ArchAstro.TokenServer.Store behaviour (archastro v0.2.0)

Copy Markdown

Optional durable backing store for the default ETS TokenServer.

Summary

Types

store_ref()

@type store_ref() :: GenServer.server() | struct() | ArchAstro.JSON.t()

Callbacks

delete(store_ref, t)

@callback delete(store_ref(), String.t()) :: :ok | {:error, ArchAstro.Error.reason()}

load(store_ref, t)

@callback load(store_ref(), String.t()) ::
  {:ok, ArchAstro.Auth.TokenSet.t()}
  | :not_found
  | {:error, ArchAstro.Error.reason()}

save(store_ref, t, t)

@callback save(store_ref(), String.t(), ArchAstro.Auth.TokenSet.t()) ::
  :ok | {:error, ArchAstro.Error.reason()}