Auctoritas v0.4.0 Auctoritas.DataStorage.Data View Source

Link to this section Summary

Types

Token expiration in seconds

When was token inserted (UNIX Epoch time)

t()

Data struct with data and metadata maps

  • data is data associated when inserting token into data_storage
  • metadata contains inserted_at, updated_at, expires_in time inserted when using get_token_data function from data_storage

When was token updated (UNIX Epoch time)

Link to this section Types

Token expiration in seconds

Link to this type

inserted_at() View Source
inserted_at() :: non_neg_integer()

When was token inserted (UNIX Epoch time)

Link to this type

metadata() View Source
metadata() :: %{
  inserted_at: inserted_at(),
  updated_at: updated_at(),
  expires_in: expiration()
}

Link to this type

t() View Source
t() :: %Auctoritas.DataStorage.Data{data: map(), metadata: metadata()}

Data struct with data and metadata maps

  • data is data associated when inserting token into data_storage
  • metadata contains inserted_at, updated_at, expires_in time inserted when using get_token_data function from data_storage

When was token updated (UNIX Epoch time)

Link to this section Functions

Link to this function

add_expiration(data, expiration) View Source
add_expiration(
  data :: %Auctoritas.DataStorage.Data{data: term(), metadata: term()},
  expiration :: expiration()
) :: %Auctoritas.DataStorage.Data{data: term(), metadata: term()}

Link to this function

initial_metadata(expiration) View Source
initial_metadata(expiration :: expiration()) :: metadata()

Link to this function

new(data_map) View Source
new(data_map :: map()) :: %Auctoritas.DataStorage.Data{
  data: term(),
  metadata: term()
}

Link to this function

new(data, expiration) View Source
new(data :: map(), expiration :: expiration()) :: %Auctoritas.DataStorage.Data{
  data: term(),
  metadata: term()
}

Link to this function

update_data(data, new_data) View Source
update_data(
  data :: %Auctoritas.DataStorage.Data{data: term(), metadata: term()},
  data :: map()
) :: %Auctoritas.DataStorage.Data{data: term(), metadata: term()}

Link to this function

update_metadata(data, new_metadata) View Source
update_metadata(
  data :: %Auctoritas.DataStorage.Data{data: term(), metadata: term()},
  new_metadata :: map()
) :: %Auctoritas.DataStorage.Data{data: term(), metadata: term()}