dagger/dsl/function
Types
pub type Opts {
Opts(
description: option.Option(String),
default_value: option.Option(String),
default_path: option.Option(String),
ignore: option.Option(List(String)),
source_map: option.Option(types.SourceMap),
deprecated: option.Option(String),
default_address: option.Option(String),
time_to_live: option.Option(String),
reason: option.Option(String),
)
}
Constructors
-
Opts( description: option.Option(String), default_value: option.Option(String), default_path: option.Option(String), ignore: option.Option(List(String)), source_map: option.Option(types.SourceMap), deprecated: option.Option(String), default_address: option.Option(String), time_to_live: option.Option(String), reason: option.Option(String), )
Values
pub fn args(
parent: types.Function,
select select: fn(types.FunctionArg) -> List(types.Field),
client client: types.Client,
then handler: fn(
Result(List(types.FunctionArg), types.QueryError),
) -> a,
) -> a
Arguments accepted by the function, if any.
pub fn deprecated(
parent: types.Function,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The reason this function is deprecated, if any.
pub fn description(
parent: types.Function,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
A doc string for the function, if any.
pub fn function(
name name: String,
return_type return_type: types.TypeDef,
) -> types.Function
pub fn name(
parent: types.Function,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
The name of the function.
pub fn opt_source_map(opts: Opts, val: types.SourceMap) -> Opts
pub fn return_type(parent: types.Function) -> types.TypeDef
The type returned by the function.
pub fn source_map(parent: types.Function) -> types.SourceMap
The location of this function declaration.
pub fn with_arg(
parent: types.Function,
name name: String,
type_def type_def: types.TypeDef,
with with_fn: fn(Opts) -> Opts,
) -> types.Function
Returns the function with the provided argument
pub fn with_cache_policy(
parent: types.Function,
policy policy: types.FunctionCachePolicy,
with with_fn: fn(Opts) -> Opts,
) -> types.Function
Returns the function updated to use the provided cache policy.
pub fn with_check(parent: types.Function) -> types.Function
Returns the function with a flag indicating it’s a check.
pub fn with_deprecated(
parent: types.Function,
with with_fn: fn(Opts) -> Opts,
) -> types.Function
Returns the function with the provided deprecation reason.
pub fn with_description(
parent: types.Function,
description description: String,
) -> types.Function
Returns the function with the given doc string.
pub fn with_generator(parent: types.Function) -> types.Function
Returns the function with a flag indicating it’s a generator.
pub fn with_source_map(
parent: types.Function,
source_map source_map: types.SourceMap,
) -> types.Function
Returns the function with the given source map.