dagger/dsl/function

Types

pub type ForWithArg
pub type ForWithCachePolicy
pub type ForWithDeprecated
pub opaque type Opts(tag_)

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 id(parent: types.Function) -> types.Function

A unique identifier for this 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 none(opts: Opts(a)) -> Opts(a)
pub fn opt_default_address(
  opts: Opts(ForWithArg),
  val: String,
) -> Opts(ForWithArg)
pub fn opt_default_path(
  opts: Opts(ForWithArg),
  val: String,
) -> Opts(ForWithArg)
pub fn opt_default_value(
  opts: Opts(ForWithArg),
  val: String,
) -> Opts(ForWithArg)
pub fn opt_deprecated(
  opts: Opts(ForWithArg),
  val: String,
) -> Opts(ForWithArg)
pub fn opt_description(
  opts: Opts(ForWithArg),
  val: String,
) -> Opts(ForWithArg)
pub fn opt_ignore(
  opts: Opts(ForWithArg),
  val: List(String),
) -> Opts(ForWithArg)
pub fn opt_reason(
  opts: Opts(ForWithDeprecated),
  val: String,
) -> Opts(ForWithDeprecated)
pub fn opt_source_map(
  opts: Opts(ForWithArg),
  val: types.SourceMap,
) -> Opts(ForWithArg)
pub fn opt_time_to_live(
  opts: Opts(ForWithCachePolicy),
  val: String,
) -> Opts(ForWithCachePolicy)
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(ForWithArg)) -> Opts(ForWithArg),
) -> 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(ForWithCachePolicy)) -> Opts(
    ForWithCachePolicy,
  ),
) -> 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(ForWithDeprecated)) -> Opts(
    ForWithDeprecated,
  ),
) -> 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.

Search Document