Documentation ¶
Index ¶
- Constants
- Variables
- func BuildObjects(tmplSpec cosmov1alpha1.TemplateSpec, inst cosmov1alpha1.InstanceObject) (objects []unstructured.Unstructured, err error)
- func FixupTemplateVarKey(key string) string
- func GetTemplateType(l LabelHolder) (string, bool)
- func IsDisableNamePrefix(tmpl cosmov1alpha1.TemplateObject) bool
- func IsSkipValidation(tmpl cosmov1alpha1.TemplateObject) bool
- func SetTemplateType(l LabelHolder, tmplType string)
- func StringToUnstructured(str string) (*schema.GroupVersionKind, *unstructured.Unstructured, error)
- func UnstructuredToJSONBytes(obj *unstructured.Unstructured) ([]byte, error)
- func ValidCustomVars(varString string) error
- type Builder
- type LabelHolder
- type RawYAMLBuilder
Constants ¶
View Source
const ( DefaultVarsInstance = "{{INSTANCE}}" DefaultVarsNamespace = "{{NAMESPACE}}" DefaultVarsTemplate = "{{TEMPLATE}}" )
Variables ¶
View Source
var (
ErrInvalidVars = errors.New("invalid Vars string")
)
Functions ¶
func BuildObjects ¶ added in v0.5.0
func BuildObjects(tmplSpec cosmov1alpha1.TemplateSpec, inst cosmov1alpha1.InstanceObject) (objects []unstructured.Unstructured, err error)
func FixupTemplateVarKey ¶
func GetTemplateType ¶
func GetTemplateType(l LabelHolder) (string, bool)
func IsDisableNamePrefix ¶ added in v0.5.0
func IsDisableNamePrefix(tmpl cosmov1alpha1.TemplateObject) bool
func IsSkipValidation ¶ added in v0.5.0
func IsSkipValidation(tmpl cosmov1alpha1.TemplateObject) bool
func SetTemplateType ¶
func SetTemplateType(l LabelHolder, tmplType string)
func StringToUnstructured ¶
func StringToUnstructured(str string) (*schema.GroupVersionKind, *unstructured.Unstructured, error)
func UnstructuredToJSONBytes ¶
func UnstructuredToJSONBytes(obj *unstructured.Unstructured) ([]byte, error)
func ValidCustomVars ¶
Types ¶
type Builder ¶ added in v0.5.0
type Builder interface {
Build() ([]unstructured.Unstructured, error)
}
type LabelHolder ¶
type RawYAMLBuilder ¶ added in v0.5.0
type RawYAMLBuilder struct {
// contains filtered or unexported fields
}
func NewRawYAMLBuilder ¶ added in v0.5.0
func NewRawYAMLBuilder(rawYaml string, inst cosmov1alpha1.InstanceObject) *RawYAMLBuilder
func (*RawYAMLBuilder) Build ¶ added in v0.5.0
func (t *RawYAMLBuilder) Build() ([]unstructured.Unstructured, error)
func (*RawYAMLBuilder) ReplaceCustomVars ¶ added in v0.5.0
func (t *RawYAMLBuilder) ReplaceCustomVars() *RawYAMLBuilder
func (*RawYAMLBuilder) ReplaceDefaultVars ¶ added in v0.5.0
func (t *RawYAMLBuilder) ReplaceDefaultVars() *RawYAMLBuilder
Click to show internal directories.
Click to hide internal directories.