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

builtinContainer(string $digest)

Retrieves a container builtin to the engine.

cacheVolume(string $key, string|null $namespace = '')

Constructs a cache volume for a given cache key.

container(Platform|null $platform = null)

Creates a scratch container.

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

error(string $message)

Create a new error.

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, Service|null $experimentalServiceHost = null, string|null $sshKnownHosts = '', Socket|null $sshAuthSocket = null)

Queries a Git repository.

host()

Queries the host environment.

http(string $url, Service|null $experimentalServiceHost = null)

Returns a file containing an http remote url content.

loadCacheVolumeFromID(CacheVolume $id)

Load a CacheVolume 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.

loadEnvVariableFromID(EnvVariable $id)

Load a EnvVariable from its ID.

loadErrorFromID(Error $id)

Load a Error 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.

loadLabelFromID(Label $id)

Load a Label from its ID.

loadListTypeDefFromID(ListTypeDef $id)

Load a ListTypeDef 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.

loadSecretFromID(Secret $id)

Load a Secret from its ID.

loadSecretFromName(string $name, string|null $accessor = null)

Load a Secret from its Name.

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)

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
Container builtinContainer(string $digest)

Retrieves a container builtin to the engine.

Parameters

string $digest

Return Value

Container

at line 29
CacheVolume cacheVolume(string $key, string|null $namespace = '')

Constructs a cache volume for a given cache key.

Parameters

string $key
string|null $namespace

Return Value

CacheVolume

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

Creates a scratch container.

Optional platform argument initializes new containers to execute and publish as that platform. Platform defaults to that of the builder's host.

Parameters

Platform|null $platform

Return Value

Container

at line 58
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 67
CurrentModule currentModule()

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

Return Value

CurrentModule

at line 76
array currentTypeDefs()

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

Return Value

array

at line 85
Platform defaultPlatform()

The default platform of the engine.

Return Value

Platform

at line 94
Directory directory()

Creates an empty directory.

Return Value

Directory

at line 103
Engine engine()

The Dagger engine container configuration and state

Return Value

Engine

at line 112
Error error(string $message)

Create a new error.

Parameters

string $message

Return Value

Error

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

Creates a function.

Parameters

string $name
TypeDef $returnType

Return Value

Function_

at line 133
GeneratedCode generatedCode(Directory $code)

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

Parameters

Directory $code

Return Value

GeneratedCode

at line 143
GitRepository git(string $url, bool|null $keepGitDir = true, Service|null $experimentalServiceHost = null, string|null $sshKnownHosts = '', Socket|null $sshAuthSocket = null)

Queries a Git repository.

Parameters

string $url
bool|null $keepGitDir
Service|null $experimentalServiceHost
string|null $sshKnownHosts
Socket|null $sshAuthSocket

Return Value

GitRepository

at line 170
Host host()

Queries the host environment.

Return Value

Host

at line 179
File http(string $url, Service|null $experimentalServiceHost = null)

Returns a file containing an http remote url content.

Parameters

string $url
Service|null $experimentalServiceHost

Return Value

File

at line 192
CacheVolume loadCacheVolumeFromID(CacheVolume $id)

Load a CacheVolume from its ID.

Parameters

CacheVolume $id

Return Value

CacheVolume

at line 202
Container loadContainerFromID(Container $id)

Load a Container from its ID.

Parameters

Container $id

Return Value

Container

at line 212
CurrentModule loadCurrentModuleFromID(CurrentModule $id)

Load a CurrentModule from its ID.

Parameters

CurrentModule $id

Return Value

CurrentModule

at line 222
Directory loadDirectoryFromID(Directory $id)

Load a Directory from its ID.

Parameters

Directory $id

Return Value

Directory

at line 232
EngineCacheEntry loadEngineCacheEntryFromID(EngineCacheEntry $id)

Load a EngineCacheEntry from its ID.

Parameters

EngineCacheEntry $id

Return Value

EngineCacheEntry

at line 242
EngineCacheEntrySet loadEngineCacheEntrySetFromID(EngineCacheEntrySet $id)

Load a EngineCacheEntrySet from its ID.

Parameters

EngineCacheEntrySet $id

Return Value

EngineCacheEntrySet

at line 252
EngineCache loadEngineCacheFromID(EngineCache $id)

Load a EngineCache from its ID.

Parameters

EngineCache $id

Return Value

EngineCache

at line 262
Engine loadEngineFromID(Engine $id)

Load a Engine from its ID.

Parameters

Engine $id

Return Value

Engine

at line 272
EnumTypeDef loadEnumTypeDefFromID(EnumTypeDef $id)

Load a EnumTypeDef from its ID.

Parameters

EnumTypeDef $id

Return Value

EnumTypeDef

at line 282
EnumValueTypeDef loadEnumValueTypeDefFromID(EnumValueTypeDef $id)

Load a EnumValueTypeDef from its ID.

Parameters

EnumValueTypeDef $id

Return Value

EnumValueTypeDef

at line 292
EnvVariable loadEnvVariableFromID(EnvVariable $id)

Load a EnvVariable from its ID.

Parameters

EnvVariable $id

Return Value

EnvVariable

at line 302
Error loadErrorFromID(Error $id)

Load a Error from its ID.

Parameters

Error $id

