util

package
v0.34.1 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsOneOfField added in v0.27.0

func IsOneOfField(field reflect.StructField) bool

IsOneOfField checks if a field is tagged with oneOf

Types

type HelmOverrides added in v0.25.0

type HelmOverrides struct {
	Values map[string]interface{} `yaml:",inline"`
}

HelmOverrides is a helper struct to aid with json serialization of map[string]interface{}

func (*HelmOverrides) MarshalJSON added in v0.25.0

func (h *HelmOverrides) MarshalJSON() ([]byte, error)

MarshalJSON implements JSON marshalling by including the value as an inline yaml fragment.

func (*HelmOverrides) UnmarshalJSON added in v0.25.0

func (h *HelmOverrides) UnmarshalJSON(text []byte) error

UnmarshalYAML implements JSON unmarshalling by reading an inline yaml fragment.

type VersionedConfig

type VersionedConfig interface {
	GetVersion() string
	Upgrade() (VersionedConfig, error)
}

type YamlpatchNode added in v0.28.0

type YamlpatchNode struct {
	// node is an arbitrary yaml fragment
	Node yamlpatch.Node
}

YamlpatchNode wraps a `yamlpatch.Node` and makes it serializable to JSON. The yaml serialization needs to be implemented manually, because the node may be an arbitrary yaml fragment so that a field tag `yaml:",inline"` does not work here.

func (*YamlpatchNode) MarshalJSON added in v0.28.0

func (n *YamlpatchNode) MarshalJSON() ([]byte, error)

MarshalJSON implements JSON marshalling by including the value as an inline yaml fragment.

func (*YamlpatchNode) MarshalYAML added in v0.28.0

func (n *YamlpatchNode) MarshalYAML() (interface{}, error)

MarshalYAML implements yaml.Marshaler.

func (*YamlpatchNode) UnmarshalJSON added in v0.28.0

func (n *YamlpatchNode) UnmarshalJSON(text []byte) error

UnmarshalYAML implements JSON unmarshalling by reading an inline yaml fragment.

func (*YamlpatchNode) UnmarshalYAML added in v0.28.0

func (n *YamlpatchNode) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements yaml.Unmarshaler

Jump to

Keyboard shortcuts

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