CoderRing.Memo (CoderRing v0.2.3) View Source

Schema for a coder ring state.

Link to this section Summary

Types

t()
  • :name - Name of the code type. (eg. "rx")
  • :extra - Additional prefix last used by the caller. If we get a new one, :uniquizer_num is reset to 0 and the ring is reset.
  • :uniquizer_num - A number to be passed to integer_to_string/1 for an extra value to be used between :caller_extra and the base code.
  • :last_max_pos - Position of the code record last used as "max".

Functions

Changeset for creating a new memo.

Create a new Memo struct.

Changeset for updating an existing memo.

Link to this section Types

Specs

t() :: %CoderRing.Memo{
  __meta__: term(),
  extra: String.t(),
  last_max_pos: non_neg_integer(),
  name: String.t(),
  uniquizer_num: non_neg_integer()
}
  • :name - Name of the code type. (eg. "rx")
  • :extra - Additional prefix last used by the caller. If we get a new one, :uniquizer_num is reset to 0 and the ring is reset.
  • :uniquizer_num - A number to be passed to integer_to_string/1 for an extra value to be used between :caller_extra and the base code.
  • :last_max_pos - Position of the code record last used as "max".

Link to this section Functions

Link to this function

changeset(memo_or_changeset, params)

View Source

Specs

changeset(t() | Ecto.Changeset.t(), map()) :: Ecto.Changeset.t()

Changeset for creating a new memo.

Specs

new(keyword()) :: t()

Create a new Memo struct.

Link to this function

update_changeset(memo_or_changeset, params \\ %{})

View Source

Specs

update_changeset(t() | Ecto.Changeset.t(), map()) :: Ecto.Changeset.t()

Changeset for updating an existing memo.