uo

package
v1.28.2-0...-a3f5403 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyMergeStrMap

func CopyMergeStrMap(a map[string]string, b map[string]string) map[string]string

func GetChild

func GetChild(parent interface{}, key interface{}) (interface{}, bool, error)

func KeyListToJsonPath

func KeyListToJsonPath(keys []interface{}) string

func MergeMap

func MergeMap(a, b map[string]interface{})

func MergeStrMap

func MergeStrMap(a map[string]string, b map[string]string)

func SetChild

func SetChild(parent interface{}, key interface{}, value interface{}) error

Types

type MyJsonPath

type MyJsonPath struct {
	// contains filtered or unexported fields
}

func NewMyJsonPath

func NewMyJsonPath(p string) (*MyJsonPath, error)

func NewMyJsonPathMust

func NewMyJsonPathMust(p string) *MyJsonPath

func (*MyJsonPath) Del

func (j *MyJsonPath) Del(o interface{}) error

func (*MyJsonPath) Get

func (j *MyJsonPath) Get(o interface{}) []interface{}

func (*MyJsonPath) GetFirst

func (j *MyJsonPath) GetFirst(o interface{}) (interface{}, bool)

func (*MyJsonPath) GetFirstListOfMaps

func (j *MyJsonPath) GetFirstListOfMaps(o interface{}) ([]map[string]interface{}, bool, error)

func (*MyJsonPath) GetFirstMap

func (j *MyJsonPath) GetFirstMap(o interface{}) (map[string]interface{}, bool, error)

func (*MyJsonPath) ListMatchingFields

func (j *MyJsonPath) ListMatchingFields(o *UnstructuredObject) ([][]interface{}, error)

type ObjectIterator

type ObjectIterator struct {
	// contains filtered or unexported fields
}

func NewObjectIterator

func NewObjectIterator(o map[string]interface{}) *ObjectIterator

func (*ObjectIterator) IterateLeafs

func (it *ObjectIterator) IterateLeafs(cb ObjectIteratorFunc) error

func (*ObjectIterator) JsonPath

func (it *ObjectIterator) JsonPath() string

func (*ObjectIterator) Key

func (it *ObjectIterator) Key() interface{}

func (*ObjectIterator) KeyPath

func (it *ObjectIterator) KeyPath() []interface{}

func (*ObjectIterator) Parent

func (it *ObjectIterator) Parent() interface{}

func (*ObjectIterator) SetValue

func (it *ObjectIterator) SetValue(v interface{}) error

func (*ObjectIterator) Value

func (it *ObjectIterator) Value() interface{}

type ObjectIteratorFunc

type ObjectIteratorFunc func(it *ObjectIterator) error

type UnstructuredObject

type UnstructuredObject struct {
	Object map[string]interface{} `yaml:"object,omitempty,inline"`
}

func FromFile

func FromFile(p string) (*UnstructuredObject, error)

func FromMap

func FromMap(o map[string]interface{}) *UnstructuredObject

func FromString

func FromString(s string) (*UnstructuredObject, error)

func FromStringMulti

func FromStringMulti(s string) ([]*UnstructuredObject, error)

func FromStringMust

func FromStringMust(s string) *UnstructuredObject

func FromStruct

func FromStruct(o interface{}) (*UnstructuredObject, error)

func New

func New() *UnstructuredObject

func (*UnstructuredObject) Clear

func (uo *UnstructuredObject) Clear()

func (*UnstructuredObject) Clone

func (*UnstructuredObject) GetK8sAnnotation

func (uo *UnstructuredObject) GetK8sAnnotation(name string) *string

func (*UnstructuredObject) GetK8sAnnotations

func (uo *UnstructuredObject) GetK8sAnnotations() map[string]string

func (*UnstructuredObject) GetK8sAnnotationsWithRegex

func (uo *UnstructuredObject) GetK8sAnnotationsWithRegex(r interface{}) map[string]string

func (*UnstructuredObject) GetK8sCreationTime

func (uo *UnstructuredObject) GetK8sCreationTime() time.Time

func (*UnstructuredObject) GetK8sGVK

func (uo *UnstructuredObject) GetK8sGVK() schema.GroupVersionKind

func (*UnstructuredObject) GetK8sLabel

func (uo *UnstructuredObject) GetK8sLabel(name string) *string

func (*UnstructuredObject) GetK8sLabels

func (uo *UnstructuredObject) GetK8sLabels() map[string]string

func (*UnstructuredObject) GetK8sLabelsWithRegex

func (uo *UnstructuredObject) GetK8sLabelsWithRegex(r interface{}) map[string]string

func (*UnstructuredObject) GetK8sManagedFields

func (uo *UnstructuredObject) GetK8sManagedFields() []metav1.ManagedFieldsEntry

func (*UnstructuredObject) GetK8sName

func (uo *UnstructuredObject) GetK8sName() string

func (*UnstructuredObject) GetK8sNamespace

func (uo *UnstructuredObject) GetK8sNamespace() string

func (*UnstructuredObject) GetK8sOwnerReferences

