Cased (cased v1.0.0)
Documentation for Cased.
Link to this section Summary
Functions
Publish an audit event to Cased.
Publish an audit event to Cased, raising an exception in the event of failure.
Link to this section Types
Link to this type
publish_opt()
Specs
publish_opt() :: {:publishers, [GenServer.server()]} | {:handlers, [Cased.Sensitive.Handler.t() | Cased.Sensitive.Handler.spec()]}
Link to this type
publish_opts()
Specs
publish_opts() :: [publish_opt()]
Options when publishing.
:publishers
, the list of publisher pids (defaults to[Cased.Publisher.Datadog]
).:handlers
, the list of sensitive data handlers (defaults to[]
); seeCased.Sensitive.Handler
.
Link to this section Functions
Link to this function
publish(audit_event, opts \\ [])
Specs
publish(audit_event :: map(), opts :: publish_opts()) :: :ok | {:error, Jason.EncodeError.t() | Exception.t()}
Publish an audit event to Cased.
Note: Uses GenServer.call/3
to send events to publisher processes.
%{
action: "credit_card.charge",
amount: 2000,
currency: "usd",
source: "tok_amex",
description: "My First Test Charge (created for API docs)",
credit_card_id: "card_1dQpXqQwXxsQs9sohN9HrzRAV6y"
}
|> Cased.publish()
Link to this function
publish!(data, opts \\ [])
Specs
publish!(data :: term(), opts :: publish_opts()) :: :ok | no_return()
Publish an audit event to Cased, raising an exception in the event of failure.