dagger

package
v0.0.0-...-502ef5e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetMarshalContext

func SetMarshalContext(ctx context.Context)

SetMarshalContext is a hack that lets us set the ctx to use for MarshalJSON implementations that get an object's ID.

func Tracer

func Tracer() trace.Tracer

Types

type Backend

type Backend struct {
	// contains filtered or unexported fields
}

func (*Backend) Binary

func (r *Backend) Binary(source *Directory, opts ...BackendBinaryOpts) *File

Return the compiled backend binary for a particular architecture

func (*Backend) Build

func (r *Backend) Build(source *Directory, opts ...BackendBuildOpts) *Directory

Build the backend

func (*Backend) Container

func (r *Backend) Container(source *Directory, opts ...BackendContainerOpts) *Container

Get a container ready to run the backend

func (*Backend) ID

func (r *Backend) ID(ctx context.Context) (BackendID, error)

A unique identifier for this Backend.

func (*Backend) Lint

func (r *Backend) Lint(ctx context.Context, source *Directory) (string, error)

Lint the backend Go code

func (*Backend) MarshalJSON

func (r *Backend) MarshalJSON() ([]byte, error)

func (*Backend) Serve

func (r *Backend) Serve(source *Directory) *Service

Get a Service to run the backend

func (*Backend) UnitTest

func (r *Backend) UnitTest(ctx context.Context, source *Directory) (string, error)

Run the unit tests for the backend

func (*Backend) UnmarshalJSON

func (r *Backend) UnmarshalJSON(bs []byte) error

func (*Backend) WithGraphQLQuery

func (r *Backend) WithGraphQLQuery(q *querybuilder.Selection) *Backend

func (*Backend) XXX_GraphQLID

func (r *Backend) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Backend) XXX_GraphQLIDType

func (r *Backend) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Backend) XXX_GraphQLType

func (r *Backend) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type BackendBinaryOpts

type BackendBinaryOpts struct {
	Arch string
}

BackendBinaryOpts contains options for Backend.Binary

type BackendBuildOpts

type BackendBuildOpts struct {
	Arch string
}

BackendBuildOpts contains options for Backend.Build

type BackendContainerOpts

type BackendContainerOpts struct {
	Arch string
}

BackendContainerOpts contains options for Backend.Container

type BackendID

type BackendID string

The `BackendID` scalar type represents an identifier for an object of type Backend.

type BuildArg

type BuildArg struct {
	// The build argument name.
	Name string `json:"name"`

	// The build argument value.
	Value string `json:"value"`
}

Key value object that represents a build argument.

type CacheSharingMode

type CacheSharingMode string
const (
	// Shares the cache volume amongst many build pipelines, but will serialize the writes
	Locked CacheSharingMode = "LOCKED"

	// Keeps a cache volume for a single build pipeline
	Private CacheSharingMode = "PRIVATE"

	// Shares the cache volume amongst many build pipelines
	Shared CacheSharingMode = "SHARED"
)

func (CacheSharingMode) IsEnum

func (CacheSharingMode) IsEnum()

type CacheVolume

type CacheVolume struct {
	// contains filtered or unexported fields
}

A directory whose contents persist across runs.

func (*CacheVolume) ID

A unique identifier for this CacheVolume.

func (*CacheVolume) MarshalJSON

func (r *CacheVolume) MarshalJSON() ([]byte, error)

func (*CacheVolume) UnmarshalJSON

func (r *CacheVolume) UnmarshalJSON(bs []byte) error

func (*CacheVolume) WithGraphQLQuery

func (r *CacheVolume) WithGraphQLQuery(q *querybuilder.Selection) *CacheVolume

func (*CacheVolume) XXX_GraphQLID

func (r *CacheVolume) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*CacheVolume) XXX_GraphQLIDType

func (r *CacheVolume) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*CacheVolume) XXX_GraphQLType

func (r *CacheVolume) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type CacheVolumeID

type CacheVolumeID string

The `CacheVolumeID` scalar type represents an identifier for an object of type CacheVolume.

type Client

type Client struct {
	// contains filtered or unexported fields
}

func Connect

func Connect() *Client

func (*Client) Backend

func (r *Client) Backend() *Backend

func (*Client) Blob

func (r *Client) Blob(digest string, size int, mediaType string, uncompressed string) *Directory

Retrieves a content-addressed blob.

func (*Client) BuiltinContainer

func (r *Client) BuiltinContainer(digest string) *Container

Retrieves a container builtin to the engine.

func (*Client) CacheVolume

func (r *Client) CacheVolume(key string) *CacheVolume

Constructs a cache volume for a given cache key.

func (*Client) CheckVersionCompatibility

func (r *Client) CheckVersionCompatibility(ctx context.Context, version string) (bool, error)

Checks if the current Dagger Engine is compatible with an SDK's required version.

func (*Client) Container

func (r *Client) Container(opts ...ContainerOpts) *Container

Creates a scratch container.

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

func (*Client) CurrentFunctionCall

func (r *Client) CurrentFunctionCall() *FunctionCall

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

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

func (*Client) CurrentModule

func (r *Client) CurrentModule() *CurrentModule

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

func (*Client) CurrentTypeDefs

func (r *Client) CurrentTypeDefs(ctx context.Context) ([]TypeDef, error)

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

func (*Client) DefaultPlatform

func (r *Client) DefaultPlatform(ctx context.Context) (Platform, error)

The default platform of the engine.

func (*Client) Directory

func (r *Client) Directory(opts ...DirectoryOpts) *Directory

Creates an empty directory.

func (*Client) File deprecated

func (r *Client) File(id FileID) *File

Deprecated: Use LoadFileFromID instead.

func (*Client) Fly

func (r *Client) Fly() *Fly

func (*Client) Frontend

func (r *Client) Frontend() *Frontend

func (*Client) Function

func (r *Client) Function(name string, returnType *TypeDef) *Function

Creates a function.

func (*Client) GeneratedCode

func (r *Client) GeneratedCode(code *Directory) *GeneratedCode

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

func (*Client) Git

func (r *Client) Git(url string, opts ...GitOpts) *GitRepository

Queries a Git repository.

func (*Client) GithubRelease

func (r *Client) GithubRelease() *GithubRelease

func (*Client) GraphQLClient

func (c *Client) GraphQLClient() graphql.Client

GraphQLClient returns the underlying graphql.Client

func (*Client) HTTP

func (r *Client) HTTP(url string, opts ...HTTPOpts) *File

Returns a file containing an http remote url content.

func (*Client) Infisical

func (r *Client) Infisical() *Infisical

func (*Client) LoadBackendFromID

func (r *Client) LoadBackendFromID(id BackendID) *Backend

Load a Backend from its ID.

func (*Client) LoadCacheVolumeFromID

func (r *Client) LoadCacheVolumeFromID(id CacheVolumeID) *CacheVolume

Load a CacheVolume from its ID.

func (*Client) LoadContainerFromID

func (r *Client) LoadContainerFromID(id ContainerID) *Container

Load a Container from its ID.

func (*Client) LoadCurrentModuleFromID

func (r *Client) LoadCurrentModuleFromID(id CurrentModuleID) *CurrentModule

Load a CurrentModule from its ID.

func (*Client) LoadDirectoryFromID

func (r *Client) LoadDirectoryFromID(id DirectoryID) *Directory

Load a Directory from its ID.

func (*Client) LoadEnvVariableFromID

func (r *Client) LoadEnvVariableFromID(id EnvVariableID) *EnvVariable

Load a EnvVariable from its ID.

func (*Client) LoadFieldTypeDefFromID

func (r *Client) LoadFieldTypeDefFromID(id FieldTypeDefID) *FieldTypeDef

Load a FieldTypeDef from its ID.

func (*Client) LoadFileFromID

func (r *Client) LoadFileFromID(id FileID) *File

Load a File from its ID.

func (*Client) LoadFlyFromID

func (r *Client) LoadFlyFromID(id FlyID) *Fly

Load a Fly from its ID.

func (*Client) LoadFrontendFromID

func (r *Client) LoadFrontendFromID(id FrontendID) *Frontend

Load a Frontend from its ID.

func (*Client) LoadFunctionArgFromID

func (r *Client) LoadFunctionArgFromID(id FunctionArgID) *FunctionArg

Load a FunctionArg from its ID.

func (*Client) LoadFunctionCallArgValueFromID

func (r *Client) LoadFunctionCallArgValueFromID(id FunctionCallArgValueID) *FunctionCallArgValue

Load a FunctionCallArgValue from its ID.

func (*Client) LoadFunctionCallFromID

func (r *Client) LoadFunctionCallFromID(id FunctionCallID) *FunctionCall

Load a FunctionCall from its ID.

func (*Client) LoadFunctionFromID

func (r *Client) LoadFunctionFromID(id FunctionID) *Function

Load a Function from its ID.

func (*Client) LoadGeneratedCodeFromID

func (r *Client) LoadGeneratedCodeFromID(id GeneratedCodeID) *GeneratedCode

Load a GeneratedCode from its ID.

func (*Client) LoadGitModuleSourceFromID

func (r *Client) LoadGitModuleSourceFromID(id GitModuleSourceID) *GitModuleSource

Load a GitModuleSource from its ID.

func (*Client) LoadGitRefFromID

func (r *Client) LoadGitRefFromID(id GitRefID) *GitRef

Load a GitRef from its ID.

func (*Client) LoadGitRepositoryFromID

func (r *Client) LoadGitRepositoryFromID(id GitRepositoryID) *GitRepository

Load a GitRepository from its ID.

func (*Client) LoadGithubReleaseFromID

func (r *Client) LoadGithubReleaseFromID(id GithubReleaseID) *GithubRelease

Load a GithubRelease from its ID.

func (*Client) LoadInfisicalFromID

func (r *Client) LoadInfisicalFromID(id InfisicalID) *Infisical

Load a Infisical from its ID.

func (*Client) LoadInputTypeDefFromID

func (r *Client) LoadInputTypeDefFromID(id InputTypeDefID) *InputTypeDef

Load a InputTypeDef from its ID.

func (*Client) LoadInterfaceTypeDefFromID

func (r *Client) LoadInterfaceTypeDefFromID(id InterfaceTypeDefID) *InterfaceTypeDef

Load a InterfaceTypeDef from its ID.

func (*Client) LoadLabelFromID

func (r *Client) LoadLabelFromID(id LabelID) *Label

Load a Label from its ID.

func (*Client) LoadListTypeDefFromID

func (r *Client) LoadListTypeDefFromID(id ListTypeDefID) *ListTypeDef

Load a ListTypeDef from its ID.

func (*Client) LoadLocalModuleSourceFromID

func (r *Client) LoadLocalModuleSourceFromID(id LocalModuleSourceID) *LocalModuleSource

Load a LocalModuleSource from its ID.

func (*Client) LoadModuleDependencyFromID

func (r *Client) LoadModuleDependencyFromID(id ModuleDependencyID) *ModuleDependency

Load a ModuleDependency from its ID.

func (*Client) LoadModuleFromID

func (r *Client) LoadModuleFromID(id ModuleID) *Module

Load a Module from its ID.

func (*Client) LoadModuleSourceFromID

func (r *Client) LoadModuleSourceFromID(id ModuleSourceID) *ModuleSource

Load a ModuleSource from its ID.

func (*Client) LoadModuleSourceViewFromID

func (r *Client) LoadModuleSourceViewFromID(id ModuleSourceViewID) *ModuleSourceView

Load a ModuleSourceView from its ID.

func (*Client) LoadNetlifyFromID

func (r *Client) LoadNetlifyFromID(id NetlifyID) *Netlify

Load a Netlify from its ID.

func (*Client) LoadObjectTypeDefFromID

func (r *Client) LoadObjectTypeDefFromID(id ObjectTypeDefID) *ObjectTypeDef

Load a ObjectTypeDef from its ID.

func (*Client) LoadPortFromID

func (r *Client) LoadPortFromID(id PortID) *Port

Load a Port from its ID.

func (*Client) LoadProxyFromID

func (r *Client) LoadProxyFromID(id ProxyID) *Proxy

Load a Proxy from its ID.

func (*Client) LoadScalarTypeDefFromID

func (r *Client) LoadScalarTypeDefFromID(id ScalarTypeDefID) *ScalarTypeDef

Load a ScalarTypeDef from its ID.

func (*Client) LoadSecretFromID

func (r *Client) LoadSecretFromID(id SecretID) *Secret

Load a Secret from its ID.

func (*Client) LoadServiceFromID

func (r *Client) LoadServiceFromID(id ServiceID) *Service

Load a Service from its ID.

func (*Client) LoadSocketFromID

func (r *Client) LoadSocketFromID(id SocketID) *Socket

Load a Socket from its ID.

func (*Client) LoadTerminalFromID

func (r *Client) LoadTerminalFromID(id TerminalID) *Terminal

Load a Terminal from its ID.

func (*Client) LoadTypeDefFromID

func (r *Client) LoadTypeDefFromID(id TypeDefID) *TypeDef

Load a TypeDef from its ID.

func (*Client) LoadUtilsFromID

func (r *Client) LoadUtilsFromID(id UtilsID) *Utils

Load a Utils from its ID.

func (*Client) Module

func (r *Client) Module() *Module

Create a new module.

func (*Client) ModuleDependency

func (r *Client) ModuleDependency(source *ModuleSource, opts ...ModuleDependencyOpts) *ModuleDependency

Create a new module dependency configuration from a module source and name

func (*Client) ModuleSource

func (r *Client) ModuleSource(refString string, opts ...ModuleSourceOpts) *ModuleSource

Create a new module source instance from a source ref string.

func (*Client) Netlify

func (r *Client) Netlify() *Netlify

func (*Client) Pipeline

func (r *Client) Pipeline(name string, opts ...PipelineOpts) *Client

Creates a named sub-pipeline.

func (*Client) Proxy

func (r *Client) Proxy(opts ...ProxyOpts) *Proxy

Forwards multiple services into a single service with multiple ports

func (*Client) Secret

func (r *Client) Secret(name string, opts ...SecretOpts) *Secret

Reference a secret by name.

func (*Client) SetSecret

func (r *Client) SetSecret(name string, plaintext string) *Secret

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

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

func (*Client) Socket deprecated

func (r *Client) Socket(id SocketID) *Socket

Loads a socket by its ID.

Deprecated: Use LoadSocketFromID instead.

func (*Client) TypeDef

func (r *Client) TypeDef() *TypeDef

Create a new TypeDef.

func (*Client) Utils

func (r *Client) Utils() *Utils

func (*Client) Version

func (r *Client) Version(ctx context.Context) (string, error)

Get the current Dagger Engine version.

func (*Client) With

func (r *Client) With(f WithClientFunc) *Client

With calls the provided function with current Client.

This is useful for reusability and readability by not breaking the calling chain.

func (*Client) WithGraphQLQuery

func (r *Client) WithGraphQLQuery(q *querybuilder.Selection) *Client

type Container

type Container struct {
	// contains filtered or unexported fields
}

An OCI-compatible container, also known as a Docker container.

func (*Container) AsService

func (r *Container) AsService() *Service

Turn the container into a Service.

Be sure to set any exposed ports before this conversion.

func (*Container) AsTarball

func (r *Container) AsTarball(opts ...ContainerAsTarballOpts) *File

Returns a File representing the container serialized to a tarball.

func (*Container) Build

func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container

Initializes this container from a Dockerfile build.

func (*Container) DefaultArgs

func (r *Container) DefaultArgs(ctx context.Context) ([]string, error)

Retrieves default arguments for future commands.

func (*Container) Directory

func (r *Container) Directory(path string) *Directory

Retrieves a directory at the given path.

Mounts are included.

func (*Container) Entrypoint

func (r *Container) Entrypoint(ctx context.Context) ([]string, error)

Retrieves entrypoint to be prepended to the arguments of all commands.

func (*Container) EnvVariable

func (r *Container) EnvVariable(ctx context.Context, name string) (string, error)

Retrieves the value of the specified environment variable.

func (*Container) EnvVariables

func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error)

Retrieves the list of environment variables passed to commands.

func (*Container) ExperimentalWithAllGPUs

func (r *Container) ExperimentalWithAllGPUs() *Container

EXPERIMENTAL API! Subject to change/removal at any time.

Configures all available GPUs on the host to be accessible to this container.

This currently works for Nvidia devices only.

func (*Container) ExperimentalWithGPU

func (r *Container) ExperimentalWithGPU(devices []string) *Container

EXPERIMENTAL API! Subject to change/removal at any time.

Configures the provided list of devices to be accessible to this container.

This currently works for Nvidia devices only.

func (*Container) Export

func (r *Container) Export(ctx context.Context, path string, opts ...ContainerExportOpts) (bool, error)

Writes the container as an OCI tarball to the destination file path on the host.

Return true on success.

It can also export platform variants.

func (*Container) ExposedPorts

func (r *Container) ExposedPorts(ctx context.Context) ([]Port, error)

Retrieves the list of exposed ports.

This includes ports already exposed by the image, even if not explicitly added with dagger.

func (*Container) File

func (r *Container) File(path string) *File

Retrieves a file at the given path.

Mounts are included.

func (*Container) From

func (r *Container) From(address string) *Container

Initializes this container from a pulled base image.

func (*Container) ID

func (r *Container) ID(ctx context.Context) (ContainerID, error)

A unique identifier for this Container.

func (*Container) ImageRef

func (r *Container) ImageRef(ctx context.Context) (string, error)

The unique image reference which can only be retrieved immediately after the 'Container.From' call.

func (*Container) Import

func (r *Container) Import(source *File, opts ...ContainerImportOpts) *Container

Reads the container from an OCI tarball.

func (*Container) Label

func (r *Container) Label(ctx context.Context, name string) (string, error)

Retrieves the value of the specified label.

func (*Container) Labels

func (r *Container) Labels(ctx context.Context) ([]Label, error)

Retrieves the list of labels passed to container.

func (*Container) MarshalJSON

func (r *Container) MarshalJSON() ([]byte, error)

func (*Container) Mounts

func (r *Container) Mounts(ctx context.Context) ([]string, error)

Retrieves the list of paths where a directory is mounted.

func (*Container) Pipeline

func (r *Container) Pipeline(name string, opts ...ContainerPipelineOpts) *Container

Creates a named sub-pipeline.

func (*Container) Platform

func (r *Container) Platform(ctx context.Context) (Platform, error)

The platform this container executes and publishes as.

func (*Container) Publish

func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error)

Publishes this container as a new image to the specified address.

Publish returns a fully qualified ref.

It can also publish platform variants.

func (*Container) Rootfs

func (r *Container) Rootfs() *Directory

Retrieves this container's root filesystem. Mounts are not included.

func (*Container) Stderr

func (r *Container) Stderr(ctx context.Context) (string, error)

The error stream of the last executed command.

Will execute default command if none is set, or error if there's no default.

func (*Container) Stdout

func (r *Container) Stdout(ctx context.Context) (string, error)

The output stream of the last executed command.

Will execute default command if none is set, or error if there's no default.

func (*Container) Sync

func (r *Container) Sync(ctx context.Context) (*Container, error)

Forces evaluation of the pipeline in the engine.

It doesn't run the default command if no exec has been set.

func (*Container) Terminal

func (r *Container) Terminal(opts ...ContainerTerminalOpts) *Terminal

Return an interactive terminal for this container using its configured default terminal command if not overridden by args (or sh as a fallback default).

func (*Container) UnmarshalJSON

func (r *Container) UnmarshalJSON(bs []byte) error

func (*Container) User

func (r *Container) User(ctx context.Context) (string, error)

Retrieves the user to be set for all commands.

func (*Container) With

With calls the provided function with current Container.

This is useful for reusability and readability by not breaking the calling chain.

func (*Container) WithDefaultArgs

func (r *Container) WithDefaultArgs(args []string) *Container

Configures default arguments for future commands.

func (*Container) WithDefaultTerminalCmd

func (r *Container) WithDefaultTerminalCmd(args []string, opts ...ContainerWithDefaultTerminalCmdOpts) *Container

Set the default command to invoke for the container's terminal API.

func (*Container) WithDirectory

func (r *Container) WithDirectory(path string, directory *Directory, opts ...ContainerWithDirectoryOpts) *Container

Retrieves this container plus a directory written at the given path.

func (*Container) WithEntrypoint

func (r *Container) WithEntrypoint(args []string, opts ...ContainerWithEntrypointOpts) *Container

Retrieves this container but with a different command entrypoint.

func (*Container) WithEnvVariable

func (r *Container) WithEnvVariable(name string, value string, opts ...ContainerWithEnvVariableOpts) *Container

Retrieves this container plus the given environment variable.

func (*Container) WithExec

func (r *Container) WithExec(args []string, opts ...ContainerWithExecOpts) *Container

Retrieves this container after executing the specified command inside it.

func (*Container) WithExposedPort

func (r *Container) WithExposedPort(port int, opts ...ContainerWithExposedPortOpts) *Container

Expose a network port.

Exposed ports serve two purposes:

- For health checks and introspection, when running services

- For setting the EXPOSE OCI field when publishing the container

func (*Container) WithFile

func (r *Container) WithFile(path string, source *File, opts ...ContainerWithFileOpts) *Container

Retrieves this container plus the contents of the given file copied to the given path.

func (*Container) WithFiles

func (r *Container) WithFiles(path string, sources []*File, opts ...ContainerWithFilesOpts) *Container

Retrieves this container plus the contents of the given files copied to the given path.

func (*Container) WithFocus

func (r *Container) WithFocus() *Container

Indicate that subsequent operations should be featured more prominently in the UI.

func (*Container) WithGraphQLQuery

func (r *Container) WithGraphQLQuery(q *querybuilder.Selection) *Container

func (*Container) WithLabel

func (r *Container) WithLabel(name string, value string) *Container

Retrieves this container plus the given label.

func (*Container) WithMountedCache

func (r *Container) WithMountedCache(path string, cache *CacheVolume, opts ...ContainerWithMountedCacheOpts) *Container

Retrieves this container plus a cache volume mounted at the given path.

func (*Container) WithMountedDirectory

func (r *Container) WithMountedDirectory(path string, source *Directory, opts ...ContainerWithMountedDirectoryOpts) *Container

Retrieves this container plus a directory mounted at the given path.

func (*Container) WithMountedFile

func (r *Container) WithMountedFile(path string, source *File, opts ...ContainerWithMountedFileOpts) *Container

Retrieves this container plus a file mounted at the given path.

func (*Container) WithMountedSecret

func (r *Container) WithMountedSecret(path string, source *Secret, opts ...ContainerWithMountedSecretOpts) *Container

Retrieves this container plus a secret mounted into a file at the given path.

func (*Container) WithMountedTemp

func (r *Container) WithMountedTemp(path string) *Container

Retrieves this container plus a temporary directory mounted at the given path. Any writes will be ephemeral to a single withExec call; they will not be persisted to subsequent withExecs.

func (*Container) WithNewFile

func (r *Container) WithNewFile(path string, opts ...ContainerWithNewFileOpts) *Container

Retrieves this container plus a new file written at the given path.

func (*Container) WithRegistryAuth

func (r *Container) WithRegistryAuth(address string, username string, secret *Secret) *Container

Retrieves this container with a registry authentication for a given address.

func (*Container) WithRootfs

func (r *Container) WithRootfs(directory *Directory) *Container

Retrieves the container with the given directory mounted to /.

func (*Container) WithSecretVariable

func (r *Container) WithSecretVariable(name string, secret *Secret) *Container

Retrieves this container plus an env variable containing the given secret.

func (*Container) WithServiceBinding

func (r *Container) WithServiceBinding(alias string, service *Service) *Container

Establish a runtime dependency on a service.

The service will be started automatically when needed and detached when it is no longer needed, executing the default command if none is set.

The service will be reachable from the container via the provided hostname alias.

The service dependency will also convey to any files or directories produced by the container.

func (*Container) WithUnixSocket

func (r *Container) WithUnixSocket(path string, source *Socket, opts ...ContainerWithUnixSocketOpts) *Container

Retrieves this container plus a socket forwarded to the given Unix socket path.

func (*Container) WithUser

func (r *Container) WithUser(name string) *Container

Retrieves this container with a different command user.

func (*Container) WithWorkdir

func (r *Container) WithWorkdir(path string) *Container

Retrieves this container with a different working directory.

func (*Container) WithoutDefaultArgs

func (r *Container) WithoutDefaultArgs() *Container

Retrieves this container with unset default arguments for future commands.

func (*Container) WithoutDirectory

func (r *Container) WithoutDirectory(path string) *Container

Retrieves this container with the directory at the given path removed.

func (*Container) WithoutEntrypoint

func (r *Container) WithoutEntrypoint(opts ...ContainerWithoutEntrypointOpts) *Container

Retrieves this container with an unset command entrypoint.

func (*Container) WithoutEnvVariable

func (r *Container) WithoutEnvVariable(name string) *Container

Retrieves this container minus the given environment variable.

func (*Container) WithoutExposedPort

func (r *Container) WithoutExposedPort(port int, opts ...ContainerWithoutExposedPortOpts) *Container

Unexpose a previously exposed port.

func (*Container) WithoutFile

func (r *Container) WithoutFile(path string) *Container

Retrieves this container with the file at the given path removed.

func (*Container) WithoutFocus

func (r *Container) WithoutFocus() *Container

Indicate that subsequent operations should not be featured more prominently in the UI.

This is the initial state of all containers.

func (*Container) WithoutLabel

func (r *Container) WithoutLabel(name string) *Container

Retrieves this container minus the given environment label.

func (*Container) WithoutMount

func (r *Container) WithoutMount(path string) *Container

Retrieves this container after unmounting everything at the given path.

func (*Container) WithoutRegistryAuth

func (r *Container) WithoutRegistryAuth(address string) *Container

Retrieves this container without the registry authentication of a given address.

func (*Container) WithoutSecretVariable

func (r *Container) WithoutSecretVariable(name string) *Container

Retrieves this container minus the given environment variable containing the secret.

func (*Container) WithoutUnixSocket

func (r *Container) WithoutUnixSocket(path string) *Container

Retrieves this container with a previously added Unix socket removed.

func (*Container) WithoutUser

func (r *Container) WithoutUser() *Container

Retrieves this container with an unset command user.

Should default to root.

func (*Container) WithoutWorkdir

func (r *Container) WithoutWorkdir() *Container

Retrieves this container with an unset working directory.

Should default to "/".

func (*Container) Workdir

func (r *Container) Workdir(ctx context.Context) (string, error)

Retrieves the working directory for all commands.

func (*Container) XXX_GraphQLID

func (r *Container) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Container) XXX_GraphQLIDType

func (r *Container) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Container) XXX_GraphQLType

func (r *Container) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ContainerAsTarballOpts

type ContainerAsTarballOpts struct {
	// Identifiers for other platform specific containers.
	//
	// Used for multi-platform images.
	PlatformVariants []*Container
	// Force each layer of the image to use the specified compression algorithm.
	//
	// If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
	ForcedCompression ImageLayerCompression
	// Use the specified media types for the image's layers.
	//
	// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
	MediaTypes ImageMediaTypes
}

ContainerAsTarballOpts contains options for Container.AsTarball

type ContainerBuildOpts

type ContainerBuildOpts struct {
	// Path to the Dockerfile to use.
	Dockerfile string
	// Target build stage to build.
	Target string
	// Additional build arguments.
	BuildArgs []BuildArg
	// Secrets to pass to the build.
	//
	// They will be mounted at /run/secrets/[secret-name] in the build container
	//
	// They can be accessed in the Dockerfile using the "secret" mount type and mount path /run/secrets/[secret-name], e.g. RUN --mount=type=secret,id=my-secret curl [http://example.com?token=$(cat /run/secrets/my-secret)](http://example.com?token=$(cat /run/secrets/my-secret))
	Secrets []*Secret
}

ContainerBuildOpts contains options for Container.Build

type ContainerExportOpts

type ContainerExportOpts struct {
	// Identifiers for other platform specific containers.
	//
	// Used for multi-platform image.
	PlatformVariants []*Container
	// Force each layer of the exported image to use the specified compression algorithm.
	//
	// If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
	ForcedCompression ImageLayerCompression
	// Use the specified media types for the exported image's layers.
	//
	// Defaults to OCI, which is largely compatible with most recent container runtimes, but Docker may be needed for older runtimes without OCI support.
	MediaTypes ImageMediaTypes
}

ContainerExportOpts contains options for Container.Export

type ContainerID

type ContainerID string

The `ContainerID` scalar type represents an identifier for an object of type Container.

type ContainerImportOpts

type ContainerImportOpts struct {
	// Identifies the tag to import from the archive, if the archive bundles multiple tags.
	Tag string
}

ContainerImportOpts contains options for Container.Import

type ContainerOpts

type ContainerOpts struct {
	// DEPRECATED: Use `loadContainerFromID` instead.
	ID ContainerID
	// Platform to initialize the container with.
	Platform Platform
}

ContainerOpts contains options for Client.Container

type ContainerPipelineOpts

type ContainerPipelineOpts struct {
	// Description of the sub-pipeline.
	Description string
	// Labels to apply to the sub-pipeline.
	Labels []PipelineLabel
}

ContainerPipelineOpts contains options for Container.Pipeline

type ContainerPublishOpts

type ContainerPublishOpts struct {
	// Identifiers for other platform specific containers.
	//
	// Used for multi-platform image.
	PlatformVariants []*Container
	// Force each layer of the published image to use the specified compression algorithm.
	//
	// If this is unset, then if a layer already has a compressed blob in the engine's cache, that will be used (this can result in a mix of compression algorithms for different layers). If this is unset and a layer has no compressed blob in the engine's cache, then it will be compressed using Gzip.
	ForcedCompression ImageLayerCompression
	// Use the specified media types for the published image's layers.
	//
	// Defaults to OCI, which is largely compatible with most recent registries, but Docker may be needed for older registries without OCI support.
	MediaTypes ImageMediaTypes
}

ContainerPublishOpts contains options for Container.Publish

type ContainerTerminalOpts

type ContainerTerminalOpts struct {
	// If set, override the container's default terminal command and invoke these command arguments instead.
	Cmd []string
	// Provides 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 bool
	// Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
	InsecureRootCapabilities bool
}

ContainerTerminalOpts contains options for Container.Terminal

type ContainerWithDefaultTerminalCmdOpts

type ContainerWithDefaultTerminalCmdOpts struct {
	// Provides 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 bool
	// Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
	InsecureRootCapabilities bool
}

ContainerWithDefaultTerminalCmdOpts contains options for Container.WithDefaultTerminalCmd

type ContainerWithDirectoryOpts

type ContainerWithDirectoryOpts struct {
	// Patterns to exclude in the written directory (e.g. ["node_modules/**", ".gitignore", ".git/"]).
	Exclude []string
	// Patterns to include in the written directory (e.g. ["*.go", "go.mod", "go.sum"]).
	Include []string
	// A user:group to set for the directory and its contents.
	//
	// The user and group can either be an ID (1000:1000) or a name (foo:bar).
	//
	// If the group is omitted, it defaults to the same as the user.
	Owner string
}

ContainerWithDirectoryOpts contains options for Container.WithDirectory

type ContainerWithEntrypointOpts

type ContainerWithEntrypointOpts struct {
	// Don't remove the default arguments when setting the entrypoint.
	KeepDefaultArgs bool
}

ContainerWithEntrypointOpts contains options for Container.WithEntrypoint

type ContainerWithEnvVariableOpts

type ContainerWithEnvVariableOpts struct {
	// Replace `${VAR}` or `$VAR` in the value according to the current environment variables defined in the container (e.g., "/opt/bin:$PATH").
	Expand bool
}

ContainerWithEnvVariableOpts contains options for Container.WithEnvVariable

type ContainerWithExecOpts

type ContainerWithExecOpts struct {
	// If the container has an entrypoint, ignore it for args rather than using it to wrap them.
	SkipEntrypoint bool
	// Content to write to the command's standard input before closing (e.g., "Hello world").
	Stdin string
	// Redirect the command's standard output to a file in the container (e.g., "/tmp/stdout").
	RedirectStdout string
	// Redirect the command's standard error to a file in the container (e.g., "/tmp/stderr").
	RedirectStderr string
	// Provides 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 bool
	// Execute the command with all root capabilities. This is similar to running a command with "sudo" or executing "docker run" with the "--privileged" flag. Containerization does not provide any security guarantees when using this option. It should only be used when absolutely necessary and only with trusted commands.
	InsecureRootCapabilities bool
}

ContainerWithExecOpts contains options for Container.WithExec

type ContainerWithExposedPortOpts

type ContainerWithExposedPortOpts struct {
	// Transport layer network protocol
	Protocol NetworkProtocol
	// Optional port description
	Description string
	// Skip the health check when run as a service.
	ExperimentalSkipHealthcheck bool
}

ContainerWithExposedPortOpts contains options for Container.WithExposedPort

type ContainerWithFileOpts

type ContainerWithFileOpts struct {
	// Permission given to the copied file (e.g., 0600).
	Permissions int
	// A user:group to set for the file.
	//
	// The user and group can either be an ID (1000:1000) or a name (foo:bar).
	//
	// If the group is omitted, it defaults to the same as the user.
	Owner string
}

ContainerWithFileOpts contains options for Container.WithFile

type ContainerWithFilesOpts

type ContainerWithFilesOpts struct {
	// Permission given to the copied files (e.g., 0600).
	Permissions int
	// A user:group to set for the files.
	//
	// The user and group can either be an ID (1000:1000) or a name (foo:bar).
	//
	// If the group is omitted, it defaults to the same as the user.
	Owner string
}

ContainerWithFilesOpts contains options for Container.WithFiles

type ContainerWithMountedCacheOpts

type ContainerWithMountedCacheOpts struct {
	// Identifier of the directory to use as the cache volume's root.
	Source *Directory
	// Sharing mode of the cache volume.
	Sharing CacheSharingMode
	// A user:group to set for the mounted cache directory.
	//
	// Note that this changes the ownership of the specified mount along with the initial filesystem provided by source (if any). It does not have any effect if/when the cache has already been created.
	//
	// The user and group can either be an ID (1000:1000) or a name (foo:bar).
	//
	// If the group is omitted, it defaults to the same as the user.
	Owner string
}

ContainerWithMountedCacheOpts contains options for Container.WithMountedCache

type ContainerWithMountedDirectoryOpts

type ContainerWithMountedDirectoryOpts struct {
	// A user:group to set for the mounted directory and its contents.
	//
	// The user and group can either be an ID (1000:1000) or a name (foo:bar).
	//
	// If the group is omitted, it defaults to the same as the user.
	Owner string
}

ContainerWithMountedDirectoryOpts contains options for Container.WithMountedDirectory

type ContainerWithMountedFileOpts

type ContainerWithMountedFileOpts struct {
	// A user or user:group to set for the mounted file.
	//
	// The user and group can either be an ID (1000:1000) or a name (foo:bar).
	//
	// If the group is omitted, it defaults to the same as the user.
	Owner string
}

ContainerWithMountedFileOpts contains options for Container.WithMountedFile

type ContainerWithMountedSecretOpts

type ContainerWithMountedSecretOpts struct {
	// A user:group to set for the mounted secret.
	//
	// The user and group can either be an ID (1000:1000) or a name (foo:bar).
	//
	// If the group is omitted, it defaults to the same as the user.
	Owner string
	// Permission given to the mounted secret (e.g., 0600).
	//
	// This option requires an owner to be set to be active.
	Mode int
}

ContainerWithMountedSecretOpts contains options for Container.WithMountedSecret

type ContainerWithNewFileOpts

type ContainerWithNewFileOpts struct {
	// Content of the file to write (e.g., "Hello world!").
	Contents string
	// Permission given to the written file (e.g., 0600).
	Permissions int
	// A user:group to set for the file.
	//
	// The user and group can either be an ID (1000:1000) or a name (foo:bar).
	//
	// If the group is omitted, it defaults to the same as the user.
	Owner string
}

ContainerWithNewFileOpts contains options for Container.WithNewFile

type ContainerWithUnixSocketOpts

type ContainerWithUnixSocketOpts struct {
	// A user:group to set for the mounted socket.
	//
	// The user and group can either be an ID (1000:1000) or a name (foo:bar).
	//
	// If the group is omitted, it defaults to the same as the user.
	Owner string
}

ContainerWithUnixSocketOpts contains options for Container.WithUnixSocket

type ContainerWithoutEntrypointOpts

type ContainerWithoutEntrypointOpts struct {
	// Don't remove the default arguments when unsetting the entrypoint.
	KeepDefaultArgs bool
}

ContainerWithoutEntrypointOpts contains options for Container.WithoutEntrypoint

type ContainerWithoutExposedPortOpts

type ContainerWithoutExposedPortOpts struct {
	// Port protocol to unexpose
	Protocol NetworkProtocol
}

ContainerWithoutExposedPortOpts contains options for Container.WithoutExposedPort

type CurrentModule

type CurrentModule struct {
	// contains filtered or unexported fields
}

Reflective module API provided to functions at runtime.

func (*CurrentModule) ID

A unique identifier for this CurrentModule.

func (*CurrentModule) MarshalJSON

func (r *CurrentModule) MarshalJSON() ([]byte, error)

func (*CurrentModule) Name

func (r *CurrentModule) Name(ctx context.Context) (string, error)

The name of the module being executed in

func (*CurrentModule) Source

func (r *CurrentModule) Source() *Directory

The directory containing the module's source code loaded into the engine (plus any generated code that may have been created).

func (*CurrentModule) UnmarshalJSON

func (r *CurrentModule) UnmarshalJSON(bs []byte) error

func (*CurrentModule) WithGraphQLQuery

func (r *CurrentModule) WithGraphQLQuery(q *querybuilder.Selection) *CurrentModule

func (*CurrentModule) Workdir

func (r *CurrentModule) Workdir(path string, opts ...CurrentModuleWorkdirOpts) *Directory

Load a directory from the module's scratch working directory, including any changes that may have been made to it during module function execution.

func (*CurrentModule) WorkdirFile

func (r *CurrentModule) WorkdirFile(path string) *File

Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.Load a file from the module's scratch working directory, including any changes that may have been made to it during module function execution.

func (*CurrentModule) XXX_GraphQLID

func (r *CurrentModule) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*CurrentModule) XXX_GraphQLIDType

func (r *CurrentModule) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*CurrentModule) XXX_GraphQLType

func (r *CurrentModule) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type CurrentModuleID

type CurrentModuleID string

The `CurrentModuleID` scalar type represents an identifier for an object of type CurrentModule.

type CurrentModuleWorkdirOpts

type CurrentModuleWorkdirOpts struct {
	// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
	Exclude []string
	// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
	Include []string
}

CurrentModuleWorkdirOpts contains options for CurrentModule.Workdir

type Directory

type Directory struct {
	// contains filtered or unexported fields
}

A directory.

func (*Directory) AsModule

func (r *Directory) AsModule(opts ...DirectoryAsModuleOpts) *Module

Load the directory as a Dagger module

func (*Directory) Diff

func (r *Directory) Diff(other *Directory) *Directory

Gets the difference between this directory and an another directory.

func (*Directory) Directory

func (r *Directory) Directory(path string) *Directory

Retrieves a directory at the given path.

func (*Directory) DockerBuild

func (r *Directory) DockerBuild(opts ...DirectoryDockerBuildOpts) *Container

Builds a new Docker container from this directory.

func (*Directory) Entries

func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error)

Returns a list of files and directories at the given path.

func (*Directory) Export

func (r *Directory) Export(ctx context.Context, path string, opts ...DirectoryExportOpts) (bool, error)

Writes the contents of the directory to a path on the host.

func (*Directory) File

func (r *Directory) File(path string) *File

Retrieves a file at the given path.

func (*Directory) Glob

func (r *Directory) Glob(ctx context.Context, pattern string) ([]string, error)

Returns a list of files and directories that matche the given pattern.

func (*Directory) ID

func (r *Directory) ID(ctx context.Context) (DirectoryID, error)

A unique identifier for this Directory.

func (*Directory) MarshalJSON

func (r *Directory) MarshalJSON() ([]byte, error)

func (*Directory) Pipeline

func (r *Directory) Pipeline(name string, opts ...DirectoryPipelineOpts) *Directory

Creates a named sub-pipeline.

func (*Directory) Sync

func (r *Directory) Sync(ctx context.Context) (*Directory, error)

Force evaluation in the engine.

func (*Directory) UnmarshalJSON

func (r *Directory) UnmarshalJSON(bs []byte) error

func (*Directory) With

With calls the provided function with current Directory.

This is useful for reusability and readability by not breaking the calling chain.

func (*Directory) WithDirectory

func (r *Directory) WithDirectory(path string, directory *Directory, opts ...DirectoryWithDirectoryOpts) *Directory

Retrieves this directory plus a directory written at the given path.

func (*Directory) WithFile

func (r *Directory) WithFile(path string, source *File, opts ...DirectoryWithFileOpts) *Directory

Retrieves this directory plus the contents of the given file copied to the given path.

func (*Directory) WithFiles

func (r *Directory) WithFiles(path string, sources []*File, opts ...DirectoryWithFilesOpts) *Directory

Retrieves this directory plus the contents of the given files copied to the given path.

func (*Directory) WithGraphQLQuery

func (r *Directory) WithGraphQLQuery(q *querybuilder.Selection) *Directory

func (*Directory) WithNewDirectory

func (r *Directory) WithNewDirectory(path string, opts ...DirectoryWithNewDirectoryOpts) *Directory

Retrieves this directory plus a new directory created at the given path.

func (*Directory) WithNewFile

func (r *Directory) WithNewFile(path string, contents string, opts ...DirectoryWithNewFileOpts) *Directory

Retrieves this directory plus a new file written at the given path.

func (*Directory) WithTimestamps

func (r *Directory) WithTimestamps(timestamp int) *Directory

Retrieves this directory with all file/dir timestamps set to the given time.

func (*Directory) WithoutDirectory

func (r *Directory) WithoutDirectory(path string) *Directory

Retrieves this directory with the directory at the given path removed.

func (*Directory) WithoutFile

func (r *Directory) WithoutFile(path string) *Directory

Retrieves this directory with the file at the given path removed.

func (*Directory) XXX_GraphQLID

func (r *Directory) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Directory) XXX_GraphQLIDType

func (r *Directory) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Directory) XXX_GraphQLType

func (r *Directory) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type DirectoryAsModuleOpts

type DirectoryAsModuleOpts struct {
	// An optional subpath of the directory which contains the module's configuration file.
	//
	// This is needed when the module code is in a subdirectory but requires parent directories to be loaded in order to execute. For example, the module source code may need a go.mod, project.toml, package.json, etc. file from a parent directory.
	//
	// If not set, the module source code is loaded from the root of the directory.
	SourceRootPath string
}

DirectoryAsModuleOpts contains options for Directory.AsModule

type DirectoryDockerBuildOpts

type DirectoryDockerBuildOpts struct {
	// The platform to build.
	Platform Platform
	// Path to the Dockerfile to use (e.g., "frontend.Dockerfile").
	Dockerfile string
	// Target build stage to build.
	Target string
	// Build arguments to use in the build.
	BuildArgs []BuildArg
	// Secrets to pass to the build.
	//
	// They will be mounted at /run/secrets/[secret-name].
	Secrets []*Secret
}

DirectoryDockerBuildOpts contains options for Directory.DockerBuild

type DirectoryEntriesOpts

type DirectoryEntriesOpts struct {
	// Location of the directory to look at (e.g., "/src").
	Path string
}

DirectoryEntriesOpts contains options for Directory.Entries

type DirectoryExportOpts

type DirectoryExportOpts struct {
	// If true, then the host directory will be wiped clean before exporting so that it exactly matches the directory being exported; this means it will delete any files on the host that aren't in the exported dir. If false (the default), the contents of the directory will be merged with any existing contents of the host directory, leaving any existing files on the host that aren't in the exported directory alone.
	Wipe bool
}

DirectoryExportOpts contains options for Directory.Export

type DirectoryID

type DirectoryID string

The `DirectoryID` scalar type represents an identifier for an object of type Directory.

type DirectoryOpts

type DirectoryOpts struct {
	// DEPRECATED: Use `loadDirectoryFromID` instead.
	ID DirectoryID
}

DirectoryOpts contains options for Client.Directory

type DirectoryPipelineOpts

type DirectoryPipelineOpts struct {
	// Description of the sub-pipeline.
	Description string
	// Labels to apply to the sub-pipeline.
	Labels []PipelineLabel
}

DirectoryPipelineOpts contains options for Directory.Pipeline

type DirectoryWithDirectoryOpts

type DirectoryWithDirectoryOpts struct {
	// Exclude artifacts that match the given pattern (e.g., ["node_modules/", ".git*"]).
	Exclude []string
	// Include only artifacts that match the given pattern (e.g., ["app/", "package.*"]).
	Include []string
}

DirectoryWithDirectoryOpts contains options for Directory.WithDirectory

type DirectoryWithFileOpts

type DirectoryWithFileOpts struct {
	// Permission given to the copied file (e.g., 0600).
	Permissions int
}

DirectoryWithFileOpts contains options for Directory.WithFile

type DirectoryWithFilesOpts

type DirectoryWithFilesOpts struct {
	// Permission given to the copied files (e.g., 0600).
	Permissions int
}

DirectoryWithFilesOpts contains options for Directory.WithFiles

type DirectoryWithNewDirectoryOpts

type DirectoryWithNewDirectoryOpts struct {
	// Permission granted to the created directory (e.g., 0777).
	Permissions int
}

DirectoryWithNewDirectoryOpts contains options for Directory.WithNewDirectory

type DirectoryWithNewFileOpts

type DirectoryWithNewFileOpts struct {
	// Permission given to the copied file (e.g., 0600).
	Permissions int
}

DirectoryWithNewFileOpts contains options for Directory.WithNewFile

type EnvVariable

type EnvVariable struct {
	// contains filtered or unexported fields
}

An environment variable name and value.

func (*EnvVariable) ID

A unique identifier for this EnvVariable.

func (*EnvVariable) MarshalJSON

func (r *EnvVariable) MarshalJSON() ([]byte, error)

func (*EnvVariable) Name

func (r *EnvVariable) Name(ctx context.Context) (string, error)

The environment variable name.

func (*EnvVariable) UnmarshalJSON

func (r *EnvVariable) UnmarshalJSON(bs []byte) error

func (*EnvVariable) Value

func (r *EnvVariable) Value(ctx context.Context) (string, error)

The environment variable value.

func (*EnvVariable) WithGraphQLQuery

func (r *EnvVariable) WithGraphQLQuery(q *querybuilder.Selection) *EnvVariable

func (*EnvVariable) XXX_GraphQLID

func (r *EnvVariable) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*EnvVariable) XXX_GraphQLIDType

func (r *EnvVariable) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*EnvVariable) XXX_GraphQLType

func (r *EnvVariable) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type EnvVariableID

type EnvVariableID string

The `EnvVariableID` scalar type represents an identifier for an object of type EnvVariable.

type ExecError

type ExecError struct {
	Cmd      []string
	ExitCode int
	Stdout   string
	Stderr   string
	// contains filtered or unexported fields
}

ExecError is an API error from an exec operation.

func (*ExecError) Error

func (e *ExecError) Error() string

func (*ExecError) Message

func (e *ExecError) Message() string

func (*ExecError) Unwrap

func (e *ExecError) Unwrap() error

type FieldTypeDef

type FieldTypeDef struct {
	// contains filtered or unexported fields
}

A definition of a field on a custom object defined in a Module.

A field on an object has a static value, as opposed to a function on an object whose value is computed by invoking code (and can accept arguments).

func (*FieldTypeDef) Description

func (r *FieldTypeDef) Description(ctx context.Context) (string, error)

A doc string for the field, if any.

func (*FieldTypeDef) ID

A unique identifier for this FieldTypeDef.

func (*FieldTypeDef) MarshalJSON

func (r *FieldTypeDef) MarshalJSON() ([]byte, error)

func (*FieldTypeDef) Name

func (r *FieldTypeDef) Name(ctx context.Context) (string, error)

The name of the field in lowerCamelCase format.

func (*FieldTypeDef) TypeDef

func (r *FieldTypeDef) TypeDef() *TypeDef

The type of the field.

func (*FieldTypeDef) UnmarshalJSON

func (r *FieldTypeDef) UnmarshalJSON(bs []byte) error

func (*FieldTypeDef) WithGraphQLQuery

func (r *FieldTypeDef) WithGraphQLQuery(q *querybuilder.Selection) *FieldTypeDef

func (*FieldTypeDef) XXX_GraphQLID

func (r *FieldTypeDef) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*FieldTypeDef) XXX_GraphQLIDType

func (r *FieldTypeDef) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*FieldTypeDef) XXX_GraphQLType

func (r *FieldTypeDef) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type FieldTypeDefID

type FieldTypeDefID string

The `FieldTypeDefID` scalar type represents an identifier for an object of type FieldTypeDef.

type File

type File struct {
	// contains filtered or unexported fields
}

A file.

func (*File) Contents

func (r *File) Contents(ctx context.Context) (string, error)

Retrieves the contents of the file.

func (*File) Export

func (r *File) Export(ctx context.Context, path string, opts ...FileExportOpts) (bool, error)

Writes the file to a file path on the host.

func (*File) ID

func (r *File) ID(ctx context.Context) (FileID, error)

A unique identifier for this File.

func (*File) MarshalJSON

func (r *File) MarshalJSON() ([]byte, error)

func (*File) Name

func (r *File) Name(ctx context.Context) (string, error)

Retrieves the name of the file.

func (*File) Size

func (r *File) Size(ctx context.Context) (int, error)

Retrieves the size of the file, in bytes.

func (*File) Sync

func (r *File) Sync(ctx context.Context) (*File, error)

Force evaluation in the engine.

func (*File) UnmarshalJSON

func (r *File) UnmarshalJSON(bs []byte) error

func (*File) With

func (r *File) With(f WithFileFunc) *File

With calls the provided function with current File.

This is useful for reusability and readability by not breaking the calling chain.

func (*File) WithGraphQLQuery

func (r *File) WithGraphQLQuery(q *querybuilder.Selection) *File

func (*File) WithTimestamps

func (r *File) WithTimestamps(timestamp int) *File

Retrieves this file with its created/modified timestamps set to the given time.

func (*File) XXX_GraphQLID

func (r *File) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*File) XXX_GraphQLIDType

func (r *File) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*File) XXX_GraphQLType

func (r *File) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type FileExportOpts

type FileExportOpts struct {
	// If allowParentDirPath is true, the path argument can be a directory path, in which case the file will be created in that directory.
	AllowParentDirPath bool
}

FileExportOpts contains options for File.Export

type FileID

type FileID string

The `FileID` scalar type represents an identifier for an object of type File.

type Fly

type Fly struct {
	// contains filtered or unexported fields
}

func (*Fly) Deploy

func (r *Fly) Deploy(ctx context.Context, app string, image string, token *Secret) (string, error)

Deploy an application to fly.io with an image ref

func (*Fly) ID

func (r *Fly) ID(ctx context.Context) (FlyID, error)

A unique identifier for this Fly.

func (*Fly) MarshalJSON

func (r *Fly) MarshalJSON() ([]byte, error)

func (*Fly) UnmarshalJSON

func (r *Fly) UnmarshalJSON(bs []byte) error

func (*Fly) WithGraphQLQuery

func (r *Fly) WithGraphQLQuery(q *querybuilder.Selection) *Fly

func (*Fly) XXX_GraphQLID

func (r *Fly) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Fly) XXX_GraphQLIDType

func (r *Fly) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Fly) XXX_GraphQLType

func (r *Fly) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type FlyID

type FlyID string

The `FlyID` scalar type represents an identifier for an object of type Fly.

type Frontend

type Frontend struct {
	// contains filtered or unexported fields
}

func (*Frontend) Build

func (r *Frontend) Build(source *Directory, opts ...FrontendBuildOpts) *Directory

Build the frontend hugo static site

func (*Frontend) ID

func (r *Frontend) ID(ctx context.Context) (FrontendID, error)

A unique identifier for this Frontend.

func (*Frontend) Lint

func (r *Frontend) Lint(ctx context.Context, source *Directory) (string, error)

Lint the frontend Go code

func (*Frontend) MarshalJSON

func (r *Frontend) MarshalJSON() ([]byte, error)

func (*Frontend) Serve

func (r *Frontend) Serve(source *Directory) *Service

Get a service to run the frontend webservice

func (*Frontend) UnitTest

func (r *Frontend) UnitTest(ctx context.Context, source *Directory) (string, error)

Test the frontend

func (*Frontend) UnmarshalJSON

func (r *Frontend) UnmarshalJSON(bs []byte) error

func (*Frontend) WithGraphQLQuery

func (r *Frontend) WithGraphQLQuery(q *querybuilder.Selection) *Frontend

func (*Frontend) XXX_GraphQLID

func (r *Frontend) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Frontend) XXX_GraphQLIDType

func (r *Frontend) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Frontend) XXX_GraphQLType

func (r *Frontend) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type FrontendBuildOpts

type FrontendBuildOpts struct {
	//
	// +default "dev"
	//
	Env string
}

FrontendBuildOpts contains options for Frontend.Build

type FrontendID

type FrontendID string

The `FrontendID` scalar type represents an identifier for an object of type Frontend.

type Function

type Function struct {
	// contains filtered or unexported fields
}

Function represents a resolver provided by a Module.

A function always evaluates against a parent object and is given a set of named arguments.

func (*Function) Args

func (r *Function) Args(ctx context.Context) ([]FunctionArg, error)

Arguments accepted by the function, if any.

func (*Function) Description

func (r *Function) Description(ctx context.Context) (string, error)

A doc string for the function, if any.

func (*Function) ID

func (r *Function) ID(ctx context.Context) (FunctionID, error)

A unique identifier for this Function.

func (*Function) MarshalJSON

func (r *Function) MarshalJSON() ([]byte, error)

func (*Function) Name

func (r *Function) Name(ctx context.Context) (string, error)

The name of the function.

func (*Function) ReturnType

func (r *Function) ReturnType() *TypeDef

The type returned by the function.

func (*Function) UnmarshalJSON

func (r *Function) UnmarshalJSON(bs []byte) error

func (*Function) With

func (r *Function) With(f WithFunctionFunc) *Function

With calls the provided function with current Function.

This is useful for reusability and readability by not breaking the calling chain.

func (*Function) WithArg

func (r *Function) WithArg(name string, typeDef *TypeDef, opts ...FunctionWithArgOpts) *Function

Returns the function with the provided argument

func (*Function) WithDescription

func (r *Function) WithDescription(description string) *Function

Returns the function with the given doc string.

func (*Function) WithGraphQLQuery

func (r *Function) WithGraphQLQuery(q *querybuilder.Selection) *Function

func (*Function) XXX_GraphQLID

func (r *Function) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Function) XXX_GraphQLIDType

func (r *Function) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Function) XXX_GraphQLType

func (r *Function) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type FunctionArg

type FunctionArg struct {
	// contains filtered or unexported fields
}

An argument accepted by a function.

This is a specification for an argument at function definition time, not an argument passed at function call time.

func (*FunctionArg) DefaultValue

func (r *FunctionArg) DefaultValue(ctx context.Context) (JSON, error)

A default value to use for this argument when not explicitly set by the caller, if any.

func (*FunctionArg) Description

func (r *FunctionArg) Description(ctx context.Context) (string, error)

A doc string for the argument, if any.

func (*FunctionArg) ID

A unique identifier for this FunctionArg.

func (*FunctionArg) MarshalJSON

func (r *FunctionArg) MarshalJSON() ([]byte, error)

func (*FunctionArg) Name

func (r *FunctionArg) Name(ctx context.Context) (string, error)

The name of the argument in lowerCamelCase format.

func (*FunctionArg) TypeDef

func (r *FunctionArg) TypeDef() *TypeDef

The type of the argument.

func (*FunctionArg) UnmarshalJSON

func (r *FunctionArg) UnmarshalJSON(bs []byte) error

func (*FunctionArg) WithGraphQLQuery

func (r *FunctionArg) WithGraphQLQuery(q *querybuilder.Selection) *FunctionArg

func (*FunctionArg) XXX_GraphQLID

func (r *FunctionArg) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*FunctionArg) XXX_GraphQLIDType

func (r *FunctionArg) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*FunctionArg) XXX_GraphQLType

func (r *FunctionArg) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type FunctionArgID

type FunctionArgID string

The `FunctionArgID` scalar type represents an identifier for an object of type FunctionArg.

type FunctionCall

type FunctionCall struct {
	// contains filtered or unexported fields
}

An active function call.

func (*FunctionCall) ID

A unique identifier for this FunctionCall.

func (*FunctionCall) InputArgs

func (r *FunctionCall) InputArgs(ctx context.Context) ([]FunctionCallArgValue, error)

The argument values the function is being invoked with.

func (*FunctionCall) MarshalJSON

func (r *FunctionCall) MarshalJSON() ([]byte, error)

func (*FunctionCall) Name

func (r *FunctionCall) Name(ctx context.Context) (string, error)

The name of the function being called.

func (*FunctionCall) Parent

func (r *FunctionCall) Parent(ctx context.Context) (JSON, error)

The value of the parent object of the function being called. If the function is top-level to the module, this is always an empty object.

func (*FunctionCall) ParentName

func (r *FunctionCall) ParentName(ctx context.Context) (string, error)

The name of the parent object of the function being called. If the function is top-level to the module, this is the name of the module.

func (*FunctionCall) ReturnValue

func (r *FunctionCall) ReturnValue(ctx context.Context, value JSON) (Void, error)

Set the return value of the function call to the provided value.

func (*FunctionCall) UnmarshalJSON

func (r *FunctionCall) UnmarshalJSON(bs []byte) error

func (*FunctionCall) WithGraphQLQuery

func (r *FunctionCall) WithGraphQLQuery(q *querybuilder.Selection) *FunctionCall

func (*FunctionCall) XXX_GraphQLID

func (r *FunctionCall) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*FunctionCall) XXX_GraphQLIDType

func (r *FunctionCall) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*FunctionCall) XXX_GraphQLType

func (r *FunctionCall) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type FunctionCallArgValue

type FunctionCallArgValue struct {
	// contains filtered or unexported fields
}

A value passed as a named argument to a function call.

func (*FunctionCallArgValue) ID

A unique identifier for this FunctionCallArgValue.

func (*FunctionCallArgValue) MarshalJSON

func (r *FunctionCallArgValue) MarshalJSON() ([]byte, error)

func (*FunctionCallArgValue) Name

The name of the argument.

func (*FunctionCallArgValue) UnmarshalJSON

func (r *FunctionCallArgValue) UnmarshalJSON(bs []byte) error

func (*FunctionCallArgValue) Value

func (r *FunctionCallArgValue) Value(ctx context.Context) (JSON, error)

The value of the argument represented as a JSON serialized string.

func (*FunctionCallArgValue) WithGraphQLQuery

func (*FunctionCallArgValue) XXX_GraphQLID

func (r *FunctionCallArgValue) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*FunctionCallArgValue) XXX_GraphQLIDType

func (r *FunctionCallArgValue) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*FunctionCallArgValue) XXX_GraphQLType

func (r *FunctionCallArgValue) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type FunctionCallArgValueID

type FunctionCallArgValueID string

The `FunctionCallArgValueID` scalar type represents an identifier for an object of type FunctionCallArgValue.

type FunctionCallID

type FunctionCallID string

The `FunctionCallID` scalar type represents an identifier for an object of type FunctionCall.

type FunctionID

type FunctionID string

The `FunctionID` scalar type represents an identifier for an object of type Function.

type FunctionWithArgOpts

type FunctionWithArgOpts struct {
	// A doc string for the argument, if any
	Description string
	// A default value to use for this argument if not explicitly set by the caller, if any
	DefaultValue JSON
}

FunctionWithArgOpts contains options for Function.WithArg

type GeneratedCode

type GeneratedCode struct {
	// contains filtered or unexported fields
}

The result of running an SDK's codegen.

func (*GeneratedCode) Code

func (r *GeneratedCode) Code() *Directory

The directory containing the generated code.

func (*GeneratedCode) ID

A unique identifier for this GeneratedCode.

func (*GeneratedCode) MarshalJSON

func (r *GeneratedCode) MarshalJSON() ([]byte, error)

func (*GeneratedCode) UnmarshalJSON

func (r *GeneratedCode) UnmarshalJSON(bs []byte) error

func (*GeneratedCode) VcsGeneratedPaths

func (r *GeneratedCode) VcsGeneratedPaths(ctx context.Context) ([]string, error)

List of paths to mark generated in version control (i.e. .gitattributes).

func (*GeneratedCode) VcsIgnoredPaths

func (r *GeneratedCode) VcsIgnoredPaths(ctx context.Context) ([]string, error)

List of paths to ignore in version control (i.e. .gitignore).

func (*GeneratedCode) With

With calls the provided function with current GeneratedCode.

This is useful for reusability and readability by not breaking the calling chain.

func (*GeneratedCode) WithGraphQLQuery

func (r *GeneratedCode) WithGraphQLQuery(q *querybuilder.Selection) *GeneratedCode

func (*GeneratedCode) WithVCSGeneratedPaths

func (r *GeneratedCode) WithVCSGeneratedPaths(paths []string) *GeneratedCode

Set the list of paths to mark generated in version control.

func (*GeneratedCode) WithVCSIgnoredPaths

func (r *GeneratedCode) WithVCSIgnoredPaths(paths []string) *GeneratedCode

Set the list of paths to ignore in version control.

func (*GeneratedCode) XXX_GraphQLID

func (r *GeneratedCode) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*GeneratedCode) XXX_GraphQLIDType

func (r *GeneratedCode) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*GeneratedCode) XXX_GraphQLType

func (r *GeneratedCode) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type GeneratedCodeID

type GeneratedCodeID string

The `GeneratedCodeID` scalar type represents an identifier for an object of type GeneratedCode.

type GitModuleSource

type GitModuleSource struct {
	// contains filtered or unexported fields
}

Module source originating from a git repo.

func (*GitModuleSource) CloneURL

func (r *GitModuleSource) CloneURL(ctx context.Context) (string, error)

The URL from which the source's git repo can be cloned.

func (*GitModuleSource) Commit

func (r *GitModuleSource) Commit(ctx context.Context) (string, error)

The resolved commit of the git repo this source points to.

func (*GitModuleSource) ContextDirectory

func (r *GitModuleSource) ContextDirectory() *Directory

The directory containing everything needed to load load and use the module.

func (*GitModuleSource) HTMLURL

func (r *GitModuleSource) HTMLURL(ctx context.Context) (string, error)

The URL to the source's git repo in a web browser

func (*GitModuleSource) ID

A unique identifier for this GitModuleSource.

func (*GitModuleSource) MarshalJSON

func (r *GitModuleSource) MarshalJSON() ([]byte, error)

func (*GitModuleSource) RootSubpath

func (r *GitModuleSource) RootSubpath(ctx context.Context) (string, error)

The path to the root of the module source under the context directory. This directory contains its configuration file. It also contains its source code (possibly as a subdirectory).

func (*GitModuleSource) UnmarshalJSON

func (r *GitModuleSource) UnmarshalJSON(bs []byte) error

func (*GitModuleSource) Version

func (r *GitModuleSource) Version(ctx context.Context) (string, error)

The specified version of the git repo this source points to.

func (*GitModuleSource) WithGraphQLQuery

func (r *GitModuleSource) WithGraphQLQuery(q *querybuilder.Selection) *GitModuleSource

func (*GitModuleSource) XXX_GraphQLID

func (r *GitModuleSource) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*GitModuleSource) XXX_GraphQLIDType

func (r *GitModuleSource) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*GitModuleSource) XXX_GraphQLType

func (r *GitModuleSource) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type GitModuleSourceID

type GitModuleSourceID string

The `GitModuleSourceID` scalar type represents an identifier for an object of type GitModuleSource.

type GitOpts

type GitOpts struct {
	// Set to true to keep .git directory.
	KeepGitDir bool
	// A service which must be started before the repo is fetched.
	ExperimentalServiceHost *Service
	// Set SSH known hosts
	SSHKnownHosts string
	// Set SSH auth socket
	SSHAuthSocket *Socket
}

GitOpts contains options for Client.Git

type GitRef

type GitRef struct {
	// contains filtered or unexported fields
}

A git ref (tag, branch, or commit).

func (*GitRef) Commit

func (r *GitRef) Commit(ctx context.Context) (string, error)

The resolved commit id at this ref.

func (*GitRef) ID

func (r *GitRef) ID(ctx context.Context) (GitRefID, error)

A unique identifier for this GitRef.

func (*GitRef) MarshalJSON

func (r *GitRef) MarshalJSON() ([]byte, error)

func (*GitRef) Tree

func (r *GitRef) Tree(opts ...GitRefTreeOpts) *Directory

The filesystem tree at this ref.

func (*GitRef) UnmarshalJSON

func (r *GitRef) UnmarshalJSON(bs []byte) error

func (*GitRef) WithGraphQLQuery

func (r *GitRef) WithGraphQLQuery(q *querybuilder.Selection) *GitRef

func (*GitRef) XXX_GraphQLID

func (r *GitRef) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*GitRef) XXX_GraphQLIDType

func (r *GitRef) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*GitRef) XXX_GraphQLType

func (r *GitRef) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type GitRefID

type GitRefID string

The `GitRefID` scalar type represents an identifier for an object of type GitRef.

type GitRefTreeOpts

type GitRefTreeOpts struct {
	// DEPRECATED: This option should be passed to `git` instead.
	SSHKnownHosts string
	// DEPRECATED: This option should be passed to `git` instead.
	SSHAuthSocket *Socket
}

GitRefTreeOpts contains options for GitRef.Tree

type GitRepository

type GitRepository struct {
	// contains filtered or unexported fields
}

A git repository.

func (*GitRepository) Branch

func (r *GitRepository) Branch(name string) *GitRef

Returns details of a branch.

func (*GitRepository) Commit

func (r *GitRepository) Commit(id string) *GitRef

Returns details of a commit.

func (*GitRepository) Head

func (r *GitRepository) Head() *GitRef

Returns details for HEAD.

func (*GitRepository) ID

A unique identifier for this GitRepository.

func (*GitRepository) MarshalJSON

func (r *GitRepository) MarshalJSON() ([]byte, error)

func (*GitRepository) Ref

func (r *GitRepository) Ref(name string) *GitRef

Returns details of a ref.

func (*GitRepository) Tag

func (r *GitRepository) Tag(name string) *GitRef

Returns details of a tag.

func (*GitRepository) UnmarshalJSON

func (r *GitRepository) UnmarshalJSON(bs []byte) error

func (*GitRepository) With

With calls the provided function with current GitRepository.

This is useful for reusability and readability by not breaking the calling chain.

func (*GitRepository) WithAuthHeader

func (r *GitRepository) WithAuthHeader(header *Secret) *GitRepository

Header to authenticate the remote with.

func (*GitRepository) WithAuthToken

func (r *GitRepository) WithAuthToken(token *Secret) *GitRepository

Token to authenticate the remote with.

func (*GitRepository) WithGraphQLQuery

func (r *GitRepository) WithGraphQLQuery(q *querybuilder.Selection) *GitRepository

func (*GitRepository) XXX_GraphQLID

func (r *GitRepository) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*GitRepository) XXX_GraphQLIDType

func (r *GitRepository) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*GitRepository) XXX_GraphQLType

func (r *GitRepository) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type GitRepositoryID

type GitRepositoryID string

The `GitRepositoryID` scalar type represents an identifier for an object of type GitRepository.

type GithubRelease

type GithubRelease struct {
	// contains filtered or unexported fields
}

func (*GithubRelease) Create

func (r *GithubRelease) Create(ctx context.Context, repo string, tag string, title string, token *Secret, opts ...GithubReleaseCreateOpts) (string, error)

func (*GithubRelease) ID

A unique identifier for this GithubRelease.

func (*GithubRelease) MarshalJSON

func (r *GithubRelease) MarshalJSON() ([]byte, error)

func (*GithubRelease) UnmarshalJSON

func (r *GithubRelease) UnmarshalJSON(bs []byte) error

func (*GithubRelease) WithGraphQLQuery

func (r *GithubRelease) WithGraphQLQuery(q *querybuilder.Selection) *GithubRelease

func (*GithubRelease) XXX_GraphQLID

func (r *GithubRelease) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*GithubRelease) XXX_GraphQLIDType

func (r *GithubRelease) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*GithubRelease) XXX_GraphQLType

func (r *GithubRelease) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type GithubReleaseCreateOpts

type GithubReleaseCreateOpts struct {
	Assets *Directory

	Notes string

	Draft bool

	Latest bool

	Prerelease bool
}

GithubReleaseCreateOpts contains options for GithubRelease.Create

type GithubReleaseID

type GithubReleaseID string

The `GithubReleaseID` scalar type represents an identifier for an object of type GithubRelease.

type HTTPOpts

type HTTPOpts struct {
	// A service which must be started before the URL is fetched.
	ExperimentalServiceHost *Service
}

HTTPOpts contains options for Client.HTTP

type ImageLayerCompression

type ImageLayerCompression string
const (
	Estargz ImageLayerCompression = "EStarGZ"

	Gzip ImageLayerCompression = "Gzip"

	Uncompressed ImageLayerCompression = "Uncompressed"

	Zstd ImageLayerCompression = "Zstd"
)

func (ImageLayerCompression) IsEnum

func (ImageLayerCompression) IsEnum()

type ImageMediaTypes

type ImageMediaTypes string
const (
	Dockermediatypes ImageMediaTypes = "DockerMediaTypes"

	Ocimediatypes ImageMediaTypes = "OCIMediaTypes"
)

func (ImageMediaTypes) IsEnum

func (ImageMediaTypes) IsEnum()

type Infisical

type Infisical struct {
	// contains filtered or unexported fields
}

func (*Infisical) GetSecret

func (r *Infisical) GetSecret(name string, token *Secret, projectId string, env string, path string) *Secret

Get a secret from an Infisical project using secret name, project token, env, and path

func (*Infisical) ID

func (r *Infisical) ID(ctx context.Context) (InfisicalID, error)

A unique identifier for this Infisical.

func (*Infisical) MarshalJSON

func (r *Infisical) MarshalJSON() ([]byte, error)

func (*Infisical) Test

func (r *Infisical) Test(ctx context.Context, token string, projectId string) (string, error)

Insecure test using default Infisical project and plaintext token

func (*Infisical) UnmarshalJSON

func (r *Infisical) UnmarshalJSON(bs []byte) error

func (*Infisical) WithGraphQLQuery

func (r *Infisical) WithGraphQLQuery(q *querybuilder.Selection) *Infisical

func (*Infisical) XXX_GraphQLID

func (r *Infisical) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Infisical) XXX_GraphQLIDType

func (r *Infisical) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Infisical) XXX_GraphQLType

func (r *Infisical) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type InfisicalID

type InfisicalID string

The `InfisicalID` scalar type represents an identifier for an object of type Infisical.

type InputTypeDef

type InputTypeDef struct {
	// contains filtered or unexported fields
}

A graphql input type, which is essentially just a group of named args. This is currently only used to represent pre-existing usage of graphql input types in the core API. It is not used by user modules and shouldn't ever be as user module accept input objects via their id rather than graphql input types.

func (*InputTypeDef) Fields

func (r *InputTypeDef) Fields(ctx context.Context) ([]FieldTypeDef, error)

Static fields defined on this input object, if any.

func (*InputTypeDef) ID

A unique identifier for this InputTypeDef.

func (*InputTypeDef) MarshalJSON

func (r *InputTypeDef) MarshalJSON() ([]byte, error)

func (*InputTypeDef) Name

func (r *InputTypeDef) Name(ctx context.Context) (string, error)

The name of the input object.

func (*InputTypeDef) UnmarshalJSON

func (r *InputTypeDef) UnmarshalJSON(bs []byte) error

func (*InputTypeDef) WithGraphQLQuery

func (r *InputTypeDef) WithGraphQLQuery(q *querybuilder.Selection) *InputTypeDef

func (*InputTypeDef) XXX_GraphQLID

func (r *InputTypeDef) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*InputTypeDef) XXX_GraphQLIDType

func (r *InputTypeDef) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*InputTypeDef) XXX_GraphQLType

func (r *InputTypeDef) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type InputTypeDefID

type InputTypeDefID string

The `InputTypeDefID` scalar type represents an identifier for an object of type InputTypeDef.

type InterfaceTypeDef

type InterfaceTypeDef struct {
	// contains filtered or unexported fields
}

A definition of a custom interface defined in a Module.

func (*InterfaceTypeDef) Description

func (r *InterfaceTypeDef) Description(ctx context.Context) (string, error)

The doc string for the interface, if any.

func (*InterfaceTypeDef) Functions

func (r *InterfaceTypeDef) Functions(ctx context.Context) ([]Function, error)

Functions defined on this interface, if any.

func (*InterfaceTypeDef) ID

A unique identifier for this InterfaceTypeDef.

func (*InterfaceTypeDef) MarshalJSON

func (r *InterfaceTypeDef) MarshalJSON() ([]byte, error)

func (*InterfaceTypeDef) Name

func (r *InterfaceTypeDef) Name(ctx context.Context) (string, error)

The name of the interface.

func (*InterfaceTypeDef) SourceModuleName

func (r *InterfaceTypeDef) SourceModuleName(ctx context.Context) (string, error)

If this InterfaceTypeDef is associated with a Module, the name of the module. Unset otherwise.

func (*InterfaceTypeDef) UnmarshalJSON

func (r *InterfaceTypeDef) UnmarshalJSON(bs []byte) error

func (*InterfaceTypeDef) WithGraphQLQuery

func (r *InterfaceTypeDef) WithGraphQLQuery(q *querybuilder.Selection) *InterfaceTypeDef

func (*InterfaceTypeDef) XXX_GraphQLID

func (r *InterfaceTypeDef) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*InterfaceTypeDef) XXX_GraphQLIDType

func (r *InterfaceTypeDef) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*InterfaceTypeDef) XXX_GraphQLType

func (r *InterfaceTypeDef) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type InterfaceTypeDefID

type InterfaceTypeDefID string

The `InterfaceTypeDefID` scalar type represents an identifier for an object of type InterfaceTypeDef.

type JSON

type JSON string

An arbitrary JSON-encoded value.

type Label

type Label struct {
	// contains filtered or unexported fields
}

A simple key value object that represents a label.

func (*Label) ID

func (r *Label) ID(ctx context.Context) (LabelID, error)

A unique identifier for this Label.

func (*Label) MarshalJSON

func (r *Label) MarshalJSON() ([]byte, error)

func (*Label) Name

func (r *Label) Name(ctx context.Context) (string, error)

The label name.

func (*Label) UnmarshalJSON

func (r *Label) UnmarshalJSON(bs []byte) error

func (*Label) Value

func (r *Label) Value(ctx context.Context) (string, error)

The label value.

func (*Label) WithGraphQLQuery

func (r *Label) WithGraphQLQuery(q *querybuilder.Selection) *Label

func (*Label) XXX_GraphQLID

func (r *Label) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Label) XXX_GraphQLIDType

func (r *Label) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Label) XXX_GraphQLType

func (r *Label) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type LabelID

type LabelID string

The `LabelID` scalar type represents an identifier for an object of type Label.

type ListTypeDef

type ListTypeDef struct {
	// contains filtered or unexported fields
}

A definition of a list type in a Module.

func (*ListTypeDef) ElementTypeDef

func (r *ListTypeDef) ElementTypeDef() *TypeDef

The type of the elements in the list.

func (*ListTypeDef) ID

A unique identifier for this ListTypeDef.

func (*ListTypeDef) MarshalJSON

func (r *ListTypeDef) MarshalJSON() ([]byte, error)

func (*ListTypeDef) UnmarshalJSON

func (r *ListTypeDef) UnmarshalJSON(bs []byte) error

func (*ListTypeDef) WithGraphQLQuery

func (r *ListTypeDef) WithGraphQLQuery(q *querybuilder.Selection) *ListTypeDef

func (*ListTypeDef) XXX_GraphQLID

func (r *ListTypeDef) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*ListTypeDef) XXX_GraphQLIDType

func (r *ListTypeDef) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*ListTypeDef) XXX_GraphQLType

func (r *ListTypeDef) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ListTypeDefID

type ListTypeDefID string

The `ListTypeDefID` scalar type represents an identifier for an object of type ListTypeDef.

type LocalModuleSource

type LocalModuleSource struct {
	// contains filtered or unexported fields
}

Module source that that originates from a path locally relative to an arbitrary directory.

func (*LocalModuleSource) ContextDirectory

func (r *LocalModuleSource) ContextDirectory() *Directory

The directory containing everything needed to load load and use the module.

func (*LocalModuleSource) ID

A unique identifier for this LocalModuleSource.

func (*LocalModuleSource) MarshalJSON

func (r *LocalModuleSource) MarshalJSON() ([]byte, error)

func (*LocalModuleSource) RootSubpath

func (r *LocalModuleSource) RootSubpath(ctx context.Context) (string, error)

The path to the root of the module source under the context directory. This directory contains its configuration file. It also contains its source code (possibly as a subdirectory).

func (*LocalModuleSource) UnmarshalJSON

func (r *LocalModuleSource) UnmarshalJSON(bs []byte) error

func (*LocalModuleSource) WithGraphQLQuery

func (r *LocalModuleSource) WithGraphQLQuery(q *querybuilder.Selection) *LocalModuleSource

func (*LocalModuleSource) XXX_GraphQLID

func (r *LocalModuleSource) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*LocalModuleSource) XXX_GraphQLIDType

func (r *LocalModuleSource) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*LocalModuleSource) XXX_GraphQLType

func (r *LocalModuleSource) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type LocalModuleSourceID

type LocalModuleSourceID string

The `LocalModuleSourceID` scalar type represents an identifier for an object of type LocalModuleSource.

type Module

type Module struct {
	// contains filtered or unexported fields
}

A Dagger module.

func (*Module) Dependencies

func (r *Module) Dependencies(ctx context.Context) ([]Module, error)

Modules used by this module.

func (*Module) DependencyConfig

func (r *Module) DependencyConfig(ctx context.Context) ([]ModuleDependency, error)

The dependencies as configured by the module.

func (*Module) Description

func (r *Module) Description(ctx context.Context) (string, error)

The doc string of the module, if any

func (*Module) GeneratedContextDiff

func (r *Module) GeneratedContextDiff() *Directory

The generated files and directories made on top of the module source's context directory.

func (*Module) GeneratedContextDirectory

func (r *Module) GeneratedContextDirectory() *Directory

The module source's context plus any configuration and source files created by codegen.

func (*Module) ID

func (r *Module) ID(ctx context.Context) (ModuleID, error)

A unique identifier for this Module.

func (*Module) Initialize

func (r *Module) Initialize() *Module

Retrieves the module with the objects loaded via its SDK.

func (*Module) Interfaces

func (r *Module) Interfaces(ctx context.Context) ([]TypeDef, error)

Interfaces served by this module.

func (*Module) MarshalJSON

func (r *Module) MarshalJSON() ([]byte, error)

func (*Module) Name

func (r *Module) Name(ctx context.Context) (string, error)

The name of the module

func (*Module) Objects

func (r *Module) Objects(ctx context.Context) ([]TypeDef, error)

Objects served by this module.

func (*Module) Runtime

func (r *Module) Runtime() *Container

The container that runs the module's entrypoint. It will fail to execute if the module doesn't compile.

func (*Module) SDK

func (r *Module) SDK(ctx context.Context) (string, error)

The SDK used by this module. Either a name of a builtin SDK or a module source ref string pointing to the SDK's implementation.

func (*Module) Serve

func (r *Module) Serve(ctx context.Context) (Void, error)

Serve a module's API in the current session.

Note: this can only be called once per session. In the future, it could return a stream or service to remove the side effect.

func (*Module) Source

func (r *Module) Source() *ModuleSource

The source for the module.

func (*Module) UnmarshalJSON

func (r *Module) UnmarshalJSON(bs []byte) error

func (*Module) With

func (r *Module) With(f WithModuleFunc) *Module

With calls the provided function with current Module.

This is useful for reusability and readability by not breaking the calling chain.

func (*Module) WithDescription

func (r *Module) WithDescription(description string) *Module

Retrieves the module with the given description

func (*Module) WithGraphQLQuery

func (r *Module) WithGraphQLQuery(q *querybuilder.Selection) *Module

func (*Module) WithInterface

func (r *Module) WithInterface(iface *TypeDef) *Module

This module plus the given Interface type and associated functions

func (*Module) WithObject

func (r *Module) WithObject(object *TypeDef) *Module

This module plus the given Object type and associated functions.

func (*Module) WithSource

func (r *Module) WithSource(source *ModuleSource) *Module

Retrieves the module with basic configuration loaded if present.

func (*Module) XXX_GraphQLID

func (r *Module) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Module) XXX_GraphQLIDType

func (r *Module) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Module) XXX_GraphQLType

func (r *Module) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ModuleDependency

type ModuleDependency struct {
	// contains filtered or unexported fields
}

The configuration of dependency of a module.

func (*ModuleDependency) ID

A unique identifier for this ModuleDependency.

func (*ModuleDependency) MarshalJSON

func (r *ModuleDependency) MarshalJSON() ([]byte, error)

func (*ModuleDependency) Name

func (r *ModuleDependency) Name(ctx context.Context) (string, error)

The name of the dependency module.

func (*ModuleDependency) Source

func (r *ModuleDependency) Source() *ModuleSource

The source for the dependency module.

func (*ModuleDependency) UnmarshalJSON

func (r *ModuleDependency) UnmarshalJSON(bs []byte) error

func (*ModuleDependency) WithGraphQLQuery

func (r *ModuleDependency) WithGraphQLQuery(q *querybuilder.Selection) *ModuleDependency

func (*ModuleDependency) XXX_GraphQLID

func (r *ModuleDependency) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*ModuleDependency) XXX_GraphQLIDType

func (r *ModuleDependency) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*ModuleDependency) XXX_GraphQLType

func (r *ModuleDependency) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ModuleDependencyID

type ModuleDependencyID string

The `ModuleDependencyID` scalar type represents an identifier for an object of type ModuleDependency.

type ModuleDependencyOpts

type ModuleDependencyOpts struct {
	// If set, the name to use for the dependency. Otherwise, once installed to a parent module, the name of the dependency module will be used by default.
	Name string
}

ModuleDependencyOpts contains options for Client.ModuleDependency

type ModuleID

type ModuleID string

The `ModuleID` scalar type represents an identifier for an object of type Module.

type ModuleSource

type ModuleSource struct {
	// contains filtered or unexported fields
}

The source needed to load and run a module, along with any metadata about the source such as versions/urls/etc.

func (*ModuleSource) AsGitSource

func (r *ModuleSource) AsGitSource() *GitModuleSource

If the source is a of kind git, the git source representation of it.

func (*ModuleSource) AsLocalSource

func (r *ModuleSource) AsLocalSource() *LocalModuleSource

If the source is of kind local, the local source representation of it.

func (*ModuleSource) AsModule

func (r *ModuleSource) AsModule() *Module

Load the source as a module. If this is a local source, the parent directory must have been provided during module source creation

func (*ModuleSource) AsString

func (r *ModuleSource) AsString(ctx context.Context) (string, error)

A human readable ref string representation of this module source.

func (*ModuleSource) ConfigExists

func (r *ModuleSource) ConfigExists(ctx context.Context) (bool, error)

Returns whether the module source has a configuration file.

func (*ModuleSource) ContextDirectory

func (r *ModuleSource) ContextDirectory() *Directory

The directory containing everything needed to load load and use the module.

func (*ModuleSource) Dependencies

func (r *ModuleSource) Dependencies(ctx context.Context) ([]ModuleDependency, error)

The dependencies of the module source. Includes dependencies from the configuration and any extras from withDependencies calls.

func (*ModuleSource) Directory

func (r *ModuleSource) Directory(path string) *Directory

The directory containing the module configuration and source code (source code may be in a subdir).

func (*ModuleSource) ID

A unique identifier for this ModuleSource.

func (*ModuleSource) Kind

The kind of source (e.g. local, git, etc.)

func (*ModuleSource) MarshalJSON

func (r *ModuleSource) MarshalJSON() ([]byte, error)

func (*ModuleSource) ModuleName

func (r *ModuleSource) ModuleName(ctx context.Context) (string, error)

If set, the name of the module this source references, including any overrides at runtime by callers.

func (*ModuleSource) ModuleOriginalName

func (r *ModuleSource) ModuleOriginalName(ctx context.Context) (string, error)

The original name of the module this source references, as defined in the module configuration.

func (*ModuleSource) ResolveContextPathFromCaller

func (r *ModuleSource) ResolveContextPathFromCaller(ctx context.Context) (string, error)

The path to the module source's context directory on the caller's filesystem. Only valid for local sources.

func (*ModuleSource) ResolveDependency

func (r *ModuleSource) ResolveDependency(dep *ModuleSource) *ModuleSource

Resolve the provided module source arg as a dependency relative to this module source.

func (*ModuleSource) ResolveDirectoryFromCaller

func (r *ModuleSource) ResolveDirectoryFromCaller(path string, opts ...ModuleSourceResolveDirectoryFromCallerOpts) *Directory

Load a directory from the caller optionally with a given view applied.

func (*ModuleSource) ResolveFromCaller

func (r *ModuleSource) ResolveFromCaller() *ModuleSource

Load the source from its path on the caller's filesystem, including only needed+configured files and directories. Only valid for local sources.

func (*ModuleSource) SourceRootSubpath

func (r *ModuleSource) SourceRootSubpath(ctx context.Context) (string, error)

The path relative to context of the root of the module source, which contains dagger.json. It also contains the module implementation source code, but that may or may not being a subdir of this root.

func (*ModuleSource) SourceSubpath

func (r *ModuleSource) SourceSubpath(ctx context.Context) (string, error)

The path relative to context of the module implementation source code.

func (*ModuleSource) UnmarshalJSON

func (r *ModuleSource) UnmarshalJSON(bs []byte) error

func (*ModuleSource) View

func (r *ModuleSource) View(name string) *ModuleSourceView

Retrieve a named view defined for this module source.

func (*ModuleSource) Views

func (r *ModuleSource) Views(ctx context.Context) ([]ModuleSourceView, error)

The named views defined for this module source, which are sets of directory filters that can be applied to directory arguments provided to functions.

func (*ModuleSource) With

With calls the provided function with current ModuleSource.

This is useful for reusability and readability by not breaking the calling chain.

func (*ModuleSource) WithContextDirectory

func (r *ModuleSource) WithContextDirectory(dir *Directory) *ModuleSource

Update the module source with a new context directory. Only valid for local sources.

func (*ModuleSource) WithDependencies

func (r *ModuleSource) WithDependencies(dependencies []*ModuleDependency) *ModuleSource

Append the provided dependencies to the module source's dependency list.

func (*ModuleSource) WithGraphQLQuery

func (r *ModuleSource) WithGraphQLQuery(q *querybuilder.Selection) *ModuleSource

func (*ModuleSource) WithName

func (r *ModuleSource) WithName(name string) *ModuleSource

Update the module source with a new name.

func (*ModuleSource) WithSDK

func (r *ModuleSource) WithSDK(sdk string) *ModuleSource

Update the module source with a new SDK.

func (*ModuleSource) WithSourceSubpath

func (r *ModuleSource) WithSourceSubpath(path string) *ModuleSource

Update the module source with a new source subpath.

func (*ModuleSource) WithView

func (r *ModuleSource) WithView(name string, patterns []string) *ModuleSource

Update the module source with a new named view.

func (*ModuleSource) XXX_GraphQLID

func (r *ModuleSource) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*ModuleSource) XXX_GraphQLIDType

func (r *ModuleSource) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*ModuleSource) XXX_GraphQLType

func (r *ModuleSource) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ModuleSourceID

type ModuleSourceID string

The `ModuleSourceID` scalar type represents an identifier for an object of type ModuleSource.

type ModuleSourceKind

type ModuleSourceKind string
const (
	GitSource ModuleSourceKind = "GIT_SOURCE"

	LocalSource ModuleSourceKind = "LOCAL_SOURCE"
)

func (ModuleSourceKind) IsEnum

func (ModuleSourceKind) IsEnum()

type ModuleSourceOpts

type ModuleSourceOpts struct {
	// If true, enforce that the source is a stable version for source kinds that support versioning.
	Stable bool
}

ModuleSourceOpts contains options for Client.ModuleSource

type ModuleSourceResolveDirectoryFromCallerOpts

type ModuleSourceResolveDirectoryFromCallerOpts struct {
	// If set, the name of the view to apply to the path.
	ViewName string
}

ModuleSourceResolveDirectoryFromCallerOpts contains options for ModuleSource.ResolveDirectoryFromCaller

type ModuleSourceView

type ModuleSourceView struct {
	// contains filtered or unexported fields
}

A named set of path filters that can be applied to directory arguments provided to functions.

func (*ModuleSourceView) ID

A unique identifier for this ModuleSourceView.

func (*ModuleSourceView) MarshalJSON

func (r *ModuleSourceView) MarshalJSON() ([]byte, error)

func (*ModuleSourceView) Name

func (r *ModuleSourceView) Name(ctx context.Context) (string, error)

The name of the view

func (*ModuleSourceView) Patterns

func (r *ModuleSourceView) Patterns(ctx context.Context) ([]string, error)

The patterns of the view used to filter paths

func (*ModuleSourceView) UnmarshalJSON

func (r *ModuleSourceView) UnmarshalJSON(bs []byte) error

func (*ModuleSourceView) WithGraphQLQuery

func (r *ModuleSourceView) WithGraphQLQuery(q *querybuilder.Selection) *ModuleSourceView

func (*ModuleSourceView) XXX_GraphQLID

func (r *ModuleSourceView) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*ModuleSourceView) XXX_GraphQLIDType

func (r *ModuleSourceView) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*ModuleSourceView) XXX_GraphQLType

func (r *ModuleSourceView) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ModuleSourceViewID

type ModuleSourceViewID string

The `ModuleSourceViewID` scalar type represents an identifier for an object of type ModuleSourceView.

type Netlify

type Netlify struct {
	// contains filtered or unexported fields
}

func (*Netlify) Deploy

func (r *Netlify) Deploy(ctx context.Context, dir *Directory, token *Secret, site string) (string, error)

Deploy a site to production

func (*Netlify) ID

func (r *Netlify) ID(ctx context.Context) (NetlifyID, error)

A unique identifier for this Netlify.

func (*Netlify) List

func (r *Netlify) List(ctx context.Context, token *Secret) (string, error)

List sites

func (*Netlify) MarshalJSON

func (r *Netlify) MarshalJSON() ([]byte, error)

func (*Netlify) Preview

func (r *Netlify) Preview(ctx context.Context, dir *Directory, token *Secret, site string) (string, error)

Deploy a preview site

func (*Netlify) UnmarshalJSON

func (r *Netlify) UnmarshalJSON(bs []byte) error

func (*Netlify) WithGraphQLQuery

func (r *Netlify) WithGraphQLQuery(q *querybuilder.Selection) *Netlify

func (*Netlify) XXX_GraphQLID

func (r *Netlify) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Netlify) XXX_GraphQLIDType

func (r *Netlify) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Netlify) XXX_GraphQLType

func (r *Netlify) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type NetlifyID

type NetlifyID string

The `NetlifyID` scalar type represents an identifier for an object of type Netlify.

type NetworkProtocol

type NetworkProtocol string
const (
	Tcp NetworkProtocol = "TCP"

	Udp NetworkProtocol = "UDP"
)

func (NetworkProtocol) IsEnum

func (NetworkProtocol) IsEnum()

type ObjectTypeDef

type ObjectTypeDef struct {
	// contains filtered or unexported fields
}

A definition of a custom object defined in a Module.

func (*ObjectTypeDef) Constructor

func (r *ObjectTypeDef) Constructor() *Function

The function used to construct new instances of this object, if any

func (*ObjectTypeDef) Description

func (r *ObjectTypeDef) Description(ctx context.Context) (string, error)

The doc string for the object, if any.

func (*ObjectTypeDef) Fields

func (r *ObjectTypeDef) Fields(ctx context.Context) ([]FieldTypeDef, error)

Static fields defined on this object, if any.

func (*ObjectTypeDef) Functions

func (r *ObjectTypeDef) Functions(ctx context.Context) ([]Function, error)

Functions defined on this object, if any.

func (*ObjectTypeDef) ID

A unique identifier for this ObjectTypeDef.

func (*ObjectTypeDef) MarshalJSON

func (r *ObjectTypeDef) MarshalJSON() ([]byte, error)

func (*ObjectTypeDef) Name

func (r *ObjectTypeDef) Name(ctx context.Context) (string, error)

The name of the object.

func (*ObjectTypeDef) SourceModuleName

func (r *ObjectTypeDef) SourceModuleName(ctx context.Context) (string, error)

If this ObjectTypeDef is associated with a Module, the name of the module. Unset otherwise.

func (*ObjectTypeDef) UnmarshalJSON

func (r *ObjectTypeDef) UnmarshalJSON(bs []byte) error

func (*ObjectTypeDef) WithGraphQLQuery

func (r *ObjectTypeDef) WithGraphQLQuery(q *querybuilder.Selection) *ObjectTypeDef

func (*ObjectTypeDef) XXX_GraphQLID

func (r *ObjectTypeDef) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*ObjectTypeDef) XXX_GraphQLIDType

func (r *ObjectTypeDef) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*ObjectTypeDef) XXX_GraphQLType

func (r *ObjectTypeDef) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ObjectTypeDefID

type ObjectTypeDefID string

The `ObjectTypeDefID` scalar type represents an identifier for an object of type ObjectTypeDef.

type PipelineLabel

type PipelineLabel struct {
	// Label name.
	Name string `json:"name"`

	// Label value.
	Value string `json:"value"`
}

Key value object that represents a pipeline label.

type PipelineOpts

type PipelineOpts struct {
	// Description of the sub-pipeline.
	Description string
	// Labels to apply to the sub-pipeline.
	Labels []PipelineLabel
}

PipelineOpts contains options for Client.Pipeline

type Platform

type Platform string

The platform config OS and architecture in a Container.

The format is os/[platform]/[version] (e.g., "darwin/arm64/v7", "windows/amd64", "linux/arm64").

type Port

type Port struct {
	// contains filtered or unexported fields
}

A port exposed by a container.

func (*Port) Description

func (r *Port) Description(ctx context.Context) (string, error)

The port description.

func (*Port) ExperimentalSkipHealthcheck

func (r *Port) ExperimentalSkipHealthcheck(ctx context.Context) (bool, error)

Skip the health check when run as a service.

func (*Port) ID

func (r *Port) ID(ctx context.Context) (PortID, error)

A unique identifier for this Port.

func (*Port) MarshalJSON

func (r *Port) MarshalJSON() ([]byte, error)

func (*Port) Port

func (r *Port) Port(ctx context.Context) (int, error)

The port number.

func (*Port) Protocol

func (r *Port) Protocol(ctx context.Context) (NetworkProtocol, error)

The transport layer protocol.

func (*Port) UnmarshalJSON

func (r *Port) UnmarshalJSON(bs []byte) error

func (*Port) WithGraphQLQuery

func (r *Port) WithGraphQLQuery(q *querybuilder.Selection) *Port

func (*Port) XXX_GraphQLID

func (r *Port) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Port) XXX_GraphQLIDType

func (r *Port) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Port) XXX_GraphQLType

func (r *Port) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type PortForward

type PortForward struct {
	// Destination port for traffic.
	Backend int `json:"backend"`

	// Port to expose to clients. If unspecified, a default will be chosen.
	Frontend int `json:"frontend"`

	// Transport layer protocol to use for traffic.
	Protocol NetworkProtocol `json:"protocol,omitempty"`
}

Port forwarding rules for tunneling network traffic.

type PortID

type PortID string

The `PortID` scalar type represents an identifier for an object of type Port.

type Proxy

type Proxy struct {
	// contains filtered or unexported fields
}

Forwards multiple services into a single service with multiple ports

func (*Proxy) Ctr

func (r *Proxy) Ctr() *Container

An OCI-compatible container, also known as a Docker container.

func (*Proxy) ID

func (r *Proxy) ID(ctx context.Context) (ProxyID, error)

A unique identifier for this Proxy.

func (*Proxy) MarshalJSON

func (r *Proxy) MarshalJSON() ([]byte, error)

func (*Proxy) Service

func (r *Proxy) Service() *Service

Get the proxy Service

func (*Proxy) UnmarshalJSON

func (r *Proxy) UnmarshalJSON(bs []byte) error

func (*Proxy) With

func (r *Proxy) With(f WithProxyFunc) *Proxy

With calls the provided function with current Proxy.

This is useful for reusability and readability by not breaking the calling chain.

func (*Proxy) WithGraphQLQuery

func (r *Proxy) WithGraphQLQuery(q *querybuilder.Selection) *Proxy

func (*Proxy) WithService

func (r *Proxy) WithService(service *Service, name string, frontend int, backend int) *Proxy

Add a service to proxy

func (*Proxy) XXX_GraphQLID

func (r *Proxy) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Proxy) XXX_GraphQLIDType

func (r *Proxy) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Proxy) XXX_GraphQLType

func (r *Proxy) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ProxyID

type ProxyID string

The `ProxyID` scalar type represents an identifier for an object of type Proxy.

type ProxyOpts

type ProxyOpts struct {
	//
	// An OCI-compatible container, also known as a Docker container.
	//
	Ctr *Container
}

ProxyOpts contains options for Client.Proxy

type ScalarTypeDef

type ScalarTypeDef struct {
	// contains filtered or unexported fields
}

A definition of a custom scalar defined in a Module.

func (*ScalarTypeDef) Description

func (r *ScalarTypeDef) Description(ctx context.Context) (string, error)

A doc string for the scalar, if any.

func (*ScalarTypeDef) ID

A unique identifier for this ScalarTypeDef.

func (*ScalarTypeDef) MarshalJSON

func (r *ScalarTypeDef) MarshalJSON() ([]byte, error)

func (*ScalarTypeDef) Name

func (r *ScalarTypeDef) Name(ctx context.Context) (string, error)

The name of the scalar.

func (*ScalarTypeDef) SourceModuleName

func (r *ScalarTypeDef) SourceModuleName(ctx context.Context) (string, error)

If this ScalarTypeDef is associated with a Module, the name of the module. Unset otherwise.

func (*ScalarTypeDef) UnmarshalJSON

func (r *ScalarTypeDef) UnmarshalJSON(bs []byte) error

func (*ScalarTypeDef) WithGraphQLQuery

func (r *ScalarTypeDef) WithGraphQLQuery(q *querybuilder.Selection) *ScalarTypeDef

func (*ScalarTypeDef) XXX_GraphQLID

func (r *ScalarTypeDef) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*ScalarTypeDef) XXX_GraphQLIDType

func (r *ScalarTypeDef) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*ScalarTypeDef) XXX_GraphQLType

func (r *ScalarTypeDef) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ScalarTypeDefID

type ScalarTypeDefID string

The `ScalarTypeDefID` scalar type represents an identifier for an object of type ScalarTypeDef.

type Secret

type Secret struct {
	// contains filtered or unexported fields
}

A reference to a secret value, which can be handled more safely than the value itself.

func (*Secret) ID

func (r *Secret) ID(ctx context.Context) (SecretID, error)

A unique identifier for this Secret.

func (*Secret) MarshalJSON

func (r *Secret) MarshalJSON() ([]byte, error)

func (*Secret) Name

func (r *Secret) Name(ctx context.Context) (string, error)

The name of this secret.

func (*Secret) Plaintext

func (r *Secret) Plaintext(ctx context.Context) (string, error)

The value of this secret.

func (*Secret) UnmarshalJSON

func (r *Secret) UnmarshalJSON(bs []byte) error

func (*Secret) WithGraphQLQuery

func (r *Secret) WithGraphQLQuery(q *querybuilder.Selection) *Secret

func (*Secret) XXX_GraphQLID

func (r *Secret) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Secret) XXX_GraphQLIDType

func (r *Secret) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Secret) XXX_GraphQLType

func (r *Secret) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type SecretID

type SecretID string

The `SecretID` scalar type represents an identifier for an object of type Secret.

type SecretOpts

type SecretOpts struct {
	Accessor string
}

SecretOpts contains options for Client.Secret

type Service

type Service struct {
	// contains filtered or unexported fields
}

A content-addressed service providing TCP connectivity.

func (*Service) Endpoint

func (r *Service) Endpoint(ctx context.Context, opts ...ServiceEndpointOpts) (string, error)

Retrieves an endpoint that clients can use to reach this container.

If no port is specified, the first exposed port is used. If none exist an error is returned.

If a scheme is specified, a URL is returned. Otherwise, a host:port pair is returned.

func (*Service) Hostname

func (r *Service) Hostname(ctx context.Context) (string, error)

Retrieves a hostname which can be used by clients to reach this container.

func (*Service) ID

func (r *Service) ID(ctx context.Context) (ServiceID, error)

A unique identifier for this Service.

func (*Service) MarshalJSON

func (r *Service) MarshalJSON() ([]byte, error)

func (*Service) Ports

func (r *Service) Ports(ctx context.Context) ([]Port, error)

Retrieves the list of ports provided by the service.

func (*Service) Start

func (r *Service) Start(ctx context.Context) (*Service, error)

Start the service and wait for its health checks to succeed.

Services bound to a Container do not need to be manually started.

func (*Service) Stop

func (r *Service) Stop(ctx context.Context, opts ...ServiceStopOpts) (*Service, error)

Stop the service.

func (*Service) UnmarshalJSON

func (r *Service) UnmarshalJSON(bs []byte) error

func (*Service) Up

func (r *Service) Up(ctx context.Context, opts ...ServiceUpOpts) (Void, error)

Creates a tunnel that forwards traffic from the caller's network to this service.

func (*Service) WithGraphQLQuery

func (r *Service) WithGraphQLQuery(q *querybuilder.Selection) *Service

func (*Service) XXX_GraphQLID

func (r *Service) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Service) XXX_GraphQLIDType

func (r *Service) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Service) XXX_GraphQLType

func (r *Service) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type ServiceEndpointOpts

type ServiceEndpointOpts struct {
	// The exposed port number for the endpoint
	Port int
	// Return a URL with the given scheme, eg. http for http://
	Scheme string
}

ServiceEndpointOpts contains options for Service.Endpoint

type ServiceID

type ServiceID string

The `ServiceID` scalar type represents an identifier for an object of type Service.

type ServiceStopOpts

type ServiceStopOpts struct {
	// Immediately kill the service without waiting for a graceful exit
	Kill bool
}

ServiceStopOpts contains options for Service.Stop

type ServiceUpOpts

type ServiceUpOpts struct {
	// List of frontend/backend port mappings to forward.
	//
	// Frontend is the port accepting traffic on the host, backend is the service port.
	Ports []PortForward
	// Bind each tunnel port to a random port on the host.
	Random bool
}

ServiceUpOpts contains options for Service.Up

type Socket

type Socket struct {
	// contains filtered or unexported fields
}

A Unix or TCP/IP socket that can be mounted into a container.

func (*Socket) ID

func (r *Socket) ID(ctx context.Context) (SocketID, error)

A unique identifier for this Socket.

func (*Socket) MarshalJSON

func (r *Socket) MarshalJSON() ([]byte, error)

func (*Socket) UnmarshalJSON

func (r *Socket) UnmarshalJSON(bs []byte) error

func (*Socket) WithGraphQLQuery

func (r *Socket) WithGraphQLQuery(q *querybuilder.Selection) *Socket

func (*Socket) XXX_GraphQLID

func (r *Socket) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Socket) XXX_GraphQLIDType

func (r *Socket) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Socket) XXX_GraphQLType

func (r *Socket) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type SocketID

type SocketID string

The `SocketID` scalar type represents an identifier for an object of type Socket.

type Terminal

type Terminal struct {
	// contains filtered or unexported fields
}

An interactive terminal that clients can connect to.

func (*Terminal) ID

func (r *Terminal) ID(ctx context.Context) (TerminalID, error)

A unique identifier for this Terminal.

func (*Terminal) MarshalJSON

func (r *Terminal) MarshalJSON() ([]byte, error)

func (*Terminal) UnmarshalJSON

func (r *Terminal) UnmarshalJSON(bs []byte) error

func (*Terminal) WebsocketEndpoint

func (r *Terminal) WebsocketEndpoint(ctx context.Context) (string, error)

An http endpoint at which this terminal can be connected to over a websocket.

func (*Terminal) WithGraphQLQuery

func (r *Terminal) WithGraphQLQuery(q *querybuilder.Selection) *Terminal

func (*Terminal) XXX_GraphQLID

func (r *Terminal) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Terminal) XXX_GraphQLIDType

func (r *Terminal) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Terminal) XXX_GraphQLType

func (r *Terminal) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type TerminalID

type TerminalID string

The `TerminalID` scalar type represents an identifier for an object of type Terminal.

type TypeDef

type TypeDef struct {
	// contains filtered or unexported fields
}

A definition of a parameter or return type in a Module.

func (*TypeDef) AsInput

func (r *TypeDef) AsInput() *InputTypeDef

If kind is INPUT, the input-specific type definition. If kind is not INPUT, this will be null.

func (*TypeDef) AsInterface

func (r *TypeDef) AsInterface() *InterfaceTypeDef

If kind is INTERFACE, the interface-specific type definition. If kind is not INTERFACE, this will be null.

func (*TypeDef) AsList

func (r *TypeDef) AsList() *ListTypeDef

If kind is LIST, the list-specific type definition. If kind is not LIST, this will be null.

func (*TypeDef) AsObject

func (r *TypeDef) AsObject() *ObjectTypeDef

If kind is OBJECT, the object-specific type definition. If kind is not OBJECT, this will be null.

func (*TypeDef) AsScalar

func (r *TypeDef) AsScalar() *ScalarTypeDef

If kind is SCALAR, the scalar-specific type definition. If kind is not SCALAR, this will be null.

func (*TypeDef) ID

func (r *TypeDef) ID(ctx context.Context) (TypeDefID, error)

A unique identifier for this TypeDef.

func (*TypeDef) Kind

func (r *TypeDef) Kind(ctx context.Context) (TypeDefKind, error)

The kind of type this is (e.g. primitive, list, object).

func (*TypeDef) MarshalJSON

func (r *TypeDef) MarshalJSON() ([]byte, error)

func (*TypeDef) Optional

func (r *TypeDef) Optional(ctx context.Context) (bool, error)

Whether this type can be set to null. Defaults to false.

func (*TypeDef) UnmarshalJSON

func (r *TypeDef) UnmarshalJSON(bs []byte) error

func (*TypeDef) With

func (r *TypeDef) With(f WithTypeDefFunc) *TypeDef

With calls the provided function with current TypeDef.

This is useful for reusability and readability by not breaking the calling chain.

func (*TypeDef) WithConstructor

func (r *TypeDef) WithConstructor(function *Function) *TypeDef

Adds a function for constructing a new instance of an Object TypeDef, failing if the type is not an object.

func (*TypeDef) WithField

func (r *TypeDef) WithField(name string, typeDef *TypeDef, opts ...TypeDefWithFieldOpts) *TypeDef

Adds a static field for an Object TypeDef, failing if the type is not an object.

func (*TypeDef) WithFunction

func (r *TypeDef) WithFunction(function *Function) *TypeDef

Adds a function for an Object or Interface TypeDef, failing if the type is not one of those kinds.

func (*TypeDef) WithGraphQLQuery

func (r *TypeDef) WithGraphQLQuery(q *querybuilder.Selection) *TypeDef

func (*TypeDef) WithInterface

func (r *TypeDef) WithInterface(name string, opts ...TypeDefWithInterfaceOpts) *TypeDef

Returns a TypeDef of kind Interface with the provided name.

func (*TypeDef) WithKind

func (r *TypeDef) WithKind(kind TypeDefKind) *TypeDef

Sets the kind of the type.

func (*TypeDef) WithListOf

func (r *TypeDef) WithListOf(elementType *TypeDef) *TypeDef

Returns a TypeDef of kind List with the provided type for its elements.

func (*TypeDef) WithObject

func (r *TypeDef) WithObject(name string, opts ...TypeDefWithObjectOpts) *TypeDef

Returns a TypeDef of kind Object with the provided name.

Note that an object's fields and functions may be omitted if the intent is only to refer to an object. This is how functions are able to return their own object, or any other circular reference.

func (*TypeDef) WithOptional

func (r *TypeDef) WithOptional(optional bool) *TypeDef

Sets whether this type can be set to null.

func (*TypeDef) WithScalar

func (r *TypeDef) WithScalar(name string, opts ...TypeDefWithScalarOpts) *TypeDef

Returns a TypeDef of kind Scalar with the provided name.

func (*TypeDef) XXX_GraphQLID

func (r *TypeDef) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*TypeDef) XXX_GraphQLIDType

func (r *TypeDef) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*TypeDef) XXX_GraphQLType

func (r *TypeDef) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type TypeDefID

type TypeDefID string

The `TypeDefID` scalar type represents an identifier for an object of type TypeDef.

type TypeDefKind

type TypeDefKind string
const (
	// A boolean value.
	BooleanKind TypeDefKind = "BOOLEAN_KIND"

	// A graphql input type, used only when representing the core API via TypeDefs.
	InputKind TypeDefKind = "INPUT_KIND"

	// An integer value.
	IntegerKind TypeDefKind = "INTEGER_KIND"

	// A named type of functions that can be matched+implemented by other objects+interfaces.
	//
	// Always paired with an InterfaceTypeDef.
	InterfaceKind TypeDefKind = "INTERFACE_KIND"

	// A list of values all having the same type.
	//
	// Always paired with a ListTypeDef.
	ListKind TypeDefKind = "LIST_KIND"

	// A named type defined in the GraphQL schema, with fields and functions.
	//
	// Always paired with an ObjectTypeDef.
	ObjectKind TypeDefKind = "OBJECT_KIND"

	// A scalar value of any basic kind.
	ScalarKind TypeDefKind = "SCALAR_KIND"

	// A string value.
	StringKind TypeDefKind = "STRING_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.
	VoidKind TypeDefKind = "VOID_KIND"
)

func (TypeDefKind) IsEnum

func (TypeDefKind) IsEnum()

type TypeDefWithFieldOpts

type TypeDefWithFieldOpts struct {
	// A doc string for the field, if any
	Description string
}

TypeDefWithFieldOpts contains options for TypeDef.WithField

type TypeDefWithInterfaceOpts

type TypeDefWithInterfaceOpts struct {
	Description string
}

TypeDefWithInterfaceOpts contains options for TypeDef.WithInterface

type TypeDefWithObjectOpts

type TypeDefWithObjectOpts struct {
	Description string
}

TypeDefWithObjectOpts contains options for TypeDef.WithObject

type TypeDefWithScalarOpts

type TypeDefWithScalarOpts struct {
	Description string
}

TypeDefWithScalarOpts contains options for TypeDef.WithScalar

type Utils

type Utils struct {
	// contains filtered or unexported fields
}

func (*Utils) ID

func (r *Utils) ID(ctx context.Context) (UtilsID, error)

A unique identifier for this Utils.

func (*Utils) MarshalJSON

func (r *Utils) MarshalJSON() ([]byte, error)

func (*Utils) Multisync

func (r *Utils) Multisync(ctx context.Context, ctrs []*Container) ([]Container, error)

Concurrently Sync multiple Containers

func (*Utils) Tar

func (r *Utils) Tar(dir *Directory) *File

Get a tarball of a Directory

func (*Utils) UnmarshalJSON

func (r *Utils) UnmarshalJSON(bs []byte) error

func (*Utils) WithGraphQLQuery

func (r *Utils) WithGraphQLQuery(q *querybuilder.Selection) *Utils

func (*Utils) XXX_GraphQLID

func (r *Utils) XXX_GraphQLID(ctx context.Context) (string, error)

XXX_GraphQLID is an internal function. It returns the underlying type ID

func (*Utils) XXX_GraphQLIDType

func (r *Utils) XXX_GraphQLIDType() string

XXX_GraphQLIDType is an internal function. It returns the native GraphQL type name for the ID of this object

func (*Utils) XXX_GraphQLType

func (r *Utils) XXX_GraphQLType() string

XXX_GraphQLType is an internal function. It returns the native GraphQL type name

type UtilsID

type UtilsID string

The `UtilsID` scalar type represents an identifier for an object of type Utils.

type Void

type Void string

The absence of a value.

A Null Void is used as a placeholder for resolvers that do not return anything.

type WithClientFunc

type WithClientFunc func(r *Client) *Client

type WithContainerFunc

type WithContainerFunc func(r *Container) *Container

type WithDirectoryFunc

type WithDirectoryFunc func(r *Directory) *Directory

type WithFileFunc

type WithFileFunc func(r *File) *File

type WithFunctionFunc

type WithFunctionFunc func(r *Function) *Function

type WithGeneratedCodeFunc

type WithGeneratedCodeFunc func(r *GeneratedCode) *GeneratedCode

type WithGitRepositoryFunc

type WithGitRepositoryFunc func(r *GitRepository) *GitRepository

type WithModuleFunc

type WithModuleFunc func(r *Module) *Module

type WithModuleSourceFunc

type WithModuleSourceFunc func(r *ModuleSource) *ModuleSource

type WithProxyFunc

type WithProxyFunc func(r *Proxy) *Proxy

type WithTypeDefFunc

type WithTypeDefFunc func(r *TypeDef) *TypeDef

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL