fieldmeta

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: Apache-2.0 Imports: 6 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"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type FieldMeta

type FieldMeta struct {
	Schema spec.Schema

	Extensions XKustomize
}

FieldMeta contains metadata that may be attached to fields as comments

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

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