Documentation
¶
Index ¶
- Constants
- type AptStepBuilder
- type BuildStepOptions
- type CacheContext
- func (c *CacheContext) AddCache(name string, directory string) string
- func (c *CacheContext) AddCacheWithType(name string, directory string, cacheType string) string
- func (c *CacheContext) GetAptCaches() []string
- func (c *CacheContext) GetCache(name string) *plan.Cache
- func (c *CacheContext) SetCache(name string, cache *plan.Cache)
- type CommandStepBuilder
- func (b *CommandStepBuilder) AddCache(name string)
- func (b *CommandStepBuilder) AddCommand(command plan.Command)
- func (b *CommandStepBuilder) AddCommands(commands []plan.Command)
- func (b *CommandStepBuilder) AddEnvVars(envVars map[string]string)
- func (b *CommandStepBuilder) AddInput(input plan.Input)
- func (b *CommandStepBuilder) AddInputs(inputs []plan.Input)
- func (b *CommandStepBuilder) AddPaths(paths []string)
- func (b *CommandStepBuilder) AddVariables(variables map[string]string)
- func (b *CommandStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
- func (b *CommandStepBuilder) Name() string
- func (b *CommandStepBuilder) UseSecrets(secrets []string)
- func (b *CommandStepBuilder) UseSecretsWithPrefix(prefix string)
- func (b *CommandStepBuilder) UseSecretsWithPrefixes(prefixes []string)
- type DeployBuilder
- type GenerateContext
- func (c *GenerateContext) DefaultRuntimeInput() plan.Input
- func (c *GenerateContext) DefaultRuntimeInputWithPackages(additionalAptPackages []string) plan.Input
- func (c *GenerateContext) EnterSubContext(subContext string) *GenerateContext
- func (c *GenerateContext) ExitSubContext() *GenerateContext
- func (c *GenerateContext) Generate() (*plan.BuildPlan, map[string]*resolver.ResolvedPackage, error)
- func (c *GenerateContext) GetMiseStepBuilder() *MiseStepBuilder
- func (c *GenerateContext) GetStepByName(name string) *StepBuilder
- func (c *GenerateContext) GetStepName(name string) string
- func (c *GenerateContext) NewAptStepBuilder(name string) *AptStepBuilder
- func (c *GenerateContext) NewCommandStep(name string) *CommandStepBuilder
- func (c *GenerateContext) NewImageStep(name string, resolveStepImage func(options *BuildStepOptions) string) *ImageStepBuilder
- func (c *GenerateContext) ResolvePackages() (map[string]*resolver.ResolvedPackage, error)
- type ImageStepBuilder
- func (b *ImageStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
- func (b *ImageStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
- func (b *ImageStepBuilder) Name() string
- func (b *ImageStepBuilder) Version(name resolver.PackageRef, version string, source string)
- type Metadata
- type MiseStepBuilder
- func (b *MiseStepBuilder) AddInput(input plan.Input)
- func (b *MiseStepBuilder) AddSupportingAptPackage(name string)
- func (b *MiseStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
- func (b *MiseStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
- func (b *MiseStepBuilder) GetOutputPaths() []string
- func (b *MiseStepBuilder) GetSupportingMiseConfigFiles(path string) []string
- func (b *MiseStepBuilder) Name() string
- func (b *MiseStepBuilder) Version(name resolver.PackageRef, version string, source string)
- type StepBuilder
Constants ¶
View Source
const ( APT_CACHE_KEY = "apt" MISE_CACHE_KEY = "mise" )
View Source
const (
MisePackageStepName = "packages:mise"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AptStepBuilder ¶
func (*AptStepBuilder) AddAptPackage ¶
func (b *AptStepBuilder) AddAptPackage(pkg string)
func (*AptStepBuilder) AddInput ¶ added in v0.0.23
func (b *AptStepBuilder) AddInput(input plan.Input)
func (*AptStepBuilder) Build ¶
func (b *AptStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
func (*AptStepBuilder) Name ¶
func (b *AptStepBuilder) Name() string
type BuildStepOptions ¶
type BuildStepOptions struct {
ResolvedPackages map[string]*resolver.ResolvedPackage
Caches *CacheContext
}
func (*BuildStepOptions) NewAptInstallCommand ¶
func (o *BuildStepOptions) NewAptInstallCommand(pkgs []string) plan.Command
type CacheContext ¶
func NewCacheContext ¶
func NewCacheContext() *CacheContext
func (*CacheContext) AddCache ¶
func (c *CacheContext) AddCache(name string, directory string) string
func (*CacheContext) AddCacheWithType ¶ added in v0.0.17
func (c *CacheContext) AddCacheWithType(name string, directory string, cacheType string) string
func (*CacheContext) GetAptCaches ¶
func (c *CacheContext) GetAptCaches() []string
type CommandStepBuilder ¶
type CommandStepBuilder struct {
DisplayName string
Commands []plan.Command
Inputs []plan.Input
Assets map[string]string
Variables map[string]string
Caches []string
Secrets []string
// contains filtered or unexported fields
}
func (*CommandStepBuilder) AddCache ¶ added in v0.0.9
func (b *CommandStepBuilder) AddCache(name string)
func (*CommandStepBuilder) AddCommand ¶
func (b *CommandStepBuilder) AddCommand(command plan.Command)
func (*CommandStepBuilder) AddCommands ¶
func (b *CommandStepBuilder) AddCommands(commands []plan.Command)
func (*CommandStepBuilder) AddEnvVars ¶
func (b *CommandStepBuilder) AddEnvVars(envVars map[string]string)
func (*CommandStepBuilder) AddInput ¶ added in v0.0.23
func (b *CommandStepBuilder) AddInput(input plan.Input)
func (*CommandStepBuilder) AddInputs ¶ added in v0.0.23
func (b *CommandStepBuilder) AddInputs(inputs []plan.Input)
func (*CommandStepBuilder) AddPaths ¶
func (b *CommandStepBuilder) AddPaths(paths []string)
func (*CommandStepBuilder) AddVariables ¶ added in v0.0.9
func (b *CommandStepBuilder) AddVariables(variables map[string]string)
func (*CommandStepBuilder) Build ¶
func (b *CommandStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
func (*CommandStepBuilder) Name ¶
func (b *CommandStepBuilder) Name() string
func (*CommandStepBuilder) UseSecrets ¶
func (b *CommandStepBuilder) UseSecrets(secrets []string)
func (*CommandStepBuilder) UseSecretsWithPrefix ¶ added in v0.0.11
func (b *CommandStepBuilder) UseSecretsWithPrefix(prefix string)
func (*CommandStepBuilder) UseSecretsWithPrefixes ¶ added in v0.0.11
func (b *CommandStepBuilder) UseSecretsWithPrefixes(prefixes []string)
type DeployBuilder ¶ added in v0.0.23
type DeployBuilder struct {
Inputs []plan.Input
StartCmd string
Variables map[string]string
Paths []string
AptPackages []string
}
func NewDeployBuilder ¶ added in v0.0.23
func NewDeployBuilder() *DeployBuilder
func (*DeployBuilder) Build ¶ added in v0.0.23
func (b *DeployBuilder) Build() plan.Deploy
type GenerateContext ¶
type GenerateContext struct {
App *a.App
Env *a.Environment
Config *config.Config
BaseImage string
Steps []StepBuilder
Deploy *DeployBuilder
Caches *CacheContext
Secrets []string
SubContexts []string
Metadata *Metadata
Resolver *resolver.Resolver
MiseStepBuilder *MiseStepBuilder
}
func NewGenerateContext ¶
func NewGenerateContext(app *a.App, env *a.Environment, config *config.Config) (*GenerateContext, error)
func (*GenerateContext) DefaultRuntimeInput ¶ added in v0.0.23
func (c *GenerateContext) DefaultRuntimeInput() plan.Input
func (*GenerateContext) DefaultRuntimeInputWithPackages ¶ added in v0.0.23
func (c *GenerateContext) DefaultRuntimeInputWithPackages(additionalAptPackages []string) plan.Input
func (*GenerateContext) EnterSubContext ¶
func (c *GenerateContext) EnterSubContext(subContext string) *GenerateContext
func (*GenerateContext) ExitSubContext ¶
func (c *GenerateContext) ExitSubContext() *GenerateContext
func (*GenerateContext) Generate ¶
func (c *GenerateContext) Generate() (*plan.BuildPlan, map[string]*resolver.ResolvedPackage, error)
Generate a build plan from the context
func (*GenerateContext) GetMiseStepBuilder ¶
func (c *GenerateContext) GetMiseStepBuilder() *MiseStepBuilder
func (*GenerateContext) GetStepByName ¶
func (c *GenerateContext) GetStepByName(name string) *StepBuilder
func (*GenerateContext) GetStepName ¶
func (c *GenerateContext) GetStepName(name string) string
func (*GenerateContext) NewAptStepBuilder ¶
func (c *GenerateContext) NewAptStepBuilder(name string) *AptStepBuilder
func (*GenerateContext) NewCommandStep ¶
func (c *GenerateContext) NewCommandStep(name string) *CommandStepBuilder
func (*GenerateContext) NewImageStep ¶
func (c *GenerateContext) NewImageStep(name string, resolveStepImage func(options *BuildStepOptions) string) *ImageStepBuilder
func (*GenerateContext) ResolvePackages ¶
func (c *GenerateContext) ResolvePackages() (map[string]*resolver.ResolvedPackage, error)
type ImageStepBuilder ¶
type ImageStepBuilder struct {
DisplayName string
Resolver *resolver.Resolver
Packages []*resolver.PackageRef
ResolveStepImage func(options *BuildStepOptions) string
AptPackages []string
}
func (*ImageStepBuilder) Build ¶
func (b *ImageStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
func (*ImageStepBuilder) Default ¶
func (b *ImageStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
func (*ImageStepBuilder) Name ¶
func (b *ImageStepBuilder) Name() string
func (*ImageStepBuilder) Version ¶
func (b *ImageStepBuilder) Version(name resolver.PackageRef, version string, source string)
type Metadata ¶
func NewMetadata ¶
func NewMetadata() *Metadata
type MiseStepBuilder ¶
type MiseStepBuilder struct {
DisplayName string
Resolver *resolver.Resolver
SupportingAptPackages []string
MisePackages []*resolver.PackageRef
SupportingMiseFiles []string
Assets map[string]string
Inputs []plan.Input
Variables map[string]string
// contains filtered or unexported fields
}
func (*MiseStepBuilder) AddInput ¶ added in v0.0.23
func (b *MiseStepBuilder) AddInput(input plan.Input)
func (*MiseStepBuilder) AddSupportingAptPackage ¶
func (b *MiseStepBuilder) AddSupportingAptPackage(name string)
func (*MiseStepBuilder) Build ¶
func (b *MiseStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
func (*MiseStepBuilder) Default ¶
func (b *MiseStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
func (*MiseStepBuilder) GetOutputPaths ¶ added in v0.0.23
func (b *MiseStepBuilder) GetOutputPaths() []string
func (*MiseStepBuilder) GetSupportingMiseConfigFiles ¶
func (b *MiseStepBuilder) GetSupportingMiseConfigFiles(path string) []string
func (*MiseStepBuilder) Name ¶
func (b *MiseStepBuilder) Name() string
func (*MiseStepBuilder) Version ¶
func (b *MiseStepBuilder) Version(name resolver.PackageRef, version string, source string)
type StepBuilder ¶
type StepBuilder interface {
Name() string
Build(options *BuildStepOptions) (*plan.Step, error)
}
Click to show internal directories.
Click to hide internal directories.