Polyjuice Client v0.1.0 Polyjuice.Client.Storage protocol View Source

Persistent storage for the Matrix client

Link to this section Summary

Types

t()

Safe values to use for key-value storage. All storage must support at least these types.

Functions

Close the storage.

Get the latest sync token, or nil if no sync token has been set.

Get the data for a specific key.

Store data for a specific key.

Set the sync token.

Link to this section Types

Link to this type

value()

View Source
value() ::
  true
  | false
  | nil
  | String.t()
  | float()
  | [value(), ...]
  | %{optional(String.t()) => value()}

Safe values to use for key-value storage. All storage must support at least these types.

Link to this section Functions

Close the storage.

Get the latest sync token, or nil if no sync token has been set.

Link to this function

kv_get(storage, key, default \\ nil)

View Source

Get the data for a specific key.

Link to this function

kv_put(storage, key, value)

View Source

Store data for a specific key.

Link to this function

set_sync_token(storage, token)

View Source

Set the sync token.