const ( // String defines a string flag String FieldValueType = "string" // Bool defines a bool flag Bool = "boolean" // Int defines an int flag Int = "integer" )
const ( // CLIDefinitionsPrefix is the prefix for cli definition keys. CLIDefinitionsPrefix = "io.k8s.cli." // SetterDefinitionPrefix is the prefix for setter definition keys. SetterDefinitionPrefix = CLIDefinitionsPrefix + "setters." // SubstitutionDefinitionPrefix is the prefix for substitution definition keys. SubstitutionDefinitionPrefix = CLIDefinitionsPrefix + "substitutions." // DefinitionsPrefix is the prefix used to reference definitions in the OpenAPI DefinitionsPrefix = "#/definitions/" )
func SetShortHandRef(ref string)
func ShortHandRef() string
FieldMeta contains metadata that may be attached to fields as comments
type FieldMeta struct { Schema spec.Schema Extensions XKustomize SettersSchema *spec.Schema }
func (fm *FieldMeta) IsEmpty() bool
IsEmpty returns true if the FieldMeta has any empty Schema
func (fm *FieldMeta) Read(n *yaml.RNode) error
Read reads the FieldMeta from a node
func (fm *FieldMeta) Write(n *yaml.RNode) error
Write writes the FieldMeta to a node
func (fm *FieldMeta) WriteV1Setters(n *yaml.RNode) error
WriteV1Setters is the v1 setters way of writing setter definitions TODO: pmarupaka - remove this method after migration
FieldValueType defines the type of input to register
type FieldValueType string
func (it FieldValueType) String() string
func (it FieldValueType) Tag() string
func (it FieldValueType) TagForValue(value string) string
func (it FieldValueType) Validate(value string) error
PartialFieldSetter defines how to set part of a field rather than the full field value. e.g. the tag part of an image field
type PartialFieldSetter struct { // Name is the name of this setter. Name string `yaml:"name" json:"name"` // Value is the current value that has been set. Value string `yaml:"value" json:"value"` }
type XKustomize struct { SetBy string `yaml:"setBy,omitempty" json:"setBy,omitempty"` PartialFieldSetters []PartialFieldSetter `yaml:"partialSetters,omitempty" json:"partialSetters,omitempty"` FieldSetter *PartialFieldSetter `yaml:"setter,omitempty" json:"setter,omitempty"` }