Arke.System (Arke v0.6.2)

Copy Markdown View Source

Summary

Functions

Macro to create an arke struct with the given parameters. Usable only via code and not iex.

Macro used to define parameter in an arke. See example above arke/2

Macro used to define parameter in an arke. See example above arke/2

Functions

arke(opts \\ [], list)

(macro)
@spec arke(args :: list(), Macro.t()) :: %{}

Macro to create an arke struct with the given parameters. Usable only via code and not iex.

Example

arke  do
  parameter :custom_parameter, :string, required: true, unique: true
  parameter :custom_parameter2, :string, required: true, values: ["value1", "value2"]
  parameter :custom_parameter3, :integer, required: true, values: [%{label: "option 1", value: 1},%{label: "option 2", value: 2}]
  parameter :custom_parameter4, :dict, required: true, default: %{"default_dict_key": "default_dict_value"}
end

Return

%Arke.Core.'{arke_struct}'{}

group(id, opts \\ [])

(macro)
@spec group(id :: atom(), opts :: list()) :: Macro.t()

Macro used to define parameter in an arke. See example above arke/2

parameter(id, type, opts \\ [])

(macro)
@spec parameter(id :: atom(), type :: atom(), opts :: list()) :: Macro.t()

Macro used to define parameter in an arke. See example above arke/2