unstructured

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const PathSeparator = "/"

Variables

This section is empty.

Functions

This section is empty.

Types

type Unstructured

type Unstructured map[string]interface{}

Unstructured is a map[string]interface{} that can be used to represent unstructured JSON content. This type is a simplified version of the Unstructured type from package "k8s.io/apimachinery/pkg/apis/meta/v1/unstructured". +kubebuilder:validation:Type=object

func (*Unstructured) DeepCopy

func (in *Unstructured) DeepCopy() *Unstructured

func (*Unstructured) DeepCopyInto

func (in *Unstructured) DeepCopyInto(out *Unstructured)

func (*Unstructured) Get

func (in *Unstructured) Get(path string) (interface{}, bool)

Get returns the value at the given path and a boolean indicating whether the path exists. Path segments should be separated by slashes, as in: foo/bar/qix. If this method is invoked on a nil receiver, nil and false is returned. If the map is nil, or if the path does not exist, nil and false is returned.

func (*Unstructured) MarshalJSON

func (in *Unstructured) MarshalJSON() ([]byte, error)

func (*Unstructured) Put

func (in *Unstructured) Put(path string, v interface{})

Put puts the value at the given path. Path segments should be separated by slashes, as in: foo/bar/qix. If this method is invoked on a nil receiver, it is a noop. If the map is nil, or if any intermediary key does not exist, it is instantiated.

func (*Unstructured) PutAll

func (in *Unstructured) PutAll(m map[string]interface{})

PutAll puts the given map in this map, recursively. If this method is invoked on a nil receiver, it is a noop. If the map is nil, or if any intermediary key does not exist, it is instantiated.

func (*Unstructured) PutIfAbsent

func (in *Unstructured) PutIfAbsent(path string, v interface{})

PutIfAbsent puts the value at the given path, if and only if the path does not exist, or exists but holds a nil value. Path segments should be separated by slashes, as in: foo/bar/qix. If this method is invoked on a nil receiver, it is a noop. If the map is nil, or if any intermediary key does not exist, it is instantiated.

func (*Unstructured) UnmarshalJSON

func (in *Unstructured) UnmarshalJSON(b []byte) error

Jump to

Keyboard shortcuts

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