View Source Dagger.Function (dagger v0.11.2)
Function represents a resolver provided by a Module.
A function always evaluates against a parent object and is given a set of named arguments.
Link to this section Summary
Functions
Arguments accepted by the function, if any.
A doc string for the function, if any.
A unique identifier for this Function.
The name of the function.
The type returned by the function.
Returns the function with the provided argument
Returns the function with the given doc string.
Link to this section Types
Link to this section Functions
@spec args(t()) :: {:ok, [Dagger.FunctionArg.t()]} | {:error, term()}
Arguments accepted by the function, if any.
A doc string for the function, if any.
@spec id(t()) :: {:ok, Dagger.FunctionID.t()} | {:error, term()}
A unique identifier for this Function.
The name of the function.
@spec return_type(t()) :: Dagger.TypeDef.t()
The type returned by the function.
@spec with_arg(t(), String.t(), Dagger.TypeDef.t(), description: String.t() | nil, default_value: Dagger.JSON.t() | nil ) :: t()
Returns the function with the provided argument
Returns the function with the given doc string.