Documentation ¶
Index ¶
Constants ¶
View Source
const ( KformAnnotationKeyPrefix = "kform.dev" KformAnnotationKey_BLOCK_TYPE = KformAnnotationKeyPrefix + "/" + "block-type" KformAnnotationKey_RESOURCE_TYPE = KformAnnotationKeyPrefix + "/" + "resource-type" KformAnnotationKey_RESOURCE_ID = KformAnnotationKeyPrefix + "/" + "resource-id" KformAnnotationKey_COUNT = KformAnnotationKeyPrefix + "/" + "count" KformAnnotationKey_FOR_EACH = KformAnnotationKeyPrefix + "/" + "for-each" KformAnnotationKey_DEPENDS_ON = KformAnnotationKeyPrefix + "/" + "depends-on" KformAnnotationKey_DEFAULT = KformAnnotationKeyPrefix + "/" + "default" KformAnnotationKey_SOURCE = KformAnnotationKeyPrefix + "/" + "source" KformAnnotationKey_VERSION = KformAnnotationKeyPrefix + "/" + "version" KformAnnotationKey_DESCRIPTION = KformAnnotationKeyPrefix + "/" + "description" KformAnnotationKey_SENSITIVE = KformAnnotationKeyPrefix + "/" + "sensitive" KformAnnotationKey_LIFECYCLE = KformAnnotationKeyPrefix + "/" + "lifecycle" KformAnnotationKey_PRECONDITION = KformAnnotationKeyPrefix + "/" + "pre-condition" KformAnnotationKey_POSTCONDITION = KformAnnotationKeyPrefix + "/" + "post-condition" KformAnnotationKey_PROVIDERS = KformAnnotationKeyPrefix + "/" + "providers" KformAnnotationKey_PROVIDER = KformAnnotationKeyPrefix + "/" + "provider" KformAnnotationKey_PROVISIONER = KformAnnotationKeyPrefix + "/" + "provisioner" KformAnnotationKey_ORGANIZATION = KformAnnotationKeyPrefix + "/" + "organization" KformAnnotationKey_ALIAS = KformAnnotationKeyPrefix + "/" + "alias" KformAnnotationKey_HOSTNAME = KformAnnotationKeyPrefix + "/" + "hostname" KformAnnotationKey_PATH = KformAnnotationKeyPrefix + "/" + "path" KformAnnotationKey_INDEX = KformAnnotationKeyPrefix + "/" + "index" )
kform attibutes
View Source
const ( Group = "meta.pkg.kform.dev" Version = "v1alpha1" APIVersion = Group + "/" + Version KformFileName = "KformFile.yaml" )
View Source
const ( LoopAttrCount = "count" LoopAttrForEach = "forEach" LoopKeyCount = "count" LoopKeyEach = "each" LoopKeyCountIndex = "count.index" LoopKeyForEachKey = "each.key" LoopKeyForEachVal = "each.value" LoopKeyItemsTotal = "items.total" LoopKeyItemsIndex = "items.index" )
Variables ¶
View Source
var KformAnnotations = []string{ KformAnnotationKey_BLOCK_TYPE, KformAnnotationKey_RESOURCE_TYPE, KformAnnotationKey_RESOURCE_ID, KformAnnotationKey_COUNT, KformAnnotationKey_FOR_EACH, KformAnnotationKey_DEPENDS_ON, KformAnnotationKey_DEFAULT, KformAnnotationKey_SOURCE, KformAnnotationKey_VERSION, KformAnnotationKey_DESCRIPTION, KformAnnotationKey_SENSITIVE, KformAnnotationKey_LIFECYCLE, KformAnnotationKey_PRECONDITION, KformAnnotationKey_POSTCONDITION, KformAnnotationKey_PROVIDERS, KformAnnotationKey_PROVIDER, KformAnnotationKey_PROVISIONER, KformAnnotationKey_ORGANIZATION, KformAnnotationKey_ALIAS, KformAnnotationKey_HOSTNAME, KformAnnotationKey_PATH, KformAnnotationKey_INDEX, }
View Source
var (
KformFileKind = reflect.TypeOf(KformFile{}).Name()
)
View Source
var LocalVars = map[string]struct{}{ LoopKeyCountIndex: {}, LoopKeyForEachKey: {}, LoopKeyForEachVal: {}, }
View Source
var LoopAttr = map[string]*cel.Type{ LoopAttrCount: cel.IntType, LoopAttrForEach: cel.DynType, }
Functions ¶
Types ¶
type Attributes ¶
type Attributes struct { APIVersion string `json:"apiVersion,omitempty" yaml:"apiVersion,omitempty"` Kind string `json:"kind,omitempty" yaml:"kind,omitempty"` ResourceType string `json:"resourceType,omitempty" yaml:"resourceType,omitempty"` // only relevant for resources ResourceID string `json:"resourceID,omitempty" yaml:"resourceID,omitempty"` // only relevant for resources Count string `json:"count,omitempty" yaml:"count,omitempty"` ForEach string `json:"forEach,omitempty" yaml:"forEach,omitempty"` DependsOn string `json:"dependsOn,omitempty" yaml:"dependsOn,omitempty"` Provider string `json:"provider,omitempty" yaml:"provider,omitempty"` Providers map[string]string `json:"providers,omitempty" yaml:"providers,omitempty"` // only relevant for Mixin Description string `json:"description,omitempty" yaml:"description,omitempty"` Sensitive bool `json:"sensitive,omitempty" yaml:"sensitive,omitempty"` Validation string `json:"validation,omitempty" yaml:"validation,omitempty"` LifeCycle string `json:"lifecycle,omitempty" yaml:"lifecycle,omitempty"` PreCondition string `json:"preCondition,omitempty" yaml:"preCondition,omitempty"` PostCondition string `json:"postCondition,omitempty" yaml:"postCondition,omitempty"` Provisioner string `json:"provisioner,omitempty" yaml:"provisioner,omitempty"` Connection string `json:"connection,omitempty" yaml:"connection,omitempty"` HostName string `json:"hostName,omitempty" yaml:"hostName,omitempty"` Organization string `json:"organization,omitempty" yaml:"organization,omitempty"` Workspaces map[string]string `json:"workspaces,omitempty" yaml:"workspaces,omitempty"` Source string `json:"source,omitempty" yaml:"source,omitempty"` Alias string `json:"alias,omitempty" yaml:"alias,omitempty"` InputParameters map[string]any `json:"inputParameters,omitempty" yaml:"inputParameters,omitempty"` // only relevant for Mixin }
type Info ¶
type Info struct { Description string `json:"description,omitempty" yaml:"description,omitempty"` Maintainers []Maintainer `json:"maintainers,omitempty" yaml:"maintainers,omitempty"` }
type KformFile ¶
type KformFile struct { metav1.TypeMeta `json:",inline" yaml:",inline"` metav1.ObjectMeta `json:"metadata,omitempty" yaml:"metadata,omitempty"` Spec KformFileSpec `json:"spec,omitempty" yaml:"spec,omitempty"` }
func BuildKformFile ¶
func BuildKformFile(meta metav1.ObjectMeta, spec KformFileSpec) *KformFile
BuildKformFile returns a KformFile api type
type KformFileSpec ¶
type Maintainer ¶
Click to show internal directories.
Click to hide internal directories.