class Client extends AbstractClient

The root of the DAG.

Properties

protected AbstractClient $client from  AbstractClient
protected Client $graphQlClient from  AbstractClient

Methods

__construct(Client $clientOrConnection, QueryBuilderChain $queryBuilderChain = new QueryBuilderChain())

No description

Results
runQuery(Query $query)

No description

null|array|string|int|float|bool
queryLeaf(Query $query, string $leafKey)

No description

address(string $value)

initialize an address to load directories, containers, secrets or other object types.

cacheVolume(string $key)

Constructs a cache volume for a given cache key.

cloud()

Dagger Cloud configuration and state

container(Platform|null $platform = null)

Creates a scratch container, with no image or metadata.

currentFunctionCall()

The FunctionCall context that the SDK caller is currently executing in.

currentModule()

The module currently being served in the session, if any.

array
currentTypeDefs()

The TypeDef representations of the objects currently being served in the session.

defaultPlatform()

The default platform of the engine.

directory()

Creates an empty directory.

engine()

The Dagger engine container configuration and state

Env
env(bool|null $privileged = false, bool|null $writable = false)

Initialize a new environment

envFile(bool|null $expand = null)

Initialize an environment file

error(string $message)

Create a new error.

file(string $name, string $contents, int|null $permissions = 420)

Creates a file with the specified contents.

function(string $name, TypeDef $returnType)

Creates a function.

generatedCode(Directory $code)

Create a code generation result, given a directory containing the generated code.

git(string $url, bool|null $keepGitDir = true, string|null $sshKnownHosts = '', Socket|null $sshAuthSocket = null, string|null $httpAuthUsername = '', Secret|null $httpAuthToken = null, Secret|null $httpAuthHeader = null, Service|null $experimentalServiceHost = null)

Queries a Git repository.

host()

Queries the host environment.

http(string $url, string|null $name = null, int|null $permissions = null, Secret|null $authHeader = null, Service|null $experimentalServiceHost = null)

Returns a file containing an http remote url content.

json()

Initialize a JSON value

LLM
llm(string|null $model = null, int|null $maxAPICalls = null)

Initialize a Large Language Model (LLM)

loadAddressFromID(Address $id)

Load a Address from its ID.

loadBindingFromID(Binding $id)

Load a Binding from its ID.

loadCacheVolumeFromID(CacheVolume $id)

Load a CacheVolume from its ID.

loadChangesetFromID(Changeset $id)

Load a Changeset from its ID.

loadCloudFromID(Cloud $id)

Load a Cloud from its ID.

loadContainerFromID(Container $id)

Load a Container from its ID.

loadCurrentModuleFromID(CurrentModule $id)

Load a CurrentModule from its ID.

loadDirectoryFromID(Directory $id)

Load a Directory from its ID.

loadEngineCacheEntryFromID(EngineCacheEntry $id)

Load a EngineCacheEntry from its ID.

loadEngineCacheEntrySetFromID(EngineCacheEntrySet $id)

Load a EngineCacheEntrySet from its ID.

loadEngineCacheFromID(EngineCache $id)

Load a EngineCache from its ID.

loadEngineFromID(Engine $id)

Load a Engine from its ID.

loadEnumTypeDefFromID(EnumTypeDef $id)

Load a EnumTypeDef from its ID.

loadEnumValueTypeDefFromID(EnumValueTypeDef $id)

Load a EnumValueTypeDef from its ID.

loadEnvFileFromID(EnvFile $id)

Load a EnvFile from its ID.

Env
loadEnvFromID(Env $id)

Load a Env from its ID.

loadEnvVariableFromID(EnvVariable $id)

Load a EnvVariable from its ID.

loadErrorFromID(Error $id)

Load a Error from its ID.

loadErrorValueFromID(ErrorValue $id)

Load a ErrorValue from its ID.

loadFieldTypeDefFromID(FieldTypeDef $id)

Load a FieldTypeDef from its ID.

loadFileFromID(File $id)

Load a File from its ID.

loadFunctionArgFromID(FunctionArg $id)

Load a FunctionArg from its ID.

loadFunctionCallArgValueFromID(FunctionCallArgValue $id)

Load a FunctionCallArgValue from its ID.

loadFunctionCallFromID(FunctionCall $id)

Load a FunctionCall from its ID.

loadFunctionFromID(Function_ $id)

