ArchAstro. TokenServer. Store behaviour
(archastro v0.2.0)
Copy Markdown
Optional durable backing store for the default ETS TokenServer.
Summary
Types
@type store_ref() :: GenServer.server() | struct() | ArchAstro.JSON.t()
Callbacks
@callback delete(store_ref(), String.t()) :: :ok | {:error, ArchAstro.Error.reason()}
@callback load(store_ref(), String.t()) :: {:ok, ArchAstro.Auth.TokenSet.t()} | :not_found | {:error, ArchAstro.Error.reason()}
@callback save(store_ref(), String.t(), ArchAstro.Auth.TokenSet.t()) :: :ok | {:error, ArchAstro.Error.reason()}