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 Command
- 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 CommandWrapper
- 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) NewInstallBinStepBuilder(name string) *InstallBinStepBuilder
- func (c *GenerateContext) NewMiseStepBuilder(displayName string) *MiseStepBuilder
- func (c *GenerateContext) ResolvePackages() (map[string]*resolver.ResolvedPackage, error)
- func (c *GenerateContext) TemplateFiles(potentialFiles []string, defaultContents string, data map[string]interface{}) (*TemplateFileResult, 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) SetVersionAvailable(ref resolver.PackageRef, isVersionAvailable func(version string) bool)
- func (b *ImageStepBuilder) Version(name resolver.PackageRef, version string, source string)
- type InstallBinStepBuilder
- func (b *InstallBinStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
- func (b *InstallBinStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
- func (b *InstallBinStepBuilder) GetOutputPaths() []string
- func (b *InstallBinStepBuilder) Name() string
- func (b *InstallBinStepBuilder) 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
- type TemplateFileResult
Constants ¶
View Source
const ( APT_CACHE_KEY = "apt" MISE_CACHE_KEY = "mise" )
View Source
const (
BinDir = "/railpack"
)
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 ¶
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 ¶
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 ¶
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 ¶
func (b *CommandStepBuilder) AddInput(input plan.Input)
func (*CommandStepBuilder) AddInputs ¶
func (b *CommandStepBuilder) AddInputs(inputs []plan.Input)
func (*CommandStepBuilder) AddPaths ¶
func (b *CommandStepBuilder) AddPaths(paths []string)
func (*CommandStepBuilder) AddVariables ¶
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 ¶
func (b *CommandStepBuilder) UseSecretsWithPrefix(prefix string)
func (*CommandStepBuilder) UseSecretsWithPrefixes ¶
func (b *CommandStepBuilder) UseSecretsWithPrefixes(prefixes []string)
type CommandWrapper ¶
func (CommandWrapper) IsSpread ¶
func (c CommandWrapper) IsSpread() bool
type DeployBuilder ¶
type DeployBuilder struct {
Inputs []plan.Input
StartCmd string
Variables map[string]string
Paths []string
AptPackages []string
}
func NewDeployBuilder ¶
func NewDeployBuilder() *DeployBuilder
func (*DeployBuilder) Build ¶
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
Logger *logger.Logger
}
func NewGenerateContext ¶
func NewGenerateContext(app *a.App, env *a.Environment, config *config.Config, logger *logger.Logger) (*GenerateContext, error)
func (*GenerateContext) DefaultRuntimeInput ¶
func (c *GenerateContext) DefaultRuntimeInput() plan.Input
func (*GenerateContext) DefaultRuntimeInputWithPackages ¶
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) NewInstallBinStepBuilder ¶
func (c *GenerateContext) NewInstallBinStepBuilder(name string) *InstallBinStepBuilder
func (*GenerateContext) NewMiseStepBuilder ¶
func (c *GenerateContext) NewMiseStepBuilder(displayName string) *MiseStepBuilder
func (*GenerateContext) ResolvePackages ¶
func (c *GenerateContext) ResolvePackages() (map[string]*resolver.ResolvedPackage, error)
func (*GenerateContext) TemplateFiles ¶
func (c *GenerateContext) TemplateFiles(potentialFiles []string, defaultContents string, data map[string]interface{}) (*TemplateFileResult, error)
TemplateFiles will look the first file that exists in the list of potential files and render it with the given data If no file is found, it will use the default contents and render it with the given data
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) SetVersionAvailable ¶
func (b *ImageStepBuilder) SetVersionAvailable(ref resolver.PackageRef, isVersionAvailable func(version string) bool)
func (*ImageStepBuilder) Version ¶
func (b *ImageStepBuilder) Version(name resolver.PackageRef, version string, source string)
type InstallBinStepBuilder ¶
type InstallBinStepBuilder struct {
DisplayName string
Resolver *resolver.Resolver
SupportingAptPackages []string
Package resolver.PackageRef
}
func (*InstallBinStepBuilder) Build ¶
func (b *InstallBinStepBuilder) Build(options *BuildStepOptions) (*plan.Step, error)
func (*InstallBinStepBuilder) Default ¶
func (b *InstallBinStepBuilder) Default(name string, defaultVersion string) resolver.PackageRef
func (*InstallBinStepBuilder) GetOutputPaths ¶
func (b *InstallBinStepBuilder) GetOutputPaths() []string
func (*InstallBinStepBuilder) Name ¶
func (b *InstallBinStepBuilder) Name() string
func (*InstallBinStepBuilder) Version ¶
func (b *InstallBinStepBuilder) 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 ¶
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 ¶
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)
}
type TemplateFileResult ¶
Click to show internal directories.
Click to hide internal directories.