View Source Flagsmith.Schemas.Traits.Trait (flagsmith_engine v0.1.8)

Ecto schema representing a Flagsmith trait definition and helpers to cast responses from the api.

Link to this section Summary

Link to this section Types

Specs

from_types() :: t() | map() | [t() | map()]

Specs

t() :: %Flagsmith.Schemas.Traits.Trait{
  id: integer() | nil,
  trait_key: String.t() | nil,
  trait_value: Flagsmith.Schemas.Traits.Trait.Value.t() | nil
}

Link to this section Functions

Link to this function

changeset(struct \\ %__MODULE__{}, params)

View Source

Specs

changeset(t(), map()) :: Ecto.Changeset.t()
Link to this function

extract_trait_value(key, traits)

View Source

Specs

extract_trait_value(String.t(), [t()]) :: {:ok, term()} | {:error, :not_found}

Specs

from(from_types()) :: [t()] | t()

Specs

into_update_map([t()]) :: map()