func (uo *UnstructuredObject) GetK8sOwnerReferences() []*UnstructuredObject

func (*UnstructuredObject) GetK8sRef

func (uo *UnstructuredObject) GetK8sRef() k8s.ObjectRef

func (*UnstructuredObject) GetK8sResourceVersion

func (uo *UnstructuredObject) GetK8sResourceVersion() string

func (*UnstructuredObject) GetNestedField

func (uo *UnstructuredObject) GetNestedField(keys ...interface{}) (interface{}, bool, error)

func (*UnstructuredObject) GetNestedInt

func (uo *UnstructuredObject) GetNestedInt(keys ...interface{}) (int64, bool, error)

func (*UnstructuredObject) GetNestedList

func (uo *UnstructuredObject) GetNestedList(keys ...interface{}) ([]interface{}, bool, error)

func (*UnstructuredObject) GetNestedObject

func (uo *UnstructuredObject) GetNestedObject(keys ...interface{}) (*UnstructuredObject, bool, error)

func (*UnstructuredObject) GetNestedObjectList

func (uo *UnstructuredObject) GetNestedObjectList(keys ...interface{}) ([]*UnstructuredObject, bool, error)

func (*UnstructuredObject) GetNestedObjectListNoErr

func (uo *UnstructuredObject) GetNestedObjectListNoErr(keys ...interface{}) []*UnstructuredObject

func (*UnstructuredObject) GetNestedString

func (uo *UnstructuredObject) GetNestedString(keys ...interface{}) (string, bool, error)

func (*UnstructuredObject) GetNestedStringList

func (uo *UnstructuredObject) GetNestedStringList(keys ...interface{}) ([]string, bool, error)

func (*UnstructuredObject) GetNestedStringMapCopy

func (uo *UnstructuredObject) GetNestedStringMapCopy(keys ...interface{}) (map[string]string, bool, error)

func (*UnstructuredObject) IsZero

func (uo *UnstructuredObject) IsZero() bool

func (*UnstructuredObject) MarshalYAML

func (uo *UnstructuredObject) MarshalYAML() (interface{}, error)

func (*UnstructuredObject) Merge

func (uo *UnstructuredObject) Merge(other *UnstructuredObject)

func (*UnstructuredObject) MergeChild

func (uo *UnstructuredObject) MergeChild(child string, other *UnstructuredObject)

func (*UnstructuredObject) MergeCopy

func (*UnstructuredObject) NewIterator

func (uo *UnstructuredObject) NewIterator() *ObjectIterator

func (*UnstructuredObject) RemoveNestedField

func (uo *UnstructuredObject) RemoveNestedField(keys ...interface{}) error

func (*UnstructuredObject) ReplaceKeys

func (uo *UnstructuredObject) ReplaceKeys(oldKey string, newKey string) error

func (*UnstructuredObject) ReplaceValues

func (uo *UnstructuredObject) ReplaceValues(oldValue interface{}, newValue interface{}) error

func (*UnstructuredObject) SetK8sAnnotation

func (uo *UnstructuredObject) SetK8sAnnotation(name string, value string)

func (*UnstructuredObject) SetK8sAnnotations

func (uo *UnstructuredObject) SetK8sAnnotations(annotations map[string]string)

func (*UnstructuredObject) SetK8sGVK

func (uo *UnstructuredObject) SetK8sGVK(gvk schema.GroupVersionKind)

func (*UnstructuredObject) SetK8sGVKs

func (uo *UnstructuredObject) SetK8sGVKs(g string, v string, k string)

func (*UnstructuredObject) SetK8sLabel

func (uo *UnstructuredObject) SetK8sLabel(name string, value string)

func (*UnstructuredObject) SetK8sLabels

func (uo *UnstructuredObject) SetK8sLabels(labels map[string]string)

func (*UnstructuredObject) SetK8sName

func (uo *UnstructuredObject) SetK8sName(name string)

func (*UnstructuredObject) SetK8sNamespace

func (uo *UnstructuredObject) SetK8sNamespace(namespace string)

func (*UnstructuredObject) SetK8sResourceVersion

func (uo *UnstructuredObject) SetK8sResourceVersion(rv string)

func (*UnstructuredObject) SetNestedField

func (uo *UnstructuredObject) SetNestedField(value interface{}, keys ...interface{}) error

func (*UnstructuredObject) SetNestedFieldDefault

func (uo *UnstructuredObject) SetNestedFieldDefault(defaultValue interface{}, keys ...interface{}) error

func (*UnstructuredObject) SetNestedObjectList

func (uo *UnstructuredObject) SetNestedObjectList(items []*UnstructuredObject, keys ...interface{}) error

func (*UnstructuredObject) ToStruct

func (uo *UnstructuredObject) ToStruct(out interface{}) error

func (*UnstructuredObject) ToUnstructured

func (uo *UnstructuredObject) ToUnstructured() *unstructured.Unstructured

func (*UnstructuredObject) UnmarshalYAML

func (uo *UnstructuredObject) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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