Load a Function from its ID.

loadGeneratedCodeFromID(GeneratedCode $id)

Load a GeneratedCode from its ID.

loadGitRefFromID(GitRef $id)

Load a GitRef from its ID.

loadGitRepositoryFromID(GitRepository $id)

Load a GitRepository from its ID.

loadHostFromID(Host $id)

Load a Host from its ID.

loadInputTypeDefFromID(InputTypeDef $id)

Load a InputTypeDef from its ID.

loadInterfaceTypeDefFromID(InterfaceTypeDef $id)

Load a InterfaceTypeDef from its ID.

loadJSONValueFromID(JsonValue $id)

Load a JSONValue from its ID.

LLM
loadLLMFromID(LLM $id)

Load a LLM from its ID.

loadLLMTokenUsageFromID(LLMTokenUsage $id)

Load a LLMTokenUsage from its ID.

loadLabelFromID(Label $id)

Load a Label from its ID.

loadListTypeDefFromID(ListTypeDef $id)

Load a ListTypeDef from its ID.

loadModuleConfigClientFromID(ModuleConfigClient $id)

Load a ModuleConfigClient from its ID.

loadModuleFromID(Module $id)

Load a Module from its ID.

loadModuleSourceFromID(ModuleSource $id)

Load a ModuleSource from its ID.

loadObjectTypeDefFromID(ObjectTypeDef $id)

Load a ObjectTypeDef from its ID.

loadPortFromID(Port $id)

Load a Port from its ID.

loadSDKConfigFromID(SDKConfig $id)

Load a SDKConfig from its ID.

loadScalarTypeDefFromID(ScalarTypeDef $id)

Load a ScalarTypeDef from its ID.

loadSearchResultFromID(SearchResult $id)

Load a SearchResult from its ID.

loadSearchSubmatchFromID(SearchSubmatch $id)

Load a SearchSubmatch from its ID.

loadSecretFromID(Secret $id)

Load a Secret from its ID.

loadServiceFromID(Service $id)

Load a Service from its ID.

loadSocketFromID(Socket $id)

Load a Socket from its ID.

loadSourceMapFromID(SourceMap $id)

Load a SourceMap from its ID.

loadTerminalFromID(Terminal $id)

Load a Terminal from its ID.

loadTypeDefFromID(TypeDef $id)

Load a TypeDef from its ID.

module()

Create a new module.

moduleSource(string $refString, string|null $refPin = '', bool|null $disableFindUp = false, bool|null $allowNotExists = false, ModuleSourceKind|null $requireKind = null)

Create a new module source instance from a source ref string

secret(string $uri, string|null $cacheKey = null)

Creates a new secret.

setSecret(string $name, string $plaintext)

Sets a secret given a user defined name to its plaintext and returns the secret.

sourceMap(string $filename, int $line, int $column)

Creates source map metadata.

typeDef()

Create a new TypeDef.

string
version()

Get the current Dagger Engine version.

Details

in AbstractClient at line 20
__construct(Client $clientOrConnection, QueryBuilderChain $queryBuilderChain = new QueryBuilderChain())

No description

Parameters

Client $clientOrConnection
QueryBuilderChain $queryBuilderChain

in AbstractClient at line 33
Results runQuery(Query $query)

No description

Parameters

Query $query

Return Value

Results

in AbstractClient at line 38
null|array|string|int|float|bool queryLeaf(Query $query, string $leafKey)

No description

Parameters

Query $query
string $leafKey

Return Value

null|array|string|int|float|bool

at line 19
Address address(string $value)

initialize an address to load directories, containers, secrets or other object types.

Parameters

string $value

Return Value

Address

at line 29
CacheVolume cacheVolume(string $key)

Constructs a cache volume for a given cache key.

Parameters

string $key

Return Value

CacheVolume

at line 39
Cloud cloud()

Dagger Cloud configuration and state

Return Value

Cloud

at line 50
Container container(Platform|null $platform = null)

Creates a scratch container, with no image or metadata.

To pull an image, follow up with the "from" function.

Parameters

Platform|null $platform

Return Value

Container

at line 64
FunctionCall currentFunctionCall()

The FunctionCall context that the SDK caller is currently executing in.

If the caller is not currently executing in a function, this will return an error.

Return Value

FunctionCall

at line 73
CurrentModule currentModule()

