Documentation
¶
Index ¶
Constants ¶
const MaxToolchainTypeLength = 128
Variables ¶
var AppConfigFileExtensions = map[ToolchainType]string{ ToolchainAppConfigProperties: ".properties", ToolchainAppConfigYAML: ".yaml", ToolchainAppConfigTOML: ".toml", ToolchainAppConfigINI: ".ini", ToolchainAppConfigJSON: ".json", ToolchainAppConfigEnv: ".env", ToolchainAppConfigText: ".txt", }
AppConfigFileExtensions maps each AppConfig toolchain to the extension its files carry. It is the one place the correspondence lives: render-configmap names the ConfigMap key it renders a file into with it, and upload classifies a bundle's files by it, so a file that is rendered out and uploaded back is read as the format it was written as.
var AppConfigToolchains = map[ToolchainType]bool{ ToolchainAppConfigProperties: true, ToolchainAppConfigYAML: true, ToolchainAppConfigTOML: true, ToolchainAppConfigINI: true, ToolchainAppConfigJSON: true, ToolchainAppConfigEnv: true, ToolchainAppConfigText: true, }
AppConfigToolchains is the set of toolchains that carry application configuration files rather than infrastructure resources. Units of these toolchains hold config data that other Units consume, so they default to Unreleasable, but they may be released like any other Unit.
Functions ¶
func FileExtensionForToolchain ¶ added in v0.4.19
func FileExtensionForToolchain(toolchain ToolchainType) string
FileExtensionForToolchain returns the file extension, with its leading dot, for a toolchain's files. A toolchain AppConfigFileExtensions does not list gets its format name, lowercased, and one with no format name gets ".config".
func IsAppConfigToolchain ¶ added in v0.2.4
func IsAppConfigToolchain(toolchain ToolchainType) bool
IsAppConfigToolchain reports whether the toolchain is an AppConfig format.
Types ¶
type ActionResultBaseMeta ¶ added in v0.9.16
type ActionResultBaseMeta struct {
RevisionNum int64
Action ActionType `bun:",notnull" swaggertype:"string"`
Result ActionResultType `bun:",notnull,default:'None'" swaggertype:"string"`
Status ActionStatusType `bun:",notnull,default:'None'" swaggertype:"string"`
Message string `bun:"type:text"`
StartedAt time.Time `json:",omitempty" bun:"type:timestamptz"`
TerminatedAt *time.Time `json:",omitempty" bun:"type:timestamptz"`
}
type ActionResultType ¶ added in v0.9.16
type ActionResultType string
const ( ActionResultNone ActionResultType = "None" ActionResultFunctionInvocationCompleted ActionResultType = "FunctionInvocationCompleted" ActionResultFunctionInvocationFailed ActionResultType = "FunctionInvocationFailed" )
Drift values
type ActionStatusType ¶ added in v0.9.16
type ActionStatusType string
const ( ActionStatusNone ActionStatusType = "None" ActionStatusPending ActionStatusType = "Pending" ActionStatusSubmitted ActionStatusType = "Submitted" ActionStatusProgressing ActionStatusType = "Progressing" ActionStatusCompleted ActionStatusType = "Completed" ActionStatusFailed ActionStatusType = "Failed" ActionStatusCanceled ActionStatusType = "Canceled" ActionStatusAborted ActionStatusType = "Aborted" // Operation superseded by a newer one )
Status values
type ActionType ¶ added in v0.9.16
type ActionType string
const ( ActionNA ActionType = "N/A" ActionCancel ActionType = "Cancel" // ActionApply is no longer performed. Historical UnitEvents carry it. ActionApply ActionType = "Apply" ActionInvokeFunctions ActionType = "InvokeFunctions" ActionListFunctions ActionType = "ListFunctions" )
Action values
type ToolchainType ¶
type ToolchainType string
const ( ToolchainConfigHubYAML ToolchainType = "ConfigHub/YAML" ToolchainKubernetesYAML ToolchainType = "Kubernetes/YAML" ToolchainAppConfigProperties ToolchainType = "AppConfig/Properties" ToolchainAppConfigYAML ToolchainType = "AppConfig/YAML" ToolchainAppConfigTOML ToolchainType = "AppConfig/TOML" ToolchainAppConfigINI ToolchainType = "AppConfig/INI" ToolchainAppConfigJSON ToolchainType = "AppConfig/JSON" ToolchainAppConfigEnv ToolchainType = "AppConfig/Env" ToolchainAppConfigText ToolchainType = "AppConfig/Text" )
ToolchainType corresponds to the toolchain and configuration format+syntax