OCSF event status.
Maps event outcome status names to their OCSF 1.8 numeric identifiers.
Used by event builders to resolve the :status keyword into the
status_id field.
See the OCSF status_id definition.
Values
| Name | ID |
|---|---|
:Unknown | 0 |
:Success | 1 |
:Failure | 2 |
:Other | 99 |
See OCSF.StatusDetail for well-known status_detail string constants
and OCSF.Severity for severity levels.
Summary
Functions
Return values formatted for Ecto.Enum.
Return the name atom for the given numeric identifier.
Return the numeric identifier for the given name atom.
Return true if the given name or identifier is valid.
Return all values as a keyword list.
Functions
@spec ecto_values() :: keyword()
Return values formatted for Ecto.Enum.
Examples
iex> OCSF.Status.ecto_values()
[Unknown: 0, Success: 1, Failure: 2, Other: 99]
Return the name atom for the given numeric identifier.
Examples
iex> OCSF.Status.name(1)
:Success
iex> OCSF.Status.name(42)
nil
Return the numeric identifier for the given name atom.
Examples
iex> OCSF.Status.uid(:Success)
1
iex> OCSF.Status.uid(:NonExistent)
nil
Return true if the given name or identifier is valid.
Examples
iex> OCSF.Status.valid?(:Success)
true
iex> OCSF.Status.valid?(1)
true
iex> OCSF.Status.valid?(:NonExistent)
false
Return all values as a keyword list.
Examples
iex> OCSF.Status.values()
[Unknown: 0, Success: 1, Failure: 2, Other: 99]