The module currently being served in the session, if any.

Return Value

CurrentModule

at line 82
array currentTypeDefs()

The TypeDef representations of the objects currently being served in the session.

Return Value

array

at line 91
Platform defaultPlatform()

The default platform of the engine.

Return Value

Platform

at line 100
Directory directory()

Creates an empty directory.

Return Value

Directory

at line 109
Engine engine()

The Dagger engine container configuration and state

Return Value

Engine

at line 118
Env env(bool|null $privileged = false, bool|null $writable = false)

Initialize a new environment

Parameters

bool|null $privileged
bool|null $writable

Return Value

Env

at line 133
EnvFile envFile(bool|null $expand = null)

Initialize an environment file

Parameters

bool|null $expand

Return Value

EnvFile

at line 145
Error error(string $message)

Create a new error.

Parameters

string $message

Return Value

Error

at line 155
File file(string $name, string $contents, int|null $permissions = 420)

Creates a file with the specified contents.

Parameters

string $name
string $contents
int|null $permissions

Return Value

File

at line 169
Function_ function(string $name, TypeDef $returnType)

Creates a function.

Parameters

string $name
TypeDef $returnType

Return Value

Function_

at line 180
GeneratedCode generatedCode(Directory $code)

Create a code generation result, given a directory containing the generated code.

Parameters

Directory $code

Return Value

GeneratedCode

at line 190
GitRepository git(string $url, bool|null $keepGitDir = true, string|null $sshKnownHosts = '', Socket|null $sshAuthSocket = null, string|null $httpAuthUsername = '', Secret|null $httpAuthToken = null, Secret|null $httpAuthHeader = null, Service|null $experimentalServiceHost = null)

Queries a Git repository.

Parameters

string $url
bool|null $keepGitDir
string|null $sshKnownHosts
Socket|null $sshAuthSocket
string|null $httpAuthUsername
Secret|null $httpAuthToken
Secret|null $httpAuthHeader
Service|null $experimentalServiceHost

Return Value

GitRepository

at line 229
Host host()

Queries the host environment.

Return Value

Host

at line 238
File http(string $url, string|null $name = null, int|null $permissions = null, Secret|null $authHeader = null, Service|null $experimentalServiceHost = null)

Returns a file containing an http remote url content.

Parameters

string $url
string|null $name
int|null $permissions
Secret|null $authHeader
Service|null $experimentalServiceHost

Return Value

File

at line 265
JsonValue json()

Initialize a JSON value

Return Value

JsonValue

at line 274
LLM llm(string|null $model = null, int|null $maxAPICalls = null)

Initialize a Large Language Model (LLM)

Parameters

string|null $model
int|null $maxAPICalls

Return Value

LLM

at line 289
Address loadAddressFromID(Address $id)

Load a Address from its ID.

Parameters

Address $id

Return Value

Address

at line 299
Binding loadBindingFromID(Binding $id)

Load a Binding from its ID.

Parameters

Binding $id

Return Value

Binding

at line 309
CacheVolume loadCacheVolumeFromID(CacheVolume $id)

Load a CacheVolume from its ID.

Parameters

CacheVolume $id

Return Value

CacheVolume

at line 319
Changeset loadChangesetFromID(Changeset $id)

Load a Changeset from its ID.

Parameters

Changeset $id

Return Value

Changeset

at line 329
Cloud loadCloudFromID(Cloud $id)

Load a Cloud from its ID.

Parameters

Cloud $id

Return Value

Cloud

at line 339
Container loadContainerFromID(Container $id)

Load a Container from its ID.

Parameters

Container $id

Return Value

Container

at line 349
CurrentModule loadCurrentModuleFromID(CurrentModule $id)

Load a CurrentModule from its ID.

Parameters

CurrentModule $id

Return Value

CurrentModule

at line 359
Directory loadDirectoryFromID(Directory $id)

Load a Directory from its ID.

Parameters

Directory $id

Return Value

Directory

at line 369
EngineCacheEntry loadEngineCacheEntryFromID(EngineCacheEntry $id)

Load a EngineCacheEntry from its ID.

Parameters

EngineCacheEntry $id

Return Value

EngineCacheEntry

at line 379
EngineCacheEntrySet loadEngineCacheEntrySetFromID(EngineCacheEntrySet $id)

