Documentation
¶
Index ¶
- Constants
- Variables
- func AddEnv(env []string, name, value string) []string
- func AroundFunc(ctx context.Context, self dagql.AnyObjectResult, id *call.ID) (context.Context, func(res dagql.AnyResult, cached bool, rerr error))
- func ContextWithQuery(ctx context.Context, q *Query) context.Context
- func CurrentDagqlCache(ctx context.Context) (*dagql.SessionCache, error)
- func CurrentDagqlServer(ctx context.Context) (*dagql.Server, error)
- func DNSConfig(ctx context.Context) (*oci.DNSConfig, error)
- func DigestOf(v any) (digest.Digest, error)
- func DoHTTPRequest(ctx context.Context, query *Query, req *http.Request, filename string, ...) (_ bkcache.ImmutableRef, _ digest.Digest, _ *http.Response, rerr error)
- func EnvIDFromContext(ctx context.Context) (res *call.ID, ok bool)
- func EnvIDToContext(ctx context.Context, env *call.ID) context.Context
- func GetClientResourceAccessor(ctx context.Context, parent *Query, externalName string) (string, error)
- func GetContentHashFromDef(ctx context.Context, bk *buildkit.Client, def *pb.Definition, subdir string) (digest.Digest, error)
- func GetContentHashFromDirectory(ctx context.Context, bk *buildkit.Client, ...) (digest.Digest, error)
- func GetHostIPSocketAccessor(ctx context.Context, query *Query, upstreamHost string, port PortForward) (string, error)
- func GitRefString(cloneRef, sourceRootSubpath, version string) string
- func InputsOf(ctx context.Context, v any) ([]llb.State, error)
- func LookupEnv(env []string, name string) (string, bool)
- func MakeDirectoryContentHashed(ctx context.Context, bk *buildkit.Client, ...) (retInst dagql.ObjectResult[*Directory], err error)
- func MountRef(ctx context.Context, ref bkcache.Ref, g bksession.Group, f func(string) error, ...) error
- func MountRefCloser(ctx context.Context, ref bkcache.Ref, g bksession.Group, ...) (string, func() error, error)
- func NewRawDagOp[T dagql.Typed](ctx context.Context, srv *dagql.Server, dagop *RawDagOp, inputs []llb.State) (t T, err error)
- func ResolveDepToSource(ctx context.Context, bk *buildkit.Client, dag *dagql.Server, ...) (inst dagql.ObjectResult[*ModuleSource], err error)
- func ResolveIndex(ctx context.Context, store content.Store, desc specs.Descriptor, ...) (*specs.Descriptor, error)
- func ResourceTransferPostCall(ctx context.Context, query *Query, sourceClientID string, ids ...*resource.ID) (func(context.Context) error, error)
- func RootPathWithoutFinalSymlink(root, containerPath string) (string, error)
- func Supports(ctx context.Context, minVersion string) bool
- func SupportsDirSlash(ctx context.Context) bool
- func ToolFunc[T any](srv *dagql.Server, fn func(context.Context, T) (any, error)) func(context.Context, any) (any, error)
- func Tracer(ctx context.Context) trace.Tracer
- func UpdatedRootFS(ctx context.Context, dir *Directory) (*dagql.ObjectResult[*Directory], error)
- func WalkEnv(env []string, fn func(string, string, string))
- type Address
- type AddressID
- type AfterVersion
- type AliasSet
- type AnthropicClient
- type BeforeVersion
- type Binding
- func (b *Binding) AsList() (dagql.Enumerable, bool)
- func (b *Binding) AsObject() (dagql.AnyObjectResult, bool)
- func (b *Binding) AsString() (string, bool)
- func (b *Binding) Clone() *Binding
- func (b *Binding) Digest() digest.Digest
- func (b *Binding) ID() string
- func (b *Binding) String() string
- func (*Binding) Type() *ast.Type
- func (b *Binding) TypeName() string
- type BuildArg
- type CacheMountSource
- type CacheSharingMode
- func (mode CacheSharingMode) Decoder() dagql.InputDecoder
- func (mode CacheSharingMode) MarshalJSON() ([]byte, error)
- func (mode CacheSharingMode) ToLiteral() call.Literal
- func (mode CacheSharingMode) Type() *ast.Type
- func (mode CacheSharingMode) TypeDescription() string
- func (mode *CacheSharingMode) UnmarshalJSON(payload []byte) error
- type CacheVolume
- type CacheVolumeID
- type CallInput
- type CallOpts
- type Callable
- type CallableField
- func (f *CallableField) ArgType(argName string) (ModType, error)
- func (f *CallableField) CacheConfigForCall(ctx context.Context, parent dagql.AnyResult, args map[string]dagql.Input, ...) (*dagql.CacheConfig, error)
- func (f *CallableField) Call(ctx context.Context, opts *CallOpts) (dagql.AnyResult, error)
- func (f *CallableField) ReturnType() (ModType, error)
- type CallerStatFS
- type ChainedCall
- type Changeset
- func (ch *Changeset) AsPatch(ctx context.Context) (*File, error)
- func (ch *Changeset) Evaluate(context.Context) (*buildkit.Result, error)
- func (ch *Changeset) Export(ctx context.Context, destPath string) (rerr error)
- func (ch *Changeset) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (*Changeset) Type() *ast.Type
- func (*Changeset) TypeDescription() string
- type ClientGenerator
- type Cloud
- type CodeGenerator
- type Container
- func (container *Container) AsRecoveredService(ctx context.Context, richErr *buildkit.RichError) (*Service, error)
- func (container *Container) AsService(ctx context.Context, args ContainerAsServiceArgs) (*Service, error)
- func (container *Container) Build(ctx context.Context, dockerfileDir *Directory, contextDir *Directory, ...) (*Container, error)
- func (container *Container) Clone() *Container
- func (container *Container) CombinedOutput(ctx context.Context) (string, error)
- func (container *Container) Directory(ctx context.Context, dirPath string) (*Directory, error)
- func (container *Container) Evaluate(ctx context.Context) (*buildkit.Result, error)
- func (container *Container) Exists(ctx context.Context, srv *dagql.Server, targetPath string, ...) (bool, error)
- func (container *Container) ExitCode(ctx context.Context) (int, error)
- func (container *Container) Export(ctx context.Context, opts ExportOpts) (*specs.Descriptor, error)
- func (container *Container) FSState() (llb.State, error)
- func (container *Container) File(ctx context.Context, filePath string) (*File, error)
- func (container *Container) FromCanonicalRef(ctx context.Context, refName reference.Canonical, cfgBytes []byte) (*Container, error)
- func (container *Container) FromInternal(ctx context.Context, desc specs.Descriptor) (*Container, error)
- func (container *Container) FromRefString(ctx context.Context, addr string) (*Container, error)
- func (container *Container) ImageConfig(ctx context.Context) (specs.ImageConfig, error)
- func (container *Container) ImageRefOrErr(ctx context.Context) (string, error)
- func (container *Container) Import(ctx context.Context, tarball io.Reader, tag string) (*Container, error)
- func (container *Container) MetaState() (*llb.State, error)
- func (container *Container) MountTargets(ctx context.Context) ([]string, error)
- func (container *Container) OnRelease(ctx context.Context) error
- func (container *Container) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (container *Container) Publish(ctx context.Context, ref string, platformVariants []*Container, ...) (string, error)
- func (container *Container) RootFS(ctx context.Context) (*Directory, error)
- func (container *Container) Stderr(ctx context.Context) (string, error)
- func (container *Container) Stdout(ctx context.Context) (string, error)
- func (container *Container) Terminal(ctx context.Context, svcID *call.ID, args *TerminalArgs) error
- func (container *Container) TerminalError(ctx context.Context, svcID *call.ID, richErr *buildkit.RichError) error
- func (*Container) Type() *ast.Type
- func (*Container) TypeDescription() string
- func (container *Container) UpdateImageConfig(ctx context.Context, updateFn func(specs.ImageConfig) specs.ImageConfig) (*Container, error)
- func (container *Container) WithAnnotation(ctx context.Context, key, value string) (*Container, error)
- func (container *Container) WithDirectory(ctx context.Context, subdir string, src dagql.ObjectResult[*Directory], ...) (*Container, error)
- func (container *Container) WithExec(ctx context.Context, opts ContainerExecOpts, ...) (_ *Container, rerr error)
- func (container *Container) WithExposedPort(port Port) (*Container, error)
- func (container *Container) WithFile(ctx context.Context, srv *dagql.Server, destPath string, ...) (*Container, error)
- func (container *Container) WithFiles(ctx context.Context, srv *dagql.Server, destDir string, ...) (*Container, error)
- func (container *Container) WithGPU(ctx context.Context, gpuOpts ContainerGPUOpts) (*Container, error)
- func (container *Container) WithMountedCache(ctx context.Context, target string, cache *CacheVolume, source *Directory, ...) (*Container, error)
- func (container *Container) WithMountedDirectory(ctx context.Context, target string, dir dagql.ObjectResult[*Directory], ...) (*Container, error)
- func (container *Container) WithMountedFile(ctx context.Context, target string, file dagql.ObjectResult[*File], ...) (*Container, error)
- func (container *Container) WithMountedSecret(ctx context.Context, target string, source dagql.ObjectResult[*Secret], ...) (*Container, error)
- func (container *Container) WithMountedTemp(ctx context.Context, target string, size int) (*Container, error)
- func (container *Container) WithNewFile(ctx context.Context, dest string, content []byte, permissions fs.FileMode, ...) (*Container, error)
- func (container *Container) WithRootFS(ctx context.Context, dir dagql.ObjectResult[*Directory]) (*Container, error)
- func (container *Container) WithSecretVariable(ctx context.Context, name string, secret dagql.ObjectResult[*Secret]) (*Container, error)
- func (container *Container) WithServiceBinding(ctx context.Context, svc dagql.ObjectResult[*Service], alias string) (*Container, error)
- func (container *Container) WithSymlink(ctx context.Context, srv *dagql.Server, target, linkPath string) (*Container, error)
- func (container *Container) WithUnixSocket(ctx context.Context, target string, source *Socket, owner string) (*Container, error)
- func (container *Container) WithoutAnnotation(ctx context.Context, name string) (*Container, error)
- func (container *Container) WithoutExposedPort(port int, protocol NetworkProtocol) (*Container, error)
- func (container *Container) WithoutInputs() *Container
- func (container *Container) WithoutMount(ctx context.Context, target string) (*Container, error)
- func (container *Container) WithoutPaths(ctx context.Context, srv *dagql.Server, destPaths ...string) (*Container, error)
- func (container *Container) WithoutSecretVariable(ctx context.Context, name string) (*Container, error)
- func (container *Container) WithoutUnixSocket(ctx context.Context, target string) (*Container, error)
- type ContainerAnnotation
- type ContainerAsServiceArgs
- type ContainerDagOp
- func (op ContainerDagOp) Backend() buildkit.CustomOpBackend
- func (op ContainerDagOp) CacheMap(ctx context.Context, cm *solver.CacheMap) (*solver.CacheMap, error)
- func (op ContainerDagOp) Digest() (digest.Digest, error)
- func (op ContainerDagOp) Exec(ctx context.Context, g bksession.Group, inputs []solver.Result, ...) (outputs []solver.Result, retErr error)
- func (op ContainerDagOp) Name() string
- type ContainerExecOpts
- type ContainerGPUOpts
- type ContainerID
- type ContainerMount
- type ContainerMountData
- type ContainerMounts
- type ContainerSecret
- type ContainerSocket
- type CopyFilter
- type CoreDirStatFS
- type CurrentModule
- type DefaultTerminalCmdOpts
- type Digestable
- type Directory
- func NewDirectory(def *pb.Definition, dir string, platform Platform, services ServiceBindings) *Directory
- func NewDirectoryDagOp(ctx context.Context, srv *dagql.Server, dagop *FSDagOp, inputs []llb.State, ...) (*Directory, error)
- func NewDirectorySt(ctx context.Context, st llb.State, dir string, platform Platform, ...) (*Directory, error)
- func NewScratchDirectory(ctx context.Context, platform Platform) (*Directory, error)
- func (dir *Directory) Chown(ctx context.Context, chownPath string, owner string) (*Directory, error)
- func (dir *Directory) Clone() *Directory
- func (dir *Directory) Diff(ctx context.Context, other *Directory) (*Directory, error)
- func (dir *Directory) Digest(ctx context.Context) (string, error)
- func (dir *Directory) Directory(ctx context.Context, subdir string) (*Directory, error)
- func (dir *Directory) Entries(ctx context.Context, src string) ([]string, error)
- func (dir *Directory) Evaluate(ctx context.Context) (*buildkit.Result, error)
- func (dir *Directory) Exists(ctx context.Context, srv *dagql.Server, targetPath string, ...) (bool, error)
- func (dir *Directory) Export(ctx context.Context, destPath string, merge bool) (rerr error)
- func (dir *Directory) File(ctx context.Context, file string) (*File, error)
- func (dir *Directory) FindUp(ctx context.Context, name string, start string) (string, error)
- func (dir *Directory) Glob(ctx context.Context, pattern string) ([]string, error)
- func (dir *Directory) Mount(ctx context.Context, f func(string) error) error
- func (dir *Directory) OnRelease(ctx context.Context) error
- func (dir *Directory) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (dir *Directory) Root() (*Directory, error)
- func (dir *Directory) Search(ctx context.Context, opts SearchOpts, paths []string, globs []string) ([]*SearchResult, error)
- func (dir *Directory) SetState(ctx context.Context, st llb.State) error
- func (dir *Directory) Stat(ctx context.Context, bk *buildkit.Client, src string) (*fstypes.Stat, error)
- func (dir *Directory) State() (llb.State, error)
- func (dir *Directory) StateWithSourcePath() (llb.State, error)
- func (dir *Directory) Terminal(ctx context.Context, svcID *call.ID, ctr *Container, args *TerminalArgs, ...) error
- func (*Directory) Type() *ast.Type
- func (*Directory) TypeDescription() string
- func (dir *Directory) WithChanges(ctx context.Context, changes *Changeset) (*Directory, error)
- func (dir *Directory) WithDirectory(ctx context.Context, destDir string, srcID *call.ID, filter CopyFilter, ...) (*Directory, error)
- func (dir *Directory) WithDirectoryLLB(ctx context.Context, destDir string, src *Directory, filter CopyFilter, ...) (*Directory, error)
- func (dir *Directory) WithFile(ctx context.Context, srv *dagql.Server, destPath string, src *File, ...) (*Directory, error)
- func (dir *Directory) WithFiles(ctx context.Context, srv *dagql.Server, destDir string, src []*File, ...) (*Directory, error)
- func (dir *Directory) WithNewDirectory(ctx context.Context, dest string, permissions fs.FileMode) (*Directory, error)
- func (dir *Directory) WithNewFile(ctx context.Context, dest string, content []byte, permissions fs.FileMode, ...) (*Directory, error)
- func (dir *Directory) WithNewFileDagOp(ctx context.Context, dest string, content []byte, permissions fs.FileMode, ...) (*Directory, error)
- func (dir *Directory) WithPatch(ctx context.Context, patch string) (*Directory, error)
- func (dir *Directory) WithSymlink(ctx context.Context, srv *dagql.Server, target, linkName string) (*Directory, error)
- func (dir *Directory) WithTimestamps(ctx context.Context, unix int) (*Directory, error)
- func (dir *Directory) Without(ctx context.Context, srv *dagql.Server, paths ...string) (*Directory, error)
- func (dir *Directory) WithoutInputs() *Directory
- type DirectoryID
- type DynamicID
- func (d DynamicID) DecodeInput(val any) (dagql.Input, error)
- func (d DynamicID) Decoder() dagql.InputDecoder
- func (d DynamicID) ID() *call.ID
- func (d DynamicID) MarshalJSON() ([]byte, error)
- func (d DynamicID) ToLiteral() call.Literal
- func (d DynamicID) Type() *ast.Type
- func (d DynamicID) TypeName() string
- type Engine
- type EngineCache
- type EngineCacheEntry
- type EngineCacheEntrySet
- type EnumMemberTypeDef
- type EnumTypeDef
- type Env
- func (env *Env) Clone() *Env
- func (env *Env) Input(key string) (*Binding, bool)
- func (env *Env) Inputs() []*Binding
- func (env *Env) IsPrivileged() bool
- func (env *Env) Output(key string) (*Binding, bool)
- func (env *Env) Outputs() []*Binding
- func (env *Env) Privileged() *Env
- func (*Env) Type() *ast.Type
- func (env *Env) WithInput(key string, val dagql.Typed, description string) *Env
- func (env *Env) WithModule(mod *Module) *Env
- func (env *Env) WithOutput(key string, expectedType dagql.Type, description string) *Env
- func (env *Env) WithWorkspace(dir dagql.ObjectResult[*Directory]) *Env
- func (env *Env) WithoutInput(key string) *Env
- func (env *Env) WithoutOutputs() *Env
- func (env *Env) Writable() *Env
- type EnvFile
- func (ef *EnvFile) AsFile(ctx context.Context) (*File, error)
- func (ef *EnvFile) Clone() *EnvFile
- func (ef *EnvFile) Exists(name string) bool
- func (ef *EnvFile) Len() int
- func (ef *EnvFile) Lookup(ctx context.Context, name string, raw bool) (string, bool, error)
- func (ef *EnvFile) LookupCaseInsensitive(ctx context.Context, name string) (string, bool, error)
- func (ef *EnvFile) Namespace(ctx context.Context, prefix string) (*EnvFile, error)
- func (*EnvFile) Type() *ast.Type
- func (*EnvFile) TypeDescription() string
- func (ef *EnvFile) Variables(ctx context.Context, raw bool) ([]EnvVariable, error)
- func (ef *EnvFile) WithContents(contents string) (*EnvFile, error)
- func (ef *EnvFile) WithEnvFiles(others ...*EnvFile) *EnvFile
- func (ef *EnvFile) WithVariable(name, value string) *EnvFile
- func (ef *EnvFile) WithVariables(variables []EnvVariable) *EnvFile
- func (ef *EnvFile) WithoutVariable(name string) *EnvFile
- type EnvHook
- type EnvID
- type EnvVariable
- type Error
- type ErrorValue
- type Evaluatable
- type ExecTerminalArgs
- type ExistsType
- type ExportOpts
- type FSDagOp
- func (op FSDagOp) Backend() buildkit.CustomOpBackend
- func (op FSDagOp) CacheMap(ctx context.Context, cm *solver.CacheMap) (*solver.CacheMap, error)
- func (op FSDagOp) Digest() (digest.Digest, error)
- func (op FSDagOp) Exec(ctx context.Context, g bksession.Group, inputs []solver.Result, ...) (outputs []solver.Result, err error)
- func (op FSDagOp) Name() string
- type FieldTypeDef
- type File
- func NewFile(def *pb.Definition, file string, platform Platform, services ServiceBindings) *File
- func NewFileDagOp(ctx context.Context, srv *dagql.Server, dagop *FSDagOp, inputs []llb.State) (*File, error)
- func NewFileSt(ctx context.Context, st llb.State, file string, platform Platform, ...) (*File, error)
- func NewFileWithContents(ctx context.Context, name string, content []byte, permissions fs.FileMode, ...) (*File, error)
- func (file *File) AsEnvFile(ctx context.Context, expand bool) (*EnvFile, error)
- func (file *File) Chown(ctx context.Context, owner string) (*File, error)
- func (file *File) Clone() *File
- func (file *File) Contents(ctx context.Context, offset, limit *int) ([]byte, error)
- func (file *File) Digest(ctx context.Context, excludeMetadata bool) (string, error)
- func (file *File) Evaluate(ctx context.Context) (*buildkit.Result, error)
- func (file *File) Export(ctx context.Context, dest string, allowParentDirPath bool) (rerr error)
- func (file *File) Mount(ctx context.Context, f func(string) error) error
- func (file *File) OnRelease(ctx context.Context) error
- func (file *File) Open(ctx context.Context) (io.ReadCloser, error)
- func (file *File) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (file *File) Search(ctx context.Context, opts SearchOpts) ([]*SearchResult, error)
- func (file *File) Stat(ctx context.Context) (*fstypes.Stat, error)
- func (file *File) State() (llb.State, error)
- func (*File) Type() *ast.Type
- func (*File) TypeDescription() string
- func (file *File) WithName(ctx context.Context, filename string) (*File, error)
- func (file *File) WithReplaced(ctx context.Context, searchStr, replacementStr string, firstFrom *int, ...) (*File, error)
- func (file *File) WithTimestamps(ctx context.Context, unix int) (*File, error)
- type FileID
- type FuncCall
- type Function
- func (fn Function) Clone() *Function
- func (fn *Function) FieldSpec(ctx context.Context, mod *Module) (dagql.FieldSpec, error)
- func (fn *Function) IsSubtypeOf(otherFn *Function) bool
- func (fn *Function) LookupArg(nameAnyCase string) (*FunctionArg, bool)
- func (*Function) Type() *ast.Type
- func (*Function) TypeDescription() string
- func (fn *Function) WithArg(name string, typeDef *TypeDef, desc string, defaultValue JSON, ...) *Function
- func (fn *Function) WithDescription(desc string) *Function
- func (fn *Function) WithSourceMap(sourceMap *SourceMap) *Function
- type FunctionArg
- type FunctionArgID
- type FunctionCall
- type FunctionCallArgValue
- type FunctionID
- type GenaiClient
- type GeneratedCode
- func (code GeneratedCode) Clone() *GeneratedCode
- func (code *GeneratedCode) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (*GeneratedCode) Type() *ast.Type
- func (*GeneratedCode) TypeDescription() string
- func (code *GeneratedCode) WithVCSGeneratedPaths(paths []string) *GeneratedCode
- func (code *GeneratedCode) WithVCSIgnoredPaths(paths []string) *GeneratedCode
- type GeneratedCodeID
- type GitModuleSource
- type GitRef
- type GitRefBackend
- type GitRefID
- type GitRepository
- type GitRepositoryBackend
- type GitRepositoryID
- type HasPBDefinitions
- type Host
- func (h *Host) Clone() *Host
- func (*Host) Directory(ctx context.Context, rootPath string, filter CopyFilter, gitIgnore bool, ...) (*Directory, error)
- func (Host) FindUp(ctx context.Context, statFS StatFS, curDirPath string, soughtName string) (string, bool, error)
- func (Host) FindUpAll(ctx context.Context, statFS StatFS, curDirPath string, ...) (map[string]string, error)
- func (Host) GetEnv(ctx context.Context, name string) string
- func (*Host) Type() *ast.Type
- func (*Host) TypeDescription() string
- type ImageLayerCompression
- type ImageMediaTypes
- type InputTypeDef
- type Inputs
- type InterfaceAnnotatedValue
- func (iface *InterfaceAnnotatedValue) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (iface *InterfaceAnnotatedValue) Type() *ast.Type
- func (iface *InterfaceAnnotatedValue) TypeDefinition(view call.View) *ast.Definition
- func (iface *InterfaceAnnotatedValue) TypeDescription() string
- func (iface *InterfaceAnnotatedValue) UnderlyingObject() (dagql.Typed, error)
- type InterfaceType
- func (iface *InterfaceType) CollectCoreIDs(ctx context.Context, value dagql.AnyResult, ids map[digest.Digest]*resource.ID) error
- func (iface *InterfaceType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.AnyResult, error)
- func (iface *InterfaceType) ConvertToSDKInput(ctx context.Context, value dagql.Typed) (any, error)
- func (iface *InterfaceType) Install(ctx context.Context, dag *dagql.Server) error
- func (iface *InterfaceType) SourceMod() Mod
- func (iface *InterfaceType) TypeDef() *TypeDef
- type InterfaceTypeDef
- func (iface InterfaceTypeDef) Clone() *InterfaceTypeDef
- func (iface *InterfaceTypeDef) IsSubtypeOf(otherIface *InterfaceTypeDef) bool
- func (*InterfaceTypeDef) Type() *ast.Type
- func (*InterfaceTypeDef) TypeDescription() string
- func (iface *InterfaceTypeDef) WithSourceMap(sourceMap *SourceMap) *InterfaceTypeDef
- type JSON
- func (p JSON) Bytes() []byte
- func (JSON) DecodeInput(val any) (res dagql.Input, err error)
- func (p JSON) Decoder() dagql.InputDecoder
- func (p JSON) MarshalJSON() ([]byte, error)
- func (p JSON) String() string
- func (p JSON) ToLiteral() call.Literal
- func (p JSON) Type() *ast.Type
- func (p JSON) TypeDescription() string
- func (p JSON) TypeName() string
- func (p *JSON) UnmarshalJSON(bs []byte) error
- type JSONValue
- type JSONValueID
- type LLM
- func (llm *LLM) BindResult(ctx context.Context, dag *dagql.Server, name string) (dagql.Nullable[*Binding], error)
- func (llm *LLM) Clone() *LLM
- func (llm *LLM) Endpoint(ctx context.Context) (*LLMEndpoint, error)
- func (llm *LLM) Env() dagql.ObjectResult[*Env]
- func (llm *LLM) HasPrompt() bool
- func (llm *LLM) History(ctx context.Context) ([]string, error)
- func (llm *LLM) HistoryJSON(ctx context.Context) (JSON, error)
- func (llm *LLM) Interject(ctx context.Context) error
- func (llm *LLM) LastReply(ctx context.Context) (string, error)
- func (llm *LLM) MCP(ctx context.Context, dag *dagql.Server) error
- func (llm *LLM) Step() *LLM
- func (llm *LLM) Sync(ctx context.Context) error
- func (llm *LLM) TokenUsage(ctx context.Context, dag *dagql.Server) (*LLMTokenUsage, error)
- func (llm *LLM) ToolsDoc(ctx context.Context) (string, error)
- func (*LLM) Type() *ast.Type
- func (llm *LLM) WithBlockedFunction(ctx context.Context, typeName, funcName string) (*LLM, error)
- func (llm *LLM) WithEnv(env dagql.ObjectResult[*Env]) *LLM
- func (llm *LLM) WithMCPServer(name string, svc dagql.ObjectResult[*Service]) *LLM
- func (llm *LLM) WithModel(model string) *LLM
- func (llm *LLM) WithPrompt(prompt string) *LLM
- func (llm *LLM) WithPromptFile(ctx context.Context, file *File) (*LLM, error)
- func (llm *LLM) WithStaticTools() *LLM
- func (llm *LLM) WithSystemPrompt(prompt string) *LLM
- func (llm *LLM) WithoutDefaultSystemPrompt() *LLM
- type LLMClient
- type LLMEndpoint
- type LLMID
- type LLMProvider
- type LLMReplayer
- type LLMResponse
- type LLMRouter
- type LLMTokenUsage
- type LLMTool
- type LLMToolCall
- type LLMToolFunc
- type LLMToolSet
- type LLMVariable
- type ListType
- func (t *ListType) CollectCoreIDs(ctx context.Context, value dagql.AnyResult, ids map[digest.Digest]*resource.ID) error
- func (t *ListType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.AnyResult, error)
- func (t *ListType) ConvertToSDKInput(ctx context.Context, value dagql.Typed) (any, error)
- func (t *ListType) SourceMod() Mod
- func (t *ListType) TypeDef() *TypeDef
- type ListTypeDef
- type LocalGitRef
- type LocalGitRepository
- func (repo *LocalGitRepository) File(ctx context.Context, filename string) (*File, error)
- func (repo *LocalGitRepository) Get(ctx context.Context, ref *gitutil.Ref) (GitRefBackend, error)
- func (repo *LocalGitRepository) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (repo *LocalGitRepository) Remote(ctx context.Context) (*gitutil.Remote, error)
- type LocalModuleSource
- type MCP
- func (m *MCP) BlockFunction(ctx context.Context, typeName, funcName string) error
- func (m *MCP) Call(ctx context.Context, tools []LLMTool, toolCall LLMToolCall) (res string, failed bool)
- func (m *MCP) CallBatch(ctx context.Context, tools []LLMTool, toolCalls []LLMToolCall) []*ModelMessage
- func (m *MCP) Clone() *MCP
- func (m *MCP) DefaultSystemPrompt() string
- func (m *MCP) GetObject(ctx context.Context, key, expectedType string) (dagql.AnyObjectResult, error)
- func (m *MCP) Ingest(obj dagql.AnyObjectResult, desc string) string
- func (m *MCP) IngestBy(obj dagql.AnyObjectResult, desc string, hash digest.Digest) string
- func (m *MCP) IngestContextual(hash digest.Digest, desc string, typeName string, ...) string
- func (m *MCP) Input(ctx context.Context, key string) (*Binding, bool, error)
- func (m *MCP) IsDone() bool
- func (m *MCP) LastResult() dagql.Typed
- func (m *MCP) LookupTool(name string, tools []LLMTool) (*LLMTool, error)
- func (m *MCP) Returned() bool
- func (m *MCP) Server(ctx context.Context) (*dagql.Server, error)
- func (m *MCP) Tools(ctx context.Context) ([]LLMTool, error)
- func (m *MCP) TypeCounts() map[string]int
- func (m *MCP) Types() []string
- func (m *MCP) WithMCPServer(srv *MCPServerConfig) *MCP
- type MCPServerConfig
- type Mod
- type ModDeps
- func (d *ModDeps) Append(mods ...Mod) *ModDeps
- func (d *ModDeps) Clone() *ModDeps
- func (d *ModDeps) LookupDep(name string) (Mod, bool)
- func (d *ModDeps) ModTypeFor(ctx context.Context, typeDef *TypeDef) (ModType, bool, error)
- func (d *ModDeps) Prepend(mods ...Mod) *ModDeps
- func (d *ModDeps) Schema(ctx context.Context) (*dagql.Server, error)
- func (d *ModDeps) SchemaIntrospectionJSONFile(ctx context.Context, hiddenTypes []string) (inst dagql.Result[*File], _ error)
- func (d *ModDeps) SchemaIntrospectionJSONFileForModule(ctx context.Context) (inst dagql.Result[*File], _ error)
- func (d *ModDeps) TypeDefs(ctx context.Context, dag *dagql.Server) ([]*TypeDef, error)
- type ModType
- type ModelFinishedError
- type ModelMessage
- type Module
- func (mod *Module) CacheConfigForCall(ctx context.Context, _ dagql.AnyResult, _ map[string]dagql.Input, _ call.View, ...) (*dagql.CacheConfig, error)
- func (mod Module) Clone() *Module
- func (mod Module) CloneWithoutDefs() *Module
- func (mod *Module) Evaluate(context.Context) (*buildkit.Result, error)
- func (mod *Module) GetContextSource() *ModuleSource
- func (mod *Module) GetSource() *ModuleSource
- func (mod *Module) IDModule() *call.Module
- func (mod *Module) Install(ctx context.Context, dag *dagql.Server) error
- func (mod *Module) ModTypeFor(ctx context.Context, typeDef *TypeDef, checkDirectDeps bool) (modType ModType, ok bool, err error)
- func (mod *Module) Name() string
- func (mod *Module) ObjectUserDefaults(ctx context.Context, objName string) (*EnvFile, error)
- func (mod *Module) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (mod *Module) Patch() error
- func (*Module) Type() *ast.Type
- func (mod *Module) TypeDefs(ctx context.Context, dag *dagql.Server) ([]*TypeDef, error)
- func (*Module) TypeDescription() string
- func (mod *Module) UserDefaults(ctx context.Context) (*EnvFile, error)
- func (mod *Module) View() (call.View, bool)
- func (mod *Module) WithDescription(desc string) *Module
- func (mod *Module) WithEnum(ctx context.Context, def *TypeDef) (*Module, error)
- func (mod *Module) WithInterface(ctx context.Context, def *TypeDef) (*Module, error)
- func (mod *Module) WithObject(ctx context.Context, def *TypeDef) (*Module, error)
- type ModuleEnum
- func (e *ModuleEnum) DecodeInput(val any) (dagql.Input, error)
- func (e *ModuleEnum) Decoder() dagql.InputDecoder
- func (e *ModuleEnum) Install(dag *dagql.Server) error
- func (e *ModuleEnum) Lookup(val string) (dagql.Input, error)
- func (e *ModuleEnum) MarshalJSON() ([]byte, error)
- func (e *ModuleEnum) PossibleValues() ast.EnumValueList
- func (e *ModuleEnum) ToLiteral() call.Literal
- func (e *ModuleEnum) Type() *ast.Type
- func (e *ModuleEnum) TypeDefinition(view call.View) *ast.Definition
- func (e *ModuleEnum) TypeDescription() string
- func (e *ModuleEnum) TypeName() string
- type ModuleEnumType
- func (m *ModuleEnumType) CollectCoreIDs(ctx context.Context, value dagql.AnyResult, ids map[digest.Digest]*resource.ID) error
- func (m *ModuleEnumType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.AnyResult, error)
- func (m *ModuleEnumType) ConvertToSDKInput(ctx context.Context, value dagql.Typed) (any, error)
- func (m *ModuleEnumType) SourceMod() Mod
- func (m *ModuleEnumType) TypeDef() *TypeDef
- type ModuleFunction
- func (fn *ModuleFunction) ArgType(argName string) (ModType, error)
- func (fn *ModuleFunction) CacheConfigForCall(ctx context.Context, parent dagql.AnyResult, args map[string]dagql.Input, ...) (*dagql.CacheConfig, error)
- func (fn *ModuleFunction) Call(ctx context.Context, opts *CallOpts) (t dagql.AnyResult, rerr error)
- func (fn *ModuleFunction) ReturnType() (ModType, error)
- func (fn *ModuleFunction) UserDefault(ctx context.Context, argName string) (*UserDefault, bool, error)
- func (fn *ModuleFunction) UserDefaults(ctx context.Context) (*EnvFile, error)
- type ModuleID
- type ModuleObject
- func (obj *ModuleObject) Install(ctx context.Context, dag *dagql.Server) error
- func (obj *ModuleObject) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (obj *ModuleObject) Type() *ast.Type
- func (obj *ModuleObject) TypeDefinition(view call.View) *ast.Definition
- func (obj *ModuleObject) TypeDescription() string
- type ModuleObjectType
- func (t *ModuleObjectType) CollectCoreIDs(ctx context.Context, value dagql.AnyResult, ids map[digest.Digest]*resource.ID) error
- func (t *ModuleObjectType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.AnyResult, error)
- func (t *ModuleObjectType) ConvertToSDKInput(ctx context.Context, value dagql.Typed) (any, error)
- func (t *ModuleObjectType) GetCallable(ctx context.Context, name string) (Callable, error)
- func (t *ModuleObjectType) SourceMod() Mod
- func (t *ModuleObjectType) TypeDef() *TypeDef
- type ModuleSource
- func (src *ModuleSource) AsString() string
- func (src *ModuleSource) CalcDigest(ctx context.Context) digest.Digest
- func (src ModuleSource) Clone() *ModuleSource
- func (src *ModuleSource) Evaluate(context.Context) (*buildkit.Result, error)
- func (src *ModuleSource) LoadContextDir(ctx context.Context, dag *dagql.Server, path string, include []string, ...) (inst dagql.ObjectResult[*Directory], err error)
- func (src *ModuleSource) LoadContextFile(ctx context.Context, dag *dagql.Server, path string) (inst dagql.ObjectResult[*File], err error)
- func (src *ModuleSource) LoadContextGit(ctx context.Context, dag *dagql.Server) (inst dagql.ObjectResult[*GitRepository], err error)
- func (src *ModuleSource) LoadUserDefaults(ctx context.Context) error
- func (src *ModuleSource) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (src *ModuleSource) Pin() string
- func (src *ModuleSource) Type() *ast.Type
- func (src *ModuleSource) TypeDescription() string
- type ModuleSourceExperimentalFeature
- func (f ModuleSourceExperimentalFeature) Decoder() dagql.InputDecoder
- func (f ModuleSourceExperimentalFeature) String() string
- func (f ModuleSourceExperimentalFeature) ToLiteral() call.Literal
- func (f ModuleSourceExperimentalFeature) Type() *ast.Type
- func (f ModuleSourceExperimentalFeature) TypeDescription() string
- type ModuleSourceID
- type ModuleSourceKind
- type ModuleSourceStatFS
- type ModuleTypes
- type NetworkProtocol
- type NullableType
- func (t *NullableType) CollectCoreIDs(ctx context.Context, value dagql.AnyResult, ids map[digest.Digest]*resource.ID) error
- func (t *NullableType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.AnyResult, error)
- func (t *NullableType) ConvertToSDKInput(ctx context.Context, value dagql.Typed) (any, error)
- func (t *NullableType) SourceMod() Mod
- func (t *NullableType) TypeDef() *TypeDef
- type ObjectTypeDef
- func (obj ObjectTypeDef) Clone() *ObjectTypeDef
- func (obj *ObjectTypeDef) FieldByName(name string) (*FieldTypeDef, bool)
- func (obj *ObjectTypeDef) FieldByOriginalName(name string) (*FieldTypeDef, bool)
- func (obj *ObjectTypeDef) FunctionByName(name string) (*Function, bool)
- func (obj *ObjectTypeDef) IsSubtypeOf(iface *InterfaceTypeDef) bool
- func (*ObjectTypeDef) Type() *ast.Type
- func (*ObjectTypeDef) TypeDescription() string
- func (obj *ObjectTypeDef) WithSourceMap(sourceMap *SourceMap) *ObjectTypeDef
- type OpenAIClient
- type Ownership
- type ParsedGitRefString
- type ParsedLocalRefString
- type ParsedRefString
- type Platform
- func (Platform) DecodeInput(val any) (dagql.Input, error)
- func (p Platform) Decoder() dagql.InputDecoder
- func (p Platform) Format() string
- func (p Platform) MarshalJSON() ([]byte, error)
- func (p Platform) Spec() specs.Platform
- func (p Platform) ToLiteral() call.Literal
- func (p Platform) Type() *ast.Type
- func (p Platform) TypeDescription() string
- func (p Platform) TypeName() string
- type Port
- type PortForward
- type PrimitiveType
- func (t *PrimitiveType) CollectCoreIDs(context.Context, dagql.AnyResult, map[digest.Digest]*resource.ID) error
- func (t *PrimitiveType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.AnyResult, error)
- func (t *PrimitiveType) ConvertToSDKInput(ctx context.Context, value dagql.Typed) (any, error)
- func (t *PrimitiveType) SourceMod() Mod
- func (t *PrimitiveType) TypeDef() *TypeDef
- type Query
- func (q Query) Clone() *Query
- func (q *Query) IDDeps(ctx context.Context, id *call.ID) (*ModDeps, error)
- func (q *Query) NewHost() *Host
- func (q *Query) NewLLM(ctx context.Context, model string, maxAPICalls int) (*LLM, error)
- func (q *Query) NewModule() *Module
- func (q *Query) RequireMainClient(ctx context.Context) error
- func (*Query) Type() *ast.Type
- func (*Query) TypeDescription() string
- func (q *Query) WithPipeline(name, desc string) *Query
- type RawDagOp
- func (op RawDagOp) Backend() buildkit.CustomOpBackend
- func (op RawDagOp) CacheMap(ctx context.Context, cm *solver.CacheMap) (*solver.CacheMap, error)
- func (op RawDagOp) Digest() (digest.Digest, error)
- func (op RawDagOp) Exec(ctx context.Context, g bksession.Group, inputs []solver.Result, ...) (outputs []solver.Result, retErr error)
- func (op RawDagOp) Name() string
- type RemoteGitRef
- type RemoteGitRepository
- type ReturnTypes
- type RunningService
- type Runtime
- type SDK
- type SDKConfig
- type ScalarTypeDef
- type SchemeType
- type SearchOpts
- type SearchResult
- type SearchSubmatch
- type Secret
- type SecretID
- type SecretStore
- func (store *SecretStore) AddSecret(secret dagql.ObjectResult[*Secret]) error
- func (store *SecretStore) AddSecretFromOtherStore(srcStore *SecretStore, secret dagql.ObjectResult[*Secret]) error
- func (store *SecretStore) AsBuildkitSecretStore() secrets.SecretStore
- func (store *SecretStore) GetSecret(idDgst digest.Digest) (inst dagql.ObjectResult[*Secret], ok bool)
- func (store *SecretStore) GetSecretName(idDgst digest.Digest) (string, bool)
- func (store *SecretStore) GetSecretNameOrURI(idDgst digest.Digest) (string, bool)
- func (store *SecretStore) GetSecretPlaintext(ctx context.Context, idDgst digest.Digest) ([]byte, error)
- func (store *SecretStore) GetSecretPlaintextDirect(ctx context.Context, secret *Secret) ([]byte, error)
- func (store *SecretStore) GetSecretURI(idDgst digest.Digest) (string, bool)
- func (store *SecretStore) HasSecret(idDgst digest.Digest) bool
- type Server
- type Service
- func (svc *Service) Clone() *Service
- func (svc *Service) Endpoint(ctx context.Context, id *call.ID, port int, scheme string) (string, error)
- func (svc *Service) Evaluate(ctx context.Context) (*buildkit.Result, error)
- func (svc *Service) Hostname(ctx context.Context, id *call.ID) (string, error)
- func (svc *Service) Ports(ctx context.Context, id *call.ID) ([]Port, error)
- func (svc *Service) Start(ctx context.Context, id *call.ID, sio *ServiceIO) (running *RunningService, err error)
- func (svc *Service) StartAndTrack(ctx context.Context, id *call.ID) error
- func (svc *Service) Stop(ctx context.Context, id *call.ID, kill bool) error
- func (*Service) Terminal(ctx context.Context, svc dagql.ObjectResult[*Service], args *ExecTerminalArgs) error
- func (*Service) Type() *ast.Type
- func (*Service) TypeDescription() string
- func (svc *Service) WithHostname(hostname string) *Service
- type ServiceBinding
- type ServiceBindings
- type ServiceID
- type ServiceIO
- type ServiceKey
- type ServiceMCPConnection
- type ServiceMCPTransport
- type Services
- func (ss *Services) Detach(ctx context.Context, svc *RunningService)
- func (ss *Services) Get(ctx context.Context, id *call.ID, clientSpecific bool) (*RunningService, error)
- func (ss *Services) Start(ctx context.Context, id *call.ID, svc Startable, clientSpecific bool) (*RunningService, error)
- func (ss *Services) StartBindings(ctx context.Context, bindings ServiceBindings) (_ func(), _ []*RunningService, err error)
- func (ss *Services) StartWithIO(ctx context.Context, id *call.ID, svc Startable, clientSpecific bool, ...) (*RunningService, error)
- func (ss *Services) Stop(ctx context.Context, id *call.ID, kill bool, clientSpecific bool) error
- func (ss *Services) StopSessionServices(ctx context.Context, sessionID string) error
- type Socket
- type SocketID
- type SocketStore
- func (store *SocketStore) AddIPSocket(sock *Socket, buildkitSessionID, upstreamHost string, port PortForward) error
- func (store *SocketStore) AddSocketFromOtherStore(socket *Socket, otherStore *SocketStore) error
- func (store *SocketStore) AddUnixSocket(sock *Socket, buildkitSessionID, hostPath string) error
- func (store *SocketStore) CheckAgent(ctx context.Context, req *sshforward.CheckAgentRequest) (*sshforward.CheckAgentResponse, error)
- func (store *SocketStore) ConnectSocket(ctx context.Context, idDgst digest.Digest) (sshforward.SSH_ForwardAgentClient, error)
- func (store *SocketStore) ForwardAgent(stream sshforward.SSH_ForwardAgentServer) error
- func (store *SocketStore) GetSocketPortForward(idDgst digest.Digest) (PortForward, bool)
- func (store *SocketStore) GetSocketURLEncoded(idDgst digest.Digest) (string, bool)
- func (store *SocketStore) HasSocket(idDgst digest.Digest) bool
- func (store *SocketStore) MountSocket(ctx context.Context, idDgst digest.Digest) (string, func() error, error)
- func (store *SocketStore) Register(srv *grpc.Server)
- type SourceMap
- type SourceMapID
- type Startable
- type StatFS
- type StatFSFunc
- type TerminalArgs
- type TerminalLegacy
- type TmpfsMountSource
- type TypeDef
- func (typeDef TypeDef) Clone() *TypeDef
- func (typeDef *TypeDef) IsSubtypeOf(otherDef *TypeDef) bool
- func (typeDef *TypeDef) ToInput() dagql.Input
- func (typeDef *TypeDef) ToType() *ast.Type
- func (typeDef *TypeDef) ToTyped() dagql.Typed
- func (*TypeDef) Type() *ast.Type
- func (*TypeDef) TypeDescription() string
- func (typeDef *TypeDef) Underlying() *TypeDef
- func (typeDef *TypeDef) WithEnum(name, desc string, sourceMap *SourceMap) *TypeDef
- func (typeDef *TypeDef) WithEnumMember(name, value, desc string, sourceMap *SourceMap) (*TypeDef, error)
- func (typeDef *TypeDef) WithEnumValue(name, value, desc string, sourceMap *SourceMap) (*TypeDef, error)
- func (typeDef *TypeDef) WithFunction(fn *Function) (*TypeDef, error)
- func (typeDef *TypeDef) WithInterface(name, desc string, sourceMap *SourceMap) *TypeDef
- func (typeDef *TypeDef) WithKind(kind TypeDefKind) *TypeDef
- func (typeDef *TypeDef) WithListOf(elem *TypeDef) *TypeDef
- func (typeDef *TypeDef) WithObject(name, desc string, sourceMap *SourceMap) *TypeDef
- func (typeDef *TypeDef) WithObjectConstructor(fn *Function) (*TypeDef, error)
- func (typeDef *TypeDef) WithObjectField(name string, fieldType *TypeDef, desc string, sourceMap *SourceMap) (*TypeDef, error)
- func (typeDef *TypeDef) WithOptional(optional bool) *TypeDef
- func (typeDef *TypeDef) WithScalar(name string, desc string) *TypeDef
- type TypeDefID
- type TypeDefKind
- type UserDefault
- type UserDefaultPrimitive
- type UserModFunctionArg
- type Void
Constants ¶
const ( // DetachGracePeriod is an arbitrary amount of time between when a service is // no longer actively used and before it is detached. This is to avoid repeated // stopping and re-starting of the same service in rapid succession. DetachGracePeriod = 10 * time.Second // TerminateGracePeriod is an arbitrary amount of time between when a service is // sent a graceful stop (SIGTERM) and when it is sent an immediate stop (SIGKILL). TerminateGracePeriod = 10 * time.Second )
const ChangesetPatchFilename = "diff.patch"
const InstrumentationLibrary = "dagger.io/core"
const (
// name of arg indicating whether the op should execute the "unlazy" dagop impl
IsDagOpArgName = "isDagOp"
)
const (
ModuleName = "daggercore"
)
const (
ShimEnableTTYEnvVar = "_DAGGER_ENABLE_TTY"
)
Variables ¶
var ( "Shares the cache volume amongst many build pipelines") CacheSharingModePrivate = CacheSharingModes.Register("PRIVATE", "Keeps a cache volume for a single build pipeline") CacheSharingModeLocked = CacheSharingModes.Register("LOCKED", "Shares the cache volume amongst many build pipelines, but will serialize the writes") )
var ( CompressionGzip = ImageLayerCompressions.Register("Gzip") CompressionZstd = ImageLayerCompressions.Register("Zstd") CompressionEStarGZ = ImageLayerCompressions.Register("EStarGZ") CompressionUncompressed = ImageLayerCompressions.Register("Uncompressed") )
var ( OCIMediaTypes = ImageMediaTypesEnum.Register("OCIMediaTypes") DockerMediaTypes = ImageMediaTypesEnum.Register("DockerMediaTypes") )
var ( ReturnSuccess = ReturnTypesEnum.Register("SUCCESS", `A successful execution (exit code 0)`, ) ReturnFailure = ReturnTypesEnum.Register("FAILURE", `A failed execution (exit codes 1-127)`, ) ReturnAny = ReturnTypesEnum.Register("ANY", `Any execution (exit codes 0-127)`, ) )
var ( ExistsTypeRegular = ExistsTypes.Register("REGULAR_TYPE", "Tests path is a regular file") ExistsTypeDirectory = ExistsTypes.Register("DIRECTORY_TYPE", "Tests path is a directory") ExistsTypeSymlink = ExistsTypes.Register("SYMLINK_TYPE", "Tests path is a symlink") )
var ( ModuleSourceKindLocal = ModuleSourceKindEnum.Register("LOCAL_SOURCE") ModuleSourceKindGit = ModuleSourceKindEnum.Register("GIT_SOURCE") ModuleSourceKindDir = ModuleSourceKindEnum.Register("DIR_SOURCE") )
var ( NetworkProtocolTCP = NetworkProtocols.Register("TCP") NetworkProtocolUDP = NetworkProtocols.Register("UDP") )
var ( TypeDefKindString = TypeDefKinds.Register("STRING_KIND", "A string value.") TypeDefKindInteger = TypeDefKinds.Register("INTEGER_KIND", "An integer value.") TypeDefKindFloat = TypeDefKinds.Register("FLOAT_KIND", "A float value.") TypeDefKindBoolean = TypeDefKinds.Register("BOOLEAN_KIND", "A boolean value.") TypeDefKindScalar = TypeDefKinds.Register("SCALAR_KIND", "A scalar value of any basic kind.") TypeDefKindList = TypeDefKinds.Register("LIST_KIND", "Always paired with a ListTypeDef.", "A list of values all having the same type.") TypeDefKindObject = TypeDefKinds.Register("OBJECT_KIND", "Always paired with an ObjectTypeDef.", "A named type defined in the GraphQL schema, with fields and functions.") TypeDefKindInterface = TypeDefKinds.Register("INTERFACE_KIND", "Always paired with an InterfaceTypeDef.", `A named type of functions that can be matched+implemented by other objects+interfaces.`) TypeDefKindInput = TypeDefKinds.Register("INPUT_KIND", `A graphql input type, used only when representing the core API via TypeDefs.`) TypeDefKindVoid = TypeDefKinds.Register("VOID_KIND", "A special kind used to signify that no value is returned.", `This is used for functions that have no return value. The outer TypeDef specifying this Kind is always Optional, as the Void is never actually represented.`, ) TypeDefKindEnum = TypeDefKinds.Register("ENUM_KIND", "A GraphQL enum type and its values", "Always paired with an EnumTypeDef.", ) )
var AllVersion = dagql.AllView{}
AllVersion is a view that contains all versions.
var CacheSharingModes = dagql.NewEnum[CacheSharingMode]()
var ErrMountNotExist = errors.New("mount does not exist")
var ErrNoCommand = errors.New("no command has been set")
var ErrNoCurrentModule = fmt.Errorf("no current module")
var ErrNoSvcCommand = errors.New("no service command has been set")
var ExistsTypes = dagql.NewEnum[ExistsType]()
var ImageLayerCompressions = dagql.NewEnum[ImageLayerCompression]()
var ImageMediaTypesEnum = dagql.NewEnum[ImageMediaTypes]()
var (
ModuleSourceExperimentalFeatureSelfCalls = ModuleSourceExperimentalFeatures.Register("SELF_CALLS", "Self calls")
)
var ModuleSourceExperimentalFeatures = dagql.NewEnum[ModuleSourceExperimentalFeature]()
var ModuleSourceKindEnum = dagql.NewEnum[ModuleSourceKind]()
var NetworkProtocols = dagql.NewEnum[NetworkProtocol]()
var ReturnTypesEnum = dagql.NewEnum[ReturnTypes]()
var SeenCacheKeys = new(sync.Map)
var TypeDefKinds = dagql.NewEnum[TypeDefKind]()
var TypesHiddenFromEnvExtensions = []dagql.Typed{ &CurrentModule{}, &EnumTypeDef{}, &EnumMemberTypeDef{}, &LLM{}, &Error{}, &ErrorValue{}, &FieldTypeDef{}, &FunctionArg{}, &FunctionCallArgValue{}, &FunctionCall{}, &Function{}, &GeneratedCode{}, &InputTypeDef{}, &InterfaceTypeDef{}, &ListTypeDef{}, &LLMTokenUsage{}, &ObjectTypeDef{}, &ScalarTypeDef{}, &SDKConfig{}, &SourceMap{}, &TerminalLegacy{}, &TypeDef{}, }
var TypesHiddenFromModuleSDKs = []dagql.Typed{ &Engine{}, &EngineCache{}, &EngineCacheEntry{}, &EngineCacheEntrySet{}, }
We don't expose these types to modules SDK codegen, but we still want their graphql schemas to be available for internal usage. So we use this list to scrub them from the introspection JSON that module SDKs use for codegen.
var (
TypesToIgnoreForModuleIntrospection = []string{"Host"}
)
Functions ¶
func AroundFunc ¶ added in v0.11.7
func ContextWithQuery ¶ added in v0.18.10
func CurrentDagqlCache ¶ added in v0.18.13
func CurrentDagqlCache(ctx context.Context) (*dagql.SessionCache, error)
func CurrentDagqlServer ¶ added in v0.18.13
func DoHTTPRequest ¶ added in v0.18.7
func EnvIDFromContext ¶ added in v0.19.3
func EnvIDToContext ¶ added in v0.19.3
func GetClientResourceAccessor ¶ added in v0.12.1
func GetContentHashFromDef ¶ added in v0.15.3
func GetContentHashFromDirectory ¶ added in v0.18.3
func GetHostIPSocketAccessor ¶ added in v0.12.1
func GitRefString ¶ added in v0.16.0
func MakeDirectoryContentHashed ¶ added in v0.15.3
func MakeDirectoryContentHashed( ctx context.Context, bk *buildkit.Client, dirInst dagql.ObjectResult[*Directory], ) (retInst dagql.ObjectResult[*Directory], err error)
MakeDirectoryContentHashed returns an updated instance of the given Directory that has it's dagql ID digest set to a content hash of the directory. This allows all directory instances with the same content to be deduplicated in dagql's cache.
func MountRef ¶ added in v0.18.7
func MountRef(ctx context.Context, ref bkcache.Ref, g bksession.Group, f func(string) error, optFns ...mountRefOptFn) error
MountRef is a utility for easily mounting a ref.
To simplify external logic, when the ref is nil, i.e. scratch, the callback just receives a tmpdir that gets deleted when the function completes.
func MountRefCloser ¶ added in v0.19.3
func MountRefCloser(ctx context.Context, ref bkcache.Ref, g bksession.Group, optFns ...mountRefOptFn) (string, func() error, error)
MountRefCloser is a utility for mounting a ref.
To simplify external logic, when the ref is nil, i.e. scratch, a tmpdir is created (and deleted when the closer func is called).
NOTE: prefer MountRef where possible, unless finer-grained control of when the directory is unmounted is needed.
func NewRawDagOp ¶ added in v0.16.3
func NewRawDagOp[T dagql.Typed]( ctx context.Context, srv *dagql.Server, dagop *RawDagOp, inputs []llb.State, ) (t T, err error)
NewRawDagOp takes a target ID for any JSON-serializable dagql type, and returns it, computing the actual dagql query inside a buildkit operation, which allows for efficiently caching the result.
func ResolveDepToSource ¶ added in v0.18.7
func ResolveDepToSource( ctx context.Context, bk *buildkit.Client, dag *dagql.Server, parentSrc *ModuleSource, depSrcRef string, depPin string, depName string, ) (inst dagql.ObjectResult[*ModuleSource], err error)
ResolveDepToSource given a parent module source, load a dependency of it from the given depSrcRef, depPin and depName.
func ResolveIndex ¶ added in v0.18.17
func ResourceTransferPostCall ¶ added in v0.18.3
func RootPathWithoutFinalSymlink ¶ added in v0.18.13
RootPathWithoutFinalSymlink joins a path with a root, evaluating and bounding all symlinks except the final component of the path (i.e. the basename component). This is useful for the case where one needs to reference a symlink rather than following it (e.g. deleting a symlink) This function will return an error if any of the symlinks encountered before the final path separator reference a location outside of the root path.
func SupportsDirSlash ¶ added in v0.17.0
func ToolFunc ¶ added in v0.17.2
func ToolFunc[T any](srv *dagql.Server, fn func(context.Context, T) (any, error)) func(context.Context, any) (any, error)
ToolFunc reuses our regular GraphQL args handling sugar for tools.
func UpdatedRootFS ¶ added in v0.18.18
UpdatedRootFS returns an updated rootfs for a given directory after an exec/import/etc. The returned ObjectResult uses the ID of the current operation.
Types ¶
type Address ¶ added in v0.19.3
type Address struct {
Value string
}
func (*Address) TypeDescription ¶ added in v0.19.3
type AfterVersion ¶ added in v0.18.11
type AfterVersion string
AfterVersion is a view that checks if a target version is greater than *or* equal to the filtered version.
type AnthropicClient ¶ added in v0.17.0
type AnthropicClient struct {
// contains filtered or unexported fields
}
func (*AnthropicClient) IsRetryable ¶ added in v0.18.4
func (c *AnthropicClient) IsRetryable(err error) bool
func (*AnthropicClient) SendQuery ¶ added in v0.17.0
func (c *AnthropicClient) SendQuery(ctx context.Context, history []*ModelMessage, tools []LLMTool) (res *LLMResponse, rerr error)
type BeforeVersion ¶ added in v0.18.11
type BeforeVersion string
BeforeVersion is a view that checks if a target version is less than the filtered version.
type Binding ¶ added in v0.18.0
type Binding struct {
Key string
Value dagql.Typed
Description string
// The expected type
// Used when defining an output
ExpectedType string
}
func (*Binding) AsObject ¶ added in v0.18.0
func (b *Binding) AsObject() (dagql.AnyObjectResult, bool)
func (*Binding) Digest ¶ added in v0.18.0
func (b *Binding) Digest() digest.Digest
Return a stable digest of the binding's value
func (*Binding) ID ¶ added in v0.18.0
Return the stable object ID for this binding, or an empty string if it's not an object
type BuildArg ¶ added in v0.3.8
type BuildArg struct {
Name string `field:"true" doc:"The build argument name."`
Value string `field:"true" doc:"The build argument value."`
}
func (BuildArg) TypeDescription ¶ added in v0.9.7
type CacheMountSource ¶ added in v0.18.18
type CacheMountSource struct {
// The base layers underneath the cache mount, if any
Base *pb.Definition
// The path from the Base to use, if any
BasePath string
// The ID of the cache mount
ID string
// The sharing mode of the cache mount
SharingMode CacheSharingMode
}
type CacheSharingMode ¶ added in v0.3.12
type CacheSharingMode string
func (CacheSharingMode) Decoder ¶ added in v0.9.7
func (mode CacheSharingMode) Decoder() dagql.InputDecoder
func (CacheSharingMode) MarshalJSON ¶ added in v0.9.0
func (mode CacheSharingMode) MarshalJSON() ([]byte, error)
CacheSharingMode marshals to its lowercased value.
NB: as far as I can recall this is purely for ~*aesthetic*~. GraphQL consts are so shouty!
func (CacheSharingMode) ToLiteral ¶ added in v0.9.7
func (mode CacheSharingMode) ToLiteral() call.Literal
func (CacheSharingMode) Type ¶ added in v0.9.7
func (mode CacheSharingMode) Type() *ast.Type
func (CacheSharingMode) TypeDescription ¶ added in v0.9.7
func (mode CacheSharingMode) TypeDescription() string
func (*CacheSharingMode) UnmarshalJSON ¶ added in v0.9.0
func (mode *CacheSharingMode) UnmarshalJSON(payload []byte) error
CacheSharingMode marshals to its lowercased value.
NB: as far as I can recall this is purely for ~*aesthetic*~. GraphQL consts are so shouty!
type CacheVolume ¶
type CacheVolume struct {
Keys []string
}
CacheVolume is a persistent volume with a globally scoped identifier.
func NewCache ¶
func NewCache(keys ...string) *CacheVolume
func (*CacheVolume) Clone ¶ added in v0.5.1
func (cache *CacheVolume) Clone() *CacheVolume
func (*CacheVolume) Sum ¶ added in v0.5.1
func (cache *CacheVolume) Sum() string
Sum returns a checksum of the cache tokens suitable for use as a cache key.
func (*CacheVolume) Type ¶ added in v0.9.7
func (*CacheVolume) Type() *ast.Type
func (*CacheVolume) TypeDescription ¶ added in v0.9.7
func (*CacheVolume) TypeDescription() string
type CacheVolumeID ¶ added in v0.9.0
type CacheVolumeID = dagql.ID[*CacheVolume]
type CallOpts ¶ added in v0.9.7
type CallOpts struct {
Inputs []CallInput
ParentTyped dagql.AnyResult
ParentFields map[string]any
Cache bool
SkipSelfSchema bool
Server *dagql.Server
// If true, don't mix in the digest for the current dagql call into the cache key for
// the exec-op underlying the function call.
//
// We want the function call to be cached by the dagql digest in almost every case
// since the current dagql call is typically the actual function call. However, in
// some corner cases we may calling a function internally within a separate dagql
// call and don't want the current call digest mixed in, e.g. during the special
// function call that retrieves the module typedefs.
SkipCallDigestCacheKey bool
}
type CallableField ¶ added in v0.9.7
type CallableField struct {
Module *Module
Field *FieldTypeDef
Return ModType
}
func (*CallableField) ArgType ¶ added in v0.9.7
func (f *CallableField) ArgType(argName string) (ModType, error)
func (*CallableField) CacheConfigForCall ¶ added in v0.18.4
func (f *CallableField) CacheConfigForCall( ctx context.Context, parent dagql.AnyResult, args map[string]dagql.Input, view call.View, inputCfg dagql.CacheConfig, ) (*dagql.CacheConfig, error)
func (*CallableField) ReturnType ¶ added in v0.9.7
func (f *CallableField) ReturnType() (ModType, error)
type CallerStatFS ¶ added in v0.18.7
type CallerStatFS struct {
// contains filtered or unexported fields
}
func NewCallerStatFS ¶ added in v0.18.7
func NewCallerStatFS(bk *buildkit.Client) *CallerStatFS
func (CallerStatFS) Stat ¶ added in v0.18.7
func (fs CallerStatFS) Stat(ctx context.Context, path string) (*fsutiltypes.Stat, error)
type ChainedCall ¶ added in v0.18.8
type Changeset ¶ added in v0.18.18
type Changeset struct {
Before dagql.ObjectResult[*Directory] `field:"true" doc:"The older/lower snapshot to compare against."`
After dagql.ObjectResult[*Directory] `field:"true" doc:"The newer/upper snapshot."`
AddedPaths []string `field:"true" doc:"Files and directories that were added in the newer directory."`
ModifiedPaths []string `field:"true" doc:"Files and directories that existed before and were updated in the newer directory."`
RemovedPaths []string `` /* 146-byte string literal not displayed */
// contains filtered or unexported fields
}
func NewChangeset ¶ added in v0.18.18
func NewChangeset(ctx context.Context, before, after dagql.ObjectResult[*Directory]) (*Changeset, error)
NewChangeset creates a Changeset object with all fields computed upfront
func (*Changeset) PBDefinitions ¶ added in v0.18.18
func (*Changeset) TypeDescription ¶ added in v0.18.18
type ClientGenerator ¶ added in v0.16.3
type ClientGenerator interface {
/*
RequiredClientGenerationFiles returns the list of files that are required
from the host to generate the client.
Note: this function is optional and may not be implemented by the SDK.
It's only useful if the client generator needs files from the host while
generating the client.
This function prototype is different from the one exposed by the SDK.
SDK MAY implement the `RequiredClientGenerationFiles` function with the
following signature:
“`gql
requiredClientGenerationFiles: [String]!
““
*/
RequiredClientGenerationFiles(ctx context.Context) (dagql.Array[dagql.String], error)
/*
Generate client binding for the module and its dependencies at the given
output directory. The generated client will be placed in the same directory
as the module source root dir and contains bindings for all of the module's
dependencies in addition to the core API and the module itself if it got
source code.
It's up to that function to update the source root directory with additional
configurations if needed.
For example (executing go mod tidy, updating tsconfig.json etc...)
The generated client should use the published library version of the SDK.
However, depending on the local configuration, a copy of the current SDK
library should be copied to test the generated client with latest changes.
NOTE: this should only be used for testing purposes.
For example (if go.mod has a replace directive on dagger.io/dagger for a local path)
This function prototype is different from the one exposed by the SDK.
SDK must implement the `GenerateClient` function with the following signature:
“`gql
generateClient(
modSource: ModuleSource!
introspectionJSON: File!
outputDir: String!
): Directory!
“`
*/
GenerateClient(
context.Context,
dagql.ObjectResult[*ModuleSource],
*ModDeps,
string,
) (dagql.ObjectResult[*Directory], error)
}
ClientGenerator is an interface that a module can implements to give client generation capabilities.
The generated client is standalone and can be used in any project, even if no source code module is available.
This interface MUST be implemented to support standalone client oriented features (`dagger client install`).
type Cloud ¶ added in v0.18.11
type Cloud struct {
}
func (*Cloud) TypeDescription ¶ added in v0.18.11
type CodeGenerator ¶ added in v0.18.7
type CodeGenerator interface {
/*
Codegen generates code for the module at the given source directory and
subpath.
The Code field of the returned GeneratedCode object should be the generated
contents of the module sourceDirSubpath, in the case where that's different
than the root of the sourceDir.
The provided Module is not fully initialized; the Runtime field will not be
set yet.
This function prototype is different from the one exposed by the SDK.
SDK must implement the `Codegen` function with the following signature:
“`gql
codegen(
modSource: ModuleSource!
introspectionJSON: File!
): GeneratedCode!
“`
*/
Codegen(
context.Context,
*ModDeps,
dagql.ObjectResult[*ModuleSource],
) (*GeneratedCode, error)
}
CodeGenerator is an interface that a SDK may implements to generate code for a module.
This can include multiple things, such as a generated client to interact with the Dagger Engine but also any changes in the module's code to run it in the Dagger Engine like dependency configuration, package manager settings etc...
This interface MUST be implemented to support language oriented SDKs (`dagger develop`).
type Container ¶
type Container struct {
// The container's root filesystem.
FS *dagql.ObjectResult[*Directory]
// Image configuration (env, workdir, etc)
Config specs.ImageConfig
// List of GPU devices that will be exposed to the container
EnabledGPUs []string
// Mount points configured for the container.
Mounts ContainerMounts
// Meta is the /dagger filesystem. It will be null if nothing has run yet.
Meta *Directory
// The platform of the container's rootfs.
Platform Platform
// OCI annotations
Annotations []ContainerAnnotation
// Secrets to expose to the container.
Secrets []ContainerSecret
// Sockets to expose to the container.
Sockets []ContainerSocket
// Image reference
ImageRef string
// Ports to expose from the container.
Ports []Port
// Services to start before running the container.
Services ServiceBindings
// The args to invoke when using the terminal api on this container.
DefaultTerminalCmd DefaultTerminalCmdOpts
// (Internal-only for now) Environment variables from the engine container, prefixed
// with a special value, that will be inherited by this container if set.
SystemEnvNames []string
// DefaultArgs have been explicitly set by the user
DefaultArgs bool
}
Container is a content-addressed container.
func NewContainer ¶ added in v0.3.3
func NewContainerDagOp ¶ added in v0.18.10
func (*Container) AsRecoveredService ¶ added in v0.18.17
func (*Container) Clone ¶ added in v0.5.1
Clone returns a deep copy of the container suitable for modifying in a WithXXX method.
func (*Container) CombinedOutput ¶ added in v0.18.17
func (*Container) Export ¶ added in v0.3.3
func (container *Container) Export( ctx context.Context, opts ExportOpts, ) (*specs.Descriptor, error)
func (*Container) FSState ¶ added in v0.5.1
FSState returns the container's root filesystem mount state. If there is none (as with an empty container ID), it returns scratch.
func (*Container) FromCanonicalRef ¶ added in v0.13.6
func (*Container) FromInternal ¶ added in v0.18.17
func (container *Container) FromInternal( ctx context.Context, desc specs.Descriptor, ) (*Container, error)
FromInternal creates a Container from an OCI image descriptor, loading the image directly from the main worker OCI store.
func (*Container) FromRefString ¶ added in v0.13.6
func (*Container) ImageConfig ¶
func (*Container) ImageRefOrErr ¶ added in v0.5.1
func (*Container) MetaState ¶ added in v0.5.1
MetaState returns the container's metadata mount state. If the container has yet to run, it returns nil.
func (*Container) MountTargets ¶ added in v0.5.1
func (*Container) PBDefinitions ¶ added in v0.8.8
func (*Container) Publish ¶
func (container *Container) Publish( ctx context.Context, ref string, platformVariants []*Container, forcedCompression ImageLayerCompression, mediaTypes ImageMediaTypes, ) (string, error)
func (*Container) TerminalError ¶ added in v0.18.17
func (*Container) TypeDescription ¶ added in v0.9.7
func (*Container) UpdateImageConfig ¶
func (container *Container) UpdateImageConfig(ctx context.Context, updateFn func(specs.ImageConfig) specs.ImageConfig) (*Container, error)
func (*Container) WithAnnotation ¶ added in v0.13.1
func (*Container) WithDirectory ¶ added in v0.3.7
func (*Container) WithExec ¶ added in v0.3.13
func (container *Container) WithExec( ctx context.Context, opts ContainerExecOpts, execMD *buildkit.ExecutionMetadata, ) (_ *Container, rerr error)
func (*Container) WithExposedPort ¶ added in v0.3.13
func (*Container) WithMountedCache ¶
func (container *Container) WithMountedCache( ctx context.Context, target string, cache *CacheVolume, source *Directory, sharingMode CacheSharingMode, owner string, ) (*Container, error)
func (*Container) WithMountedDirectory ¶
func (*Container) WithMountedFile ¶
func (*Container) WithMountedSecret ¶
func (*Container) WithMountedTemp ¶
func (*Container) WithNewFile ¶ added in v0.3.7
func (*Container) WithRootFS ¶ added in v0.3.5
func (*Container) WithSecretVariable ¶
func (*Container) WithServiceBinding ¶ added in v0.5.0
func (*Container) WithSymlink ¶ added in v0.18.10
func (*Container) WithUnixSocket ¶ added in v0.3.7
func (*Container) WithoutAnnotation ¶ added in v0.13.1
func (*Container) WithoutExposedPort ¶ added in v0.3.13
func (container *Container) WithoutExposedPort(port int, protocol NetworkProtocol) (*Container, error)
func (*Container) WithoutInputs ¶ added in v0.18.13
func (*Container) WithoutMount ¶
func (*Container) WithoutPaths ¶ added in v0.13.1
func (*Container) WithoutSecretVariable ¶ added in v0.11.3
type ContainerAnnotation ¶ added in v0.13.1
type ContainerAsServiceArgs ¶ added in v0.15.0
type ContainerAsServiceArgs struct {
// Command to run instead of the container's default command
Args []string `default:"[]"`
// If the container has an entrypoint, prepend it to this exec's args
UseEntrypoint bool `default:"false"`
// Provide the executed command access back to the Dagger API
ExperimentalPrivilegedNesting bool `default:"false"`
// Grant the process all root capabilities
InsecureRootCapabilities bool `default:"false"`
// Expand the environment variables in args
Expand bool `default:"false"`
// Skip the init process injected into containers by default so that the
// user's process is PID 1
NoInit bool `default:"false"`
}
type ContainerDagOp ¶ added in v0.18.10
type ContainerDagOp struct {
ID *call.ID
CacheKey digest.Digest
ContainerMountData
}
func (ContainerDagOp) Backend ¶ added in v0.18.10
func (op ContainerDagOp) Backend() buildkit.CustomOpBackend
func (ContainerDagOp) Digest ¶ added in v0.18.10
func (op ContainerDagOp) Digest() (digest.Digest, error)
func (ContainerDagOp) Name ¶ added in v0.18.10
func (op ContainerDagOp) Name() string
type ContainerExecOpts ¶
type ContainerExecOpts struct {
// Command to run instead of the container's default command
Args []string
// If the container has an entrypoint, prepend it to this exec's args
UseEntrypoint bool `default:"false"`
// Content to write to the command's standard input before closing
Stdin string `default:""`
// Redirect the command's standard input from a file in the container
RedirectStdin string `default:""`
// Redirect the command's standard output to a file in the container
RedirectStdout string `default:""`
// Redirect the command's standard error to a file in the container
RedirectStderr string `default:""`
// Exit codes this exec is allowed to exit with
Expect ReturnTypes `default:"SUCCESS"`
// Provide the executed command access back to the Dagger API
ExperimentalPrivilegedNesting bool `default:"false"`
// Grant the process all root capabilities
InsecureRootCapabilities bool `default:"false"`
// Expand the environment variables in args
Expand bool `default:"false"`
// Skip the init process injected into containers by default so that the
// user's process is PID 1
NoInit bool `default:"false"`
}
type ContainerGPUOpts ¶ added in v0.9.2
type ContainerGPUOpts struct {
Devices []string
}
type ContainerID ¶
type ContainerMount ¶
type ContainerMount struct {
// The path of the mount within the container.
Target string
// Configure the mount as read-only.
Readonly bool
// The mounted directory
DirectorySource *dagql.ObjectResult[*Directory]
// The mounted file
FileSource *dagql.ObjectResult[*File]
// The mounted cache
CacheSource *CacheMountSource
// The mounted tmpfs
TmpfsSource *TmpfsMountSource
}
ContainerMount is a mount point configured in a container.
func (ContainerMount) SourceState ¶
func (mnt ContainerMount) SourceState() (llb.State, error)
SourceState returns the state of the source of the mount.
type ContainerMountData ¶ added in v0.18.13
type ContainerMountData struct {
// inputs are all the inputs provided to the op
//
// be careful accessing it directly (stable order is not guaranteed, and it
// may also contain a bunch of other stuff), ideally access it through a
// known pb.Mount.Output index.
Inputs []solver.Result
// all the container mounts - the order here should be guaranteed:
// - rootfs is at 0
// - meta mount is at 1
// - nth container.Mounts is at n+2
// - secret/socket mounts are at the very end
Mounts []*pb.Mount
// The digests corresponding to each Mount, or "" if no digest available.
Digests []digest.Digest
// the number of outputs produced
OutputCount int
}
func CurrentMountData ¶ added in v0.18.13
func CurrentMountData(ctx context.Context) (ContainerMountData, bool)
func (ContainerMountData) InputRefs ¶ added in v0.18.13
func (mounts ContainerMountData) InputRefs() []bkcache.ImmutableRef
type ContainerMounts ¶ added in v0.3.3
type ContainerMounts []ContainerMount
func (ContainerMounts) Replace ¶ added in v0.18.10
func (mnts ContainerMounts) Replace(newMnt ContainerMount) (ContainerMounts, error)
func (ContainerMounts) With ¶ added in v0.3.3
func (mnts ContainerMounts) With(newMnt ContainerMount) ContainerMounts
type ContainerSecret ¶
type ContainerSecret struct {
Secret dagql.ObjectResult[*Secret]
EnvName string
MountPath string
Owner *Ownership
Mode fs.FileMode
}
ContainerSecret configures a secret to expose, either as an environment variable or mounted to a file path.
type ContainerSocket ¶ added in v0.3.7
ContainerSocket configures a socket to expose, currently as a Unix socket, but potentially as a TCP or UDP address in the future.
type CopyFilter ¶ added in v0.3.3
func (*CopyFilter) IsEmpty ¶ added in v0.19.3
func (cf *CopyFilter) IsEmpty() bool
type CoreDirStatFS ¶ added in v0.18.7
type CoreDirStatFS struct {
// contains filtered or unexported fields
}
func NewCoreDirStatFS ¶ added in v0.18.7
func NewCoreDirStatFS(dir *Directory, bk *buildkit.Client) *CoreDirStatFS
func (CoreDirStatFS) Stat ¶ added in v0.18.7
func (fs CoreDirStatFS) Stat(ctx context.Context, path string) (*fsutiltypes.Stat, error)
type CurrentModule ¶ added in v0.9.8
type CurrentModule struct {
Module *Module
}
func (CurrentModule) Clone ¶ added in v0.9.8
func (mod CurrentModule) Clone() *CurrentModule
func (*CurrentModule) Type ¶ added in v0.9.8
func (*CurrentModule) Type() *ast.Type
func (*CurrentModule) TypeDescription ¶ added in v0.9.8
func (*CurrentModule) TypeDescription() string
type DefaultTerminalCmdOpts ¶ added in v0.10.1
type Digestable ¶ added in v0.18.13
type Digestable interface {
// Digest returns a content-digest of an object.
Digest() (digest.Digest, error)
}
type Directory ¶
type Directory struct {
LLB *pb.Definition
Result bkcache.ImmutableRef // only valid when returned by dagop
Dir string
Platform Platform
// Services necessary to provision the directory.
Services ServiceBindings
}
Directory is a content-addressed directory.
func NewDirectory ¶
func NewDirectory(def *pb.Definition, dir string, platform Platform, services ServiceBindings) *Directory
func NewDirectoryDagOp ¶ added in v0.16.3
func NewDirectoryDagOp( ctx context.Context, srv *dagql.Server, dagop *FSDagOp, inputs []llb.State, selfDigest digest.Digest, argDigest digest.Digest, ) (*Directory, error)
NewDirectoryDagOp takes a target ID for a Directory, and returns a Directory for it, computing the actual dagql query inside a buildkit operation, which allows for efficiently caching the result.
func NewDirectorySt ¶ added in v0.5.2
func NewScratchDirectory ¶ added in v0.6.3
func (*Directory) Clone ¶ added in v0.5.1
Clone returns a deep copy of the container suitable for modifying in a WithXXX method.
func (*Directory) Glob ¶ added in v0.9.1
Glob returns a list of files that matches the given pattern.
func (*Directory) PBDefinitions ¶ added in v0.8.8
func (*Directory) Search ¶ added in v0.18.17
func (dir *Directory) Search(ctx context.Context, opts SearchOpts, paths []string, globs []string) ([]*SearchResult, error)
func (*Directory) StateWithSourcePath ¶ added in v0.5.1
func (*Directory) TypeDescription ¶ added in v0.9.7
func (*Directory) WithChanges ¶ added in v0.18.18
func (*Directory) WithDirectory ¶
func (*Directory) WithDirectoryLLB ¶ added in v0.19.3
func (*Directory) WithFiles ¶ added in v0.9.10
func (dir *Directory) WithFiles( ctx context.Context, srv *dagql.Server, destDir string, src []*File, permissions *int, ) (*Directory, error)
TODO: address https://github.com/dagger/dagger/pull/6556/files#r1482830091
func (*Directory) WithNewDirectory ¶ added in v0.3.3
func (*Directory) WithNewFile ¶
func (*Directory) WithNewFileDagOp ¶ added in v0.18.13
func (*Directory) WithSymlink ¶ added in v0.18.10
func (*Directory) WithTimestamps ¶ added in v0.3.8
func (*Directory) WithoutInputs ¶ added in v0.18.17
type DirectoryID ¶
type DynamicID ¶ added in v0.9.7
type DynamicID struct {
// contains filtered or unexported fields
}
func (DynamicID) DecodeInput ¶ added in v0.9.7
func (DynamicID) Decoder ¶ added in v0.9.7
func (d DynamicID) Decoder() dagql.InputDecoder
func (DynamicID) MarshalJSON ¶ added in v0.9.7
type Engine ¶ added in v0.12.0
type Engine struct {
Name string `field:"true" doc:"The name of the engine instance."`
}
func (*Engine) TypeDescription ¶ added in v0.12.0
type EngineCache ¶ added in v0.12.0
type EngineCache struct {
MaxUsedSpace int `field:"true" doc:"The maximum bytes to keep in the cache without pruning."`
TargetSpace int `field:"true" doc:"The target number of bytes to keep when pruning."`
ReservedSpace int `field:"true" doc:"The minimum amount of disk space this policy is guaranteed to retain."`
MinFreeSpace int `field:"true" doc:"The target amount of free disk space the garbage collector will attempt to leave."`
}
func (*EngineCache) Type ¶ added in v0.12.0
func (*EngineCache) Type() *ast.Type
func (*EngineCache) TypeDescription ¶ added in v0.12.0
func (*EngineCache) TypeDescription() string
type EngineCacheEntry ¶ added in v0.12.0
type EngineCacheEntry struct {
Description string `field:"true" doc:"The description of the cache entry."`
DiskSpaceBytes int `field:"true" doc:"The disk space used by the cache entry."`
CreatedTimeUnixNano int `field:"true" doc:"The time the cache entry was created, in Unix nanoseconds."`
MostRecentUseTimeUnixNano int `field:"true" doc:"The most recent time the cache entry was used, in Unix nanoseconds."`
ActivelyUsed bool `field:"true" doc:"Whether the cache entry is actively being used."`
}
func (*EngineCacheEntry) Type ¶ added in v0.12.0
func (*EngineCacheEntry) Type() *ast.Type
func (*EngineCacheEntry) TypeDescription ¶ added in v0.12.0
func (*EngineCacheEntry) TypeDescription() string
type EngineCacheEntrySet ¶ added in v0.12.0
type EngineCacheEntrySet struct {
EntryCount int `field:"true" doc:"The number of cache entries in this set."`
DiskSpaceBytes int `field:"true" doc:"The total disk space used by the cache entries in this set."`
EntriesList []*EngineCacheEntry
}
func (*EngineCacheEntrySet) Type ¶ added in v0.12.0
func (*EngineCacheEntrySet) Type() *ast.Type
func (*EngineCacheEntrySet) TypeDescription ¶ added in v0.12.0
func (*EngineCacheEntrySet) TypeDescription() string
type EnumMemberTypeDef ¶ added in v0.18.11
type EnumMemberTypeDef struct {
Name string `field:"true" doc:"The name of the enum member."`
Value string `field:"true" doc:"The value of the enum member"`
Description string `field:"true" doc:"A doc string for the enum member, if any."`
SourceMap dagql.Nullable[*SourceMap] `field:"true" doc:"The location of this enum member declaration."`
OriginalName string
}
func NewEnumMemberTypeDef ¶ added in v0.18.11
func NewEnumMemberTypeDef(name, value, description string, sourceMap *SourceMap) *EnumMemberTypeDef
func NewEnumValueTypeDef ¶ added in v0.12.0
func NewEnumValueTypeDef(name, value, description string, sourceMap *SourceMap) *EnumMemberTypeDef
func (EnumMemberTypeDef) Clone ¶ added in v0.18.11
func (enumValue EnumMemberTypeDef) Clone() *EnumMemberTypeDef
func (*EnumMemberTypeDef) EnumValueDirectives ¶ added in v0.18.11
func (enumValue *EnumMemberTypeDef) EnumValueDirectives() []*ast.Directive
func (*EnumMemberTypeDef) Type ¶ added in v0.18.11
func (*EnumMemberTypeDef) Type() *ast.Type
func (*EnumMemberTypeDef) TypeDescription ¶ added in v0.18.11
func (*EnumMemberTypeDef) TypeDescription() string
type EnumTypeDef ¶ added in v0.12.0
type EnumTypeDef struct {
// Name is the standardized name of the enum (CamelCase), as used for the enum in the graphql schema
Name string `field:"true" doc:"The name of the enum."`
Description string `field:"true" doc:"A doc string for the enum, if any."`
Members []*EnumMemberTypeDef `field:"true" doc:"The members of the enum."`
SourceMap dagql.Nullable[*SourceMap] `field:"true" doc:"The location of this enum declaration."`
// SourceModuleName is currently only set when returning the TypeDef from the Enum field on Module
SourceModuleName string `field:"true" doc:"If this EnumTypeDef is associated with a Module, the name of the module. Unset otherwise."`
// The original name of the enum as provided by the SDK that defined it, used
// when invoking the SDK so it doesn't need to think as hard about case conversions
OriginalName string
}
func NewEnumTypeDef ¶ added in v0.12.0
func NewEnumTypeDef(name, description string, sourceMap *SourceMap) *EnumTypeDef
func (EnumTypeDef) Clone ¶ added in v0.12.0
func (enum EnumTypeDef) Clone() *EnumTypeDef
func (*EnumTypeDef) Type ¶ added in v0.12.0
func (*EnumTypeDef) Type() *ast.Type
func (*EnumTypeDef) TypeDescription ¶ added in v0.12.0
func (*EnumTypeDef) TypeDescription() string
type Env ¶ added in v0.18.0
type Env struct {
// The environment's host filesystem
Workspace dagql.ObjectResult[*Directory] `field:"true"`
// contains filtered or unexported fields
}
func NewEnv ¶ added in v0.18.0
func NewEnv(workspace dagql.ObjectResult[*Directory], deps *ModDeps) *Env
func (*Env) IsPrivileged ¶ added in v0.18.8
func (*Env) Privileged ¶ added in v0.18.8
func (*Env) WithModule ¶ added in v0.19.3
func (*Env) WithOutput ¶ added in v0.18.0
Register the desire for a binding in the environment
func (*Env) WithWorkspace ¶ added in v0.19.3
func (env *Env) WithWorkspace(dir dagql.ObjectResult[*Directory]) *Env
func (*Env) WithoutInput ¶ added in v0.18.0
Remove an input
func (*Env) WithoutOutputs ¶ added in v0.19.3
Remove all outputs from the environment and prevent new ones from being declared
type EnvFile ¶ added in v0.18.18
type EnvFile struct {
// Variables stored as key-value pairs, preserving order and allowing duplicates
Environ []string `json:"variables"`
Expand bool `json:"expand"`
}
EnvFile represents a collection of environment variables that can be manipulated
func NewEnvFile ¶ added in v0.19.3
func (*EnvFile) AsFile ¶ added in v0.18.18
AsFile converts the EnvFile to a File containing the environment variables
func (*EnvFile) Lookup ¶ added in v0.18.18
Lookup a variable and return its value, and a 'found' boolean
func (*EnvFile) LookupCaseInsensitive ¶ added in v0.19.3
func (*EnvFile) Namespace ¶ added in v0.19.3
Filters variables by prefix and removes the prefix 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
func (*EnvFile) TypeDescription ¶ added in v0.18.18
func (*EnvFile) WithContents ¶ added in v0.18.18
WithContents parses the given contents using joho/godotenv and appends variables via EnvFile.WithVariable. Order/duplicates are not preserved.
func (*EnvFile) WithEnvFiles ¶ added in v0.19.3
WithVariables adds multiple environment variables to the EnvFile
func (*EnvFile) WithVariable ¶ added in v0.18.18
WithVariable adds a new environment variable to the EnvFile
func (*EnvFile) WithVariables ¶ added in v0.19.3
func (ef *EnvFile) WithVariables(variables []EnvVariable) *EnvFile
func (*EnvFile) WithoutVariable ¶ added in v0.18.18
WithoutVariable removes all occurrences of the named variable
type EnvHook ¶ added in v0.18.0
A Dagql hook for dynamically extending the Environment and Binding types based on available types
func (EnvHook) ExtendEnvType ¶ added in v0.18.0
func (s EnvHook) ExtendEnvType(targetType dagql.ObjectType) error
func (EnvHook) InstallObject ¶ added in v0.18.0
func (s EnvHook) InstallObject(targetType dagql.ObjectType)
type EnvVariable ¶ added in v0.18.18
type EnvVariable struct {
Name string `field:"true" doc:"The environment variable name."`
Value string `field:"true" doc:"The environment variable value."`
}
func (EnvVariable) Description ¶ added in v0.18.18
func (EnvVariable) Description() string
func (EnvVariable) Type ¶ added in v0.18.18
func (EnvVariable) Type() *ast.Type
func (EnvVariable) TypeDescription ¶ added in v0.18.18
func (EnvVariable) TypeDescription() string
type Error ¶ added in v0.15.0
type Error struct {
Message string `field:"true" doc:"A description of the error."`
Values []*ErrorValue `field:"true" doc:"The extensions of the error."`
}
func (*Error) Extensions ¶ added in v0.17.0
type ErrorValue ¶ added in v0.17.0
type ErrorValue struct {
Name string `field:"true" doc:"The name of the value."`
Value JSON `field:"true" doc:"The value."`
}
func (*ErrorValue) Type ¶ added in v0.17.0
func (e *ErrorValue) Type() *ast.Type
type Evaluatable ¶ added in v0.18.13
type ExecTerminalArgs ¶ added in v0.18.17
type ExecTerminalArgs struct {
Cmd []string `default:"[]"`
}
type ExistsType ¶ added in v0.18.15
type ExistsType string
func (ExistsType) Decoder ¶ added in v0.18.15
func (et ExistsType) Decoder() dagql.InputDecoder
func (ExistsType) MarshalJSON ¶ added in v0.18.15
func (et ExistsType) MarshalJSON() ([]byte, error)
func (ExistsType) ToLiteral ¶ added in v0.18.15
func (et ExistsType) ToLiteral() call.Literal
func (ExistsType) Type ¶ added in v0.18.15
func (et ExistsType) Type() *ast.Type
func (ExistsType) TypeDescription ¶ added in v0.18.15
func (et ExistsType) TypeDescription() string
func (*ExistsType) UnmarshalJSON ¶ added in v0.18.15
func (et *ExistsType) UnmarshalJSON(payload []byte) error
type ExportOpts ¶ added in v0.18.13
type ExportOpts struct {
Dest string
PlatformVariants []*Container
ForcedCompression ImageLayerCompression
MediaTypes ImageMediaTypes
Tar bool
LeaseID string
}
type FSDagOp ¶ added in v0.16.3
type FSDagOp struct {
ID *call.ID
// Path is the target path for the output - this is mostly ignored by dagop
// (except for contributing to the cache key). However, it can be used by
// dagql running inside a dagop to determine where it should write data.
Path string
CacheKey digest.Digest
}
func (FSDagOp) Backend ¶ added in v0.16.3
func (op FSDagOp) Backend() buildkit.CustomOpBackend
type FieldTypeDef ¶ added in v0.8.8
type FieldTypeDef struct {
Name string `field:"true" doc:"The name of the field in lowerCamelCase format."`
Description string `field:"true" doc:"A doc string for the field, if any."`
TypeDef *TypeDef `field:"true" doc:"The type of the field."`
SourceMap dagql.Nullable[*SourceMap] `field:"true" doc:"The location of this field declaration."`
// The original name of the object as provided by the SDK that defined it, used
// when invoking the SDK so it doesn't need to think as hard about case conversions
OriginalName string
}
func (FieldTypeDef) Clone ¶ added in v0.8.8
func (typeDef FieldTypeDef) Clone() *FieldTypeDef
func (*FieldTypeDef) Type ¶ added in v0.9.7
func (*FieldTypeDef) Type() *ast.Type
func (*FieldTypeDef) TypeDescription ¶ added in v0.9.7
func (*FieldTypeDef) TypeDescription() string
type File ¶
type File struct {
LLB *pb.Definition
Result bkcache.ImmutableRef // only valid when returned by dagop
File string
Platform Platform
// Services necessary to provision the file.
Services ServiceBindings
}
File is a content-addressed file.
func NewFile ¶
func NewFile(def *pb.Definition, file string, platform Platform, services ServiceBindings) *File
func NewFileDagOp ¶ added in v0.16.3
func NewFileDagOp( ctx context.Context, srv *dagql.Server, dagop *FSDagOp, inputs []llb.State, ) (*File, error)
NewFileDagOp takes a target ID for a File, and returns a File for it, computing the actual dagql query inside a buildkit operation, which allows for efficiently caching the result.
func NewFileWithContents ¶ added in v0.9.2
func (*File) AsEnvFile ¶ added in v0.18.18
AsEnvFile converts a File to an EnvFile by parsing its contents
func (*File) Clone ¶ added in v0.5.1
Clone returns a deep copy of the container suitable for modifying in a WithXXX method.
func (*File) PBDefinitions ¶ added in v0.8.8
func (*File) Search ¶ added in v0.18.17
func (file *File) Search(ctx context.Context, opts SearchOpts) ([]*SearchResult, error)
func (*File) TypeDescription ¶ added in v0.9.7
func (*File) WithReplaced ¶ added in v0.18.17
type Function ¶ added in v0.8.8
type Function struct {
// Name is the standardized name of the function (lowerCamelCase), as used for the resolver in the graphql schema
Name string `field:"true" doc:"The name of the function."`
Description string `field:"true" doc:"A doc string for the function, if any."`
Args []*FunctionArg `field:"true" doc:"Arguments accepted by the function, if any."`
ReturnType *TypeDef `field:"true" doc:"The type returned by the function."`
SourceMap dagql.Nullable[*SourceMap] `field:"true" doc:"The location of this function declaration."`
// OriginalName of the parent object
ParentOriginalName string
// The original name of the function as provided by the SDK that defined it, used
// when invoking the SDK so it doesn't need to think as hard about case conversions
OriginalName string
}
func NewFunction ¶ added in v0.8.8
func (*Function) FieldSpec ¶ added in v0.9.7
FieldSpec converts a Function into a GraphQL field specification for inclusion in a GraphQL schema. This method is called during schema generation when building the GraphQL API representation of module functions. It transforms the Function's metadata (name, description, arguments, return type) into the dagql.FieldSpec format that the GraphQL engine can understand and expose as queryable fields.
The conversion process includes: - Converting function arguments to GraphQL input specifications with proper typing - Handling default values for arguments by JSON decoding and type validation - Adding source map directives for debugging/IDE support - Resolving module types through the provided Module context
This is typically called during module loading/registration when the Dagger engine builds the complete GraphQL schema that clients will query against.
func (*Function) IsSubtypeOf ¶ added in v0.9.6
func (*Function) LookupArg ¶ added in v0.9.7
func (fn *Function) LookupArg(nameAnyCase string) (*FunctionArg, bool)
func (*Function) TypeDescription ¶ added in v0.9.7
func (*Function) WithDescription ¶ added in v0.8.8
func (*Function) WithSourceMap ¶ added in v0.13.7
type FunctionArg ¶ added in v0.8.8
type FunctionArg struct {
// Name is the standardized name of the argument (lowerCamelCase), as used for the resolver in the graphql schema
Name string `field:"true" doc:"The name of the argument in lowerCamelCase format."`
Description string `field:"true" doc:"A doc string for the argument, if any."`
SourceMap dagql.Nullable[*SourceMap] `field:"true" doc:"The location of this arg declaration."`
TypeDef *TypeDef `field:"true" doc:"The type of the argument."`
DefaultValue JSON `field:"true" doc:"A default value to use for this argument when not explicitly set by the caller, if any."`
DefaultPath string `` /* 152-byte string literal not displayed */
Ignore []string `` /* 187-byte string literal not displayed */
// The original name of the argument as provided by the SDK that defined it.
OriginalName string
}
func (FunctionArg) Clone ¶ added in v0.8.8
func (arg FunctionArg) Clone() *FunctionArg
func (FunctionArg) Directives ¶ added in v0.19.3
func (arg FunctionArg) Directives() []*ast.Directive
func (*FunctionArg) Type ¶ added in v0.9.7
func (*FunctionArg) Type() *ast.Type
Type returns the GraphQL FunctionArg! type.
func (*FunctionArg) TypeDescription ¶ added in v0.9.7
func (*FunctionArg) TypeDescription() string
type FunctionArgID ¶ added in v0.9.4
type FunctionArgID = dagql.ID[*FunctionArg]
type FunctionCall ¶ added in v0.8.8
type FunctionCall struct {
Name string `field:"true" doc:"The name of the function being called."`
ParentName string `` /* 154-byte string literal not displayed */
Parent JSON `` /* 155-byte string literal not displayed */
InputArgs []*FunctionCallArgValue `field:"true" doc:"The argument values the function is being invoked with."`
ParentID *call.ID
EnvID *call.ID
}
func (*FunctionCall) ReturnError ¶ added in v0.15.0
func (*FunctionCall) ReturnValue ¶ added in v0.9.7
func (fnCall *FunctionCall) ReturnValue(ctx context.Context, val JSON) error
func (*FunctionCall) Type ¶ added in v0.9.7
func (*FunctionCall) Type() *ast.Type
func (*FunctionCall) TypeDescription ¶ added in v0.9.7
func (*FunctionCall) TypeDescription() string
type FunctionCallArgValue ¶ added in v0.9.7
type FunctionCallArgValue struct {
Name string `field:"true" doc:"The name of the argument."`
Value JSON `field:"true" doc:"The value of the argument represented as a JSON serialized string."`
}
func (*FunctionCallArgValue) Type ¶ added in v0.9.7
func (*FunctionCallArgValue) Type() *ast.Type
func (*FunctionCallArgValue) TypeDescription ¶ added in v0.9.7
func (*FunctionCallArgValue) TypeDescription() string
type FunctionID ¶ added in v0.8.8
type GenaiClient ¶ added in v0.17.0
type GenaiClient struct {
// contains filtered or unexported fields
}
func (*GenaiClient) IsRetryable ¶ added in v0.18.4
func (c *GenaiClient) IsRetryable(err error) bool
func (*GenaiClient) SendQuery ¶ added in v0.17.0
func (c *GenaiClient) SendQuery(ctx context.Context, history []*ModelMessage, tools []LLMTool) (_ *LLMResponse, rerr error)
type GeneratedCode ¶ added in v0.8.8
type GeneratedCode struct {
Code dagql.ObjectResult[*Directory] `field:"true" doc:"The directory containing the generated code."`
VCSGeneratedPaths []string `field:"true" name:"vcsGeneratedPaths" doc:"List of paths to mark generated in version control (i.e. .gitattributes)."`
VCSIgnoredPaths []string `field:"true" name:"vcsIgnoredPaths" doc:"List of paths to ignore in version control (i.e. .gitignore)."`
}
func NewGeneratedCode ¶ added in v0.9.0
func NewGeneratedCode(code dagql.ObjectResult[*Directory]) *GeneratedCode
func (GeneratedCode) Clone ¶ added in v0.8.8
func (code GeneratedCode) Clone() *GeneratedCode
func (*GeneratedCode) PBDefinitions ¶ added in v0.9.7
func (code *GeneratedCode) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
func (*GeneratedCode) Type ¶ added in v0.9.7
func (*GeneratedCode) Type() *ast.Type
func (*GeneratedCode) TypeDescription ¶ added in v0.9.7
func (*GeneratedCode) TypeDescription() string
func (*GeneratedCode) WithVCSGeneratedPaths ¶ added in v0.8.8
func (code *GeneratedCode) WithVCSGeneratedPaths(paths []string) *GeneratedCode
func (*GeneratedCode) WithVCSIgnoredPaths ¶ added in v0.8.8
func (code *GeneratedCode) WithVCSIgnoredPaths(paths []string) *GeneratedCode
type GeneratedCodeID ¶ added in v0.8.8
type GeneratedCodeID = dagql.ID[*GeneratedCode]
type GitModuleSource ¶ added in v0.9.8
type GitModuleSource struct {
// The ref to clone the root of the git repo from
CloneRef string
// Symbolic is the CloneRef plus the SourceRootSubpath (no version)
Symbolic string
// The URL to the source's git repo in a web browser, at the root of the repo
HTMLRepoURL string
// The URL to the source's git repo in a web browser, including to the source root subpath
HTMLURL string
// The import path corresponding to the root of the git repo this source points to
RepoRootPath string
// The version of the source; may be a branch, tag, or commit hash
Version string
// The resolved commit hash of the source
Commit string
// The fully resolved git ref string of the source
Ref string
// The full git repo for the module source without any include filtering
UnfilteredContextDir dagql.ObjectResult[*Directory]
}
func (GitModuleSource) Clone ¶ added in v0.9.8
func (src GitModuleSource) Clone() *GitModuleSource
func (*GitModuleSource) PBDefinitions ¶ added in v0.9.9
func (src *GitModuleSource) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
type GitRef ¶ added in v0.9.1
type GitRef struct {
Repo dagql.ObjectResult[*GitRepository]
Backend GitRefBackend
Ref *gitutil.Ref
}
func (*GitRef) PBDefinitions ¶ added in v0.16.3
func (*GitRef) TypeDescription ¶ added in v0.9.7
type GitRefBackend ¶ added in v0.16.3
type GitRepository ¶ added in v0.9.4
type GitRepository struct {
URL dagql.Nullable[dagql.String] `field:"true" doc:"The URL of the git repository."`
Backend GitRepositoryBackend
Remote *gitutil.Remote
DiscardGitDir bool
}
func NewGitRepository ¶ added in v0.19.3
func NewGitRepository(ctx context.Context, backend GitRepositoryBackend) (*GitRepository, error)
func (*GitRepository) PBDefinitions ¶ added in v0.16.3
func (repo *GitRepository) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
func (*GitRepository) Type ¶ added in v0.9.7
func (*GitRepository) Type() *ast.Type
func (*GitRepository) TypeDescription ¶ added in v0.9.7
func (*GitRepository) TypeDescription() string
type GitRepositoryBackend ¶ added in v0.16.3
type GitRepositoryBackend interface {
HasPBDefinitions
// Remote returns information about the git remote.
Remote(ctx context.Context) (*gitutil.Remote, error)
// Get returns a reference to a specific git ref (branch, tag, or commit).
Get(ctx context.Context, ref *gitutil.Ref) (GitRefBackend, error)
// contains filtered or unexported methods
}
type GitRepositoryID ¶ added in v0.9.4
type GitRepositoryID = dagql.ID[*GitRepository]
type HasPBDefinitions ¶ added in v0.8.8
type HasPBDefinitions interface {
// PBDefinitions returns all the buildkit definitions that are part of a core type
PBDefinitions(context.Context) ([]*pb.Definition, error)
}
type Host ¶ added in v0.3.3
type Host struct{}
func (Host) FindUp ¶ added in v0.18.18
func (Host) FindUp( ctx context.Context, statFS StatFS, curDirPath string, soughtName string, ) (string, bool, error)
find-up a given soughtName in curDirPath and its parent directories, return the absolute path to the dir it was found in, if any
func (Host) FindUpAll ¶ added in v0.18.18
func (Host) FindUpAll( ctx context.Context, statFS StatFS, curDirPath string, soughtNames map[string]struct{}, ) (map[string]string, error)
find-up a set of soughtNames in curDirPath and its parent directories return what was found (name -> absolute path of dir containing it)
func (Host) GetEnv ¶ added in v0.19.3
Lookup an environment variable in the host system from the current context
func (*Host) TypeDescription ¶ added in v0.9.7
type ImageLayerCompression ¶ added in v0.5.3
type ImageLayerCompression string
func (ImageLayerCompression) Decoder ¶ added in v0.9.7
func (proto ImageLayerCompression) Decoder() dagql.InputDecoder
func (ImageLayerCompression) ToLiteral ¶ added in v0.9.7
func (proto ImageLayerCompression) ToLiteral() call.Literal
func (ImageLayerCompression) Type ¶ added in v0.9.7
func (proto ImageLayerCompression) Type() *ast.Type
func (ImageLayerCompression) TypeDescription ¶ added in v0.9.7
func (proto ImageLayerCompression) TypeDescription() string
type ImageMediaTypes ¶ added in v0.6.4
type ImageMediaTypes string
func (ImageMediaTypes) Decoder ¶ added in v0.9.7
func (proto ImageMediaTypes) Decoder() dagql.InputDecoder
func (ImageMediaTypes) ToLiteral ¶ added in v0.9.7
func (proto ImageMediaTypes) ToLiteral() call.Literal
func (ImageMediaTypes) Type ¶ added in v0.9.7
func (proto ImageMediaTypes) Type() *ast.Type
func (ImageMediaTypes) TypeDescription ¶ added in v0.9.7
func (proto ImageMediaTypes) TypeDescription() string
type InputTypeDef ¶ added in v0.9.8
type InputTypeDef struct {
Name string `field:"true" doc:"The name of the input object."`
Fields []*FieldTypeDef `field:"true" doc:"Static fields defined on this input object, if any."`
}
func (InputTypeDef) Clone ¶ added in v0.9.8
func (typeDef InputTypeDef) Clone() *InputTypeDef
func (*InputTypeDef) ToInputObjectSpec ¶ added in v0.9.8
func (typeDef *InputTypeDef) ToInputObjectSpec() dagql.InputObjectSpec
func (*InputTypeDef) Type ¶ added in v0.9.8
func (*InputTypeDef) Type() *ast.Type
func (*InputTypeDef) TypeDescription ¶ added in v0.9.8
func (*InputTypeDef) TypeDescription() string
type InterfaceAnnotatedValue ¶ added in v0.9.7
type InterfaceAnnotatedValue struct {
TypeDef *InterfaceTypeDef
IfaceType *InterfaceType
Fields map[string]any
UnderlyingType ModType
}
func (*InterfaceAnnotatedValue) PBDefinitions ¶ added in v0.9.7
func (iface *InterfaceAnnotatedValue) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
func (*InterfaceAnnotatedValue) Type ¶ added in v0.9.7
func (iface *InterfaceAnnotatedValue) Type() *ast.Type
func (*InterfaceAnnotatedValue) TypeDefinition ¶ added in v0.13.7
func (iface *InterfaceAnnotatedValue) TypeDefinition(view call.View) *ast.Definition
func (*InterfaceAnnotatedValue) TypeDescription ¶ added in v0.9.7
func (iface *InterfaceAnnotatedValue) TypeDescription() string
func (*InterfaceAnnotatedValue) UnderlyingObject ¶ added in v0.18.13
func (iface *InterfaceAnnotatedValue) UnderlyingObject() (dagql.Typed, error)
type InterfaceType ¶ added in v0.9.7
type InterfaceType struct {
// contains filtered or unexported fields
}
func (*InterfaceType) CollectCoreIDs ¶ added in v0.12.1
func (*InterfaceType) ConvertFromSDKResult ¶ added in v0.9.7
func (*InterfaceType) ConvertToSDKInput ¶ added in v0.9.7
func (*InterfaceType) SourceMod ¶ added in v0.9.7
func (iface *InterfaceType) SourceMod() Mod
func (*InterfaceType) TypeDef ¶ added in v0.9.7
func (iface *InterfaceType) TypeDef() *TypeDef
type InterfaceTypeDef ¶ added in v0.9.6
type InterfaceTypeDef struct {
// Name is the standardized name of the interface (CamelCase), as used for the interface in the graphql schema
Name string `field:"true" doc:"The name of the interface."`
Description string `field:"true" doc:"The doc string for the interface, if any."`
SourceMap dagql.Nullable[*SourceMap] `field:"true" doc:"The location of this interface declaration."`
Functions []*Function `field:"true" doc:"Functions defined on this interface, if any."`
// SourceModuleName is currently only set when returning the TypeDef from the Objects field on Module
SourceModuleName string `field:"true" doc:"If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise."`
// The original name of the interface as provided by the SDK that defined it, used
// when invoking the SDK so it doesn't need to think as hard about case conversions
OriginalName string
}
func NewInterfaceTypeDef ¶ added in v0.9.6
func NewInterfaceTypeDef(name, description string) *InterfaceTypeDef
func (InterfaceTypeDef) Clone ¶ added in v0.9.6
func (iface InterfaceTypeDef) Clone() *InterfaceTypeDef
func (*InterfaceTypeDef) IsSubtypeOf ¶ added in v0.9.6
func (iface *InterfaceTypeDef) IsSubtypeOf(otherIface *InterfaceTypeDef) bool
func (*InterfaceTypeDef) Type ¶ added in v0.9.7
func (*InterfaceTypeDef) Type() *ast.Type
func (*InterfaceTypeDef) TypeDescription ¶ added in v0.9.7
func (*InterfaceTypeDef) TypeDescription() string
func (*InterfaceTypeDef) WithSourceMap ¶ added in v0.13.7
func (iface *InterfaceTypeDef) WithSourceMap(sourceMap *SourceMap) *InterfaceTypeDef
type JSON ¶ added in v0.9.7
type JSON json.RawMessage
func (JSON) DecodeInput ¶ added in v0.9.7
func (JSON) Decoder ¶ added in v0.9.7
func (p JSON) Decoder() dagql.InputDecoder
func (JSON) MarshalJSON ¶ added in v0.9.7
func (JSON) TypeDescription ¶ added in v0.9.7
func (*JSON) UnmarshalJSON ¶ added in v0.11.8
type JSONValue ¶ added in v0.18.17
type JSONValue struct {
Data []byte
}
JSONValue is a simple state carrier for JSON-encoded bytes
type JSONValueID ¶ added in v0.18.17
type LLM ¶ added in v0.17.0
type LLM struct {
// contains filtered or unexported fields
}
An instance of a LLM (large language model), with its state and tool calling environment
func (*LLM) BindResult ¶ added in v0.18.0
func (*LLM) Endpoint ¶ added in v0.17.0
func (llm *LLM) Endpoint(ctx context.Context) (*LLMEndpoint, error)
func (*LLM) HistoryJSON ¶ added in v0.17.0
func (*LLM) Sync ¶ added in v0.17.0
send the context to the LLM endpoint, process replies and tool calls; continue in a loop Synchronize LLM state: 1. Send context to LLM endpoint 2. Process replies and tool calls 3. Continue in a loop until no tool calls, or caps are reached
func (*LLM) TokenUsage ¶ added in v0.17.2
func (*LLM) ToolsDoc ¶ added in v0.17.0
Generate a human-readable documentation of tools available to the model
func (*LLM) WithBlockedFunction ¶ added in v0.19.3
Disable the default system prompt
func (*LLM) WithMCPServer ¶ added in v0.19.3
Add an external MCP server to the LLM
func (*LLM) WithPrompt ¶ added in v0.17.0
Append a user message (prompt) to the message history
func (*LLM) WithPromptFile ¶ added in v0.17.0
WithPromptFile is like WithPrompt but reads the prompt from a file
func (*LLM) WithStaticTools ¶ added in v0.19.3
func (*LLM) WithSystemPrompt ¶ added in v0.17.0
Append a system prompt message to the history
func (*LLM) WithoutDefaultSystemPrompt ¶ added in v0.18.4
Disable the default system prompt
type LLMClient ¶ added in v0.17.0
type LLMClient interface {
SendQuery(ctx context.Context, history []*ModelMessage, tools []LLMTool) (*LLMResponse, error)
IsRetryable(err error) bool
}
LLMClient interface defines the methods that each provider must implement
type LLMEndpoint ¶ added in v0.17.0
type LLMEndpoint struct {
Model string
BaseURL string
Key string
Provider LLMProvider
Client LLMClient
}
type LLMProvider ¶ added in v0.17.0
type LLMProvider string
const ( OpenAI LLMProvider = "openai" Anthropic LLMProvider = "anthropic" Google LLMProvider = "google" Meta LLMProvider = "meta" Mistral LLMProvider = "mistral" DeepSeek LLMProvider = "deepseek" Other LLMProvider = "other" )
type LLMReplayer ¶ added in v0.17.0
type LLMReplayer struct {
// contains filtered or unexported fields
}
func (*LLMReplayer) IsRetryable ¶ added in v0.18.4
func (*LLMReplayer) IsRetryable(err error) bool
func (*LLMReplayer) SendQuery ¶ added in v0.17.0
func (c *LLMReplayer) SendQuery(ctx context.Context, history []*ModelMessage, tools []LLMTool) (_ *LLMResponse, rerr error)
type LLMResponse ¶ added in v0.17.0
type LLMResponse struct {
Content string
ToolCalls []LLMToolCall
TokenUsage LLMTokenUsage
}
type LLMRouter ¶ added in v0.17.0
type LLMRouter struct {
AnthropicAPIKey string
AnthropicBaseURL string
AnthropicModel string
OpenAIAPIKey string
OpenAIAzureVersion string
OpenAIBaseURL string
OpenAIModel string
OpenAIDisableStreaming bool
GeminiAPIKey string
GeminiBaseURL string
GeminiModel string
}
A LLM routing configuration
func NewLLMRouter ¶ added in v0.17.0
func (*LLMRouter) DefaultModel ¶ added in v0.17.0
Return a default model, if configured
func (*LLMRouter) LoadConfig ¶ added in v0.17.0
type LLMTokenUsage ¶ added in v0.17.2
type LLMTokenUsage struct {
InputTokens int64 `field:"true" json:"input_tokens"`
OutputTokens int64 `field:"true" json:"output_tokens"`
CachedTokenReads int64 `field:"true" json:"cached_token_reads"`
CachedTokenWrites int64 `field:"true" json:"cached_token_writes"`
TotalTokens int64 `field:"true" json:"total_tokens"`
}
func (*LLMTokenUsage) Type ¶ added in v0.17.2
func (*LLMTokenUsage) Type() *ast.Type
type LLMTool ¶ added in v0.17.0
type LLMTool struct {
// Tool name
Name string `json:"name"`
// MCP server name providing the tool, if any
Server string
// Tool description
Description string `json:"description"`
// Tool argument schema. Key is argument name. Value is unmarshalled json-schema for the argument.
Schema map[string]any `json:"schema"`
// Whether the tool schema is strict.
// https://platform.openai.com/docs/guides/structured-outputs?api-mode=chat
Strict bool `json:"-"`
// Whether we should hide the LLM tool call span in favor of just showing its
// child spans.
HideSelf bool `json:"-"`
// Whether the tool is read-only (from MCP ReadOnlyHint annotation)
ReadOnly bool `json:"-"`
// GraphQL API field that this tool corresponds to
Field *ast.FieldDefinition `json:"-"`
// Function implementing the tool.
Call LLMToolFunc `json:"-"`
}
A frontend for LLM tool calling
type LLMToolCall ¶ added in v0.18.4
type LLMToolSet ¶ added in v0.19.3
type LLMToolSet = dagui.OrderedSet[string, LLMTool]
func NewLLMToolSet ¶ added in v0.19.3
func NewLLMToolSet() *LLMToolSet
type LLMVariable ¶ added in v0.17.0
type LLMVariable struct {
// The name of the variable
Name string `field:"true"`
// The type name of the variable's value
TypeName string `field:"true"`
// A hash of the variable's value, used to detect changes
Hash string `field:"true"`
}
A variable in the LLM environment
func (*LLMVariable) Type ¶ added in v0.17.0
func (v *LLMVariable) Type() *ast.Type
type ListType ¶ added in v0.9.7
func (*ListType) CollectCoreIDs ¶ added in v0.12.1
func (*ListType) ConvertFromSDKResult ¶ added in v0.9.7
func (*ListType) ConvertToSDKInput ¶ added in v0.9.7
type ListTypeDef ¶ added in v0.8.8
type ListTypeDef struct {
ElementTypeDef *TypeDef `field:"true" doc:"The type of the elements in the list."`
}
func (ListTypeDef) Clone ¶ added in v0.8.8
func (typeDef ListTypeDef) Clone() *ListTypeDef
func (*ListTypeDef) Type ¶ added in v0.9.7
func (*ListTypeDef) Type() *ast.Type
func (*ListTypeDef) TypeDescription ¶ added in v0.9.7
func (*ListTypeDef) TypeDescription() string
type LocalGitRef ¶ added in v0.16.3
func (*LocalGitRef) PBDefinitions ¶ added in v0.16.3
func (ref *LocalGitRef) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
type LocalGitRepository ¶ added in v0.16.3
type LocalGitRepository struct {
Directory dagql.ObjectResult[*Directory]
}
func (*LocalGitRepository) Get ¶ added in v0.19.3
func (repo *LocalGitRepository) Get(ctx context.Context, ref *gitutil.Ref) (GitRefBackend, error)
func (*LocalGitRepository) PBDefinitions ¶ added in v0.16.3
func (repo *LocalGitRepository) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
type LocalModuleSource ¶ added in v0.9.8
type LocalModuleSource struct {
ContextDirectoryPath string
}
func (LocalModuleSource) Clone ¶ added in v0.9.8
func (src LocalModuleSource) Clone() *LocalModuleSource
type MCP ¶ added in v0.18.0
type MCP struct {
// contains filtered or unexported fields
}
Internal implementation of the MCP standard, for exposing a Dagger environment to a LLM via tool calling.
func (*MCP) BlockFunction ¶ added in v0.19.3
func (*MCP) CallBatch ¶ added in v0.19.3
func (m *MCP) CallBatch(ctx context.Context, tools []LLMTool, toolCalls []LLMToolCall) []*ModelMessage
CallBatch executes a batch of tool calls, handling MCP server syncing efficiently by grouping calls by destructiveness and server to avoid workspace conflicts
func (*MCP) DefaultSystemPrompt ¶ added in v0.18.0
func (*MCP) GetObject ¶ added in v0.18.0
func (m *MCP) GetObject(ctx context.Context, key, expectedType string) (dagql.AnyObjectResult, error)
Get an object saved at a given key
func (*MCP) Ingest ¶ added in v0.19.3
func (m *MCP) Ingest(obj dagql.AnyObjectResult, desc string) string
func (*MCP) IngestBy ¶ added in v0.19.3
func (m *MCP) IngestBy(obj dagql.AnyObjectResult, desc string, hash digest.Digest) string
func (*MCP) IngestContextual ¶ added in v0.19.3
func (*MCP) LastResult ¶ added in v0.18.4
func (*MCP) LookupTool ¶ added in v0.19.3
LookupTool looks for a tool identified by a name.
func (*MCP) TypeCounts ¶ added in v0.19.3
func (*MCP) WithMCPServer ¶ added in v0.19.3
func (m *MCP) WithMCPServer(srv *MCPServerConfig) *MCP
type MCPServerConfig ¶ added in v0.19.3
type MCPServerConfig struct {
// Name of the MCP server
Name string
// Command to run the MCP server
Service dagql.ObjectResult[*Service]
}
MCPServerConfig represents configuration for an external MCP server
func (*MCPServerConfig) Dial ¶ added in v0.19.3
func (srv *MCPServerConfig) Dial(ctx context.Context) (_ *mcp.ClientSession, rerr error)
type Mod ¶ added in v0.9.7
type Mod interface {
// Name gets the name of the module
Name() string
// View gets the name of the module's view of its underlying schema
View() (call.View, bool)
// Install modifies the provided server to install the contents of the
// modules declared fields.
Install(ctx context.Context, dag *dagql.Server) error
// ModTypeFor returns the ModType for the given typedef based on this module's schema.
// The returned type will have any namespacing already applied.
// If checkDirectDeps is true, then its direct dependencies will also be checked.
ModTypeFor(ctx context.Context, typeDef *TypeDef, checkDirectDeps bool) (ModType, bool, error)
// TypeDefs gets the TypeDefs exposed by this module (not including
// dependencies) from the given unified schema. Implicitly, TypeDefs
// returned by this module include any extensions installed by other
// modules from the unified schema. (e.g. LLM which is extended with each
// type via middleware)
TypeDefs(ctx context.Context, dag *dagql.Server) ([]*TypeDef, error)
// Source returns the ModuleSource for this module
GetSource() *ModuleSource
}
Mod is a module in loaded into the server's DAG of modules; it's the vertex type of the DAG. It's an interface so we can abstract over user modules and core and treat them the same.
type ModDeps ¶ added in v0.9.7
type ModDeps struct {
Mods []Mod // TODO hide
// contains filtered or unexported fields
}
ModDeps represents a set of dependencies for a module or for a caller depending on a particular set of modules to be served.
func NewModDeps ¶ added in v0.9.7
func (*ModDeps) ModTypeFor ¶ added in v0.9.7
Search the deps for the given type def, returning the ModType if found. This does not recurse to transitive dependencies; it only returns types directly exposed by the schema of the top-level deps.
func (*ModDeps) Schema ¶ added in v0.9.7
The combined schema exposed by each mod in this set of dependencies
func (*ModDeps) SchemaIntrospectionJSONFile ¶ added in v0.11.7
func (d *ModDeps) SchemaIntrospectionJSONFile(ctx context.Context, hiddenTypes []string) (inst dagql.Result[*File], _ error)
The introspection json for combined schema exposed by each mod in this set of dependencies, as a file. It is meant for consumption from modules, which have some APIs hidden from their codegen.
func (*ModDeps) SchemaIntrospectionJSONFileForModule ¶ added in v0.19.3
func (d *ModDeps) SchemaIntrospectionJSONFileForModule(ctx context.Context) (inst dagql.Result[*File], _ error)
The introspection json for combined schema exposed by each mod in this set of dependencies, as a file. Some APIs are automatically hidden as they should not be exposed to modules.
type ModType ¶ added in v0.9.7
type ModType interface {
// ConvertFromSDKResult converts a value returned from an SDK into values
// expected by the server, including conversion of IDs to their "unpacked"
// objects
ConvertFromSDKResult(ctx context.Context, value any) (dagql.AnyResult, error)
// ConvertToSDKInput converts a value from the server into a value expected
// by the SDK, which may include converting objects to their IDs
ConvertToSDKInput(ctx context.Context, value dagql.Typed) (any, error)
// CollectCoreIDs collects all the call IDs from core objects in the given value, whether
// it's idable itself or is a list/object containing idable values (recursively)
CollectCoreIDs(ctx context.Context, value dagql.AnyResult, ids map[digest.Digest]*resource.ID) error
// SourceMod is the module in which this type was originally defined
SourceMod() Mod
// The core API TypeDef representation of this type
TypeDef() *TypeDef
}
ModType wraps the core TypeDef type with schema specific concerns like ID conversion and tracking of the module in which the type was originally defined.
type ModelFinishedError ¶ added in v0.18.0
type ModelFinishedError struct {
Reason string
}
func (*ModelFinishedError) Error ¶ added in v0.18.0
func (err *ModelFinishedError) Error() string
type ModelMessage ¶ added in v0.17.0
type ModelMessage struct {
Role string `json:"role"`
Content string `json:"content"`
ToolCalls []LLMToolCall `json:"tool_calls,omitempty"`
ToolCallID string `json:"tool_call_id,omitempty"`
ToolErrored bool `json:"tool_errored,omitempty"`
TokenUsage LLMTokenUsage `json:"token_usage,omitzero"`
}
ModelMessage represents a generic message in the LLM conversation
type Module ¶ added in v0.8.8
type Module struct {
// The source of the module
Source dagql.Nullable[dagql.ObjectResult[*ModuleSource]] `field:"true" name:"source" doc:"The source for the module."`
// The source to load contextual dirs/files from, which may be different than Source for blueprints
ContextSource dagql.Nullable[dagql.ObjectResult[*ModuleSource]]
// The name of the module
NameField string `field:"true" name:"name" doc:"The name of the module"`
// The original name of the module set in its configuration file (or first configured via withName).
// Different than NameField when a different name was specified for the module via a dependency.
OriginalName string
// The module's SDKConfig, as set in the module config file
SDKConfig *SDKConfig `field:"true" name:"sdk" doc:"The SDK config used by this module."`
// Deps contains the module's dependency DAG.
Deps *ModDeps
// Runtime is the container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.
Runtime dagql.Nullable[dagql.ObjectResult[*Container]] `` /* 137-byte string literal not displayed */
// The doc string of the module, if any
Description string `field:"true" doc:"The doc string of the module, if any"`
// The module's objects
ObjectDefs []*TypeDef `field:"true" name:"objects" doc:"Objects served by this module."`
// The module's interfaces
InterfaceDefs []*TypeDef `field:"true" name:"interfaces" doc:"Interfaces served by this module."`
// The module's enumerations
EnumDefs []*TypeDef `field:"true" name:"enums" doc:"Enumerations served by this module."`
// ResultID is the ID of the initialized module.
ResultID *call.ID
}
func (*Module) CacheConfigForCall ¶ added in v0.18.3
func (Module) CloneWithoutDefs ¶ added in v0.16.3
func (*Module) GetContextSource ¶ added in v0.19.3
func (mod *Module) GetContextSource() *ModuleSource
The "context source" is the module used as the execution context for the module. Usually it's simply the module source itself. But when using blueprints, it will point to the downstrea, module applying the blueprint, not the blueprint itself.
func (*Module) GetSource ¶ added in v0.18.3
func (mod *Module) GetSource() *ModuleSource
func (*Module) ModTypeFor ¶ added in v0.9.7
func (*Module) ObjectUserDefaults ¶ added in v0.19.3
Return local defaults for the specified object An empty string as object name means the constructor.
func (*Module) PBDefinitions ¶ added in v0.8.8
func (*Module) Patch ¶ added in v0.18.12
Patch is called after all types have been loaded - here we can update any definitions as required, and attempt to resolve references.
func (*Module) TypeDescription ¶ added in v0.9.7
func (*Module) UserDefaults ¶ added in v0.19.3
Return all user defaults for this module
func (*Module) WithDescription ¶ added in v0.9.8
func (*Module) WithInterface ¶ added in v0.9.6
type ModuleEnum ¶ added in v0.12.0
type ModuleEnum struct {
TypeDef *EnumTypeDef
Name string
// Local marks this enum value as local to the module that declares its
// typedef. This is so that when converting it to/from it's own module we
// can use its OriginalName, but when converting it for other modules, we
// use the declared Name.
Local bool
}
func (*ModuleEnum) DecodeInput ¶ added in v0.12.0
func (e *ModuleEnum) DecodeInput(val any) (dagql.Input, error)
func (*ModuleEnum) Decoder ¶ added in v0.12.0
func (e *ModuleEnum) Decoder() dagql.InputDecoder
func (*ModuleEnum) Lookup ¶ added in v0.12.0
func (e *ModuleEnum) Lookup(val string) (dagql.Input, error)
func (*ModuleEnum) MarshalJSON ¶ added in v0.12.0
func (e *ModuleEnum) MarshalJSON() ([]byte, error)
func (*ModuleEnum) PossibleValues ¶ added in v0.12.0
func (e *ModuleEnum) PossibleValues() ast.EnumValueList
func (*ModuleEnum) ToLiteral ¶ added in v0.12.0
func (e *ModuleEnum) ToLiteral() call.Literal
func (*ModuleEnum) Type ¶ added in v0.12.0
func (e *ModuleEnum) Type() *ast.Type
func (*ModuleEnum) TypeDefinition ¶ added in v0.12.0
func (e *ModuleEnum) TypeDefinition(view call.View) *ast.Definition
func (*ModuleEnum) TypeDescription ¶ added in v0.12.0
func (e *ModuleEnum) TypeDescription() string
func (*ModuleEnum) TypeName ¶ added in v0.12.0
func (e *ModuleEnum) TypeName() string
type ModuleEnumType ¶ added in v0.12.0
type ModuleEnumType struct {
// contains filtered or unexported fields
}
func (*ModuleEnumType) CollectCoreIDs ¶ added in v0.12.1
func (*ModuleEnumType) ConvertFromSDKResult ¶ added in v0.12.0
func (*ModuleEnumType) ConvertToSDKInput ¶ added in v0.12.0
func (*ModuleEnumType) SourceMod ¶ added in v0.12.0
func (m *ModuleEnumType) SourceMod() Mod
func (*ModuleEnumType) TypeDef ¶ added in v0.12.0
func (m *ModuleEnumType) TypeDef() *TypeDef
type ModuleFunction ¶ added in v0.9.7
type ModuleFunction struct {
// contains filtered or unexported fields
}
func NewModFunction ¶ added in v0.16.0
func NewModFunction( ctx context.Context, mod *Module, objDef *ObjectTypeDef, runtime dagql.ObjectResult[*Container], metadata *Function, ) (*ModuleFunction, error)
func (*ModuleFunction) ArgType ¶ added in v0.9.7
func (fn *ModuleFunction) ArgType(argName string) (ModType, error)
func (*ModuleFunction) CacheConfigForCall ¶ added in v0.18.4
func (fn *ModuleFunction) CacheConfigForCall( ctx context.Context, parent dagql.AnyResult, args map[string]dagql.Input, view call.View, inputCfg dagql.CacheConfig, ) (*dagql.CacheConfig, error)
func (*ModuleFunction) ReturnType ¶ added in v0.9.7
func (fn *ModuleFunction) ReturnType() (ModType, error)
func (*ModuleFunction) UserDefault ¶ added in v0.19.3
func (fn *ModuleFunction) UserDefault(ctx context.Context, argName string) (*UserDefault, bool, error)
Lookup a user default for this function
func (*ModuleFunction) UserDefaults ¶ added in v0.19.3
func (fn *ModuleFunction) UserDefaults(ctx context.Context) (*EnvFile, error)
type ModuleObject ¶ added in v0.9.7
type ModuleObject struct {
Module *Module
TypeDef *ObjectTypeDef
Fields map[string]any
}
func (*ModuleObject) PBDefinitions ¶ added in v0.9.7
func (obj *ModuleObject) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
func (*ModuleObject) Type ¶ added in v0.9.7
func (obj *ModuleObject) Type() *ast.Type
func (*ModuleObject) TypeDefinition ¶ added in v0.13.7
func (obj *ModuleObject) TypeDefinition(view call.View) *ast.Definition
func (*ModuleObject) TypeDescription ¶ added in v0.9.7
func (obj *ModuleObject) TypeDescription() string
type ModuleObjectType ¶ added in v0.9.7
type ModuleObjectType struct {
// contains filtered or unexported fields
}
func (*ModuleObjectType) CollectCoreIDs ¶ added in v0.12.1
func (*ModuleObjectType) ConvertFromSDKResult ¶ added in v0.9.7
func (*ModuleObjectType) ConvertToSDKInput ¶ added in v0.9.7
func (*ModuleObjectType) GetCallable ¶ added in v0.9.7
func (*ModuleObjectType) SourceMod ¶ added in v0.9.7
func (t *ModuleObjectType) SourceMod() Mod
func (*ModuleObjectType) TypeDef ¶ added in v0.9.7
func (t *ModuleObjectType) TypeDef() *TypeDef
type ModuleSource ¶ added in v0.9.8
type ModuleSource struct {
ConfigExists bool `field:"true" name:"configExists" doc:"Whether an existing dagger.json for the module was found."`
ModuleName string `field:"true" name:"moduleName" doc:"The name of the module, including any setting via the withName API."`
ModuleOriginalName string `` /* 165-byte string literal not displayed */
EngineVersion string `field:"true" name:"engineVersion" doc:"The engine version of the module."`
CodegenConfig *modules.ModuleCodegenConfig
ModuleConfigUserFields modules.ModuleConfigUserFields
// The SDK configuration of the module as read from the module's dagger.json or set by withSDK
SDK *SDKConfig `field:"true" name:"sdk" doc:"The SDK configuration of the module."`
// The implementation of the SDK with codegen and related operations. Reloaded when SDK changes.
SDKImpl SDK
// IncludePaths are the includes as read from the module's dagger.json
IncludePaths []string
// RebasedIncludePaths are the include paths with the source root subpath prepended
RebasedIncludePaths []string
// ConfigDependencies are the dependencies as read from the module's dagger.json
// NOTE: this is currently not updated by withDependencies and related APIs, only Dependencies will be updated
ConfigDependencies []*modules.ModuleConfigDependency
// Dependencies are the loaded sources for the module's dependencies
Dependencies dagql.ObjectResultArray[*ModuleSource] `field:"true" name:"dependencies" doc:"The dependencies of the module source."`
ConfigBlueprint *modules.ModuleConfigDependency
Blueprint dagql.ObjectResult[*ModuleSource] `field:"true" name:"blueprint" doc:"The blueprint referenced by the module source."`
UserDefaults *EnvFile `field:"true" name:"userDefaults" doc:"User-defined defaults read from local .env files"`
// Clients are the clients generated for the module.
ConfigClients []*modules.ModuleConfigClient `field:"true" name:"configClients" doc:"The clients generated for the module."`
// SourceRootSubpath is the relative path from the context dir to the dir containing the module's dagger.json
SourceRootSubpath string `` /* 128-byte string literal not displayed */
// SourceSubpath is the relative path from the context dir to the dir containing the module's source code
SourceSubpath string
OriginalSubpath string
ContextDirectory dagql.ObjectResult[*Directory] `` /* 136-byte string literal not displayed */
Digest string `` /* 187-byte string literal not displayed */
Kind ModuleSourceKind `field:"true" name:"kind" doc:"The kind of module source (currently local, git or dir)."`
Local *LocalModuleSource
Git *GitModuleSource
}
func (*ModuleSource) AsString ¶ added in v0.16.0
func (src *ModuleSource) AsString() string
func (*ModuleSource) CalcDigest ¶ added in v0.16.0
func (src *ModuleSource) CalcDigest(ctx context.Context) digest.Digest
CalcDigest calculates a content-hash of the module source. It is used during codegen; two module sources with the same digest will share cache for codegen-related calls.
func (ModuleSource) Clone ¶ added in v0.9.8
func (src ModuleSource) Clone() *ModuleSource
func (*ModuleSource) LoadContextDir ¶ added in v0.18.17
func (src *ModuleSource) LoadContextDir( ctx context.Context, dag *dagql.Server, path string, include []string, exclude []string, ) (inst dagql.ObjectResult[*Directory], err error)
LoadContextDir loads addition files+directories from the module source's context, including those that may have not been included in the original module source load.
func (*ModuleSource) LoadContextFile ¶ added in v0.19.3
func (src *ModuleSource) LoadContextFile( ctx context.Context, dag *dagql.Server, path string, ) (inst dagql.ObjectResult[*File], err error)
func (*ModuleSource) LoadContextGit ¶ added in v0.18.17
func (src *ModuleSource) LoadContextGit( ctx context.Context, dag *dagql.Server, ) (inst dagql.ObjectResult[*GitRepository], err error)
func (*ModuleSource) LoadUserDefaults ¶ added in v0.19.3
func (src *ModuleSource) LoadUserDefaults(ctx context.Context) error
LoadUserDefaults loads and merges environment files for local module defaults. It combines the inner .env file (from the module's source root) with relevant entries from the outer .env file (found via find-up from the host), filtered by the module name and original module name as prefixes.
Example: Inner .env (mymodule/.env): FOO=bar Outer .env (found via find-up): MYMODULE_BAZ=qux, OTHER_VAR=ignored Result: FOO=bar, BAZ=qux (prefix "MYMODULE_" removed from outer entries)
func (*ModuleSource) PBDefinitions ¶ added in v0.9.8
func (src *ModuleSource) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
func (*ModuleSource) Pin ¶ added in v0.13.6
func (src *ModuleSource) Pin() string
func (*ModuleSource) Type ¶ added in v0.9.8
func (src *ModuleSource) Type() *ast.Type
func (*ModuleSource) TypeDescription ¶ added in v0.9.8
func (src *ModuleSource) TypeDescription() string
type ModuleSourceExperimentalFeature ¶ added in v0.19.3
type ModuleSourceExperimentalFeature string
func (ModuleSourceExperimentalFeature) Decoder ¶ added in v0.19.3
func (f ModuleSourceExperimentalFeature) Decoder() dagql.InputDecoder
func (ModuleSourceExperimentalFeature) String ¶ added in v0.19.3
func (f ModuleSourceExperimentalFeature) String() string
func (ModuleSourceExperimentalFeature) ToLiteral ¶ added in v0.19.3
func (f ModuleSourceExperimentalFeature) ToLiteral() call.Literal
func (ModuleSourceExperimentalFeature) Type ¶ added in v0.19.3
func (f ModuleSourceExperimentalFeature) Type() *ast.Type
func (ModuleSourceExperimentalFeature) TypeDescription ¶ added in v0.19.3
func (f ModuleSourceExperimentalFeature) TypeDescription() string
type ModuleSourceID ¶ added in v0.9.8
type ModuleSourceID = dagql.ID[*ModuleSource]
type ModuleSourceKind ¶ added in v0.9.8
type ModuleSourceKind string
func (ModuleSourceKind) Decoder ¶ added in v0.9.8
func (proto ModuleSourceKind) Decoder() dagql.InputDecoder
func (ModuleSourceKind) HumanString ¶ added in v0.16.0
func (proto ModuleSourceKind) HumanString() string
func (ModuleSourceKind) ToLiteral ¶ added in v0.9.8
func (proto ModuleSourceKind) ToLiteral() call.Literal
func (ModuleSourceKind) Type ¶ added in v0.9.8
func (proto ModuleSourceKind) Type() *ast.Type
func (ModuleSourceKind) TypeDescription ¶ added in v0.9.8
func (proto ModuleSourceKind) TypeDescription() string
type ModuleSourceStatFS ¶ added in v0.18.7
type ModuleSourceStatFS struct {
// contains filtered or unexported fields
}
func NewModuleSourceStatFS ¶ added in v0.18.7
func NewModuleSourceStatFS(bk *buildkit.Client, src *ModuleSource) *ModuleSourceStatFS
func (ModuleSourceStatFS) Stat ¶ added in v0.18.7
func (fs ModuleSourceStatFS) Stat(ctx context.Context, path string) (*fsutiltypes.Stat, error)
type ModuleTypes ¶ added in v0.19.3
type ModuleTypes interface {
/*
ModuleTypes returns a module instance representing the type definitions
exposed by the module code.
This function prototype is different from the one exposed by the SDK.
SDK must implement the `ModuleTypes` function with the following signature:
“`gql
moduleTypes(
modSource: ModuleSource!
introspectionJSON: File!
outputFilePath: String!
): Container!
“`
*/
ModuleTypes(
context.Context,
*ModDeps,
dagql.ObjectResult[*ModuleSource],
*call.ID,
) (dagql.ObjectResult[*Module], error)
}
ModuleTypes is an interface that a SDK may implement to expose type definitions of the module.
This interface MUST be implemented to support self calls.
type NetworkProtocol ¶ added in v0.3.13
type NetworkProtocol string
NetworkProtocol is a GraphQL enum type.
func (NetworkProtocol) Decoder ¶ added in v0.9.7
func (proto NetworkProtocol) Decoder() dagql.InputDecoder
func (NetworkProtocol) Network ¶ added in v0.3.13
func (proto NetworkProtocol) Network() string
Network returns the value appropriate for the "network" argument to Go net.Dial, and for appending to the port number to form the key for the ExposedPorts object in the OCI image config.
func (NetworkProtocol) ToLiteral ¶ added in v0.9.7
func (proto NetworkProtocol) ToLiteral() call.Literal
func (NetworkProtocol) Type ¶ added in v0.9.7
func (proto NetworkProtocol) Type() *ast.Type
func (NetworkProtocol) TypeDescription ¶ added in v0.9.7
func (proto NetworkProtocol) TypeDescription() string
type NullableType ¶ added in v0.9.7
func (*NullableType) CollectCoreIDs ¶ added in v0.12.1
func (*NullableType) ConvertFromSDKResult ¶ added in v0.9.7
func (*NullableType) ConvertToSDKInput ¶ added in v0.9.7
func (*NullableType) SourceMod ¶ added in v0.9.7
func (t *NullableType) SourceMod() Mod
func (*NullableType) TypeDef ¶ added in v0.9.7
func (t *NullableType) TypeDef() *TypeDef
type ObjectTypeDef ¶ added in v0.8.8
type ObjectTypeDef struct {
// Name is the standardized name of the object (CamelCase), as used for the object in the graphql schema
Name string `field:"true" doc:"The name of the object."`
Description string `field:"true" doc:"The doc string for the object, if any."`
SourceMap dagql.Nullable[*SourceMap] `field:"true" doc:"The location of this object declaration."`
Fields []*FieldTypeDef `field:"true" doc:"Static fields defined on this object, if any."`
Functions []*Function `field:"true" doc:"Functions defined on this object, if any."`
Constructor dagql.Nullable[*Function] `field:"true" doc:"The function used to construct new instances of this object, if any"`
// SourceModuleName is currently only set when returning the TypeDef from the Objects field on Module
SourceModuleName string `field:"true" doc:"If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise."`
// The original name of the object as provided by the SDK that defined it, used
// when invoking the SDK so it doesn't need to think as hard about case conversions
OriginalName string
}
func NewObjectTypeDef ¶ added in v0.9.1
func NewObjectTypeDef(name, description string) *ObjectTypeDef
func (ObjectTypeDef) Clone ¶ added in v0.8.8
func (obj ObjectTypeDef) Clone() *ObjectTypeDef
func (*ObjectTypeDef) FieldByName ¶ added in v0.8.8
func (obj *ObjectTypeDef) FieldByName(name string) (*FieldTypeDef, bool)
func (*ObjectTypeDef) FieldByOriginalName ¶ added in v0.9.7
func (obj *ObjectTypeDef) FieldByOriginalName(name string) (*FieldTypeDef, bool)
func (*ObjectTypeDef) FunctionByName ¶ added in v0.8.8
func (obj *ObjectTypeDef) FunctionByName(name string) (*Function, bool)
func (*ObjectTypeDef) IsSubtypeOf ¶ added in v0.9.6
func (obj *ObjectTypeDef) IsSubtypeOf(iface *InterfaceTypeDef) bool
func (*ObjectTypeDef) Type ¶ added in v0.9.7
func (*ObjectTypeDef) Type() *ast.Type
func (*ObjectTypeDef) TypeDescription ¶ added in v0.9.7
func (*ObjectTypeDef) TypeDescription() string
func (*ObjectTypeDef) WithSourceMap ¶ added in v0.13.7
func (obj *ObjectTypeDef) WithSourceMap(sourceMap *SourceMap) *ObjectTypeDef
type OpenAIClient ¶ added in v0.17.0
type OpenAIClient struct {
// contains filtered or unexported fields
}
func (*OpenAIClient) IsRetryable ¶ added in v0.18.4
func (c *OpenAIClient) IsRetryable(err error) bool
func (*OpenAIClient) SendQuery ¶ added in v0.17.0
func (c *OpenAIClient) SendQuery(ctx context.Context, history []*ModelMessage, tools []LLMTool) (_ *LLMResponse, rerr error)
type Ownership ¶ added in v0.5.1
Ownership contains a UID/GID pair resolved from a user/group name or ID pair provided via the API. It primarily exists to distinguish an unspecified ownership from UID/GID 0 (root) ownership.
func (Ownership) Opt ¶ added in v0.5.1
func (owner Ownership) Opt() llb.ChownOption
type ParsedGitRefString ¶ added in v0.18.7
type ParsedGitRefString struct {
ModVersion string
RepoRoot *vcs.RepoRoot
RepoRootSubdir string
SourceCloneRef string // original user-provided username
// contains filtered or unexported fields
}
func ParseGitRefString ¶ added in v0.18.7
func ParseGitRefString(ctx context.Context, refString string) (_ ParsedGitRefString, rerr error)
type ParsedLocalRefString ¶ added in v0.18.7
type ParsedLocalRefString struct {
ModPath string
}
type ParsedRefString ¶ added in v0.18.7
type ParsedRefString struct {
Kind ModuleSourceKind
Local *ParsedLocalRefString
Git *ParsedGitRefString
}
func ParseRefString ¶ added in v0.18.7
type Platform ¶ added in v0.9.7
func (Platform) DecodeInput ¶ added in v0.9.7
func (Platform) Decoder ¶ added in v0.9.7
func (p Platform) Decoder() dagql.InputDecoder
func (Platform) MarshalJSON ¶ added in v0.9.7
func (Platform) TypeDescription ¶ added in v0.9.7
type Port ¶ added in v0.8.5
type Port struct {
Port int `field:"true" doc:"The port number."`
Protocol NetworkProtocol `field:"true" doc:"The transport layer protocol."`
Description *string `field:"true" doc:"The port description."`
ExperimentalSkipHealthcheck bool `field:"true" doc:"Skip the health check when run as a service."`
}
Port configures a port to exposed from a container or service.
func NewPortFromOCI ¶ added in v0.18.15
NewPortFromOCI parses an OCI port spec (e.g. 8080/tcp) into a Port struct
func (Port) TypeDescription ¶ added in v0.9.7
type PortForward ¶ added in v0.9.0
type PortForward struct {
Frontend *int `doc:"Port to expose to clients. If unspecified, a default will be chosen." json:"frontend,omitempty"`
Backend int `doc:"Destination port for traffic." json:"backend"`
Protocol NetworkProtocol `doc:"Transport layer protocol to use for traffic." default:"TCP" json:"protocol,omitempty"`
}
func (PortForward) FrontendOrBackendPort ¶ added in v0.9.0
func (pf PortForward) FrontendOrBackendPort() int
func (PortForward) TypeDescription ¶ added in v0.9.7
func (pf PortForward) TypeDescription() string
func (PortForward) TypeName ¶ added in v0.9.7
func (pf PortForward) TypeName() string
type PrimitiveType ¶ added in v0.9.7
type PrimitiveType struct {
Def *TypeDef
}
PrimitiveType are the basic types like string, int, bool, void, etc.
func (*PrimitiveType) CollectCoreIDs ¶ added in v0.12.1
func (*PrimitiveType) ConvertFromSDKResult ¶ added in v0.9.7
func (*PrimitiveType) ConvertToSDKInput ¶ added in v0.9.7
func (*PrimitiveType) SourceMod ¶ added in v0.9.7
func (t *PrimitiveType) SourceMod() Mod
func (*PrimitiveType) TypeDef ¶ added in v0.9.7
func (t *PrimitiveType) TypeDef() *TypeDef
type Query ¶ added in v0.3.10
type Query struct {
Server
// An Env value propagated to a module function call, i.e. from LLM.
CurrentEnv *call.ID
}
Query forms the root of the DAG and houses all necessary state and dependencies for evaluating queries.
func (*Query) IDDeps ¶ added in v0.9.7
IDDeps loads the module dependencies of a given ID.
The returned ModDeps extends the inner DefaultDeps with all modules found in the ID, loaded by using the DefaultDeps schema.
func (*Query) RequireMainClient ¶ added in v0.12.0
func (*Query) TypeDescription ¶ added in v0.9.7
func (*Query) WithPipeline ¶ added in v0.9.7
type RawDagOp ¶ added in v0.16.3
func (RawDagOp) Backend ¶ added in v0.16.3
func (op RawDagOp) Backend() buildkit.CustomOpBackend
type RemoteGitRef ¶ added in v0.16.3
func (*RemoteGitRef) PBDefinitions ¶ added in v0.16.3
func (ref *RemoteGitRef) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
type RemoteGitRepository ¶ added in v0.16.3
type RemoteGitRepository struct {
URL *gitutil.GitURL
SSHKnownHosts string
SSHAuthSocket dagql.ObjectResult[*Socket]
Services ServiceBindings
Platform Platform
AuthUsername string
AuthToken dagql.ObjectResult[*Secret]
AuthHeader dagql.ObjectResult[*Secret]
}
func (*RemoteGitRepository) Get ¶ added in v0.19.3
func (repo *RemoteGitRepository) Get(ctx context.Context, target *gitutil.Ref) (GitRefBackend, error)
func (*RemoteGitRepository) PBDefinitions ¶ added in v0.16.3
func (repo *RemoteGitRepository) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
type ReturnTypes ¶ added in v0.13.7
type ReturnTypes string
func (ReturnTypes) Decoder ¶ added in v0.13.7
func (expect ReturnTypes) Decoder() dagql.InputDecoder
func (ReturnTypes) ReturnCodes ¶ added in v0.13.7
func (expect ReturnTypes) ReturnCodes() []int
ReturnCodes gets the valid exit codes allowed for a specific return status
NOTE: exit status codes above 128 are likely from exiting via a signal - we shouldn't try and handle these.
func (ReturnTypes) ToLiteral ¶ added in v0.13.7
func (expect ReturnTypes) ToLiteral() call.Literal
func (ReturnTypes) Type ¶ added in v0.13.7
func (expect ReturnTypes) Type() *ast.Type
func (ReturnTypes) TypeDescription ¶ added in v0.13.7
func (expect ReturnTypes) TypeDescription() string
type RunningService ¶ added in v0.8.5
type RunningService struct {
// Key is the unique identifier for the service.
Key ServiceKey
// Host is the hostname used to reach the service.
Host string
// Ports lists the ports bound by the service.
//
// For a Container service, this is simply the list of exposed ports.
//
// For a TunnelService, this lists the configured port forwards with any
// empty or 0 frontend ports resolved to their randomly selected host port.
//
// For a HostService, this lists the configured port forwards with any empty
// or 0 frontend ports set to the same as the backend port.
Ports []Port
// Stop forcibly stops the service. It is normally called after all clients
// have detached, but may also be called manually by the user.
Stop func(ctx context.Context, force bool) error
// Wait blocks until the service has exited or the provided context is canceled.
Wait func(ctx context.Context) error
// Exec runs a command in the service. It is only supported for services
// with a backing container.
Exec func(ctx context.Context, cmd []string, env []string, io *ServiceIO) error
// The runc container ID, if any
ContainerID string
}
RunningService represents a service that is actively running.
type Runtime ¶ added in v0.18.7
type Runtime interface {
/*
Runtime returns a container that is used to execute module code at runtime
in the Dagger engine.
The provided Module is not fully initialized; the Runtime field will not
be set yet.
This function prototype is different from the one exposed by the SDK.
SDK must implement the `Runtime` function with the following signature:
“`gql
moduleRuntime(
modSource: ModuleSource!
introspectionJSON: File!
): Container!
““
*/
Runtime(
context.Context,
*ModDeps,
dagql.ObjectResult[*ModuleSource],
) (dagql.ObjectResult[*Container], error)
}
Runtime is an interface that a SDK may implements to provide an executable container to run the module's code at runtime.
This include setup of the runtime environment, dependencies installation, and entrypoint setup.
The returned container should have as entrypoint the execution of an entrypoint function that will register the module typedefs in the Dagger engine or execute a function of that module depending on the argument forwarded to that entrypoint:
- If the called object is empty, the script should register type definitions by sending a new ModuleID to the Dagger engine.
- If the called object is set, the script should execute the corresponding function and send the result to the Dagger engine.
This interface MUST be implemented to support callable SDKs (`dagger call`).
type SDK ¶ added in v0.9.7
type SDK interface {
// Transform the SDK into a Runtime if it implements it.
AsRuntime() (Runtime, bool)
// Transform the SDK into a ModuleTypes if it implements it.
AsModuleTypes() (ModuleTypes, bool)
// Transform the SDK into a CodeGenerator if it implements it.
AsCodeGenerator() (CodeGenerator, bool)
// Transform the SDK into a ClientGenerator if it implements it.
AsClientGenerator() (ClientGenerator, bool)
}
SDK aggregates all the interfaces that a SDK may implement. It provides conversion functions to get a specific interface if it's implemented. Otherwise, the function will return false. It works the same as type conversion in Go.
type SDKConfig ¶ added in v0.15.4
type SDKConfig struct {
Source string `` /* 150-byte string literal not displayed */
Config map[string]any
Experimental map[string]bool
}
func (*SDKConfig) ExperimentalFeatureEnabled ¶ added in v0.19.3
func (sdk *SDKConfig) ExperimentalFeatureEnabled(feature ModuleSourceExperimentalFeature) bool
func (*SDKConfig) TypeDescription ¶ added in v0.15.4
type ScalarTypeDef ¶ added in v0.11.3
type ScalarTypeDef struct {
Name string `field:"true" doc:"The name of the scalar."`
Description string `field:"true" doc:"A doc string for the scalar, if any."`
OriginalName string
// SourceModuleName is currently only set when returning the TypeDef from the Scalars field on Module
SourceModuleName string `field:"true" doc:"If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise."`
}
func NewScalarTypeDef ¶ added in v0.11.3
func NewScalarTypeDef(name, description string) *ScalarTypeDef
func (ScalarTypeDef) Clone ¶ added in v0.11.3
func (typeDef ScalarTypeDef) Clone() *ScalarTypeDef
func (*ScalarTypeDef) Type ¶ added in v0.11.3
func (*ScalarTypeDef) Type() *ast.Type
func (*ScalarTypeDef) TypeDescription ¶ added in v0.11.3
func (typeDef *ScalarTypeDef) TypeDescription() string
type SchemeType ¶ added in v0.12.6
type SchemeType int
const ( NoScheme SchemeType = iota SchemeHTTP SchemeHTTPS SchemeSSH SchemeSCPLike )
func (SchemeType) IsSSH ¶ added in v0.12.6
func (s SchemeType) IsSSH() bool
func (SchemeType) Prefix ¶ added in v0.12.6
func (s SchemeType) Prefix() string
type SearchOpts ¶ added in v0.18.17
type SearchOpts struct {
Pattern string
Literal bool `default:"false"`
Multiline bool `default:"false"`
Dotall bool `default:"false"`
Insensitive bool `default:"false"`
SkipIgnored bool `default:"false"`
SkipHidden bool `default:"false"`
FilesOnly bool `default:"false"`
Limit *int
}
func (SearchOpts) Args ¶ added in v0.18.17
func (opts SearchOpts) Args() []dagql.Argument
func (SearchOpts) RipgrepArgs ¶ added in v0.18.17
func (opts SearchOpts) RipgrepArgs() []string
func (*SearchOpts) RunRipgrep ¶ added in v0.18.17
func (opts *SearchOpts) RunRipgrep(ctx context.Context, rg *exec.Cmd) ([]*SearchResult, error)
type SearchResult ¶ added in v0.18.17
type SearchResult struct {
FilePath string `field:"true" doc:"The path to the file that matched."`
LineNumber int `field:"true" doc:"The first line that matched."`
AbsoluteOffset int `field:"true" doc:"The byte offset of this line within the file."`
MatchedLines string `field:"true" doc:"The line content that matched."`
Submatches []*SearchSubmatch `field:"true" doc:"Sub-match positions and content within the matched lines."`
}
func (*SearchResult) Type ¶ added in v0.18.17
func (*SearchResult) Type() *ast.Type
type SearchSubmatch ¶ added in v0.18.17
type SearchSubmatch struct {
Text string `field:"true" doc:"The matched text."`
Start int `field:"true" doc:"The match's start offset within the matched lines."`
End int `field:"true" doc:"The match's end offset within the matched lines."`
}
func (*SearchSubmatch) Type ¶ added in v0.18.17
func (*SearchSubmatch) Type() *ast.Type
type Secret ¶
type Secret struct {
// The URI of the secret, if it's stored in a remote store.
URI string
// The id of the buildkit session the secret will be retrieved through.
BuildkitSessionID string
// The user-designated name of the secret, if created by setSecret
Name string
// The secret plaintext, if created by setSecret
Plaintext []byte `json:"-"` // we shouldn't be json marshalling this, but disclude just in case
}
Secret is a content-addressed secret.
func (*Secret) TypeDescription ¶ added in v0.9.7
type SecretStore ¶ added in v0.8.0
type SecretStore struct {
// contains filtered or unexported fields
}
func NewSecretStore ¶ added in v0.8.0
func NewSecretStore(bkSessionManager *bksession.Manager) *SecretStore
func (*SecretStore) AddSecret ¶ added in v0.8.0
func (store *SecretStore) AddSecret(secret dagql.ObjectResult[*Secret]) error
func (*SecretStore) AddSecretFromOtherStore ¶ added in v0.12.1
func (store *SecretStore) AddSecretFromOtherStore(srcStore *SecretStore, secret dagql.ObjectResult[*Secret]) error
func (*SecretStore) AsBuildkitSecretStore ¶ added in v0.12.1
func (store *SecretStore) AsBuildkitSecretStore() secrets.SecretStore
func (*SecretStore) GetSecret ¶ added in v0.8.0
func (store *SecretStore) GetSecret(idDgst digest.Digest) (inst dagql.ObjectResult[*Secret], ok bool)
func (*SecretStore) GetSecretName ¶ added in v0.12.1
func (store *SecretStore) GetSecretName(idDgst digest.Digest) (string, bool)
func (*SecretStore) GetSecretNameOrURI ¶ added in v0.16.2
func (store *SecretStore) GetSecretNameOrURI(idDgst digest.Digest) (string, bool)
func (*SecretStore) GetSecretPlaintext ¶ added in v0.12.1
func (store *SecretStore) GetSecretPlaintext(ctx context.Context, idDgst digest.Digest) ([]byte, error)
func (*SecretStore) GetSecretPlaintextDirect ¶ added in v0.18.6
func (store *SecretStore) GetSecretPlaintextDirect(ctx context.Context, secret *Secret) ([]byte, error)
GetSecretPlaintextDirect returns the plaintext of the given secret, even if it's not in the store yet. Public to support retrieving the plaintext while deriving the cache key for it (after which it will be put in the store).
func (*SecretStore) GetSecretURI ¶ added in v0.15.4
func (store *SecretStore) GetSecretURI(idDgst digest.Digest) (string, bool)
func (*SecretStore) HasSecret ¶ added in v0.12.1
func (store *SecretStore) HasSecret(idDgst digest.Digest) bool
type Server ¶ added in v0.11.8
type Server interface {
// Stitch in the given module to the list being served to the current client
ServeModule(ctx context.Context, mod *Module, includeDependencies bool) error
// If the current client is coming from a function, return the module that function is from
CurrentModule(context.Context) (*Module, error)
// If the current client is coming from a function, return the function call metadata
CurrentFunctionCall(context.Context) (*FunctionCall, error)
// Return the list of deps being served to the current client
CurrentServedDeps(context.Context) (*ModDeps, error)
// The Client metadata of the main client caller (i.e. the one who created
// the session, typically the CLI invoked by the user)
MainClientCallerMetadata(context.Context) (*engine.ClientMetadata, error)
// Metadata about the main client, aka "non-module parent client", aka "NMPC".
//
// The NMPC is the nearest ancestor client that is not a module.
// It is either a caller from the host like the CLI or a nested exec.
// Useful for figuring out where local sources should be resolved from through
// chains of dependency modules.
NonModuleParentClientMetadata(context.Context) (*engine.ClientMetadata, error)
// The default deps of every user module (currently just core)
DefaultDeps(context.Context) (*ModDeps, error)
// The DagQL query cache for the current client's session
Cache(context.Context) (*dagql.SessionCache, error)
// The DagQL server for the current client's session
Server(context.Context) (*dagql.Server, error)
// Mix in this http endpoint+handler to the current client's session
MuxEndpoint(context.Context, string, http.Handler) error
// The secret store for the current client
Secrets(context.Context) (*SecretStore, error)
// The socket store for the current client
Sockets(context.Context) (*SocketStore, error)
// Add client-isolated resources like secrets, sockets, etc. to the current client's session based
// on anything embedded in the given ID. skipTopLevel, if true, will result in the leaf selection
// of the ID to be skipped when walking the ID to find these resources.
AddClientResourcesFromID(ctx context.Context, id *resource.ID, sourceClientID string, skipTopLevel bool) error
// The auth provider for the current client
Auth(context.Context) (*auth.RegistryAuthProvider, error)
// The buildkit APIs for the current client
Buildkit(context.Context) (*buildkit.Client, error)
// The services for the current client's session
Services(context.Context) (*Services, error)
// The default platform for the engine as a whole
Platform() Platform
// The content store for the engine as a whole
OCIStore() content.Store
// The dns configuration for the engine as a whole
DNS() *oci.DNSConfig
// The lease manager for the engine as a whole
LeaseManager() *leaseutil.Manager
// Return all the cache entries in the local cache. No support for filtering yet.
EngineLocalCacheEntries(context.Context) (*EngineCacheEntrySet, error)
// Prune the local cache of releaseable entries. If useDefaultPolicy is true, use the engine-wide default pruning policy,
// otherwise prune the whole cache of any releasable entries.
PruneEngineLocalCacheEntries(context.Context, bool) (*EngineCacheEntrySet, error)
// The default local cache policy to use for automatic local cache GC.
EngineLocalCachePolicy() *bkclient.PruneInfo
// Gets the buildkit cache manager
BuildkitCache() bkcache.Manager
// Gets the buildkit session manager
BuildkitSession() *bksession.Manager
// Gets the local source
FileSyncer() *filesync.FileSyncer
// A global lock for the engine, can be used to synchronize access to
// shared resources between multiple potentially concurrent calls.
Locker() *locker.Locker
// A shared engine-wide salt used when creating cache keys for secrets based on their plaintext
SecretSalt() []byte
// Open a client's telemetry database.
ClientTelemetry(ctc context.Context, sessID, clientID string) (*clientdb.Queries, func() error, error)
// The name of the engine
EngineName() string
}
APIs from the server+session+client that are needed by core APIs
type Service ¶ added in v0.3.13
type Service struct {
// The span that created the service, which future runs of the service will
// link to.
Creator trace.SpanContext
// A custom hostname set by the user.
CustomHostname string
// Container is the container to run as a service.
Container *Container
Args []string
ExperimentalPrivilegedNesting bool
InsecureRootCapabilities bool
NoInit bool
ExecMD *buildkit.ExecutionMetadata
ExecMeta *executor.Meta
// TunnelUpstream is the service that this service is tunnelling to.
TunnelUpstream dagql.ObjectResult[*Service]
// TunnelPorts configures the port forwarding rules for the tunnel.
TunnelPorts []PortForward
// The sockets on the host to reverse tunnel
HostSockets []*Socket
// Refs to release when shutting down the service.
Releasers []bkcache.Ref
}
func (*Service) Clone ¶ added in v0.8.5
Clone returns a deep copy of the container suitable for modifying in a WithXXX method.
func (*Service) StartAndTrack ¶ added in v0.9.7
func (*Service) Terminal ¶ added in v0.18.17
func (*Service) Terminal( ctx context.Context, svc dagql.ObjectResult[*Service], args *ExecTerminalArgs, ) error
func (*Service) TypeDescription ¶ added in v0.9.7
func (*Service) WithHostname ¶ added in v0.13.4
type ServiceBinding ¶ added in v0.8.5
type ServiceBinding struct {
Service dagql.ObjectResult[*Service]
Hostname string
Aliases AliasSet
}
type ServiceBindings ¶ added in v0.3.13
type ServiceBindings []ServiceBinding
func (*ServiceBindings) Merge ¶ added in v0.3.13
func (bndp *ServiceBindings) Merge(other ServiceBindings)
type ServiceIO ¶ added in v0.18.17
type ServiceIO struct {
Stdin io.ReadCloser
Stdout io.WriteCloser
Stderr io.WriteCloser
ResizeCh chan bkgw.WinSize
Interactive bool
}
type ServiceKey ¶ added in v0.8.5
ServiceKey is a unique identifier for a service.
type ServiceMCPConnection ¶ added in v0.19.3
type ServiceMCPConnection struct {
// contains filtered or unexported fields
}
func (*ServiceMCPConnection) Close ¶ added in v0.19.3
func (t *ServiceMCPConnection) Close() error
func (*ServiceMCPConnection) Read ¶ added in v0.19.3
Read implements [mcp.Connection.Read], assuming messages are newline-delimited JSON.
func (*ServiceMCPConnection) SessionID ¶ added in v0.19.3
func (t *ServiceMCPConnection) SessionID() string
type ServiceMCPTransport ¶ added in v0.19.3
type ServiceMCPTransport struct {
Service dagql.ObjectResult[*Service]
}
func (*ServiceMCPTransport) Connect ¶ added in v0.19.3
func (t *ServiceMCPTransport) Connect(ctx context.Context) (mcp.Connection, error)
type Services ¶ added in v0.8.5
type Services struct {
// contains filtered or unexported fields
}
Services manages the lifecycle of services, ensuring the same service only runs once per client.
func (*Services) Detach ¶ added in v0.8.5
func (ss *Services) Detach(ctx context.Context, svc *RunningService)
Detach detaches from the given service. If the service is not running, it is a no-op. If the service is running, it is stopped if there are no other clients using it.
func (*Services) Get ¶ added in v0.8.5
func (ss *Services) Get(ctx context.Context, id *call.ID, clientSpecific bool) (*RunningService, error)
Get returns the running service for the given service. If the service is starting, it waits for it and either returns the running service or an error if it failed to start. If the service is not running or starting, an error is returned.
func (*Services) Start ¶ added in v0.8.5
func (ss *Services) Start(ctx context.Context, id *call.ID, svc Startable, clientSpecific bool) (*RunningService, error)
Start starts the given service, returning the running service. If the service is already running, it is returned immediately. If the service is already starting, it waits for it to finish and returns the running service. If the service failed to start, it tries again.
func (*Services) StartBindings ¶ added in v0.8.5
func (ss *Services) StartBindings(ctx context.Context, bindings ServiceBindings) (_ func(), _ []*RunningService, err error)
StartBindings starts each of the bound services in parallel and returns a function that will detach from all of them after 10 seconds.
func (*Services) StartWithIO ¶ added in v0.19.3
type Socket ¶ added in v0.3.7
type Socket struct {
// The digest of the DagQL ID that accessed this socket, used as its identifier
// in socket stores.
IDDigest digest.Digest
}
func (*Socket) TypeDescription ¶ added in v0.9.7
type SocketStore ¶ added in v0.12.1
type SocketStore struct {
// contains filtered or unexported fields
}
func NewSocketStore ¶ added in v0.12.1
func NewSocketStore(bkSessionManager *bksession.Manager) *SocketStore
func (*SocketStore) AddIPSocket ¶ added in v0.12.1
func (store *SocketStore) AddIPSocket(sock *Socket, buildkitSessionID, upstreamHost string, port PortForward) error
func (*SocketStore) AddSocketFromOtherStore ¶ added in v0.12.1
func (store *SocketStore) AddSocketFromOtherStore(socket *Socket, otherStore *SocketStore) error
func (*SocketStore) AddUnixSocket ¶ added in v0.12.1
func (store *SocketStore) AddUnixSocket(sock *Socket, buildkitSessionID, hostPath string) error
func (*SocketStore) CheckAgent ¶ added in v0.12.1
func (store *SocketStore) CheckAgent(ctx context.Context, req *sshforward.CheckAgentRequest) (*sshforward.CheckAgentResponse, error)
func (*SocketStore) ConnectSocket ¶ added in v0.12.1
func (store *SocketStore) ConnectSocket(ctx context.Context, idDgst digest.Digest) (sshforward.SSH_ForwardAgentClient, error)
func (*SocketStore) ForwardAgent ¶ added in v0.12.1
func (store *SocketStore) ForwardAgent(stream sshforward.SSH_ForwardAgentServer) error
func (*SocketStore) GetSocketPortForward ¶ added in v0.12.1
func (store *SocketStore) GetSocketPortForward(idDgst digest.Digest) (PortForward, bool)
func (*SocketStore) GetSocketURLEncoded ¶ added in v0.12.1
func (store *SocketStore) GetSocketURLEncoded(idDgst digest.Digest) (string, bool)
func (*SocketStore) HasSocket ¶ added in v0.12.1
func (store *SocketStore) HasSocket(idDgst digest.Digest) bool
func (*SocketStore) MountSocket ¶ added in v0.12.6
func (*SocketStore) Register ¶ added in v0.12.1
func (store *SocketStore) Register(srv *grpc.Server)
type SourceMap ¶ added in v0.13.7
type SourceMap struct {
Module string `field:"true" doc:"The module dependency this was declared in."`
Filename string `field:"true" doc:"The filename from the module source."`
Line int `field:"true" doc:"The line number within the filename."`
Column int `field:"true" doc:"The column number within the line."`
URL string `field:"true" doc:"The URL to the file, if any. This can be used to link to the source map in the browser."`
}
func (*SourceMap) TypeDescription ¶ added in v0.13.7
func (*SourceMap) TypeDirective ¶ added in v0.13.7
type SourceMapID ¶ added in v0.13.7
type StatFSFunc ¶ added in v0.18.7
func (StatFSFunc) Stat ¶ added in v0.18.7
func (f StatFSFunc) Stat(ctx context.Context, path string) (*fsutiltypes.Stat, error)
type TerminalArgs ¶ added in v0.10.1
type TerminalLegacy ¶ added in v0.18.0
type TerminalLegacy struct{}
func (*TerminalLegacy) Type ¶ added in v0.18.0
func (*TerminalLegacy) Type() *ast.Type
func (*TerminalLegacy) TypeDescription ¶ added in v0.18.0
func (*TerminalLegacy) TypeDescription() string
type TmpfsMountSource ¶ added in v0.18.18
type TmpfsMountSource struct {
// Configure the size of the mounted tmpfs in bytes
Size int
}
type TypeDef ¶ added in v0.8.8
type TypeDef struct {
Kind TypeDefKind `field:"true" doc:"The kind of type this is (e.g. primitive, list, object)."`
Optional bool `field:"true" doc:"Whether this type can be set to null. Defaults to false."`
AsList dagql.Nullable[*ListTypeDef] `field:"true" doc:"If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null."`
AsObject dagql.Nullable[*ObjectTypeDef] `field:"true" doc:"If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null."`
AsInterface dagql.Nullable[*InterfaceTypeDef] `field:"true" doc:"If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null."`
AsInput dagql.Nullable[*InputTypeDef] `field:"true" doc:"If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null."`
AsScalar dagql.Nullable[*ScalarTypeDef] `field:"true" doc:"If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null."`
AsEnum dagql.Nullable[*EnumTypeDef] `field:"true" doc:"If kind is ENUM, the enum-specific type definition. If kind is not ENUM, this will be null."`
}
func (*TypeDef) IsSubtypeOf ¶ added in v0.9.6
func (*TypeDef) TypeDescription ¶ added in v0.9.7
func (*TypeDef) Underlying ¶ added in v0.9.4
func (*TypeDef) WithEnumMember ¶ added in v0.18.11
func (*TypeDef) WithEnumValue ¶ added in v0.12.0
func (*TypeDef) WithFunction ¶ added in v0.9.6
func (*TypeDef) WithInterface ¶ added in v0.9.6
func (*TypeDef) WithKind ¶ added in v0.8.8
func (typeDef *TypeDef) WithKind(kind TypeDefKind) *TypeDef
func (*TypeDef) WithListOf ¶ added in v0.8.8
func (*TypeDef) WithObject ¶ added in v0.8.8
func (*TypeDef) WithObjectConstructor ¶ added in v0.9.4
func (*TypeDef) WithObjectField ¶ added in v0.8.8
func (*TypeDef) WithOptional ¶ added in v0.8.8
type TypeDefKind ¶ added in v0.8.8
type TypeDefKind string
func (TypeDefKind) Decoder ¶ added in v0.9.7
func (k TypeDefKind) Decoder() dagql.InputDecoder
func (TypeDefKind) String ¶ added in v0.8.8
func (k TypeDefKind) String() string
func (TypeDefKind) ToLiteral ¶ added in v0.9.7
func (k TypeDefKind) ToLiteral() call.Literal
func (TypeDefKind) Type ¶ added in v0.9.7
func (k TypeDefKind) Type() *ast.Type
func (TypeDefKind) TypeDescription ¶ added in v0.9.7
func (k TypeDefKind) TypeDescription() string
type UserDefault ¶ added in v0.19.3
type UserDefault struct {
UserDefaultPrimitive
}
func (*UserDefault) IsObject ¶ added in v0.19.3
func (ud *UserDefault) IsObject() bool
func (*UserDefault) String ¶ added in v0.19.3
func (ud *UserDefault) String() string
type UserDefaultPrimitive ¶ added in v0.19.3
type UserDefaultPrimitive struct {
Function *ModuleFunction
Arg *FunctionArg
UserInput string
}
A user-defined default value that is a primitive type (not an object) Unlike default objects, it can be safely manipulated without making nested dagql query
func (*UserDefaultPrimitive) CallInput ¶ added in v0.19.3
func (udp *UserDefaultPrimitive) CallInput() (*FunctionCallArgValue, error)
func (*UserDefaultPrimitive) DagqlInput ¶ added in v0.19.3
func (udp *UserDefaultPrimitive) DagqlInput() (dagql.Input, error)
func (*UserDefaultPrimitive) JSONValue ¶ added in v0.19.3
func (udp *UserDefaultPrimitive) JSONValue() (JSON, error)
func (*UserDefaultPrimitive) Value ¶ added in v0.19.3
func (udp *UserDefaultPrimitive) Value() (any, error)
type UserModFunctionArg ¶ added in v0.9.7
type UserModFunctionArg struct {
// contains filtered or unexported fields
}
type Void ¶ added in v0.9.7
type Void struct{}
func (Void) Decoder ¶ added in v0.9.7
func (p Void) Decoder() dagql.InputDecoder
func (Void) TypeDescription ¶ added in v0.9.7
Source Files
¶
- address.go
- c2h.go
- cache.go
- cacheref.go
- changeset.go
- client_resource.go
- cloud.go
- codegen.go
- container.go
- container_emulator.go
- container_exec.go
- contenthash.go
- dagop.go
- directory.go
- engine.go
- enum.go
- env.go
- envfile.go
- envvars.go
- error.go
- file.go
- git.go
- git_local.go
- git_remote.go
- gqlformat.go
- healthcheck.go
- host.go
- http.go
- ids.go
- interface.go
- json.go
- jsonvalue.go
- llm.go
- llm_anthropic.go
- llm_google.go
- llm_openai.go
- llm_replay.go
- mcp.go
- mcpclient.go
- mcpserver.go
- moddeps.go
- modfunc.go
- modtypes.go
- module.go
- modulerefs.go
- modulesource.go
- net.go
- object.go
- platform.go
- postcall.go
- query.go
- sdk.go
- search.go
- secret.go
- service.go
- services.go
- socket.go
- telemetry.go
- terminal.go
- tracing.go
- typedef.go
- util.go
- void.go