View Source Arke.Core.Parameter.Integer (Arke v0.1.21)

Module that define the struct of a Integer by extending the Arke.Core.Parameter.base_parameters()

{arke_struct} = Parameter.Integer

element-added

Element added

  • min => :atom => define the mix value the parammeter could have
  • max => :atom => define the max the parammeter could have
  • values => [list] || [%{label: string, value: any}, ...] => use this to create a parameter with only certain values assignable. (Values must be the same type as the parameter we want to create)
  • multiple => boolean => relevant only if values are set. It makes possible to assign more than a values defined in values
  • default => Integer => default value

## Example

  iex> params = [id: :integer_test, min: 3, max: 7.5, values: [%{label: "option 1", value: 1}, %{label: "option 2", value: 2}]]
  ...> Arke.Core.Parameter.new(%{type: :integer, opts: params})

## Return

  %Arke.Core.Parameter.Float{}

Link to this section Summary

Link to this section Functions

Link to this function

after_get_struct(arke, struct)

View Source
Link to this function

after_get_struct(arke, unit, struct)

View Source
Link to this function

before_create(arke, unit)

View Source
Link to this function

before_delete(arke, unit)

View Source
Link to this function

before_load(data, persistence_fn)

View Source
Link to this function

before_struct_encode(_, unit)

View Source
Link to this function

before_update(arke, unit)

View Source
Link to this function

before_validate(arke, unit)

View Source
Link to this function

on_load(data, persistence_fn)

View Source
Link to this function

on_struct_encode(_, _, data, opts)

View Source