Load a EngineCacheEntrySet from its ID.

Parameters

EngineCacheEntrySet $id

Return Value

EngineCacheEntrySet

at line 389
EngineCache loadEngineCacheFromID(EngineCache $id)

Load a EngineCache from its ID.

Parameters

EngineCache $id

Return Value

EngineCache

at line 399
Engine loadEngineFromID(Engine $id)

Load a Engine from its ID.

Parameters

Engine $id

Return Value

Engine

at line 409
EnumTypeDef loadEnumTypeDefFromID(EnumTypeDef $id)

Load a EnumTypeDef from its ID.

Parameters

EnumTypeDef $id

Return Value

EnumTypeDef

at line 419
EnumValueTypeDef loadEnumValueTypeDefFromID(EnumValueTypeDef $id)

Load a EnumValueTypeDef from its ID.

Parameters

EnumValueTypeDef $id

Return Value

EnumValueTypeDef

at line 429
EnvFile loadEnvFileFromID(EnvFile $id)

Load a EnvFile from its ID.

Parameters

EnvFile $id

Return Value

EnvFile

at line 439
Env loadEnvFromID(Env $id)

Load a Env from its ID.

Parameters

Env $id

Return Value

Env

at line 449
EnvVariable loadEnvVariableFromID(EnvVariable $id)

Load a EnvVariable from its ID.

Parameters

EnvVariable $id

Return Value

EnvVariable

at line 459
Error loadErrorFromID(Error $id)

Load a Error from its ID.

Parameters

Error $id

Return Value

Error

at line 469
ErrorValue loadErrorValueFromID(ErrorValue $id)

Load a ErrorValue from its ID.

Parameters

ErrorValue $id

Return Value

ErrorValue

at line 479
FieldTypeDef loadFieldTypeDefFromID(FieldTypeDef $id)

Load a FieldTypeDef from its ID.

Parameters

FieldTypeDef $id

Return Value

FieldTypeDef

at line 489
File loadFileFromID(File $id)

Load a File from its ID.

Parameters

File $id

Return Value

File

at line 499
FunctionArg loadFunctionArgFromID(FunctionArg $id)

Load a FunctionArg from its ID.

Parameters

FunctionArg $id

Return Value

FunctionArg

at line 509
FunctionCallArgValue loadFunctionCallArgValueFromID(FunctionCallArgValue $id)

Load a FunctionCallArgValue from its ID.

Parameters

FunctionCallArgValue $id

Return Value

FunctionCallArgValue

at line 520
FunctionCall loadFunctionCallFromID(FunctionCall $id)

Load a FunctionCall from its ID.

Parameters

FunctionCall $id

Return Value

FunctionCall

at line 530
Function_ loadFunctionFromID(Function_ $id)

Load a Function from its ID.

Parameters

Function_ $id

Return Value

Function_

at line 540
GeneratedCode loadGeneratedCodeFromID(GeneratedCode $id)

Load a GeneratedCode from its ID.

Parameters

GeneratedCode $id

Return Value

GeneratedCode

at line 550
GitRef loadGitRefFromID(GitRef $id)

Load a GitRef from its ID.

Parameters

GitRef $id

Return Value

GitRef

at line 560
GitRepository loadGitRepositoryFromID(GitRepository $id)

Load a GitRepository from its ID.

Parameters

GitRepository $id

Return Value

GitRepository

at line 570
Host loadHostFromID(Host $id)

Load a Host from its ID.

Parameters

Host $id

Return Value

Host

at line 580
InputTypeDef loadInputTypeDefFromID(InputTypeDef $id)

Load a InputTypeDef from its ID.

Parameters

InputTypeDef $id

Return Value

InputTypeDef

at line 590
InterfaceTypeDef loadInterfaceTypeDefFromID(InterfaceTypeDef $id)

Load a InterfaceTypeDef from its ID.

Parameters

InterfaceTypeDef $id

Return Value

InterfaceTypeDef

at line 600
JsonValue loadJSONValueFromID(JsonValue $id)

Load a JSONValue from its ID.

Parameters

JsonValue $id

Return Value

JsonValue

at line 610
LLM loadLLMFromID(LLM $id)

Load a LLM from its ID.

Parameters

LLM $id

Return Value

LLM

at line 620
LLMTokenUsage loadLLMTokenUsageFromID(LLMTokenUsage $id)

