Documentation ¶
Index ¶
- Constants
- func BaseInvocationImage(cli command.Cli) string
- func Extract(name string, ops ...func(*types.App) error) (*types.App, error)
- func ExtractCNABParametersValues(mapping CNABParametersMapping, env []string) map[string]string
- func Init(name string, composeFile string, description string, maintainers []string, ...) (string, error)
- func Merge(app *types.App, target io.Writer) error
- func Pack(appname string, target io.Writer) error
- func PackInvocationImageContext(cli command.Cli, app *types.App, target io.Writer) error
- func Split(app *types.App, outputDir string) error
- func ToCNAB(app *types.App, invocationImageName string) (*bundle.Bundle, error)
- func Unpack(appname, targetDir string) error
- type CNABParametersMapping
Constants ¶
const (
// DefaultCNABBaseImageName is the name of the default base invocation image.
DefaultCNABBaseImageName = "docker/cnab-app-base"
)
Variables ¶
This section is empty.
Functions ¶
func BaseInvocationImage ¶ added in v0.8.0
BaseInvocationImage returns the name and tag of the CNAB base invocation image
func Extract ¶
Extract extracts the app content if argument is an archive, or does nothing if a dir. It returns source file, effective app name, and cleanup function If appname is empty, it looks into cwd, and all subdirs for a single matching .dockerapp If nothing is found, it looks for an image and loads it
func ExtractCNABParametersValues ¶ added in v0.8.0
func ExtractCNABParametersValues(mapping CNABParametersMapping, env []string) map[string]string
ExtractCNABParametersValues extracts the parameter values from the given CNAB environment
func Init ¶
func Init(name string, composeFile string, description string, maintainers []string, singleFile bool) (string, error)
Init is the entrypoint initialization function. It generates a new application definition based on the provided parameters and returns the path to the created application definition.
func PackInvocationImageContext ¶ added in v0.8.0
PackInvocationImageContext creates a Docker build context for building a CNAB invocation image
Types ¶
type CNABParametersMapping ¶ added in v0.8.0
type CNABParametersMapping struct { CNABEnvToParameter map[string]string ParameterToCNABEnv map[string]string }
CNABParametersMapping describes the desired mapping between parameters and CNAB environment variables
func ExtractCNABParameterMapping ¶ added in v0.8.0
func ExtractCNABParameterMapping(parameters parameters.Parameters) CNABParametersMapping
ExtractCNABParameterMapping extracts the CNABParametersMapping from application parameters