NLdoc.Spec.Event.Progress (NLdoc.Spec.Event v1.0.15)
View SourceThis module defines the Ecto schema for the NLdoc Event 'progress'.
Summary
Functions
This function creates a new NLdoc.Spec.Event.Progress
struct from a map of keys and values, where the keys are snake_case.
Returns a tuple with either {:ok, progress}
or {:error, changeset}
.
Types
@type t() :: %NLdoc.Spec.Event.Progress{ context: NLdoc.Spec.Event.Progress.Context.t(), timestamp: DateTime.t(), trace_id: String.t(), type: String.t() }
Functions
@spec changeset( struct(), map() ) :: Ecto.Changeset.t()
@spec new(map()) :: {:ok, t()} | {:error, Ecto.Changeset.t()}
This function creates a new NLdoc.Spec.Event.Progress
struct from a map of keys and values, where the keys are snake_case.
Returns a tuple with either {:ok, progress}
or {:error, changeset}
.
Note: If you want to use a map with camelCase keys, use NLdoc.Util.Recase.to_snake/1
to convert them to snake_case before passing them to the constructor.