Documentation ¶
Index ¶
- Constants
- Variables
- func AddEnv(env []string, name, value string) []string
- func AroundFunc(ctx context.Context, self dagql.Object, id *call.ID) (context.Context, func(res dagql.Typed, cached bool, rerr error))
- func GetClientResourceAccessor(ctx context.Context, parent *Query, externalName string) (string, error)
- func GetHostIPSocketAccessor(ctx context.Context, query *Query, upstreamHost string, port PortForward) (string, error)
- func LoadBlob(ctx context.Context, srv *dagql.Server, dgst digest.Digest) (i dagql.Instance[*Directory], err error)
- func LookupEnv(env []string, name string) (string, bool)
- func Tracer(ctx context.Context) trace.Tracer
- func WalkEnv(env []string, fn func(string, string, string))
- type AliasSet
- type BuildArg
- 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
- type Container
- func (container *Container) AsService(ctx context.Context, args ContainerAsServiceArgs) (*Service, error)
- func (container *Container) AsServiceLegacy(ctx context.Context) (*Service, error)
- func (container *Container) AsTarball(ctx context.Context, srv *dagql.Server, platformVariants []*Container, ...) (*File, error)
- func (container *Container) Build(ctx context.Context, contextDir *Directory, dockerfile string, ...) (*Container, error)
- func (container *Container) Clone() *Container
- func (container *Container) Directory(ctx context.Context, dirPath string) (*Directory, error)
- func (container Container) Evaluate(ctx context.Context) (*buildkit.Result, error)
- func (container *Container) ExitCode(ctx context.Context) (int, error)
- func (container *Container) Export(ctx context.Context, dest string, platformVariants []*Container, ...) 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) 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, source *File, tag string) (*Container, error)
- func (container *Container) MetaState() (*llb.State, error)
- func (container *Container) MountTargets(ctx context.Context) ([]string, 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) 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 *Directory, filter CopyFilter, ...) (*Container, error)
- func (container *Container) WithExec(ctx context.Context, opts ContainerExecOpts) (*Container, error)
- func (container *Container) WithExposedPort(port Port) (*Container, error)
- func (container *Container) WithFile(ctx context.Context, destPath string, src *File, permissions *int, ...) (*Container, error)
- func (container *Container) WithFiles(ctx context.Context, destDir string, src []*File, permissions *int, ...) (*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 *Directory, owner string, ...) (*Container, error)
- func (container *Container) WithMountedFile(ctx context.Context, target string, file *File, owner string, readonly bool) (*Container, error)
- func (container *Container) WithMountedSecret(ctx context.Context, target string, source *Secret, owner string, ...) (*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) WithPipeline(ctx context.Context, name, description string) (*Container, error)
- func (container *Container) WithRootFS(ctx context.Context, dir *Directory) (*Container, error)
- func (container *Container) WithSecretVariable(ctx context.Context, name string, secret *Secret) (*Container, error)
- func (container *Container) WithServiceBinding(ctx context.Context, id *call.ID, svc *Service, alias 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) WithoutMount(ctx context.Context, target string) (*Container, error)
- func (container *Container) WithoutPaths(ctx context.Context, 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 ContainerExecOpts
- type ContainerGPUOpts
- type ContainerID
- type ContainerMount
- type ContainerMounts
- type ContainerSecret
- type ContainerSocket
- type CopyFilter
- type CurrentModule
- type DefaultTerminalCmdOpts
- type Directory
- func NewDirectory(query *Query, def *pb.Definition, dir string, platform Platform, ...) *Directory
- func NewDirectorySt(ctx context.Context, query *Query, st llb.State, dir string, platform Platform, ...) (*Directory, error)
- func NewScratchDirectory(ctx context.Context, query *Query, platform Platform) (*Directory, error)
- func (dir *Directory) AsBlob(ctx context.Context, srv *dagql.Server) (inst dagql.Instance[*Directory], rerr 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) Export(ctx context.Context, destPath string, merge bool) (rerr error)
- func (dir *Directory) File(ctx context.Context, file string) (*File, error)
- func (dir *Directory) Glob(ctx context.Context, pattern string) ([]string, error)
- func (dir *Directory) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (dir *Directory) Root() (*Directory, error)
- func (dir *Directory) SetState(ctx context.Context, st llb.State) error
- func (dir *Directory) Stat(ctx context.Context, bk *buildkit.Client, svcs *Services, 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) WithDirectory(ctx context.Context, destDir string, src *Directory, filter CopyFilter, ...) (*Directory, error)
- func (dir *Directory) WithFile(ctx context.Context, destPath string, src *File, permissions *int, ...) (*Directory, error)
- func (dir *Directory) WithFiles(ctx context.Context, destDir string, src []*File, permissions *int, ...) (*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) WithPipeline(ctx context.Context, name, description string) (*Directory, error)
- func (dir *Directory) WithTimestamps(ctx context.Context, unix int) (*Directory, error)
- func (dir *Directory) Without(ctx context.Context, paths ...string) (*Directory, error)
- 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 EnumTypeDef
- type EnumValueTypeDef
- type Error
- type FieldTypeDef
- type File
- func NewFile(query *Query, def *pb.Definition, file string, platform Platform, ...) *File
- func NewFileSt(ctx context.Context, query *Query, st llb.State, dir string, platform Platform, ...) (*File, error)
- func NewFileWithContents(ctx context.Context, query *Query, name string, content []byte, ...) (*File, error)
- func (file *File) Clone() *File
- func (file *File) Contents(ctx context.Context) ([]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) Open(ctx context.Context) (io.ReadCloser, error)
- func (file *File) PBDefinitions(ctx context.Context) ([]*pb.Definition, 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) WithTimestamps(ctx context.Context, unix int) (*File, error)
- type FileID
- type Function
- func (fn Function) Clone() *Function
- func (fn *Function) FieldSpec() (dagql.FieldSpec, error)
- func (fn *Function) IsSubtypeOf(otherFn *Function) bool
- func (fn *Function) LookupArg(name 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 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
- func (src GitModuleSource) Clone() *GitModuleSource
- func (src *GitModuleSource) HTMLURL() string
- func (src *GitModuleSource) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (src *GitModuleSource) Pin() string
- func (src *GitModuleSource) RefString() string
- func (src *GitModuleSource) Symbolic() string
- func (src *GitModuleSource) Type() *ast.Type
- func (src *GitModuleSource) TypeDescription() string
- type GitModuleSourceID
- type GitRef
- type GitRefID
- type GitRepository
- type GitRepositoryID
- type HasPBDefinitions
- type Host
- func (host *Host) Directory(ctx context.Context, srv *dagql.Server, dirPath string, ...) (dagql.Instance[*Directory], error)
- func (host *Host) File(ctx context.Context, srv *dagql.Server, filePath string) (dagql.Instance[*File], error)
- func (host *Host) SetSecretFile(ctx context.Context, srv *dagql.Server, secretName string, path string) (i dagql.Instance[*Secret], err error)
- func (*Host) Type() *ast.Type
- func (*Host) TypeDescription() string
- type ImageLayerCompression
- type ImageMediaTypes
- type InputTypeDef
- type InterfaceAnnotatedValue
- func (iface *InterfaceAnnotatedValue) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (iface *InterfaceAnnotatedValue) Type() *ast.Type
- func (iface *InterfaceAnnotatedValue) TypeDefinition(views ...string) *ast.Definition
- func (iface *InterfaceAnnotatedValue) TypeDescription() string
- type InterfaceType
- func (iface *InterfaceType) CollectCoreIDs(ctx context.Context, value dagql.Typed, ids map[digest.Digest]*resource.ID) error
- func (iface *InterfaceType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.Typed, 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) 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 ListType
- func (t *ListType) CollectCoreIDs(ctx context.Context, value dagql.Typed, ids map[digest.Digest]*resource.ID) error
- func (t *ListType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.Typed, 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 LocalModuleSource
- func (src LocalModuleSource) Clone() *LocalModuleSource
- func (src *LocalModuleSource) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (src *LocalModuleSource) RefString() string
- func (src *LocalModuleSource) Symbolic() string
- func (src *LocalModuleSource) Type() *ast.Type
- func (src *LocalModuleSource) TypeDescription() string
- type LocalModuleSourceID
- type Mod
- type ModDeps
- func (d *ModDeps) Append(mods ...Mod) *ModDeps
- func (d *ModDeps) Clone() *ModDeps
- 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) (inst dagql.Instance[*File], _ error)
- func (d *ModDeps) TypeDefs(ctx context.Context) ([]*TypeDef, error)
- type ModType
- type Module
- func (mod Module) Clone() *Module
- func (mod *Module) Dependencies() []Mod
- func (mod *Module) IDModule() *call.Module
- func (mod *Module) Initialize(ctx context.Context, oldID *call.ID, newID *call.ID, dag *dagql.Server) (*Module, error)
- func (mod *Module) Install(ctx context.Context, dag *dagql.Server) error
- func (mod *Module) ModTypeFor(ctx context.Context, typeDef *TypeDef, checkDirectDeps bool) (ModType, bool, error)
- func (mod *Module) Name() string
- func (mod *Module) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (*Module) Type() *ast.Type
- func (mod *Module) TypeDefs(ctx context.Context) ([]*TypeDef, error)
- func (*Module) TypeDescription() string
- func (mod *Module) View() (string, 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 ModuleDependency
- type ModuleDependencyID
- 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(views ...string) *ast.Definition
- func (e *ModuleEnum) TypeDescription() string
- func (e *ModuleEnum) TypeName() string
- type ModuleEnumType
- func (m *ModuleEnumType) CollectCoreIDs(ctx context.Context, value dagql.Typed, ids map[digest.Digest]*resource.ID) error
- func (m *ModuleEnumType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.Typed, 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
- type ModuleID
- type ModuleInitConfig
- 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(views ...string) *ast.Definition
- func (obj *ModuleObject) TypeDescription() string
- type ModuleObjectType
- func (t *ModuleObjectType) CollectCoreIDs(ctx context.Context, value dagql.Typed, ids map[digest.Digest]*resource.ID) error
- func (t *ModuleObjectType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.Typed, 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) AutomaticGitignore(ctx context.Context) (*bool, error)
- func (src ModuleSource) Clone() *ModuleSource
- func (src *ModuleSource) ContextDirectory() (inst dagql.Instance[*Directory], err error)
- func (src *ModuleSource) Digest(ctx context.Context) (string, error)
- func (src *ModuleSource) LoadContext(ctx context.Context, dag *dagql.Server, path string, ignore []string) (inst dagql.Instance[*Directory], err error)
- func (src *ModuleSource) ModuleConfig(ctx context.Context) (*modules.ModuleConfig, bool, error)
- func (src *ModuleSource) ModuleEngineVersion(ctx context.Context) (string, error)
- func (src *ModuleSource) ModuleName(ctx context.Context) (string, error)
- func (src *ModuleSource) ModuleOriginalName(ctx context.Context) (string, error)
- func (src *ModuleSource) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
- func (src *ModuleSource) Pin() (string, error)
- func (src *ModuleSource) RefString() (string, error)
- func (src *ModuleSource) ResolveContextPathFromCaller(ctx context.Context) (contextRootAbsPath, sourceRootAbsPath string, _ error)
- func (src *ModuleSource) ResolveContextPathFromModule(ctx context.Context) (contextRootAbsPath, moduleRootAbsPath string, err error)
- func (src *ModuleSource) SDK(ctx context.Context) (string, error)
- func (src *ModuleSource) SourceRootRelSubPath() (string, error)
- func (src *ModuleSource) SourceRootSubpath() (string, error)
- func (src *ModuleSource) SourceSubpath(ctx context.Context) (string, error)
- func (src *ModuleSource) SourceSubpathWithDefault(ctx context.Context) (string, error)
- func (src *ModuleSource) Symbolic() (string, error)
- func (src *ModuleSource) Type() *ast.Type
- func (src *ModuleSource) TypeDescription() string
- func (src *ModuleSource) ViewByName(ctx context.Context, viewName string) (*ModuleSourceView, error)
- func (src *ModuleSource) Views(ctx context.Context) ([]*ModuleSourceView, error)
- type ModuleSourceID
- type ModuleSourceKind
- type ModuleSourceView
- type NetworkProtocol
- type NullableType
- func (t *NullableType) CollectCoreIDs(ctx context.Context, value dagql.Typed, ids map[digest.Digest]*resource.ID) error
- func (t *NullableType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.Typed, 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 Ownership
- 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.Typed, map[digest.Digest]*resource.ID) error
- func (t *PrimitiveType) ConvertFromSDKResult(ctx context.Context, value any) (dagql.Typed, 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) NewContainer(platform Platform) *Container
- func (q *Query) NewContainerService(ctx context.Context, ctr *Container) *Service
- func (q *Query) NewHost() *Host
- func (q *Query) NewHostService(ctx context.Context, socks []*Socket) *Service
- func (q *Query) NewModule() *Module
- func (q *Query) NewTunnelService(ctx context.Context, upstream dagql.Instance[*Service], ports []PortForward) *Service
- 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 ReturnTypes
- type RunningService
- type SDK
- type ScalarTypeDef
- type SchemeType
- type Secret
- type SecretID
- type SecretStore
- func (store *SecretStore) AddSecret(secret *Secret, name string, plaintext []byte) error
- func (store *SecretStore) AddSecretFromOtherStore(secret *Secret, otherStore *SecretStore) error
- func (store *SecretStore) AsBuildkitSecretStore() secrets.SecretStore
- func (store *SecretStore) GetSecretName(idDgst digest.Digest) (string, bool)
- func (store *SecretStore) GetSecretPlaintext(idDgst digest.Digest) ([]byte, 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) 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, interactive bool, ...) (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) Type() *ast.Type
- func (*Service) TypeDescription() string
- func (svc *Service) WithHostname(hostname string) *Service
- type ServiceBinding
- type ServiceBindings
- type ServiceID
- type ServiceKey
- type Services
- func (ss *Services) Detach(ctx context.Context, svc *RunningService)
- func (ss *Services) Get(ctx context.Context, id *call.ID) (*RunningService, error)
- func (ss *Services) Start(ctx context.Context, id *call.ID, svc Startable) (*RunningService, error)
- func (ss *Services) StartBindings(ctx context.Context, bindings ServiceBindings) (_ func(), _ []*RunningService, err error)
- func (ss *Services) Stop(ctx context.Context, id *call.ID, kill bool) error
- func (ss *Services) StopSessionServices(ctx context.Context, sessionID string) error
- type SliceSet
- 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 TerminalArgs
- 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) WithEnumValue(name, 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 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 InstrumentationLibrary = "dagger.io/core"
const (
ModuleName = "daggercore"
)
const (
ShimEnableTTYEnvVar = "_DAGGER_ENABLE_TTY"
)
Variables ¶
var ( 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") )"Shares the cache volume amongst many build pipelines")
var ( // FIXME: should be canonicalized as GZIP, ZSTD, ESTARGZ, UNCOMPRESSED CompressionGzip = ImageLayerCompressions.Register("Gzip") CompressionZstd = ImageLayerCompressions.Register("Zstd") CompressionEStarGZ = ImageLayerCompressions.Register("EStarGZ") CompressionUncompressed = ImageLayerCompressions.Register("Uncompressed") )
var ( // FIXME: should be canonicalized as OCI_MEDIA_TYPES, DOCKER_MEDIA_TYPES 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 ( ModuleSourceKindLocal = ModuleSourceKindEnum.Register("LOCAL_SOURCE") ModuleSourceKindGit = ModuleSourceKindEnum.Register("GIT_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.") 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", "A list of values all having the same type.", "Always paired with a ListTypeDef.") TypeDefKindObject = TypeDefKinds.Register("OBJECT_KIND", "A named type defined in the GraphQL schema, with fields and functions.", "Always paired with an ObjectTypeDef.") TypeDefKindInterface = TypeDefKinds.Register("INTERFACE_KIND", `A named type of functions that can be matched+implemented by other objects+interfaces.`, "Always paired with an InterfaceTypeDef.") 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 CacheSharingModes = dagql.NewEnum[CacheSharingMode]()
var ErrNoCommand = errors.New("no command has been set")
var ErrNoCurrentModule = fmt.Errorf("no current module")
var ImageLayerCompressions = dagql.NewEnum[ImageLayerCompression]()
var ImageMediaTypesEnum = dagql.NewEnum[ImageMediaTypes]()
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]()
Functions ¶
func AroundFunc ¶ added in v0.11.7
func GetClientResourceAccessor ¶ added in v0.12.1
func GetHostIPSocketAccessor ¶ added in v0.12.1
Types ¶
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 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 `json:"keys"`
}
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 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) ReturnType ¶ added in v0.9.7
func (f *CallableField) ReturnType() (ModType, error)
type Container ¶
type Container struct { Query *Query // The container's root filesystem. FS *pb.Definition `json:"fs"` // Image configuration (env, workdir, etc) Config specs.ImageConfig `json:"cfg"` // List of GPU devices that will be exposed to the container EnabledGPUs []string `json:"enabledGPUs,omitempty"` // Mount points configured for the container. Mounts ContainerMounts `json:"mounts,omitempty"` // Meta is the /dagger filesystem. It will be null if nothing has run yet. Meta *pb.Definition `json:"meta,omitempty"` // The platform of the container's rootfs. Platform Platform `json:"platform,omitempty"` // OCI annotations Annotations []ContainerAnnotation `json:"annotations,omitempty"` // Secrets to expose to the container. Secrets []ContainerSecret `json:"secret_env,omitempty"` // Sockets to expose to the container. Sockets []ContainerSocket `json:"sockets,omitempty"` // Image reference ImageRef string `json:"image_ref,omitempty"` // Ports to expose from the container. Ports []Port `json:"ports,omitempty"` // Services to start before running the container. Services ServiceBindings `json:"services,omitempty"` // The args to invoke when using the terminal api on this container. DefaultTerminalCmd DefaultTerminalCmdOpts `json:"defaultTerminalCmd,omitempty"` // (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 `json:"system_envs,omitempty"` }
Container is a content-addressed container.
func NewContainer ¶ added in v0.3.3
func (*Container) AsServiceLegacy ¶ added in v0.15.0
func (*Container) AsTarball ¶ added in v0.9.0
func (container *Container) AsTarball( ctx context.Context, srv *dagql.Server, platformVariants []*Container, forcedCompression ImageLayerCompression, mediaTypes ImageMediaTypes, ) (*File, error)
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) Export ¶ added in v0.3.3
func (container *Container) Export( ctx context.Context, dest string, platformVariants []*Container, forcedCompression ImageLayerCompression, mediaTypes ImageMediaTypes, ) 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) 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) 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) 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) WithPipeline ¶ added in v0.5.1
func (*Container) WithRootFS ¶ added in v0.3.5
func (*Container) WithSecretVariable ¶
func (*Container) WithServiceBinding ¶ added in v0.5.0
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) 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 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 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"` // (Internal-only) If this is a nested exec, exec metadata to use for it NestedExecMetadata *buildkit.ExecutionMetadata `name:"-"` // 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 source of the mount. Source *pb.Definition `json:"source,omitempty"` // A path beneath the source to scope the mount to. SourcePath string `json:"source_path,omitempty"` // The path of the mount within the container. Target string `json:"target"` // Persist changes to the mount under this cache ID. CacheVolumeID string `json:"cache_volume_id,omitempty"` // How to share the cache across concurrent runs. CacheSharingMode CacheSharingMode `json:"cache_sharing,omitempty"` // Configure the mount as a tmpfs. Tmpfs bool `json:"tmpfs,omitempty"` // Configure the size of the mounted tmpfs in bytes Size int `json:"size,omitempty"` // Configure the mount as read-only. Readonly bool `json:"readonly,omitempty"` }
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 ContainerMounts ¶ added in v0.3.3
type ContainerMounts []ContainerMount
func (ContainerMounts) With ¶ added in v0.3.3
func (mnts ContainerMounts) With(newMnt ContainerMount) ContainerMounts
type ContainerSecret ¶
type ContainerSecret struct { Secret *Secret `json:"secret"` EnvName string `json:"env,omitempty"` MountPath string `json:"path,omitempty"` Owner *Ownership `json:"owner,omitempty"` Mode fs.FileMode `json:"mode,omitempty"` }
ContainerSecret configures a secret to expose, either as an environment variable or mounted to a file path.
type ContainerSocket ¶ added in v0.3.7
type ContainerSocket struct { Source *Socket `json:"socket"` ContainerPath string `json:"container_path,omitempty"` Owner *Ownership `json:"owner,omitempty"` }
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
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 DefaultTerminalCmdOpts struct { Args []string // Provide dagger access to the executed command // Do not use this option unless you trust the command being executed. // The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM ExperimentalPrivilegedNesting dagql.Optional[dagql.Boolean] `default:"false"` // Grant the process all root capabilities InsecureRootCapabilities dagql.Optional[dagql.Boolean] `default:"false"` }
type Directory ¶
type Directory struct { Query *Query LLB *pb.Definition Dir string Platform Platform // Services necessary to provision the directory. Services ServiceBindings }
Directory is a content-addressed directory.
func NewDirectory ¶
func NewDirectory(query *Query, def *pb.Definition, dir string, platform Platform, services ServiceBindings) *Directory
func NewDirectorySt ¶ added in v0.5.2
func NewScratchDirectory ¶ added in v0.6.3
func (*Directory) AsBlob ¶ added in v0.9.8
func (dir *Directory) AsBlob( ctx context.Context, srv *dagql.Server, ) (inst dagql.Instance[*Directory], rerr error)
AsBlob converts this directory into a stable content addressed blob, valid for the duration of the current session. Currently only used internally to support local module sources.
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) StateWithSourcePath ¶ added in v0.5.1
func (*Directory) TypeDescription ¶ added in v0.9.7
func (*Directory) WithDirectory ¶
func (*Directory) WithFiles ¶ added in v0.9.10
func (dir *Directory) WithFiles( ctx context.Context, destDir string, src []*File, permissions *int, owner *Ownership, ) (*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) WithPipeline ¶ added in v0.5.1
func (*Directory) WithTimestamps ¶ added in v0.3.8
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 {
Query *Query
}
func (*Engine) TypeDescription ¶ added in v0.12.0
type EngineCache ¶ added in v0.12.0
type EngineCache struct { Query *Query KeepBytes int `` /* 156-byte string literal not displayed */ MaxUsedSpace int `field:"true" doc:"The maximum bytes to keep in the cache without pruning."` ReservedSpace int `field:"true" docs:"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 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."` Values []*EnumValueTypeDef `field:"true" doc:"The values of the enum."` SourceMap *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) ListValues ¶ added in v0.12.0
func (enum *EnumTypeDef) ListValues() ast.EnumValueList
Implements dagql.Enum interface
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 EnumValueTypeDef ¶ added in v0.12.0
type EnumValueTypeDef struct { Name string `field:"true" doc:"The name of the enum value."` Description string `field:"true" doc:"A doc string for the enum value, if any."` SourceMap *SourceMap `field:"true" doc:"The location of this enum value declaration."` }
func NewEnumValueTypeDef ¶ added in v0.12.0
func NewEnumValueTypeDef(name, description string, sourceMap *SourceMap) *EnumValueTypeDef
func (EnumValueTypeDef) Clone ¶ added in v0.12.0
func (enumValue EnumValueTypeDef) Clone() *EnumValueTypeDef
func (*EnumValueTypeDef) Type ¶ added in v0.12.0
func (*EnumValueTypeDef) Type() *ast.Type
func (*EnumValueTypeDef) TypeDescription ¶ added in v0.12.0
func (*EnumValueTypeDef) TypeDescription() string
type Error ¶ added in v0.15.0
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 *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 { Query *Query LLB *pb.Definition `json:"llb"` File string `json:"file"` Platform Platform `json:"platform"` // Services necessary to provision the file. Services ServiceBindings `json:"services,omitempty"` }
File is a content-addressed file.
func NewFile ¶
func NewFile(query *Query, def *pb.Definition, file string, platform Platform, services ServiceBindings) *File
func NewFileWithContents ¶ added in v0.9.2
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) TypeDescription ¶ added in v0.9.7
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 *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) IsSubtypeOf ¶ added in v0.9.6
func (*Function) LookupArg ¶ added in v0.9.7
func (fn *Function) LookupArg(name 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 *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) 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 { Query *Query `json:"-"` 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."` }
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 GeneratedCode ¶ added in v0.8.8
type GeneratedCode struct { Code dagql.Instance[*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.Instance[*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 { Root string `field:"true" doc:"The clean module name of the root of the module"` RootSubpath string `` /* 200-byte string literal not displayed */ Version string `field:"true" doc:"The specified version of the git repo this source points to."` Commit string `field:"true" doc:"The resolved commit of the git repo this source points to."` CloneRef string `field:"true" name:"cloneRef" doc:"The ref to clone the root of the git repo from"` HTMLRepoURL string `field:"true" name:"htmlRepoURL" doc:"The URL to access the web view of the repository (e.g., GitHub, GitLab, Bitbucket)"` ContextDirectory dagql.Instance[*Directory] `field:"true" doc:"The directory containing everything needed to load load and use the module."` }
func (GitModuleSource) Clone ¶ added in v0.9.8
func (src GitModuleSource) Clone() *GitModuleSource
func (*GitModuleSource) HTMLURL ¶ added in v0.9.8
func (src *GitModuleSource) HTMLURL() string
func (*GitModuleSource) PBDefinitions ¶ added in v0.9.9
func (src *GitModuleSource) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
func (*GitModuleSource) Pin ¶ added in v0.13.6
func (src *GitModuleSource) Pin() string
func (*GitModuleSource) RefString ¶ added in v0.9.9
func (src *GitModuleSource) RefString() string
func (*GitModuleSource) Symbolic ¶ added in v0.9.8
func (src *GitModuleSource) Symbolic() string
func (*GitModuleSource) Type ¶ added in v0.9.8
func (src *GitModuleSource) Type() *ast.Type
func (*GitModuleSource) TypeDescription ¶ added in v0.9.8
func (src *GitModuleSource) TypeDescription() string
type GitModuleSourceID ¶ added in v0.9.8
type GitModuleSourceID = dagql.ID[*GitModuleSource]
type GitRef ¶ added in v0.9.1
type GitRef struct { Query *Query Ref string `json:"ref"` Repo *GitRepository `json:"repository"` }
func (*GitRef) TypeDescription ¶ added in v0.9.7
type GitRepository ¶ added in v0.9.4
type GitRepository struct { Query *Query URL string `json:"url"` DiscardGitDir bool `json:"discardGitDir"` SSHKnownHosts string `json:"sshKnownHosts"` SSHAuthSocket *Socket `json:"sshAuthSocket"` Services ServiceBindings `json:"services"` Platform Platform `json:"platform,omitempty"` AuthToken *Secret `json:"authToken"` AuthHeader *Secret `json:"authHeader"` }
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 GitRepositoryID ¶ added in v0.9.4
type GitRepositoryID = dagql.ID[*GitRepository]
type HasPBDefinitions ¶ added in v0.8.8
type HasPBDefinitions interface {
PBDefinitions(context.Context) ([]*pb.Definition, error)
}
type Host ¶ added in v0.3.3
type Host struct {
Query *Query
}
func (*Host) SetSecretFile ¶ added in v0.9.7
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(views ...string) *ast.Definition
func (*InterfaceAnnotatedValue) TypeDescription ¶ added in v0.9.7
func (iface *InterfaceAnnotatedValue) TypeDescription() string
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 *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 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 LocalModuleSource ¶ added in v0.9.8
type LocalModuleSource struct { RootSubpath string `` /* 200-byte string literal not displayed */ RelHostPath string `field:"true" doc:"The relative path to the module root from the host directory"` ContextDirectory dagql.Nullable[dagql.Instance[*Directory]] `field:"true" doc:"The directory containing everything needed to load load and use the module."` }
func (LocalModuleSource) Clone ¶ added in v0.9.8
func (src LocalModuleSource) Clone() *LocalModuleSource
func (*LocalModuleSource) PBDefinitions ¶ added in v0.9.9
func (src *LocalModuleSource) PBDefinitions(ctx context.Context) ([]*pb.Definition, error)
func (*LocalModuleSource) RefString ¶ added in v0.9.9
func (src *LocalModuleSource) RefString() string
func (*LocalModuleSource) Symbolic ¶ added in v0.9.8
func (src *LocalModuleSource) Symbolic() string
func (*LocalModuleSource) Type ¶ added in v0.9.8
func (src *LocalModuleSource) Type() *ast.Type
func (*LocalModuleSource) TypeDescription ¶ added in v0.9.8
func (src *LocalModuleSource) TypeDescription() string
type LocalModuleSourceID ¶ added in v0.9.8
type LocalModuleSourceID = dagql.ID[*LocalModuleSource]
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() (string, bool) // Dependencies returns the direct dependencies of this module Dependencies() []Mod // 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) TypeDefs(ctx context.Context) ([]*TypeDef, error) }
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) (inst dagql.Instance[*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.
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.Typed, 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.Typed, 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 Module ¶ added in v0.8.8
type Module struct { Query *Query // The source of the module Source dagql.Instance[*ModuleSource] `field:"true" name:"source" doc:"The source for the module."` // 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 origin sdk of the module set in its configuration file (or first configured via withSDK). OriginalSDK string // The doc string of the module, if any Description string `field:"true" doc:"The doc string of the module, if any"` // The module's SDKConfig, as set in the module config file SDKConfig string `` /* 157-byte string literal not displayed */ GeneratedContextDirectory dagql.Instance[*Directory] `` /* 139-byte string literal not displayed */ // Dependencies as configured by the module DependencyConfig []*ModuleDependency `field:"true" doc:"The dependencies as configured by the module."` // The module's loaded dependencies, not yet initialized DependenciesField []dagql.Instance[*Module] `field:"true" name:"dependencies" doc:"Modules 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 *Container `` /* 137-byte string literal not displayed */ // 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."` // InstanceID is the ID of the initialized module. InstanceID *call.ID }
func (*Module) Dependencies ¶ added in v0.8.8
func (*Module) Initialize ¶ added in v0.9.7
func (*Module) ModTypeFor ¶ added in v0.9.7
func (*Module) PBDefinitions ¶ added in v0.8.8
func (*Module) TypeDescription ¶ added in v0.9.7
func (*Module) WithDescription ¶ added in v0.9.8
func (*Module) WithInterface ¶ added in v0.9.6
type ModuleDependency ¶ added in v0.9.8
type ModuleDependency struct { Source dagql.Instance[*ModuleSource] `field:"true" name:"source" doc:"The source for the dependency module."` Name string `field:"true" name:"name" doc:"The name of the dependency module."` }
func (ModuleDependency) Clone ¶ added in v0.9.8
func (dep ModuleDependency) Clone() *ModuleDependency
func (*ModuleDependency) Type ¶ added in v0.9.8
func (*ModuleDependency) Type() *ast.Type
func (*ModuleDependency) TypeDescription ¶ added in v0.9.8
func (*ModuleDependency) TypeDescription() string
type ModuleDependencyID ¶ added in v0.9.8
type ModuleDependencyID = dagql.ID[*ModuleDependency]
type ModuleEnum ¶ added in v0.12.0
type ModuleEnum struct { TypeDef *EnumTypeDef Value string }
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(views ...string) *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 (*ModuleFunction) ArgType ¶ added in v0.9.7
func (fn *ModuleFunction) ArgType(argName string) (ModType, error)
func (*ModuleFunction) ReturnType ¶ added in v0.9.7
func (fn *ModuleFunction) ReturnType() (ModType, error)
type ModuleInitConfig ¶ added in v0.12.5
type ModuleInitConfig struct {
Merge bool
}
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(views ...string) *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 { Query *Query Kind ModuleSourceKind `field:"true" name:"kind" doc:"The kind of source (e.g. local, git, etc.)"` AsLocalSource dagql.Nullable[*LocalModuleSource] `field:"true" doc:"If the source is of kind local, the local source representation of it."` AsGitSource dagql.Nullable[*GitModuleSource] `field:"true" doc:"If the source is a of kind git, the git source representation of it."` // Settings that can be used to initialize or override the source's configuration WithName string WithDependencies []dagql.Instance[*ModuleDependency] WithoutDependencies []string WithSDK string WithInitConfig *ModuleInitConfig WithSourceSubpath string WithViews []*ModuleSourceView }
func (*ModuleSource) AutomaticGitignore ¶ added in v0.10.3
func (src *ModuleSource) AutomaticGitignore(ctx context.Context) (*bool, error)
func (ModuleSource) Clone ¶ added in v0.9.8
func (src ModuleSource) Clone() *ModuleSource
func (*ModuleSource) ContextDirectory ¶ added in v0.9.9
func (src *ModuleSource) ContextDirectory() (inst dagql.Instance[*Directory], err error)
func (*ModuleSource) Digest ¶ added in v0.13.0
func (src *ModuleSource) Digest(ctx context.Context) (string, error)
func (*ModuleSource) LoadContext ¶ added in v0.12.6
func (src *ModuleSource) LoadContext(ctx context.Context, dag *dagql.Server, path string, ignore []string) (inst dagql.Instance[*Directory], err error)
LoadContext loads a directory from the module context directory.
If the module is local, it will load the directory from the local source directly from the host. In that case, the path is first resolved based on the caller's host location. Then if the path is absolute, it will be relative to the context directory. Otherwise, it will be relative to the module root directory.
If the module is git, it will load the directory from the git repository using its context directory.
func (*ModuleSource) ModuleConfig ¶ added in v0.9.9
func (src *ModuleSource) ModuleConfig(ctx context.Context) (*modules.ModuleConfig, bool, error)
func (*ModuleSource) ModuleEngineVersion ¶ added in v0.12.0
func (src *ModuleSource) ModuleEngineVersion(ctx context.Context) (string, error)
func (*ModuleSource) ModuleName ¶ added in v0.9.8
func (src *ModuleSource) ModuleName(ctx context.Context) (string, error)
func (*ModuleSource) ModuleOriginalName ¶ added in v0.9.9
func (src *ModuleSource) ModuleOriginalName(ctx context.Context) (string, error)
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, error)
func (*ModuleSource) RefString ¶ added in v0.9.8
func (src *ModuleSource) RefString() (string, error)
func (*ModuleSource) ResolveContextPathFromCaller ¶ added in v0.12.6
func (src *ModuleSource) ResolveContextPathFromCaller(ctx context.Context) (contextRootAbsPath, sourceRootAbsPath string, _ error)
resolveContextPaths returns the context path to the .git directory if it exists. Otherwise, it returns the source root directory.
func (*ModuleSource) ResolveContextPathFromModule ¶ added in v0.12.6
func (src *ModuleSource) ResolveContextPathFromModule(ctx context.Context) (contextRootAbsPath, moduleRootAbsPath string, err error)
ResolveContextPathFromModule returns the absolute path to the module's context directory based on the caller's host location. It's necessary to use this function and not `ResolveContextPathFromCaller` because the `SourceRootSubpath` is relative to the module root source dir and not the caller after module's initialization which may leads to invalid paths.
For example, if the module is in a subdirectory (/root/ctx/mod), the `SourceRootSubpath` will be relative to the source module's root directory (./mod), but the path from the caller location would be `./ctx/mod`.
This function returns both: - the path to the context directory (location of the .git or `dagger.json“ file if it doesn't exist) - the path to the source root directory (location of the `dagger.json` file)
NOTE: this function is only valid for local module sources.
func (*ModuleSource) SDK ¶ added in v0.9.9
func (src *ModuleSource) SDK(ctx context.Context) (string, error)
func (*ModuleSource) SourceRootRelSubPath ¶ added in v0.12.6
func (src *ModuleSource) SourceRootRelSubPath() (string, error)
func (*ModuleSource) SourceRootSubpath ¶ added in v0.9.9
func (src *ModuleSource) SourceRootSubpath() (string, error)
func (*ModuleSource) SourceSubpath ¶ added in v0.9.9
func (src *ModuleSource) SourceSubpath(ctx context.Context) (string, error)
func (*ModuleSource) SourceSubpathWithDefault ¶ added in v0.9.9
func (src *ModuleSource) SourceSubpathWithDefault(ctx context.Context) (string, error)
SourceSubpathWithDefault is the same as SourceSubpath, but it will default to the root subpath if the module has no configuration.
func (*ModuleSource) Symbolic ¶ added in v0.9.8
func (src *ModuleSource) Symbolic() (string, error)
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
func (*ModuleSource) ViewByName ¶ added in v0.10.3
func (src *ModuleSource) ViewByName(ctx context.Context, viewName string) (*ModuleSourceView, error)
func (*ModuleSource) Views ¶ added in v0.10.3
func (src *ModuleSource) Views(ctx context.Context) ([]*ModuleSourceView, error)
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) 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 ModuleSourceView ¶ added in v0.10.3
type ModuleSourceView struct {
*modules.ModuleConfigView
}
func (*ModuleSourceView) Type ¶ added in v0.10.3
func (v *ModuleSourceView) Type() *ast.Type
func (*ModuleSourceView) TypeDescription ¶ added in v0.10.3
func (v *ModuleSourceView) TypeDescription() string
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 *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 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 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 (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
}
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) NewContainer ¶ added in v0.9.7
func (*Query) NewContainerService ¶ added in v0.9.7
func (*Query) NewHostService ¶ added in v0.9.7
func (*Query) NewTunnelService ¶ added in v0.9.7
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 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 { // Service is the service that has been started. Service *Service // 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 // Block until the service has exited or the provided context is canceled. Wait func(ctx context.Context) error }
RunningService represents a service that is actively running.
type SDK ¶ added in v0.9.7
type SDK 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. */ Codegen(context.Context, *ModDeps, dagql.Instance[*ModuleSource]) (*GeneratedCode, error) /* 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. */ Runtime(context.Context, *ModDeps, dagql.Instance[*ModuleSource]) (*Container, error) // Paths that should always be loaded from module sources using this SDK. Ensures that e.g. main.go // in the Go SDK is always loaded even if dagger.json has include settings that don't include it. RequiredPaths(context.Context) ([]string, error) }
An SDK is an implementation of the functionality needed to generate code for and execute a module.
There is one special SDK, the Go SDK, which is implemented in `goSDK` below. It's used as the "seed" for all other SDK implementations.
All other SDKs are themselves implemented as Modules, with Functions matching the two defined in this SDK interface.
An SDK Module needs to choose its own SDK for its implementation. This can be "well-known" built-in SDKs like "go", "python", etc. Or it can be any external module as specified with a module source ref string.
You can thus think of SDK Modules as a DAG of dependencies, with each SDK using a different SDK to implement its Module, with the Go SDK as the root of the DAG and the only one without any dependencies.
Built-in SDKs are also a bit special in that they come bundled w/ the engine container image, which allows them to be used without hard dependencies on the internet. They are loaded w/ the `loadBuiltinSDK` function below, which loads them as modules from the engine container.
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 Secret ¶
type Secret struct { Query *Query // The digest of the DagQL ID that accessed this secret, used as its identifier // in secret stores. IDDigest digest.Digest }
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() *SecretStore
func (*SecretStore) AddSecret ¶ added in v0.8.0
func (store *SecretStore) AddSecret(secret *Secret, name string, plaintext []byte) error
func (*SecretStore) AddSecretFromOtherStore ¶ added in v0.12.1
func (store *SecretStore) AddSecretFromOtherStore(secret *Secret, otherStore *SecretStore) error
func (*SecretStore) AsBuildkitSecretStore ¶ added in v0.12.1
func (store *SecretStore) AsBuildkitSecretStore() secrets.SecretStore
func (*SecretStore) GetSecretName ¶ added in v0.12.1
func (store *SecretStore) GetSecretName(idDgst digest.Digest) (string, bool)
func (*SecretStore) GetSecretPlaintext ¶ added in v0.12.1
func (store *SecretStore) GetSecretPlaintext(idDgst digest.Digest) ([]byte, 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(context.Context, *Module) 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 ClientID of the main client caller (i.e. the one who created the session, typically the CLI // invoked by the user) MainClientCallerID(context.Context) (string, 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.Cache, 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 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 everything that is releasable in the local cache. No support for filtering yet. PruneEngineLocalCacheEntries(context.Context) (*EngineCacheEntrySet, error) // The default local cache policy to use for automatic local cache GC. EngineLocalCachePolicy() bkclient.PruneInfo // The nearest ancestor client that is not a module (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) }
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 Query *Query // A custom hostname set by the user. CustomHostname string // Container is the container to run as a service. Container *Container `json:"container"` // TunnelUpstream is the service that this service is tunnelling to. TunnelUpstream *dagql.Instance[*Service] `json:"upstream,omitempty"` // TunnelPorts configures the port forwarding rules for the tunnel. TunnelPorts []PortForward `json:"tunnel_ports,omitempty"` // The sockets on the host to reverse tunnel HostSockets []*Socket `json:"host_sockets,omitempty"` }
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) TypeDescription ¶ added in v0.9.7
func (*Service) WithHostname ¶ added in v0.13.4
type ServiceBinding ¶ added in v0.8.5
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 ServiceKey ¶ added in v0.8.5
type ServiceKey struct { Digest digest.Digest SessionID string }
ServiceKey is a unique identifier for a service.
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
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
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.
type SliceSet ¶ added in v0.13.1
type SliceSet[T comparable] []T
SliceSet is a generic type that represents a set implemented as a slice. TODO: it can eventually be replaced with a more performant underlying data structure like a tree since the current implementation is O(n) but it's fine as it's used ofor small sets currently.
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."` }
func (*SourceMap) TypeDescription ¶ added in v0.13.7
func (*SourceMap) TypeDirective ¶ added in v0.13.7
type SourceMapID ¶ added in v0.13.7
type TerminalArgs ¶ added in v0.10.1
type TerminalArgs struct { Cmd []string `default:"[]"` // Provide dagger access to the executed command // Do not use this option unless you trust the command being executed. // The command being executed WILL BE GRANTED FULL ACCESS TO YOUR HOST FILESYSTEM ExperimentalPrivilegedNesting dagql.Optional[dagql.Boolean] `default:"false"` // Grant the process all root capabilities InsecureRootCapabilities dagql.Optional[dagql.Boolean] `default:"false"` }
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) 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 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 ¶
- c2h.go
- cache.go
- client_resource.go
- codegen.go
- container.go
- container_exec.go
- directory.go
- engine.go
- enum.go
- error.go
- file.go
- git.go
- gqlformat.go
- healthcheck.go
- host.go
- ids.go
- interface.go
- json.go
- moddeps.go
- modfunc.go
- modtypes.go
- module.go
- modulesource.go
- net.go
- object.go
- platform.go
- query.go
- secret.go
- service.go
- services.go
- socket.go
- telemetry.go
- terminal.go
- tracing.go
- typedef.go
- util.go
- void.go