Cased.Event (cased v1.0.0)
Data modeling a Cased audit event.
Link to this section Summary
Functions
Build a request to retrieve an event.
Build a request to retrieve events from an audit trail.
Link to this section Types
Link to this type
get_opt()
Specs
Link to this type
get_opts()
Specs
get_opts() :: [get_opt()]
Link to this type
query_opt()
Specs
query_opt() :: {:phrase, String.t()} | {:key, String.t()} | {:variables, keyword()} | {:per_page, pos_integer()} | {:page, pos_integer()}
Link to this type
query_opts()
Specs
query_opts() :: [query_opt()]
Specs
t() :: %Cased.Event{ audit_trail: Cased.AuditTrail.t(), data: %{required(String.t()) => any()}, id: String.t(), processed_at: DateTime.t(), published_at: DateTime.t(), url: String.t() }
Link to this section Functions
Link to this function
get(client, event_id, opts \\ [])
Specs
get(client :: Cased.Client.t(), event_id :: String.t(), opts :: get_opts()) :: Cased.Request.t() | no_return()
Build a request to retrieve an event.
Options
All optional:
:audit_trail
— The audit trail, used to ensure the event comes from the given audit trail.:key
— A Cased policy key allowing access to events.
If :key
is omitted:
- If an
:audit_trail
is provided, the key configured on the client for that audit trail will be used. - If an
:audit_trail
is not provided, the key configured on the client for the:default
audit trail will be used.
If :audit_trail
is omitted, the :default
audit trail is assumed.
Link to this function
query(client, opts \\ [])
Specs
query(client :: Cased.Client.t(), opts :: query_opts()) :: Cased.Request.t() | no_return()
Build a request to retrieve events from an audit trail.
Options
:phrase
— The search phrase.:audit_trail
— The audit trail.:key
— A Cased policy key allowing access to events.:variables
— Cased Policy variables.:per_page
— Number of results per page (default:25
).:page
— Requested page (default:1
).
If :key
is omitted:
- If an
:audit_trail
is provided, the key configured on the client for that audit trail will be used. - If an
:audit_trail
is not provided, the key configured on the client for the:default
audit trail will be used.