Versions in this module Expand all Collapse all v0 v0.3.1 Oct 17, 2018 v0.3.0 Oct 12, 2018 Changes in this version + const NetModeHost + const NetModeNone + const NetModeSandbox + var Darwin = Platform(specs.Platform{ ... }) + var IgnoreCache = constraintsOptFunc(func(c *Constraints) { ... }) + var LinuxAmd64 = Platform(specs.Platform{ ... }) + var LinuxArm = LinuxArmhf + var LinuxArm64 = Platform(specs.Platform{ ... }) + var LinuxArmel = Platform(specs.Platform{ ... }) + var LinuxArmhf = Platform(specs.Platform{ ... }) + var LinuxPpc64le = Platform(specs.Platform{ ... }) + var LinuxS390x = Platform(specs.Platform{ ... }) + var MarkImageInternal = imageOptionFunc(func(ii *ImageInfo) { ... }) + var SSHOptional = sshOptionFunc(func(si *SSHInfo) { ... }) + var SecretOptional = secretOptionFunc(func(si *SecretInfo) { ... }) + var Windows = Platform(specs.Platform{ ... }) + func MarshalConstraints(base, override *Constraints) (*pb.Op, *pb.OpMetadata) + func Readonly(m *mount) + func WriteTo(def *Definition, w io.Writer) error + type CacheMountSharingMode int + const CacheMountLocked + const CacheMountPrivate + const CacheMountShared + type Constraints struct + Caps *apicaps.CapSet + LocalUniqueID string + Metadata pb.OpMetadata + Platform *specs.Platform + WorkerConstraints []string + type ConstraintsOpt interface + SetConstraintsOption func(*Constraints) + func LocalUniqueID(v string) ConstraintsOpt + func Platform(p specs.Platform) ConstraintsOpt + func Require(filters ...string) ConstraintsOpt + func WithCaps(caps apicaps.CapSet) ConstraintsOpt + func WithCustomName(name string, a ...interface{}) ConstraintsOpt + func WithDescription(m map[string]string) ConstraintsOpt + func WithExportCache() ConstraintsOpt + func WithoutDefaultExportCache() ConstraintsOpt + func WithoutExportCache() ConstraintsOpt + type Definition struct + Def [][]byte + Metadata map[digest.Digest]pb.OpMetadata + func ReadFrom(r io.Reader) (*Definition, error) + func (def *Definition) FromPB(x *pb.Definition) + func (def *Definition) ToPB() *pb.Definition + type EnvList []KeyValue + func (e EnvList) AddOrReplace(k, v string) EnvList + func (e EnvList) Delete(k string) EnvList + func (e EnvList) Get(k string) (string, bool) + func (e EnvList) Index(k string) (int, bool) + func (e EnvList) SetDefault(k, v string) EnvList + func (e EnvList) ToArray() []string + type ExecInfo struct + Mounts []MountInfo + ProxyEnv *ProxyEnv + ReadonlyRootFS bool + SSH []SSHInfo + Secrets []SecretInfo + State State + type ExecOp struct + func NewExecOp(root Output, meta Meta, readOnly bool, c Constraints) *ExecOp + func (e *ExecOp) AddMount(target string, source Output, opt ...MountOption) Output + func (e *ExecOp) GetMount(target string) Output + func (e *ExecOp) Inputs() (inputs []Output) + func (e *ExecOp) Marshal(c *Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) + func (e *ExecOp) Output() Output + func (e *ExecOp) Validate() error + type ExecState struct + func (e ExecState) AddMount(target string, source State, opt ...MountOption) State + func (e ExecState) GetMount(target string) State + func (e ExecState) Root() State + type GitInfo struct + KeepGitDir bool + type GitOption interface + SetGitOption func(*GitInfo) + func KeepGitDir() GitOption + type HTTPInfo struct + Checksum digest.Digest + Filename string + GID int + Perm int + UID int + type HTTPOption interface + SetHTTPOption func(*HTTPInfo) + func Checksum(dgst digest.Digest) HTTPOption + func Chmod(perm os.FileMode) HTTPOption + func Chown(uid, gid int) HTTPOption + func Filename(name string) HTTPOption + type HostIP struct + Host string + IP net.IP + type ImageInfo struct + RecordType string + type ImageMetaResolver interface + ResolveImageConfig func(ctx context.Context, ref string, opt gw.ResolveImageConfigOpt) (digest.Digest, []byte, error) + type ImageOption interface + SetImageOption func(*ImageInfo) + func WithMetaResolver(mr ImageMetaResolver) ImageOption + type KeyValue struct + type LocalInfo struct + ExcludePatterns string + FollowPaths string + IncludePatterns string + SessionID string + SharedKeyHint string + type LocalOption interface + SetLocalOption func(*LocalInfo) + func ExcludePatterns(p []string) LocalOption + func FollowPaths(p []string) LocalOption + func IncludePatterns(p []string) LocalOption + func SessionID(id string) LocalOption + func SharedKeyHint(h string) LocalOption + type MarshalCache struct + func (mc *MarshalCache) Cached(c *Constraints) bool + func (mc *MarshalCache) Load() (digest.Digest, []byte, *pb.OpMetadata, error) + func (mc *MarshalCache) Store(dt []byte, md *pb.OpMetadata, c *Constraints) + type Meta struct + Args []string + Cwd string + Env EnvList + ExtraHosts []HostIP + Network pb.NetMode + ProxyEnv *ProxyEnv + User string + type MountInfo struct + Opts []MountOption + Source Output + Target string + type MountOption func(*mount) + func AsPersistentCacheDir(id string, sharing CacheMountSharingMode) MountOption + func SourcePath(src string) MountOption + func Tmpfs() MountOption + type Output interface + ToInput func(*Constraints) (*pb.Input, error) + Vertex func() Vertex + type ProxyEnv struct + FtpProxy string + HttpProxy string + HttpsProxy string + NoProxy string + type ResolveMode int + const ResolveModeDefault + const ResolveModeForcePull + const ResolveModePreferLocal + func (r ResolveMode) SetImageOption(ii *ImageInfo) + func (r ResolveMode) String() string + type RunOption interface + SetRunOption func(es *ExecInfo) + func AddEnv(key, value string) RunOption + func AddEnvf(key, value string, v ...interface{}) RunOption + func AddExtraHost(host string, ip net.IP) RunOption + func AddMount(dest string, mountState State, opts ...MountOption) RunOption + func AddSSHSocket(opts ...SSHOption) RunOption + func AddSecret(dest string, opts ...SecretOption) RunOption + func Args(a []string) RunOption + func Dir(str string) RunOption + func Dirf(str string, v ...interface{}) RunOption + func Network(n pb.NetMode) RunOption + func ReadonlyRootFS() RunOption + func Reset(s State) RunOption + func Shlex(str string) RunOption + func Shlexf(str string, v ...interface{}) RunOption + func User(str string) RunOption + func With(so ...StateOption) RunOption + func WithProxy(ps ProxyEnv) RunOption + type SSHInfo struct + GID int + ID string + Mode int + Optional bool + Target string + UID int + type SSHOption interface + SetSSHOption func(*SSHInfo) + func SSHID(id string) SSHOption + func SSHSocketOpt(target string, uid, gid, mode int) SSHOption + func SSHSocketTarget(target string) SSHOption + type SecretInfo struct + GID int + ID string + Mode int + Optional bool + Target string + UID int + type SecretOption interface + SetSecretOption func(*SecretInfo) + func SecretFileOpt(uid, gid, mode int) SecretOption + func SecretID(id string) SecretOption + type SourceOp struct + func NewSource(id string, attrs map[string]string, c Constraints) *SourceOp + func (s *SourceOp) Inputs() []Output + func (s *SourceOp) Marshal(constraints *Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) + func (s *SourceOp) Output() Output + func (s *SourceOp) Validate() error + type State struct + func Git(remote, ref string, opts ...GitOption) State + func HTTP(url string, opts ...HTTPOption) State + func Image(ref string, opts ...ImageOption) State + func Local(name string, opts ...LocalOption) State + func NewState(o Output) State + func Scratch() State + func (s State) AddEnv(key, value string) State + func (s State) AddEnvf(key, value string, v ...interface{}) State + func (s State) AddExtraHost(host string, ip net.IP) State + func (s State) Dir(str string) State + func (s State) Dirf(str string, v ...interface{}) State + func (s State) Env() []string + func (s State) GetArgs() []string + func (s State) GetDir() string + func (s State) GetEnv(key string) (string, bool) + func (s State) GetNetwork() pb.NetMode + func (s State) GetPlatform() *specs.Platform + func (s State) Marshal(co ...ConstraintsOpt) (*Definition, error) + func (s State) Network(n pb.NetMode) State + func (s State) Output() Output + func (s State) Platform(p specs.Platform) State + func (s State) Reset(s2 State) State + func (s State) Run(ro ...RunOption) ExecState + func (s State) SetMarshalDefaults(co ...ConstraintsOpt) State + func (s State) User(v string) State + func (s State) Validate() error + func (s State) Value(k interface{}) interface{} + func (s State) With(so ...StateOption) State + func (s State) WithOutput(o Output) State + func (s State) WithValue(k, v interface{}) State + type StateOption func(State) State + type Vertex interface + Inputs func() []Output + Marshal func(*Constraints) (digest.Digest, []byte, *pb.OpMetadata, error) + Output func() Output + Validate func() error