fieldmeta

package
v0.10.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2021 License: Apache-2.0 Imports: 9 Imported by: 8

Documentation

Index

Constants

View Source
const (
	// String defines a string flag
	String FieldValueType = "string"
	// Bool defines a bool flag
	Bool = "boolean"
	// Int defines an int flag
	Int = "integer"
)
View Source
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/"
)

Variables

This section is empty.

Functions

func SetShortHandRef added in v0.1.13

func SetShortHandRef(ref string)

func ShortHandRef added in v0.1.13

func ShortHandRef() string

Types

type FieldMeta

type FieldMeta struct {
	Schema spec.Schema

	Extensions XKustomize

	SettersSchema *spec.Schema
}

FieldMeta contains metadata that may be attached to fields as comments

func (*FieldMeta) IsEmpty added in v0.1.1

func (fm *FieldMeta) IsEmpty() bool

IsEmpty returns true if the FieldMeta has any empty Schema

func (*FieldMeta) Read

func (fm *FieldMeta) Read(n *yaml.RNode) error

Read reads the FieldMeta from a node

func (*FieldMeta) Write

func (fm *FieldMeta) Write(n *yaml.RNode) error

Write writes the FieldMeta to a node

func (*FieldMeta) WriteV1Setters added in v0.4.2

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

type FieldValueType

type FieldValueType string

FieldValueType defines the type of input to register

func (FieldValueType) String

func (it FieldValueType) String() string

func (FieldValueType) Tag

func (it FieldValueType) Tag() string

func (FieldValueType) TagForValue

func (it FieldValueType) TagForValue(value string) string

func (FieldValueType) Validate

func (it FieldValueType) Validate(value string) error

type PartialFieldSetter added in v0.0.4

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"`
}

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 XKustomize added in v0.0.4

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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL