container

package
v0.0.0-...-9004d47 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Overview

Package container GENERATED BY gengo:runtimedoc DON'T EDIT THIS FILE

Index

Constants

This section is empty.

Variables

View Source
var RegistryAuthStoreContext = contextx.New[RegistryAuthStore](
	contextx.WithDefaultsFunc(func() RegistryAuthStore {
		return defaultRegistryStore
	}),
)

Functions

func MergeMap

func MergeMap[K comparable, V any](a map[K]V, b map[K]V) map[K]V

func Secret

func Secret(ctx context.Context, c *dagger.Client, s *client.Secret) (*dagger.Secret, bool)

Types

type Auth

type Auth struct {
	Username string        `json:"username"`
	Secret   client.Secret `json:"secret"`
}

func (*Auth) ApplyTo

func (a *Auth) ApplyTo(ctx context.Context, c *dagger.Client, container *dagger.Container, address string) *dagger.Container

func (Auth) RuntimeDoc

func (v Auth) RuntimeDoc(names ...string) ([]string, bool)

type Build

type Build struct {
	task.Group

	Steps  []StepInterface `json:"steps"`
	Output Container       `json:"-" output:"output"`
}

Build docker build step

func (*Build) Do

func (x *Build) Do(ctx context.Context) error

func (Build) RuntimeDoc

func (v Build) RuntimeDoc(names ...string) ([]string, bool)

type CacheDir

type CacheDir struct {
	ID string `json:"id"`
}

func (CacheDir) RuntimeDoc

func (v CacheDir) RuntimeDoc(names ...string) ([]string, bool)

type Config

type Config struct {
	task.SetupTask

	Auths map[string]Auth `json:"auths"`
}

func (*Config) Do

func (v *Config) Do(ctx context.Context) error

func (Config) RuntimeDoc

func (v Config) RuntimeDoc(names ...string) ([]string, bool)

type Container

type Container struct {
	Ref struct {
		ID string `json:"id"`
	} `json:"$$container"`
	Rootfs   Fs     `json:"rootfs"`
	Platform string `json:"platform"`
}

func (*Container) Container

func (container *Container) Container(ctx context.Context, c *dagger.Client) (*dagger.Container, error)

func (Container) RuntimeDoc

func (v Container) RuntimeDoc(names ...string) ([]string, bool)

func (*Container) Scope

func (container *Container) Scope() piperdagger.Scope

func (*Container) Select

func (container *Container) Select(ctx context.Context) piperdagger.Engine

func (*Container) Sync

func (container *Container) Sync(ctx context.Context, c *dagger.Container, platform string) error

type Copy

type Copy struct {
	task.Task

	Input Container `json:"input"`

	Contents Fs       `json:"contents"`
	Source   string   `json:"source" default:"/"`
	Include  []string `json:"include,omitempty"`
	Exclude  []string `json:"exclude,omitempty"`

	Dest string `json:"dest" default:"/"`

	Output Container `json:"-" output:"output"`
}

func (*Copy) Do

func (x *Copy) Do(ctx context.Context) error

func (Copy) RuntimeDoc

func (v Copy) RuntimeDoc(names ...string) ([]string, bool)

type Diff

type Diff struct {
	task.Task

	Upper Fs `json:"upper"`
	Lower Fs `json:"lower"`

	Output Fs `json:"-" output:"output"`
}

func (*Diff) Do

func (x *Diff) Do(ctx context.Context) error

func (Diff) RuntimeDoc

func (v Diff) RuntimeDoc(names ...string) ([]string, bool)

type Dir

type Dir struct {
	task.Task

	Input Container `json:"input,omitempty"`
	Path  string    `json:"path" default:"/"`

	Output Fs `json:"-" output:"output"`
}

func (*Dir) Do

func (x *Dir) Do(ctx context.Context) error

func (Dir) RuntimeDoc

func (v Dir) RuntimeDoc(names ...string) ([]string, bool)

type Dump

type Dump struct {
	task.Task

	Input Fs `json:"input"`

	OutDir wd.WorkDir `json:"outDir"`

	With DumpOption `json:"with,omitempty"`

	Dir wd.WorkDir `json:"-" output:"dir"`
}

func (*Dump) Do

func (x *Dump) Do(ctx context.Context) error

func (Dump) RuntimeDoc

func (v Dump) RuntimeDoc(names ...string) ([]string, bool)

type DumpOption

type DumpOption struct {
	Empty bool `json:"empty,omitempty"`
}

func (DumpOption) RuntimeDoc

func (v DumpOption) RuntimeDoc(names ...string) ([]string, bool)

type Exec

type Exec struct {
	task.Task

	Input Container `json:"input"`

	Args       []string                         `json:"args"`
	Mounts     map[string]Mount                 `json:"mounts,omitempty"`
	Env        map[string]client.SecretOrString `json:"env,omitempty"`
	Workdir    string                           `json:"workdir,omitempty" default:"/"`
	Entrypoint []string                         `json:"entrypoint,omitempty"`
	User       string                           `json:"user,omitempty" default:"root:root"`
	Always     bool                             `json:"always,omitempty"`

	Output Container `json:"-" output:"output"`
}

func (*Exec) Do

func (e *Exec) Do(ctx context.Context) error

func (Exec) RuntimeDoc

func (v Exec) RuntimeDoc(names ...string) ([]string, bool)

type Export

type Export struct {
	task.Task

	Input Container `json:"input"`

	// oci annotations
	Annotations map[string]string `json:"annotations,omitempty"`

	OutFile file.File `json:"outFile"`

	File file.File `json:"-" output:"file"`
}

func (*Export) Do

func (x *Export) Do(ctx context.Context) error

func (Export) RuntimeDoc

func (v Export) RuntimeDoc(names ...string) ([]string, bool)

type Fs

type Fs struct {
	Ref struct {
		ID string `json:"id"`
	} `json:"$$fs"`
}

func (*Fs) Directory

func (fs *Fs) Directory(ctx context.Context, c *dagger.Client) (*dagger.Directory, error)

func (*Fs) DirectoryID

func (fs *Fs) DirectoryID() dagger.DirectoryID

func (Fs) RuntimeDoc

func (v Fs) RuntimeDoc(names ...string) ([]string, bool)

func (*Fs) Scope

func (fs *Fs) Scope() piperdagger.Scope

func (*Fs) Select

func (fs *Fs) Select(ctx context.Context) piperdagger.Engine

func (*Fs) Sync

func (fs *Fs) Sync(ctx context.Context, c *dagger.Directory) error

func (*Fs) SyncLazyDirectory

func (fs *Fs) SyncLazyDirectory(ctx context.Context, inputs any, do LazyDoFn) error

type HTTPFetch

type HTTPFetch struct {
	task.Task

	Source string `json:"source"`
	Dest   string `json:"dest"`

	Output Fs `json:"-" output:"output"`
}

func (*HTTPFetch) Do

func (x *HTTPFetch) Do(ctx context.Context) error

func (HTTPFetch) RuntimeDoc

func (v HTTPFetch) RuntimeDoc(names ...string) ([]string, bool)

type ImageConfig

type ImageConfig piperdagger.ImageConfig

func (ImageConfig) ApplyTo

func (p ImageConfig) ApplyTo(c *dagger.Container) *dagger.Container

func (ImageConfig) Merge

func (p ImageConfig) Merge(config ImageConfig) ImageConfig

func (ImageConfig) RuntimeDoc

func (v ImageConfig) RuntimeDoc(names ...string) ([]string, bool)

type LazyDoFn

type LazyDoFn func(ctx context.Context, c *dagger.Client) (*dagger.Directory, error)

func (LazyDoFn) RuntimeDoc

func (LazyDoFn) RuntimeDoc(names ...string) ([]string, bool)

type Merge

type Merge struct {
	task.Task

	Inputs []Fs `json:"inputs"`
	Output Fs   `json:"-" output:"output"`
}

func (*Merge) Do

func (x *Merge) Do(ctx context.Context) error

func (Merge) RuntimeDoc

func (v Merge) RuntimeDoc(names ...string) ([]string, bool)

type Mkdir

type Mkdir struct {
	task.Task

	Input       Fs                   `json:"input"`
	Path        client.StringOrSlice `json:"path"`
	Permissions int                  `json:"permissions" default:"0o755"`

	Output Fs `json:"-" output:"output"`
}

func (*Mkdir) Do

func (x *Mkdir) Do(ctx context.Context) error

func (Mkdir) RuntimeDoc

func (v Mkdir) RuntimeDoc(names ...string) ([]string, bool)

type Mount

type Mount struct {
	Mounter `json:"-"`
}

func (Mount) MarshalJSON

func (m Mount) MarshalJSON() ([]byte, error)

func (Mount) OneOf

func (Mount) OneOf() []any

func (Mount) RuntimeDoc

func (v Mount) RuntimeDoc(names ...string) ([]string, bool)

func (*Mount) UnmarshalJSON

func (m *Mount) UnmarshalJSON(data []byte) error

type MountCacheDir

type MountCacheDir struct {
	Type     string   `json:"type" enum:"cache"`
	Dest     string   `json:"dest"`
	Contents CacheDir `json:"contents"`
}

func (MountCacheDir) MountTo

func (m MountCacheDir) MountTo(ctx context.Context, c *dagger.Client, container *dagger.Container) (*dagger.Container, error)

func (MountCacheDir) MountType

func (MountCacheDir) MountType() string

func (MountCacheDir) RuntimeDoc

func (v MountCacheDir) RuntimeDoc(names ...string) ([]string, bool)

type MountFile

type MountFile struct {
	Type        string `json:"type" enum:"file"`
	Dest        string `json:"dest"`
	Contents    string `json:"contents"`
	Permissions int    `json:"mask" default:"0o644"`
}

func (MountFile) MountTo

func (m MountFile) MountTo(ctx context.Context, c *dagger.Client, container *dagger.Container) (*dagger.Container, error)

func (MountFile) MountType

func (MountFile) MountType() string

func (MountFile) RuntimeDoc

func (v MountFile) RuntimeDoc(names ...string) ([]string, bool)

type MountFs

type MountFs struct {
	Type     string  `json:"type" enum:"fs"`
	Contents Fs      `json:"contents"`
	Dest     string  `json:"dest"`
	Source   *string `json:"source,omitempty"`
}

func (MountFs) MountTo

func (f MountFs) MountTo(ctx context.Context, c *dagger.Client, container *dagger.Container) (*dagger.Container, error)

func (MountFs) MountType

func (MountFs) MountType() string

func (MountFs) RuntimeDoc

func (v MountFs) RuntimeDoc(names ...string) ([]string, bool)

type MountSecret

type MountSecret struct {
	Type     string        `json:"type" enum:"secret"`
	Dest     string        `json:"dest"`
	Contents client.Secret `json:"contents"`
}

func (MountSecret) MountTo

func (m MountSecret) MountTo(ctx context.Context, c *dagger.Client, container *dagger.Container) (*dagger.Container, error)

func (MountSecret) MountType

func (MountSecret) MountType() string

func (MountSecret) RuntimeDoc

func (v MountSecret) RuntimeDoc(names ...string) ([]string, bool)

type MountTemp

type MountTemp struct {
	Type     string  `json:"type" enum:"tmp"`
	Dest     string  `json:"dest"`
	Contents TempDir `json:"contents"`
}

func (MountTemp) MountTo

func (t MountTemp) MountTo(ctx context.Context, c *dagger.Client, container *dagger.Container) (*dagger.Container, error)

func (MountTemp) MountType

func (MountTemp) MountType() string

func (MountTemp) RuntimeDoc

func (v MountTemp) RuntimeDoc(names ...string) ([]string, bool)

type Mounter

type Mounter interface {
	MountType() string
	MountTo(ctx context.Context, c *dagger.Client, container *dagger.Container) (*dagger.Container, error)
}

type Pull

type Pull struct {
	task.Task

	// image from
	Source string `json:"source"`
	// image platform
	Platform string `json:"platform,omitempty" output:"platform"`
	// registry auth
	Auth *Auth `json:"auth,omitempty"`

	// image
	Output Container `json:"-" output:"output"`
}

Pull image from

func (*Pull) Do

func (x *Pull) Do(ctx context.Context) error

func (Pull) RuntimeDoc

func (v Pull) RuntimeDoc(names ...string) ([]string, bool)

type Push

type Push struct {
	task.Task
	// image tag
	Dest string `json:"dest"`
	// images for push
	// [Platform]: _
	Images map[string]Container `json:"images"`

	// registry auth
	Auth *Auth `json:"auth,omitempty"`

	// image pushed result
	Result string `json:"-" output:"result"`
}

Push image to registry

func (*Push) Do

func (x *Push) Do(ctx context.Context) error

func (Push) RuntimeDoc

func (v Push) RuntimeDoc(names ...string) ([]string, bool)

type ReadFile

type ReadFile struct {
	task.Task

	Input Fs     `json:"input"`
	Path  string `json:"path"`

	Contents string `json:"-" output:"contents"`
}

func (*ReadFile) Do

func (x *ReadFile) Do(ctx context.Context) error

func (ReadFile) RuntimeDoc

func (v ReadFile) RuntimeDoc(names ...string) ([]string, bool)

type RegistryAuthStore

type RegistryAuthStore interface {
	Store(address string, auth *Auth)
	ApplyTo(ctx context.Context, c *dagger.Client, container *dagger.Container, address string, localAuths ...*Auth) *dagger.Container
}

func NewRegistryAuthStore

func NewRegistryAuthStore() RegistryAuthStore

type Rm

type Rm struct {
	task.Task

	Input  Fs                   `json:"input"`
	Path   client.StringOrSlice `json:"path"`
	Output Fs                   `json:"-" output:"output"`
}

func (*Rm) Do

func (x *Rm) Do(ctx context.Context) error

