Documentation ¶
Index ¶
- func CopyMergeStrMap(a map[string]string, b map[string]string) map[string]string
- func CopyUnstructured(u *unstructured.Unstructured) *unstructured.Unstructured
- func GetChild(parent interface{}, key interface{}) (interface{}, bool, error)
- func KeyListToJsonPath(keys []interface{}) string
- func MergeMap(a, b map[string]interface{})
- func MergeStrMap(a map[string]string, b map[string]string)
- func SetChild(parent interface{}, key interface{}, value interface{}) error
- type MyJsonPath
- func (j *MyJsonPath) Del(o interface{}) error
- func (j *MyJsonPath) Get(o interface{}) []interface{}
- func (j *MyJsonPath) GetFirst(o interface{}) (interface{}, bool)
- func (j *MyJsonPath) GetFirstListOfMaps(o interface{}) ([]map[string]interface{}, bool, error)
- func (j *MyJsonPath) GetFirstMap(o interface{}) (map[string]interface{}, bool, error)
- func (j *MyJsonPath) ListMatchingFields(o *UnstructuredObject) ([][]interface{}, error)
- type ObjectIterator
- func (it *ObjectIterator) IterateLeafs(cb ObjectIteratorFunc) error
- func (it *ObjectIterator) JsonPath() string
- func (it *ObjectIterator) Key() interface{}
- func (it *ObjectIterator) KeyPath() []interface{}
- func (it *ObjectIterator) Parent() interface{}
- func (it *ObjectIterator) SetValue(v interface{}) error
- func (it *ObjectIterator) Value() interface{}
- type ObjectIteratorFunc
- type UnstructuredObject
- func FromFile(p string) (*UnstructuredObject, error)
- func FromMap(o map[string]interface{}) *UnstructuredObject
- func FromString(s string) (*UnstructuredObject, error)
- func FromStringMulti(s string) ([]*UnstructuredObject, error)
- func FromStringMust(s string) *UnstructuredObject
- func FromStruct(o interface{}) (*UnstructuredObject, error)
- func FromUnstructured(u *unstructured.Unstructured) *UnstructuredObject
- func New() *UnstructuredObject
- func (uo *UnstructuredObject) Clear()
- func (uo *UnstructuredObject) Clone() *UnstructuredObject
- func (uo *UnstructuredObject) GetK8sAnnotation(name string) *string
- func (uo *UnstructuredObject) GetK8sAnnotations() map[string]string
- func (uo *UnstructuredObject) GetK8sAnnotationsWithRegex(r interface{}) map[string]string
- func (uo *UnstructuredObject) GetK8sCreationTime() time.Time
- func (uo *UnstructuredObject) GetK8sGVK() schema.GroupVersionKind
- func (uo *UnstructuredObject) GetK8sLabel(name string) *string
- func (uo *UnstructuredObject) GetK8sLabels() map[string]string
- func (uo *UnstructuredObject) GetK8sLabelsWithRegex(r interface{}) map[string]string
- func (uo *UnstructuredObject) GetK8sManagedFields() []metav1.ManagedFieldsEntry
- func (uo *UnstructuredObject) GetK8sName() string
- func (uo *UnstructuredObject) GetK8sNamespace() string
- func (uo *UnstructuredObject) GetK8sOwnerReferences() []*UnstructuredObject
- func (uo *UnstructuredObject) GetK8sRef() k8s.ObjectRef
- func (uo *UnstructuredObject) GetK8sResourceVersion() string
- func (uo *UnstructuredObject) GetNestedField(keys ...interface{}) (interface{}, bool, error)
- func (uo *UnstructuredObject) GetNestedInt(keys ...interface{}) (int64, bool, error)
- func (uo *UnstructuredObject) GetNestedList(keys ...interface{}) ([]interface{}, bool, error)
- func (uo *UnstructuredObject) GetNestedObject(keys ...interface{}) (*UnstructuredObject, bool, error)
- func (uo *UnstructuredObject) GetNestedObjectList(keys ...interface{}) ([]*UnstructuredObject, bool, error)
- func (uo *UnstructuredObject) GetNestedObjectListNoErr(keys ...interface{}) []*UnstructuredObject
- func (uo *UnstructuredObject) GetNestedString(keys ...interface{}) (string, bool, error)
- func (uo *UnstructuredObject) GetNestedStringList(keys ...interface{}) ([]string, bool, error)
- func (uo *UnstructuredObject) GetNestedStringMapCopy(keys ...interface{}) (map[string]string, bool, error)
- func (uo *UnstructuredObject) IsZero() bool
- func (uo *UnstructuredObject) MarshalYAML() (interface{}, error)
- func (uo *UnstructuredObject) Merge(other *UnstructuredObject)
- func (uo *UnstructuredObject) MergeChild(child string, other *UnstructuredObject)
- func (uo *UnstructuredObject) MergeCopy(other *UnstructuredObject) *UnstructuredObject
- func (uo *UnstructuredObject) NewIterator() *ObjectIterator
- func (uo *UnstructuredObject) RemoveNestedField(keys ...interface{}) error
- func (uo *UnstructuredObject) ReplaceKeys(oldKey string, newKey string) error
- func (uo *UnstructuredObject) ReplaceValues(oldValue interface{}, newValue interface{}) error
- func (uo *UnstructuredObject) SetK8sAnnotation(name string, value string)
- func (uo *UnstructuredObject) SetK8sAnnotations(annotations map[string]string)
- func (uo *UnstructuredObject) SetK8sGVK(gvk schema.GroupVersionKind)
- func (uo *UnstructuredObject) SetK8sGVKs(g string, v string, k string)
- func (uo *UnstructuredObject) SetK8sLabel(name string, value string)
- func (uo *UnstructuredObject) SetK8sLabels(labels map[string]string)
- func (uo *UnstructuredObject) SetK8sName(name string)
- func (uo *UnstructuredObject) SetK8sNamespace(namespace string)
- func (uo *UnstructuredObject) SetK8sResourceVersion(rv string)
- func (uo *UnstructuredObject) SetNestedField(value interface{}, keys ...interface{}) error
- func (uo *UnstructuredObject) SetNestedFieldDefault(defaultValue interface{}, keys ...interface{}) error
- func (uo *UnstructuredObject) SetNestedObjectList(items []*UnstructuredObject, keys ...interface{}) error
- func (uo *UnstructuredObject) ToStruct(out interface{}) error
- func (uo *UnstructuredObject) ToUnstructured() *unstructured.Unstructured
- func (uo *UnstructuredObject) UnmarshalYAML(unmarshal func(interface{}) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CopyMergeStrMap ¶
func CopyUnstructured ¶
func CopyUnstructured(u *unstructured.Unstructured) *unstructured.Unstructured
func KeyListToJsonPath ¶
func KeyListToJsonPath(keys []interface{}) string
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 FromUnstructured ¶
func FromUnstructured(u *unstructured.Unstructured) *UnstructuredObject
func New ¶
func New() *UnstructuredObject
func (*UnstructuredObject) Clear ¶
func (uo *UnstructuredObject) Clear()
func (*UnstructuredObject) Clone ¶
func (uo *UnstructuredObject) Clone() *UnstructuredObject
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 (uo *UnstructuredObject) MergeCopy(other *UnstructuredObject) *UnstructuredObject
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
Click to show internal directories.
Click to hide internal directories.