Load a LLMTokenUsage from its ID.

Parameters

LLMTokenUsage $id

Return Value

LLMTokenUsage

at line 630
Label loadLabelFromID(Label $id)

Load a Label from its ID.

Parameters

Label $id

Return Value

Label

at line 640
ListTypeDef loadListTypeDefFromID(ListTypeDef $id)

Load a ListTypeDef from its ID.

Parameters

ListTypeDef $id

Return Value

ListTypeDef

at line 650
ModuleConfigClient loadModuleConfigClientFromID(ModuleConfigClient $id)

Load a ModuleConfigClient from its ID.

Parameters

ModuleConfigClient $id

Return Value

ModuleConfigClient

at line 660
Module loadModuleFromID(Module $id)

Load a Module from its ID.

Parameters

Module $id

Return Value

Module

at line 670
ModuleSource loadModuleSourceFromID(ModuleSource $id)

Load a ModuleSource from its ID.

Parameters

ModuleSource $id

Return Value

ModuleSource

at line 680
ObjectTypeDef loadObjectTypeDefFromID(ObjectTypeDef $id)

Load a ObjectTypeDef from its ID.

Parameters

ObjectTypeDef $id

Return Value

ObjectTypeDef

at line 690
Port loadPortFromID(Port $id)

Load a Port from its ID.

Parameters

Port $id

Return Value

Port

at line 700
SDKConfig loadSDKConfigFromID(SDKConfig $id)

Load a SDKConfig from its ID.

Parameters

SDKConfig $id

Return Value

SDKConfig

at line 710
ScalarTypeDef loadScalarTypeDefFromID(ScalarTypeDef $id)

Load a ScalarTypeDef from its ID.

Parameters

ScalarTypeDef $id

Return Value

ScalarTypeDef

at line 720
SearchResult loadSearchResultFromID(SearchResult $id)

Load a SearchResult from its ID.

Parameters

SearchResult $id

Return Value

SearchResult

at line 730
SearchSubmatch loadSearchSubmatchFromID(SearchSubmatch $id)

Load a SearchSubmatch from its ID.

Parameters

SearchSubmatch $id

Return Value

SearchSubmatch

at line 740
Secret loadSecretFromID(Secret $id)

Load a Secret from its ID.

Parameters

Secret $id

Return Value

Secret

at line 750
Service loadServiceFromID(Service $id)

Load a Service from its ID.

Parameters

Service $id

Return Value

Service

at line 760
Socket loadSocketFromID(Socket $id)

Load a Socket from its ID.

Parameters

Socket $id

Return Value

Socket

at line 770
SourceMap loadSourceMapFromID(SourceMap $id)

Load a SourceMap from its ID.

Parameters

SourceMap $id

Return Value

SourceMap

at line 780
Terminal loadTerminalFromID(Terminal $id)

Load a Terminal from its ID.

Parameters

Terminal $id

Return Value

Terminal

at line 790
TypeDef loadTypeDefFromID(TypeDef $id)

Load a TypeDef from its ID.

Parameters

TypeDef $id

Return Value

TypeDef

at line 800
Module module()

Create a new module.

Return Value

Module

at line 809
ModuleSource moduleSource(string $refString, string|null $refPin = '', bool|null $disableFindUp = false, bool|null $allowNotExists = false, ModuleSourceKind|null $requireKind = null)

Create a new module source instance from a source ref string

Parameters

string $refString
string|null $refPin
bool|null $disableFindUp
bool|null $allowNotExists
ModuleSourceKind|null $requireKind

Return Value

ModuleSource

at line 836
Secret secret(string $uri, string|null $cacheKey = null)

Creates a new secret.

Parameters

string $uri
string|null $cacheKey

Return Value

Secret

at line 851
Secret setSecret(string $name, string $plaintext)

Sets a secret given a user defined name to its plaintext and returns the secret.

The plaintext value is limited to a size of 128000 bytes.

Parameters

string $name
string $plaintext

Return Value

Secret

at line 862
SourceMap sourceMap(string $filename, int $line, int $column)

Creates source map metadata.

Parameters

string $filename
int $line
int $column

Return Value

SourceMap

at line 874
TypeDef typeDef()

Create a new TypeDef.

Return Value

TypeDef

at line 883
string version()

Get the current Dagger Engine version.

Return Value

string