Return Value

Error

at line 312
FieldTypeDef loadFieldTypeDefFromID(FieldTypeDef $id)

Load a FieldTypeDef from its ID.

Parameters

FieldTypeDef $id

Return Value

FieldTypeDef

at line 322
File loadFileFromID(File $id)

Load a File from its ID.

Parameters

File $id

Return Value

File

at line 332
FunctionArg loadFunctionArgFromID(FunctionArg $id)

Load a FunctionArg from its ID.

Parameters

FunctionArg $id

Return Value

FunctionArg

at line 342
FunctionCallArgValue loadFunctionCallArgValueFromID(FunctionCallArgValue $id)

Load a FunctionCallArgValue from its ID.

Parameters

FunctionCallArgValue $id

Return Value

FunctionCallArgValue

at line 353
FunctionCall loadFunctionCallFromID(FunctionCall $id)

Load a FunctionCall from its ID.

Parameters

FunctionCall $id

Return Value

FunctionCall

at line 363
Function_ loadFunctionFromID(Function_ $id)

Load a Function from its ID.

Parameters

Function_ $id

Return Value

Function_

at line 373
GeneratedCode loadGeneratedCodeFromID(GeneratedCode $id)

Load a GeneratedCode from its ID.

Parameters

GeneratedCode $id

Return Value

GeneratedCode

at line 383
GitRef loadGitRefFromID(GitRef $id)

Load a GitRef from its ID.

Parameters

GitRef $id

Return Value

GitRef

at line 393
GitRepository loadGitRepositoryFromID(GitRepository $id)

Load a GitRepository from its ID.

Parameters

GitRepository $id

Return Value

GitRepository

at line 403
Host loadHostFromID(Host $id)

Load a Host from its ID.

Parameters

Host $id

Return Value

Host

at line 413
InputTypeDef loadInputTypeDefFromID(InputTypeDef $id)

Load a InputTypeDef from its ID.

Parameters

InputTypeDef $id

Return Value

InputTypeDef

at line 423
InterfaceTypeDef loadInterfaceTypeDefFromID(InterfaceTypeDef $id)

Load a InterfaceTypeDef from its ID.

Parameters

InterfaceTypeDef $id

Return Value

InterfaceTypeDef

at line 433
Label loadLabelFromID(Label $id)

Load a Label from its ID.

Parameters

Label $id

Return Value

Label

at line 443
ListTypeDef loadListTypeDefFromID(ListTypeDef $id)

Load a ListTypeDef from its ID.

Parameters

ListTypeDef $id

Return Value

ListTypeDef

at line 453
Module loadModuleFromID(Module $id)

Load a Module from its ID.

Parameters

Module $id

Return Value

Module

at line 463
ModuleSource loadModuleSourceFromID(ModuleSource $id)

Load a ModuleSource from its ID.

Parameters

ModuleSource $id

Return Value

ModuleSource

at line 473
ObjectTypeDef loadObjectTypeDefFromID(ObjectTypeDef $id)

Load a ObjectTypeDef from its ID.

Parameters

ObjectTypeDef $id

Return Value

ObjectTypeDef

at line 483
Port loadPortFromID(Port $id)

Load a Port from its ID.

Parameters

Port $id

Return Value

Port

at line 493
SDKConfig loadSDKConfigFromID(SDKConfig $id)

Load a SDKConfig from its ID.

Parameters

SDKConfig $id

Return Value

SDKConfig

at line 503
ScalarTypeDef loadScalarTypeDefFromID(ScalarTypeDef $id)

Load a ScalarTypeDef from its ID.

Parameters

ScalarTypeDef $id

Return Value

ScalarTypeDef

at line 513
Secret loadSecretFromID(Secret $id)

Load a Secret from its ID.

Parameters

Secret $id

Return Value

Secret

at line 523
Secret loadSecretFromName(string $name, string|null $accessor = null)

Load a Secret from its Name.

Parameters

string $name
string|null $accessor

Return Value

Secret

at line 536
Service loadServiceFromID(Service $id)

Load a Service from its ID.

Parameters

Service $id

Return Value

Service

at line 546
Socket loadSocketFromID(Socket $id)

Load a Socket from its ID.

Parameters

Socket $id

Return Value

Socket

at line 556
SourceMap loadSourceMapFromID(SourceMap $id)

Load a SourceMap from its ID.

Parameters

SourceMap $id

Return Value

SourceMap

at line 566
Terminal loadTerminalFromID(Terminal $id)

Load a Terminal from its ID.

Parameters

Terminal $id

Return Value

Terminal

at line 576
TypeDef loadTypeDefFromID(TypeDef $id)

Load a TypeDef from its ID.

Parameters

TypeDef $id

Return Value

TypeDef

at line 586
Module module()

Create a new module.

Return Value

Module

at line 595
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 622
Secret secret(string $uri)

Creates a new secret.

Parameters

string $uri

Return Value

Secret

at line 634
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 645
SourceMap sourceMap(string $filename, int $line, int $column)

Creates source map metadata.

Parameters

string $filename
int $line
int $column

Return Value

SourceMap

at line 657
TypeDef typeDef()

Create a new TypeDef.

Return Value

TypeDef

at line 666
string version()

Get the current Dagger Engine version.

Return Value

string