VerifiedPubSub.Dsl.Field (VerifiedPubSub v0.1.0)

Copy Markdown View Source

A payload field that a manifest declares.

Summary

Types

t()

The fields of the field

The type of a field. Each value is one of these

Types

t()

@type t() :: %VerifiedPubSub.Dsl.Field{
  __identifier__: term(),
  __spark_metadata__: term(),
  description: String.t() | nil,
  name: atom(),
  required: boolean(),
  type: type()
}

The fields of the field:

  • name: the key of the field in the payload.
  • type: the type of the value.
  • required: whether the payload must hold the key with a value that is not nil.
  • description: the description, or nil.
  • __identifier__ and __spark_metadata__: Spark sets these.

type()

@type type() :: atom() | {:list, type()}

The type of a field. Each value is one of these:

  • a primitive: :string, :integer, :float, :boolean, :atom, :map, :list, or :any
  • a {:list, type} tuple
  • a struct module