Atex.IdentityResolver.Cache behaviour (atex v0.3.0)
View SourceSummary
Callbacks
Get the child specification for starting the cache in a supervision tree.
Delete an identity in the cache.
Retrieve an identity from the cache by DID or handle.
Add a new identity to the cache. Can also be used to update an identity that may already exist.
Functions
See Atex.IdentityResolver.Cache.ETS.get/1
.
Callbacks
@callback child_spec(any()) :: Supervisor.child_spec()
Get the child specification for starting the cache in a supervision tree.
@callback delete(String.t()) :: :noop | Atex.IdentityResolver.Identity.t()
Delete an identity in the cache.
@callback get(String.t()) :: {:ok, Atex.IdentityResolver.Identity.t()} | {:error, atom()}
Retrieve an identity from the cache by DID or handle.
@callback insert(identity :: Atex.IdentityResolver.Identity.t()) :: Atex.IdentityResolver.Identity.t()
Add a new identity to the cache. Can also be used to update an identity that may already exist.
Returns the input Atex.IdentityResolver.Identity.t/0
.