Client
class Client extends AbstractClient
The root of the DAG.
Properties
protected AbstractClient | $client | from AbstractClient | |
protected Client | $graphQlClient | from AbstractClient |
Methods
No description
No description
initialize an address to load directories, containers, secrets or other object types.
Constructs a cache volume for a given cache key.
Creates a scratch container, with no image or metadata.
The FunctionCall context that the SDK caller is currently executing in.
The module currently being served in the session, if any.
The TypeDef representations of the objects currently being served in the session.
The default platform of the engine.
Creates a file with the specified contents.
Create a code generation result, given a directory containing the generated code.
Queries a Git repository.
Returns a file containing an http remote url content.
Initialize a Large Language Model (LLM)
Load a Address from its ID.
Load a Binding from its ID.
Load a CacheVolume from its ID.
Load a Changeset from its ID.
Load a Cloud from its ID.
Load a Container from its ID.
Load a CurrentModule from its ID.
Load a Directory from its ID.
Load a EngineCacheEntry from its ID.
Load a EngineCacheEntrySet from its ID.
Load a EngineCache from its ID.
Load a Engine from its ID.
Load a EnumTypeDef from its ID.
Load a EnumValueTypeDef from its ID.
Load a EnvFile from its ID.
Load a Env from its ID.
Load a EnvVariable from its ID.
Load a Error from its ID.
Load a ErrorValue from its ID.
Load a FieldTypeDef from its ID.
Load a File from its ID.
Load a FunctionArg from its ID.
Load a FunctionCallArgValue from its ID.
Load a FunctionCall from its ID.
Load a Function from its ID.
Load a GeneratedCode from its ID.
Load a GitRef from its ID.
Load a GitRepository from its ID.
Load a Host from its ID.
Load a InputTypeDef from its ID.
Load a InterfaceTypeDef from its ID.
Load a JSONValue from its ID.
Load a LLM from its ID.
Load a LLMTokenUsage from its ID.
Load a Label from its ID.
Load a ListTypeDef from its ID.
Load a ModuleConfigClient from its ID.
Load a Module from its ID.
Load a ModuleSource from its ID.
Load a ObjectTypeDef from its ID.
Load a Port from its ID.
Load a SDKConfig from its ID.
Load a ScalarTypeDef from its ID.
Load a SearchResult from its ID.
Load a SearchSubmatch from its ID.
Load a Secret from its ID.
Load a Service from its ID.
Load a Socket from its ID.
Load a SourceMap from its ID.
Load a Terminal from its ID.
Load a TypeDef from its ID.
Create a new module source instance from a source ref string
Sets a secret given a user defined name to its plaintext and returns the secret.
Get the current Dagger Engine version.
Details
in
AbstractClient at line 20
__construct(Client $clientOrConnection, QueryBuilderChain $queryBuilderChain = new QueryBuilderChain())
No description
in
AbstractClient at line 33
Results
runQuery(Query $query)
No description
in
AbstractClient at line 38
null|array|string|int|float|bool
queryLeaf(Query $query, string $leafKey)
No description
at line 19
Address
address(string $value)
initialize an address to load directories, containers, secrets or other object types.
at line 29
CacheVolume
cacheVolume(string $key)
Constructs a cache volume for a given cache key.
at line 39
Cloud
cloud()
Dagger Cloud configuration and state
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.
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.
at line 73
CurrentModule
currentModule()
The module currently being served in the session, if any.
at line 82
array
currentTypeDefs()
The TypeDef representations of the objects currently being served in the session.
at line 91
Platform
defaultPlatform()
The default platform of the engine.
at line 100
Directory
directory()
Creates an empty directory.
at line 109
Engine
engine()
The Dagger engine container configuration and state
at line 118
Env
env(bool|null $privileged = false, bool|null $writable = false)
Initialize a new environment
at line 133
EnvFile
envFile(bool|null $expand = null)
Initialize an environment file
at line 145
Error
error(string $message)
Create a new error.
at line 155
File
file(string $name, string $contents, int|null $permissions = 420)
Creates a file with the specified contents.
at line 169
Function_
function(string $name, TypeDef $returnType)
Creates a function.
at line 180
GeneratedCode
generatedCode(Directory $code)
Create a code generation result, given a directory containing the generated code.
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.
at line 229
Host
host()
Queries the host environment.
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.
at line 265
JsonValue
json()
Initialize a JSON value
at line 274
LLM
llm(string|null $model = null, int|null $maxAPICalls = null)
Initialize a Large Language Model (LLM)
at line 289
Address
loadAddressFromID(Address $id)
Load a Address from its ID.
at line 299
Binding
loadBindingFromID(Binding $id)
Load a Binding from its ID.
at line 309
CacheVolume
loadCacheVolumeFromID(CacheVolume $id)
Load a CacheVolume from its ID.
at line 319
Changeset
loadChangesetFromID(Changeset $id)
Load a Changeset from its ID.
at line 329
Cloud
loadCloudFromID(Cloud $id)
Load a Cloud from its ID.
at line 339
Container
loadContainerFromID(Container $id)
Load a Container from its ID.
at line 349
CurrentModule
loadCurrentModuleFromID(CurrentModule $id)
Load a CurrentModule from its ID.
at line 359
Directory
loadDirectoryFromID(Directory $id)
Load a Directory from its ID.
at line 369
EngineCacheEntry
loadEngineCacheEntryFromID(EngineCacheEntry $id)
Load a EngineCacheEntry from its ID.
at line 379
EngineCacheEntrySet
loadEngineCacheEntrySetFromID(EngineCacheEntrySet $id)
Load a EngineCacheEntrySet from its ID.
at line 389
EngineCache
loadEngineCacheFromID(EngineCache $id)
Load a EngineCache from its ID.
at line 399
Engine
loadEngineFromID(Engine $id)
Load a Engine from its ID.
at line 409
EnumTypeDef
loadEnumTypeDefFromID(EnumTypeDef $id)
Load a EnumTypeDef from its ID.
at line 419
EnumValueTypeDef
loadEnumValueTypeDefFromID(EnumValueTypeDef $id)
Load a EnumValueTypeDef from its ID.
at line 429
EnvFile
loadEnvFileFromID(EnvFile $id)
Load a EnvFile from its ID.
at line 439
Env
loadEnvFromID(Env $id)
Load a Env from its ID.
at line 449
EnvVariable
loadEnvVariableFromID(EnvVariable $id)
Load a EnvVariable from its ID.
at line 459
Error
loadErrorFromID(Error $id)
Load a Error from its ID.
at line 469
ErrorValue
loadErrorValueFromID(ErrorValue $id)
Load a ErrorValue from its ID.
at line 479
FieldTypeDef
loadFieldTypeDefFromID(FieldTypeDef $id)
Load a FieldTypeDef from its ID.
at line 489
File
loadFileFromID(File $id)
Load a File from its ID.
at line 499
FunctionArg
loadFunctionArgFromID(FunctionArg $id)
Load a FunctionArg from its ID.
at line 509
FunctionCallArgValue
loadFunctionCallArgValueFromID(FunctionCallArgValue $id)
Load a FunctionCallArgValue from its ID.
at line 520
FunctionCall
loadFunctionCallFromID(FunctionCall $id)
Load a FunctionCall from its ID.
at line 530
Function_
loadFunctionFromID(Function_ $id)
Load a Function from its ID.
at line 540
GeneratedCode
loadGeneratedCodeFromID(GeneratedCode $id)
Load a GeneratedCode from its ID.
at line 550
GitRef
loadGitRefFromID(GitRef $id)
Load a GitRef from its ID.
at line 560
GitRepository
loadGitRepositoryFromID(GitRepository $id)
Load a GitRepository from its ID.
at line 570
Host
loadHostFromID(Host $id)
Load a Host from its ID.
at line 580
InputTypeDef
loadInputTypeDefFromID(InputTypeDef $id)
Load a InputTypeDef from its ID.
at line 590
InterfaceTypeDef
loadInterfaceTypeDefFromID(InterfaceTypeDef $id)
Load a InterfaceTypeDef from its ID.
at line 600
JsonValue
loadJSONValueFromID(JsonValue $id)
Load a JSONValue from its ID.
at line 610
LLM
loadLLMFromID(LLM $id)
Load a LLM from its ID.
at line 620
LLMTokenUsage
loadLLMTokenUsageFromID(LLMTokenUsage $id)
Load a LLMTokenUsage from its ID.
at line 630
Label
loadLabelFromID(Label $id)
Load a Label from its ID.
at line 640
ListTypeDef
loadListTypeDefFromID(ListTypeDef $id)
Load a ListTypeDef from its ID.
at line 650
ModuleConfigClient
loadModuleConfigClientFromID(ModuleConfigClient $id)
Load a ModuleConfigClient from its ID.
at line 660
Module
loadModuleFromID(Module $id)
Load a Module from its ID.
at line 670
ModuleSource
loadModuleSourceFromID(ModuleSource $id)
Load a ModuleSource from its ID.
at line 680
ObjectTypeDef
loadObjectTypeDefFromID(ObjectTypeDef $id)
Load a ObjectTypeDef from its ID.
at line 690
Port
loadPortFromID(Port $id)
Load a Port from its ID.
at line 700
SDKConfig
loadSDKConfigFromID(SDKConfig $id)
Load a SDKConfig from its ID.
at line 710
ScalarTypeDef
loadScalarTypeDefFromID(ScalarTypeDef $id)
Load a ScalarTypeDef from its ID.
at line 720
SearchResult
loadSearchResultFromID(SearchResult $id)
Load a SearchResult from its ID.
at line 730
SearchSubmatch
loadSearchSubmatchFromID(SearchSubmatch $id)
Load a SearchSubmatch from its ID.
at line 740
Secret
loadSecretFromID(Secret $id)
Load a Secret from its ID.
at line 750
Service
loadServiceFromID(Service $id)
Load a Service from its ID.
at line 760
Socket
loadSocketFromID(Socket $id)
Load a Socket from its ID.
at line 770
SourceMap
loadSourceMapFromID(SourceMap $id)
Load a SourceMap from its ID.
at line 780
Terminal
loadTerminalFromID(Terminal $id)
Load a Terminal from its ID.
at line 790
TypeDef
loadTypeDefFromID(TypeDef $id)
Load a TypeDef from its ID.
at line 800
Module
module()
Create a new 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
at line 836
Secret
secret(string $uri, string|null $cacheKey = null)
Creates a new 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.
at line 862
SourceMap
sourceMap(string $filename, int $line, int $column)
Creates source map metadata.
at line 874
TypeDef
typeDef()
Create a new TypeDef.
at line 883
string
version()
Get the current Dagger Engine version.