Documentation
¶
Index ¶
- Constants
- Variables
- func BoolEnv(k string) bool
- func DeprecatedFlagRunImage(image *string)
- func EnvOrDefault(key string, defaultVal string) string
- func Exit(err error)
- func ExitWithVersion()
- func FlagAnalyzedPath(dir *string)
- func FlagAppDir(dir *string)
- func FlagBuildpacksDir(dir *string)
- func FlagCacheDir(dir *string)
- func FlagCacheImage(image *string)
- func FlagGID(gid *int)
- func FlagGroupPath(path *string)
- func FlagLaunchCacheDir(dir *string)
- func FlagLauncherPath(path *string)
- func FlagLayersDir(dir *string)
- func FlagLogLevel(level *string)
- func FlagNoColor(skip *bool)
- func FlagOrderPath(path *string)
- func FlagPlanPath(path *string)
- func FlagPlatformDir(dir *string)
- func FlagPreviousImage(image *string)
- func FlagProcessType(processType *string)
- func FlagProjectMetadataPath(projectMetadataPath *string)
- func FlagReportPath(path *string)
- func FlagRunImage(image *string)
- func FlagSkipLayers(skip *bool)
- func FlagSkipRestore(skip *bool)
- func FlagStackPath(path *string)
- func FlagTags(tags *StringSlice)
- func FlagUID(uid *int)
- func FlagUseDaemon(use *bool)
- func FlagVersion(version *bool)
- func Run(c Command, asSubcommand bool)
- func VerifyBuildpackAPI(bp string, requested string) error
- func VerifyPlatformAPI(requested string) error
- type Command
- type ErrorFail
- type Logger
- type StringSlice
Constants ¶
View Source
const ( // lifecycle errors not specific to any phase: 1-99 CodeFailed = 1 // CodeFailed indicates generic lifecycle error // 2: reserved CodeInvalidArgs = 3 // API errors CodeIncompatiblePlatformAPI = 11 CodeIncompatibleBuildpackAPI = 12 // detect phase errors: 100-199 CodeFailedDetect = 100 // CodeFailedDetect indicates that no buildpacks detected // CodeFailedDetectWithErrors indicated that no buildpacks detected and at least one errored CodeFailedDetectWithErrors = 101 CodeDetectError = 102 // CodeDetectError indicates generic detect error // analyze phase errors: 200-299 CodeAnalyzeError = 202 // CodeAnalyzeError indicates generic analyze error // restore phase errors: 300-399 CodeRestoreError = 302 // CodeRestoreError indicates generic restore error // build phase errors: 400-499 CodeFailedBuildWithErrors = 401 // CodeFailedBuildWithErrors indicates buildpack error during /bin/build CodeBuildError = 402 // CodeBuildError indicates generic build error // export phase errors: 500-599 CodeExportError = 502 // CodeExportError indicates generic export error // rebase phase errors: 600-699 CodeRebaseError = 602 // CodeRebaseError indicates generic rebase error // launch phase errors: 700-799 CodeLaunchError = 702 // CodeLaunchError indicates generic launch error )
View Source
const ( EnvAnalyzedPath = "CNB_ANALYZED_PATH" EnvAppDir = "CNB_APP_DIR" EnvBuildpacksDir = "CNB_BUILDPACKS_DIR" EnvCacheDir = "CNB_CACHE_DIR" EnvCacheImage = "CNB_CACHE_IMAGE" EnvDeprecationMode = "CNB_DEPRECATION_MODE" EnvGID = "CNB_GROUP_ID" EnvGroupPath = "CNB_GROUP_PATH" EnvLaunchCacheDir = "CNB_LAUNCH_CACHE_DIR" EnvLayersDir = "CNB_LAYERS_DIR" EnvLogLevel = "CNB_LOG_LEVEL" EnvNoColor = "CNB_NO_COLOR" // defaults to false EnvOrderPath = "CNB_ORDER_PATH" EnvPlanPath = "CNB_PLAN_PATH" EnvPlatformAPI = "CNB_PLATFORM_API" EnvPlatformDir = "CNB_PLATFORM_DIR" EnvPreviousImage = "CNB_PREVIOUS_IMAGE" EnvProcessType = "CNB_PROCESS_TYPE" EnvProjectMetadataPath = "CNB_PROJECT_METADATA_PATH" EnvRegistryAuth = "CNB_REGISTRY_AUTH" EnvReportPath = "CNB_REPORT_PATH" EnvRunImage = "CNB_RUN_IMAGE" EnvSkipLayers = "CNB_ANALYZE_SKIP_LAYERS" // defaults to false EnvSkipRestore = "CNB_SKIP_RESTORE" // defaults to false EnvStackPath = "CNB_STACK_PATH" EnvUID = "CNB_USER_ID" EnvUseDaemon = "CNB_USE_DAEMON" // defaults to false )
View Source
const ( DeprecationModeQuiet = "quiet" DeprecationModeWarn = "warn" DeprecationModeError = "error" )
Variables ¶
View Source
var ( DefaultAnalyzedPath = filepath.Join(".", "analyzed.toml") DefaultAppDir = filepath.Join(rootDir, "workspace") DefaultBuildpacksDir = filepath.Join(rootDir, "cnb", "buildpacks") DefaultDeprecationMode = DeprecationModeWarn DefaultGroupPath = filepath.Join(".", "group.toml") DefaultLauncherPath = filepath.Join(rootDir, "cnb", "lifecycle", "launcher"+execExt) DefaultLayersDir = filepath.Join(rootDir, "layers") DefaultLogLevel = "info" DefaultOrderPath = filepath.Join(rootDir, "cnb", "order.toml") DefaultPlanPath = filepath.Join(".", "plan.toml") DefaultPlatformAPI = "0.3" DefaultPlatformDir = filepath.Join(rootDir, "platform") DefaultProcessType = "web" DefaultProjectMetadataPath = filepath.Join(".", "project-metadata.toml") DefaultReportPath = filepath.Join(".", "report.toml") DefaultStackPath = filepath.Join(rootDir, "cnb", "stack.toml") )
View Source
var ( // Version is the version of the lifecycle and all produced binaries. Version = "0.0.0" // SCMCommit is the commit information provided by SCM. SCMCommit = "" // SCMRepository is the source repository. SCMRepository = "" DeprecationMode = EnvOrDefault(EnvDeprecationMode, DefaultDeprecationMode) )
The following variables are injected at compile time.
Functions ¶
func DeprecatedFlagRunImage ¶ added in v0.7.0
func DeprecatedFlagRunImage(image *string)
func EnvOrDefault ¶ added in v0.9.0
func ExitWithVersion ¶
func ExitWithVersion()
func FlagAnalyzedPath ¶
func FlagAnalyzedPath(dir *string)
func FlagAppDir ¶
func FlagAppDir(dir *string)
func FlagBuildpacksDir ¶
func FlagBuildpacksDir(dir *string)
func FlagCacheDir ¶
func FlagCacheDir(dir *string)
func FlagCacheImage ¶
func FlagCacheImage(image *string)
func FlagGroupPath ¶
func FlagGroupPath(path *string)
func FlagLaunchCacheDir ¶
func FlagLaunchCacheDir(dir *string)
func FlagLauncherPath ¶
func FlagLauncherPath(path *string)
func FlagLayersDir ¶
func FlagLayersDir(dir *string)
func FlagLogLevel ¶
func FlagLogLevel(level *string)
func FlagNoColor ¶ added in v0.9.0
func FlagNoColor(skip *bool)
func FlagOrderPath ¶
func FlagOrderPath(path *string)
func FlagPlanPath ¶
func FlagPlanPath(path *string)
func FlagPlatformDir ¶
func FlagPlatformDir(dir *string)
func FlagPreviousImage ¶ added in v0.7.0
func FlagPreviousImage(image *string)
func FlagProcessType ¶ added in v0.7.0
func FlagProcessType(processType *string)
func FlagProjectMetadataPath ¶ added in v0.7.0
func FlagProjectMetadataPath(projectMetadataPath *string)
func FlagReportPath ¶ added in v0.9.0
func FlagReportPath(path *string)
func FlagRunImage ¶
func FlagRunImage(image *string)
func FlagSkipLayers ¶
func FlagSkipLayers(skip *bool)
func FlagSkipRestore ¶ added in v0.7.0
func FlagSkipRestore(skip *bool)
func FlagStackPath ¶
func FlagStackPath(path *string)
func FlagTags ¶ added in v0.7.0
func FlagTags(tags *StringSlice)
func FlagUseDaemon ¶
func FlagUseDaemon(use *bool)
func FlagVersion ¶
func FlagVersion(version *bool)
func VerifyBuildpackAPI ¶ added in v0.9.0
func VerifyPlatformAPI ¶ added in v0.9.0
Types ¶
type ErrorFail ¶
func SetLogLevel ¶
type StringSlice ¶ added in v0.7.0
type StringSlice []string
func (*StringSlice) Set ¶ added in v0.7.0
func (s *StringSlice) Set(value string) error
func (*StringSlice) String ¶ added in v0.7.0
func (s *StringSlice) String() string
Click to show internal directories.
Click to hide internal directories.