Karta. Audit
(Karta v1.0.0)
The record of what people and API keys did to the records of a server:
the actions on messages (Karta.Outbound.Actions) so far. An event says
who acted (actor/2), what they did, to which record, and the
particulars; it is written in the transaction of the action, so an
action that did not happen leaves no event, and one that happened
always does. Events are never changed; they go with their server.
Summary
Functions
The actor of a signed-in user (:user) or an API key (:api_key).
The events about a record, oldest first, at most limit (default 100).
Records that actor did action to the record subject of type
("message"), with details (a map of text and numbers), at now.
Types
@type actor() :: %{kind: String.t(), id: Ecto.UUID.t() | nil, label: String.t() | nil}
Functions
@spec actor( :user | :api_key, Karta.Accounts.User.t() | Karta.Credentials.Credential.t() ) :: actor()
The actor of a signed-in user (:user) or an API key (:api_key).
@spec for_subject(Ecto.UUID.t(), pos_integer()) :: [Karta.Audit.Event.t()]
The events about a record, oldest first, at most limit (default 100).
@spec record( Karta.Servers.Server.t(), actor(), String.t(), String.t(), Ecto.UUID.t(), map(), DateTime.t() ) :: Karta.Audit.Event.t()
Records that actor did action to the record subject of type
("message"), with details (a map of text and numbers), at now.