ExPlain.Actor (ExPlain v0.3.0)

Copy Markdown View Source

Represents who performed an action in Plain.

The :type field discriminates the variant:

  • :user — a workspace user (agent). :user_id is set.
  • :customer — a customer. :customer_id is set.
  • :machine_user — an API key / machine user. :machine_user_id is set.
  • :system — the Plain system itself.
  • :deleted_customer — a customer that has since been deleted. :customer_id is set.

Summary

Types

actor_type()

@type actor_type() :: :user | :customer | :machine_user | :system | :deleted_customer

t()

@type t() :: %ExPlain.Actor{
  customer_id: String.t() | nil,
  machine_user_id: String.t() | nil,
  type: actor_type(),
  user_id: String.t() | nil
}