func (Rm) RuntimeDoc

func (v Rm) RuntimeDoc(names ...string) ([]string, bool)

type RootfsDo

type RootfsDo struct {
	task.Group

	Input  Container               `json:"input"`
	Steps  []RootfsDoStepInterface `json:"steps"`
	Output Container               `json:"-" output:"output"`
}

FsDo docker build but with rootfs

func (*RootfsDo) Do

func (x *RootfsDo) Do(ctx context.Context) error

func (RootfsDo) RuntimeDoc

func (v RootfsDo) RuntimeDoc(names ...string) ([]string, bool)

type RootfsDoStepInterface

type RootfsDoStepInterface struct {
	Input  Fs `json:"input,omitempty"`
	Output Fs `json:"output"`
}

func (RootfsDoStepInterface) RuntimeDoc

func (v RootfsDoStepInterface) RuntimeDoc(names ...string) ([]string, bool)

type Run

type Run struct {
	task.Task

	Input Container `json:"input"`

	Mounts  map[string]Mount                 `json:"mounts,omitempty"`
	Env     map[string]client.SecretOrString `json:"env,omitempty"`
	Workdir string                           `json:"workdir,omitempty" default:"/"`
	User    string                           `json:"user,omitempty" default:"root:root"`
	Always  bool                             `json:"always,omitempty"`

	Shell string               `json:"shell,omitempty" default:"sh"`
	Run   client.StringOrSlice `json:"run"`

	Output Container `json:"-" output:"output"`
}

func (*Run) Do

func (x *Run) Do(ctx context.Context) error

func (Run) RuntimeDoc

func (v Run) RuntimeDoc(names ...string) ([]string, bool)

type Set

type Set struct {
	task.Task

	Input  Container   `json:"input"`
	Config ImageConfig `json:"config"`
	Output Container   `json:"-" output:"output"`
}

func (*Set) Do

func (x *Set) Do(ctx context.Context) error

func (Set) RuntimeDoc

func (v Set) RuntimeDoc(names ...string) ([]string, bool)

type Source

type Source struct {
	task.Task

	// working dir
	Cwd     wd.WorkDir `json:"cwd"`
	Path    string     `json:"path" default:"."`
	Include []string   `json:"include,omitempty"`
	Exclude []string   `json:"exclude,omitempty"`

	Output Fs `json:"-" output:"output"`
}

func (*Source) Do

func (x *Source) Do(ctx context.Context) error

func (Source) RuntimeDoc

func (v Source) RuntimeDoc(names ...string) ([]string, bool)

type SourceFile

type SourceFile struct {
	task.Task

	File file.File `json:"file"`
	Dest string    `json:"dest,omitempty"`

	Output Fs `json:"-" output:"output"`
}

func (*SourceFile) Do

func (x *SourceFile) Do(ctx context.Context) error

func (SourceFile) RuntimeDoc

func (v SourceFile) RuntimeDoc(names ...string) ([]string, bool)

type StepInterface

type StepInterface struct {
	Input  Container `json:"input,omitempty"`
	Output Container `json:"output"`
}

func (StepInterface) RuntimeDoc

func (v StepInterface) RuntimeDoc(names ...string) ([]string, bool)

type Stretch

type Stretch struct {
	task.Task
	// image platform
	Platform string `json:"platform,omitempty" output:"platform"`
	// image
	Output Container `json:"-" output:"output"`
}

Stretch image from stretch

func (*Stretch) Do

func (x *Stretch) Do(ctx context.Context) error

func (Stretch) RuntimeDoc

func (v Stretch) RuntimeDoc(names ...string) ([]string, bool)

type Sub

type Sub struct {
	task.Task

	// source fs
	Input   Fs       `json:"input,omitempty"`
	Source  string   `json:"source" default:"/"`
	Include []string `json:"include,omitempty"`
	Exclude []string `json:"exclude,omitempty"`
	Dest    string   `json:"dest" default:"/"`
	Output  Fs       `json:"-" output:"output"`
}

func (*Sub) Do

func (x *Sub) Do(ctx context.Context) error

func (Sub) RuntimeDoc

func (v Sub) RuntimeDoc(names ...string) ([]string, bool)

type TempDir

type TempDir struct {
}

type WriteFile

type WriteFile struct {
	task.Task

	Input       Fs     `json:"input"`
	Path        string `json:"path"`
	Permissions int    `json:"permissions" default:"0o644"`
	Contents    string `json:"contents"`

	Output Fs `json:"-" output:"output"`
}

func (*WriteFile) Do

func (x *WriteFile) Do(ctx context.Context) error

func (WriteFile) RuntimeDoc

func (v WriteFile) RuntimeDoc(names ...string) ([]string, bool)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL