Skip to main content

Class: Env

Extends

  • BaseClient

Constructors

Constructor

new Env(ctx?, _id?): Env

Constructor is used for internal usage only, do not create object from it.

Parameters

ctx?

Context

_id?

EnvID

Returns

Env

Overrides

BaseClient.constructor

Methods

id()

id(): Promise<EnvID>

A unique identifier for this Env.

Returns

Promise<EnvID>


input()

input(name): Binding

retrieve an input value by name

Parameters

name

string

Returns

Binding


inputs()

inputs(): Promise<Binding[]>

return all input values for the environment

Returns

Promise<Binding[]>


output()

output(name): Binding

retrieve an output value by name

Parameters

name

string

Returns

Binding


outputs()

outputs(): Promise<Binding[]>

return all output values for the environment

Returns

Promise<Binding[]>


with()

with(arg): Env

Call the provided function with current Env.

This is useful for reusability and readability by not breaking the calling chain.

Parameters

arg

(param) => Env

Returns

Env


withCacheVolumeInput()

withCacheVolumeInput(name, value, description): Env

Create or update a binding of type CacheVolume in the environment

Parameters

name

string

The name of the binding

value

CacheVolume

The CacheVolume value to assign to the binding

description

string

The purpose of the input

Returns

Env


withCacheVolumeOutput()

withCacheVolumeOutput(name, description): Env

Declare a desired CacheVolume output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withContainerInput()

withContainerInput(name, value, description): Env

Create or update a binding of type Container in the environment

Parameters

name

string

The name of the binding

value

Container

The Container value to assign to the binding

description

string

The purpose of the input

Returns

Env


withContainerOutput()

withContainerOutput(name, description): Env

Declare a desired Container output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withDirectoryInput()

withDirectoryInput(name, value, description): Env

Create or update a binding of type Directory in the environment

Parameters

name

string

The name of the binding

value

Directory

The Directory value to assign to the binding

description

string

The purpose of the input

Returns

Env


withDirectoryOutput()

withDirectoryOutput(name, description): Env

Declare a desired Directory output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withEnvInput()

withEnvInput(name, value, description): Env

Create or update a binding of type Env in the environment

Parameters

name

string

The name of the binding

value

Env

The Env value to assign to the binding

description

string

The purpose of the input

Returns

Env


withEnvOutput()

withEnvOutput(name, description): Env

Declare a desired Env output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withFileInput()

withFileInput(name, value, description): Env

Create or update a binding of type File in the environment

Parameters

name

string

The name of the binding

value

File

The File value to assign to the binding

description

string

The purpose of the input

Returns

Env


withFileOutput()

withFileOutput(name, description): Env

Declare a desired File output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withGitRefInput()

withGitRefInput(name, value, description): Env

Create or update a binding of type GitRef in the environment

Parameters

name

string

The name of the binding

value

GitRef

The GitRef value to assign to the binding

description

string

The purpose of the input

Returns

Env


withGitRefOutput()

withGitRefOutput(name, description): Env

Declare a desired GitRef output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withGitRepositoryInput()

withGitRepositoryInput(name, value, description): Env

Create or update a binding of type GitRepository in the environment

Parameters

name

string

The name of the binding

value

GitRepository

The GitRepository value to assign to the binding

description

string

The purpose of the input

Returns

Env


withGitRepositoryOutput()

withGitRepositoryOutput(name, description): Env

Declare a desired GitRepository output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withLLMInput()

withLLMInput(name, value, description): Env

Create or update a binding of type LLM in the environment

Parameters

name

string

The name of the binding

value

LLM

The LLM value to assign to the binding

description

string

The purpose of the input

Returns

Env


withLLMOutput()

withLLMOutput(name, description): Env

Declare a desired LLM output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withModuleConfigClientInput()

withModuleConfigClientInput(name, value, description): Env

Create or update a binding of type ModuleConfigClient in the environment

Parameters

name

string

The name of the binding

value

ModuleConfigClient

The ModuleConfigClient value to assign to the binding

description

string

The purpose of the input

Returns

Env


withModuleConfigClientOutput()

withModuleConfigClientOutput(name, description): Env

Declare a desired ModuleConfigClient output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withModuleInput()

withModuleInput(name, value, description): Env

Create or update a binding of type Module in the environment

Parameters

name

string

The name of the binding

value

Module_

The Module value to assign to the binding

description

string

The purpose of the input

Returns

Env


withModuleOutput()

withModuleOutput(name, description): Env

Declare a desired Module output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withModuleSourceInput()

withModuleSourceInput(name, value, description): Env

Create or update a binding of type ModuleSource in the environment

Parameters

name

string

The name of the binding

value

ModuleSource

The ModuleSource value to assign to the binding

description

string

The purpose of the input

Returns

Env


withModuleSourceOutput()

withModuleSourceOutput(name, description): Env

Declare a desired ModuleSource output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withSecretInput()

withSecretInput(name, value, description): Env

Create or update a binding of type Secret in the environment

Parameters

name

string

The name of the binding

value

Secret

The Secret value to assign to the binding

description

string

The purpose of the input

Returns

Env


withSecretOutput()

withSecretOutput(name, description): Env

Declare a desired Secret output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withServiceInput()

withServiceInput(name, value, description): Env

Create or update a binding of type Service in the environment

Parameters

name

string

The name of the binding

value

Service

The Service value to assign to the binding

description

string

The purpose of the input

Returns

Env


withServiceOutput()

withServiceOutput(name, description): Env

Declare a desired Service output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withSocketInput()

withSocketInput(name, value, description): Env

Create or update a binding of type Socket in the environment

Parameters

name

string

The name of the binding

value

Socket

The Socket value to assign to the binding

description

string

The purpose of the input

Returns

Env


withSocketOutput()

withSocketOutput(name, description): Env

Declare a desired Socket output to be assigned in the environment

Parameters

name

string

The name of the binding

description

string

A description of the desired value of the binding

Returns

Env


withStringInput()

withStringInput(name, value, description): Env

Create or update an input value of type string

Parameters

name

string

The name of the binding

value

string

The string value to assign to the binding

description

string

Returns

Env