cmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultLayersDir     = "/layers"
	DefaultAppDir        = "/workspace"
	DefaultBuildpacksDir = "/cnb/buildpacks"
	DefaultPlatformDir   = "/platform"
	DefaultOrderPath     = "/cnb/order.toml"
	DefaultGroupPath     = "./group.toml"
	DefaultStackPath     = "/cnb/stack.toml"
	DefaultAnalyzedPath  = "./analyzed.toml"
	DefaultPlanPath      = "./plan.toml"
	DefaultProcessType   = "web"
	DefaultLauncherPath  = "/cnb/lifecycle/launcher"

	EnvLayersDir         = "CNB_LAYERS_DIR"
	EnvAppDir            = "CNB_APP_DIR"
	EnvBuildpacksDir     = "CNB_BUILDPACKS_DIR"
	EnvPlatformDir       = "CNB_PLATFORM_DIR"
	EnvAnalyzedPath      = "CNB_ANALYZED_PATH"
	EnvOrderPath         = "CNB_ORDER_PATH"
	EnvGroupPath         = "CNB_GROUP_PATH"
	EnvStackPath         = "CNB_STACK_PATH"
	EnvPlanPath          = "CNB_PLAN_PATH"
	EnvUseDaemon         = "CNB_USE_DAEMON"       // defaults to false
	EnvUseHelpers        = "CNB_USE_CRED_HELPERS" // defaults to false
	EnvRunImage          = "CNB_RUN_IMAGE"
	EnvCacheImage        = "CNB_CACHE_IMAGE"
	EnvCacheDir          = "CNB_CACHE_DIR"
	EnvLaunchCacheDir    = "CNB_LAUNCH_CACHE_DIR"
	EnvUID               = "CNB_USER_ID"
	EnvGID               = "CNB_GROUP_ID"
	EnvRegistryAuth      = "CNB_REGISTRY_AUTH"
	EnvSkipLayers        = "CNB_ANALYZE_SKIP_LAYERS" // defaults to false
	EnvProcessType       = "CNB_PROCESS_TYPE"
	EnvProcessTypeLegacy = "PACK_PROCESS_TYPE" // deprecated
)
View Source
const (
	CodeFailed = 1
	// 2: reserved
	CodeInvalidArgs = 3
	// 4: CodeInvalidEnv
	// 5: CodeNotFound
	CodeFailedDetect = 6
	CodeFailedBuild  = 7
	CodeFailedLaunch = 8
	// 9: CodeFailedUpdate
	CodeFailedSave = 10
)

Variables

View Source
var (
	// Version is the version of the lifecycle and all produced binaries. It is injected at compile time.
	Version = "0.0.0"
	// SCMCommit is the commit information provided by SCM. It is injected at compile time.
	SCMCommit = ""
	// SCMRepository is the source repository. It is injected at compile time.
	SCMRepository = ""
	OutLogger     = log.New(os.Stdout, "", 0)
	ErrLogger     = log.New(os.Stderr, "", 0)
)

Functions

func DockerClient added in v0.4.0

func DockerClient() (*client.Client, error)

func Exit

func Exit(err error)

func ExitWithVersion added in v0.4.0

func ExitWithVersion()

func FailCode

func FailCode(code int, action ...string) error

func FailErr

func FailErr(err error, action ...string) error

func FailErrCode

func FailErrCode(err error, code int, action ...string) error

func FlagAnalyzedPath added in v0.3.0

func FlagAnalyzedPath(dir *string)

func FlagAppDir

func FlagAppDir(dir *string)

func FlagBuildpacksDir

func FlagBuildpacksDir(dir *string)

func FlagCacheDir added in v0.2.0

func FlagCacheDir(dir *string)

func FlagCacheImage

func FlagCacheImage(image *string)

func FlagGID

func FlagGID(gid *int)

func FlagGroupPath

func FlagGroupPath(path *string)

func FlagLaunchCacheDir added in v0.2.0

func FlagLaunchCacheDir(dir *string)

func FlagLauncherPath added in v0.4.0

func FlagLauncherPath(path *string)

func FlagLayersDir

func FlagLayersDir(dir *string)

func FlagOrderPath

func FlagOrderPath(path *string)

func FlagPlanPath

func FlagPlanPath(path *string)

func FlagPlatformDir

func FlagPlatformDir(dir *string)

func FlagRunImage

func FlagRunImage(image *string)

func FlagSkipLayers added in v0.3.0

func FlagSkipLayers(skip *bool)

func FlagStackPath

func FlagStackPath(path *string)

func FlagUID

func FlagUID(uid *int)

func FlagUseCredHelpers

func FlagUseCredHelpers(use *bool)

func FlagUseDaemon

func FlagUseDaemon(use *bool)

func FlagVersion added in v0.4.0

func FlagVersion(version *bool)

Types

type ErrorFail

type ErrorFail struct {
	Err    error
	Code   int
	Action []string
}

func (*ErrorFail) Error

func (e *ErrorFail) Error() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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