Documentation
¶
Index ¶
- Constants
- Variables
- func FileExtensionForToolchain(toolchain ToolchainType) string
- func IsAppConfigToolchain(toolchain ToolchainType) bool
- func IsSupportedProvider(provider ProviderType) bool
- func IsValidProviderType(provider ProviderType) bool
- type ActionResultBaseMeta
- type ActionResultType
- type ActionStatusType
- type ActionType
- type ProviderType
- type ToolchainType
Constants ¶
const MaxProviderTypeLength = 128
Max length for 3P providers
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 ProviderNone, but they may be given a Provider and released like any other Unit.
var SupportedProviders = map[ProviderType]bool{ ProviderConfigHub: true, ProviderOCI: true, ProviderNone: true, }
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.
func IsSupportedProvider ¶ added in v0.9.16
func IsSupportedProvider(provider ProviderType) bool
func IsValidProviderType ¶ added in v0.9.16
func IsValidProviderType(provider ProviderType) bool
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 ProviderType ¶ added in v0.9.16
type ProviderType string
ProviderType says whether and how a Unit is delivered.
const ( // ProviderConfigHub marks configuration that ConfigHub applies to itself, such as the // ConfigHub/YAML Unit that holds an entity's configuration. ProviderConfigHub ProviderType = "ConfigHub" // ProviderOCI publishes Unit data verbatim in its Space's Releases, which a puller // (e.g. Argo CD or Flux) consumes from ConfigHub's OCI registry. ProviderOCI ProviderType = "OCI" // ProviderNone is used to express the Unit is not in use in a Release // or to be applied ProviderNone ProviderType = "None" )
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