ChoreRunner.Input (chore_runner v0.1.4)

Link to this section Summary

Link to this section Types

Link to this type

input_options()

Specs

input_options() :: [validators: [validator_function()], description: String.t()]
Link to this type

input_type()

Specs

input_type() :: :string | :int | :float | :file | :bool

Specs

reason() :: atom() | String.t()

Specs

t() :: {input_type(), atom(), input_options()}
Link to this type

validator_function()

Specs

validator_function() ::
  (term() -> {:ok, term()} | :ok | true | {:error, reason()} | nil | false)

Link to this section Functions

Link to this function

bool(name, opts \\ [])

Specs

bool(atom(), input_options()) :: t()
Link to this function

file(name, opts \\ [])

Specs

file(atom(), input_options()) :: t()
Link to this function

float(name, opts \\ [])

Specs

float(atom(), input_options()) :: t()
Link to this function

int(name, opts \\ [])

Specs

int(atom(), input_options()) :: t()
Link to this function

string(name, opts \\ [])

Specs

string(atom(), input_options()) :: t()
Link to this macro

valid_type(type)

(macro)
Link to this function

validate_field(type, value)