Version: v0.8.0 Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Jun 11, 2019 License: Apache-2.0 Imports: 26 Imported by: 0




View Source
const (
	// DefaultCNABBaseImageName is the name of the default base invocation image.
	DefaultCNABBaseImageName = "docker/cnab-app-base"


This section is empty.


func BaseInvocationImage added in v0.8.0

func BaseInvocationImage(cli command.Cli) string

BaseInvocationImage returns the name and tag of the CNAB base invocation image

func Extract

func Extract(name string, ops ...func(*types.App) error) (*types.App, error)

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 Merge

func Merge(app *types.App, target io.Writer) error

Merge converts an app-package to the single-file merged version

func Pack

func Pack(appname string, target io.Writer) error

Pack packs the app as a single file

func PackInvocationImageContext added in v0.8.0

func PackInvocationImageContext(cli command.Cli, app *types.App, target io.Writer) error

PackInvocationImageContext creates a Docker build context for building a CNAB invocation image

func Split

func Split(app *types.App, outputDir string) error

Split converts an app package to the split version

func ToCNAB added in v0.8.0

func ToCNAB(app *types.App, invocationImageName string) (*bundle.Bundle, error)

ToCNAB creates a CNAB bundle from an app package

func Unpack

func Unpack(appname, targetDir string) error

Unpack extracts a packed app


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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL