AshOps.Task.ArgSchema (ash_ops v0.2.3)
A struct which contains information about the arguments a task expects to receive.
Summary
Functions
Add a switch to the arguments
Append a positional argument to the end of the argument list
Return the default arguments that all tasks expect to take.
Parse and validate the command-line arguments.
Prepend a positional argument to the beginning argument list
Remove a positional argument by name.
Remove a switch from the argument schemas
Display usage information about the arguments
Types
@type t() :: %AshOps.Task.ArgSchema{ op_schema: OptionParser.options(), so_schema: Spark.Options.schema() }
Functions
Add a switch to the arguments
Arguments
name
the name of the switch - this will be dasherised byOptionParser
.op_type
the type to cast the argument to (as perOptionParser.parse/2
).so_schema
theSpark.Options
schema fragment for to validate the resulting input.help_text
the text to display when asked to render usage information.aliases
a list of "short name" aliases for the switch.
Append a positional argument to the end of the argument list
ie after any action arguments taken by the task.
@spec default(AshOps.entity()) :: t()
Return the default arguments that all tasks expect to take.
@spec parse(t(), OptionParser.argv()) :: {:ok, %{required(atom()) => any()}} | {:error, any()}
Parse and validate the command-line arguments.
Prepend a positional argument to the beginning argument list
ie before any action arguments taken by the task.
Remove a positional argument by name.
Remove a switch from the argument schemas
@spec usage(AshOps.entity(), t()) :: String.t()
Display usage information about the arguments