dagger/dsl/env_file
Types
Values
pub fn env_file() -> types.EnvFile
pub fn exists(
parent: types.EnvFile,
name name: String,
client client: types.Client,
then handler: fn(Result(Bool, types.QueryError)) -> a,
) -> a
Check if a variable exists
pub fn get(
parent: types.EnvFile,
name name: String,
with with_fn: fn(Opts) -> Opts,
client client: types.Client,
then handler: fn(Result(String, types.QueryError)) -> a,
) -> a
Lookup a variable (last occurrence wins) and return its value, or an empty string
pub fn namespace(
parent: types.EnvFile,
prefix prefix: String,
) -> types.EnvFile
Filters variables by prefix and removes the pref from keys. Variables without the prefix are excluded. For example, with the prefix “MY_APP_” and variables: MY_APP_TOKEN=topsecret MY_APP_NAME=hello FOO=bar the resulting environment will contain: TOKEN=topsecret NAME=hello
pub fn variables(
parent: types.EnvFile,
with with_fn: fn(Opts) -> Opts,
select select: fn(types.EnvVariable) -> List(types.Field),
client client: types.Client,
then handler: fn(
Result(List(types.EnvVariable), types.QueryError),
) -> a,
) -> a
Return all variables
pub fn with_variable(
parent: types.EnvFile,
name name: String,
value value: String,
) -> types.EnvFile
Add a variable
pub fn without_variable(
parent: types.EnvFile,
name name: String,
) -> types.EnvFile
Remove all occurrences of the named variable