Chronicle.Identities (cratis_chronicle v2.2.0)

Copy Markdown View Source

Manager operations for identities known to Chronicle.

Distinct from Chronicle.Identity, which represents a single identity value travelling with a state change; this module performs administrative operations against the identities the kernel has observed.

Options

  • :client — the client name (default: Chronicle.Client)
  • :namespace — overrides the client's default namespace

Summary

Functions

Renames the name of an identity, identified by its subject.

Functions

rename(subject, name, opts \\ [])

@spec rename(String.t(), String.t(), keyword()) :: :ok | {:error, term()}

Renames the name of an identity, identified by its subject.

The subject is the stable identifier of the identity - the name is the display name and can change over time, for instance when a person changes their name. Renaming an identity affects every event and read model that refers to the identity, as the name is resolved from the identity itself and not stored with what refers to it.