Documentation ¶
Index ¶
- func ListTargets(files []File) ([]string, error)
- func ParseHCLFile(dt []byte, fn string) (*hcl.File, bool, error)
- func ReadRemoteFiles(ctx context.Context, nodes []builder.Node, url string, names []string, ...) ([]File, *Input, error)
- func ReadTargets(ctx context.Context, files []File, targets, overrides []string, ...) (map[string]*Target, map[string]*Group, error)
- func TargetsToBuildOpt(m map[string]*Target, inp *Input) (map[string]build.Options, error)
- type Config
- func ParseCompose(cfgs []composetypes.ConfigFile, envs map[string]string) (*Config, error)
- func ParseComposeFiles(fs []File) (*Config, error)
- func ParseFile(dt []byte, fn string) (*Config, error)
- func ParseFiles(files []File, defaults map[string]string) (_ *Config, _ *hclparser.ParseMeta, err error)
- type EntitlementConf
- type EntitlementKey
- type File
- type Group
- type Input
- type Override
- type Target
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListTargets ¶ added in v0.11.0
func ParseHCLFile ¶ added in v0.6.0
func ReadRemoteFiles ¶ added in v0.5.0
func ReadTargets ¶
Types ¶
type Config ¶
type Config struct { Groups []*Group `json:"group" hcl:"group,block" cty:"group"` Targets []*Target `json:"target" hcl:"target,block" cty:"target"` }
func ParseCompose ¶
func ParseCompose(cfgs []composetypes.ConfigFile, envs map[string]string) (*Config, error)
func ParseComposeFiles ¶ added in v0.9.1
func ParseFiles ¶ added in v0.6.0
type EntitlementConf ¶ added in v0.17.0
type EntitlementConf struct { NetworkHost bool SecurityInsecure bool FSRead []string FSWrite []string ImagePush []string ImageLoad []string SSH bool }
func ParseEntitlements ¶ added in v0.17.0
func ParseEntitlements(in []string) (EntitlementConf, error)
func (EntitlementConf) Validate ¶ added in v0.17.0
func (c EntitlementConf) Validate(m map[string]build.Options) (EntitlementConf, error)
type EntitlementKey ¶ added in v0.17.0
type EntitlementKey string
const ( EntitlementKeyNetworkHost EntitlementKey = "network.host" EntitlementKeySecurityInsecure EntitlementKey = "security.insecure" EntitlementKeyFSRead EntitlementKey = "fs.read" EntitlementKeyFSWrite EntitlementKey = "fs.write" EntitlementKeyFS EntitlementKey = "fs" EntitlementKeyImagePush EntitlementKey = "image.push" EntitlementKeyImageLoad EntitlementKey = "image.load" EntitlementKeyImage EntitlementKey = "image" EntitlementKeySSH EntitlementKey = "ssh" )
type Group ¶
type Group struct { Name string `json:"-" hcl:"name,label" cty:"name"` Description string `json:"description,omitempty" hcl:"description,optional" cty:"description"` Targets []string `json:"targets" hcl:"targets" cty:"targets"` }
func (*Group) GetEvalContexts ¶ added in v0.11.0
func (g *Group) GetEvalContexts(ectx *hcl.EvalContext, block *hcl.Block, loadDeps func(hcl.Expression) hcl.Diagnostics) ([]*hcl.EvalContext, error)
func (*Group) GetName ¶ added in v0.11.0
func (g *Group) GetName(ectx *hcl.EvalContext, block *hcl.Block, loadDeps func(hcl.Expression) hcl.Diagnostics) (string, error)
type Target ¶
type Target struct { Name string `json:"-" hcl:"name,label" cty:"name"` Description string `json:"description,omitempty" hcl:"description,optional" cty:"description"` // Inherits is the only field that cannot be overridden with --set Inherits []string `json:"inherits,omitempty" hcl:"inherits,optional" cty:"inherits"` Annotations []string `json:"annotations,omitempty" hcl:"annotations,optional" cty:"annotations"` Attest []string `json:"attest,omitempty" hcl:"attest,optional" cty:"attest"` Context *string `json:"context,omitempty" hcl:"context,optional" cty:"context"` Contexts map[string]string `json:"contexts,omitempty" hcl:"contexts,optional" cty:"contexts"` Dockerfile *string `json:"dockerfile,omitempty" hcl:"dockerfile,optional" cty:"dockerfile"` DockerfileInline *string `json:"dockerfile-inline,omitempty" hcl:"dockerfile-inline,optional" cty:"dockerfile-inline"` Args map[string]*string `json:"args,omitempty" hcl:"args,optional" cty:"args"` Labels map[string]*string `json:"labels,omitempty" hcl:"labels,optional" cty:"labels"` Tags []string `json:"tags,omitempty" hcl:"tags,optional" cty:"tags"` CacheFrom []string `json:"cache-from,omitempty" hcl:"cache-from,optional" cty:"cache-from"` CacheTo []string `json:"cache-to,omitempty" hcl:"cache-to,optional" cty:"cache-to"` Target *string `json:"target,omitempty" hcl:"target,optional" cty:"target"` Secrets []string `json:"secret,omitempty" hcl:"secret,optional" cty:"secret"` SSH []string `json:"ssh,omitempty" hcl:"ssh,optional" cty:"ssh"` Platforms []string `json:"platforms,omitempty" hcl:"platforms,optional" cty:"platforms"` Outputs []string `json:"output,omitempty" hcl:"output,optional" cty:"output"` Pull *bool `json:"pull,omitempty" hcl:"pull,optional" cty:"pull"` NoCache *bool `json:"no-cache,omitempty" hcl:"no-cache,optional" cty:"no-cache"` NetworkMode *string `json:"network,omitempty" hcl:"network,optional" cty:"network"` NoCacheFilter []string `json:"no-cache-filter,omitempty" hcl:"no-cache-filter,optional" cty:"no-cache-filter"` ShmSize *string `json:"shm-size,omitempty" hcl:"shm-size,optional"` Ulimits []string `json:"ulimits,omitempty" hcl:"ulimits,optional"` Call *string `json:"call,omitempty" hcl:"call,optional" cty:"call"` Entitlements []string `json:"entitlements,omitempty" hcl:"entitlements,optional" cty:"entitlements"` // contains filtered or unexported fields }
func (*Target) AddOverrides ¶ added in v0.7.0
func (*Target) GetEvalContexts ¶ added in v0.11.0
func (t *Target) GetEvalContexts(ectx *hcl.EvalContext, block *hcl.Block, loadDeps func(hcl.Expression) hcl.Diagnostics) ([]*hcl.EvalContext, error)
func (*Target) GetName ¶ added in v0.11.0
func (t *Target) GetName(ectx *hcl.EvalContext, block *hcl.Block, loadDeps func(hcl.Expression) hcl.Diagnostics) (string, error)
Click to show internal directories.
Click to hide internal directories.