runlet v1.0.0 Runlet.History

Runlet command history tracked by user

Link to this section Summary

Functions

Add an item into a user's history.

Complete history for a user.

Delete an item or items from a user's history.

Return the history for a user corresponding to a number or a list of numbers.

Link to this section Types

Link to this type

t()

t() :: {binary(), any()}

Link to this section Functions

Link to this function

add(user, key, val)

add(binary(), binary(), any()) :: :ok | {:error, any()}

Add an item into a user's history.

Link to this function

all(user)

all(binary()) :: [binary()]

Complete history for a user.

Link to this function

delete(user, index)

delete(binary(), integer() | [integer()]) :: :ok | {:error, any()}

Delete an item or items from a user's history.

Link to this function

lookup(user, index)

lookup(binary(), integer() | [integer()]) :: nil | t()

Return the history for a user corresponding to a number or a list of numbers.