dynamicutils

package
v2.11.26 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckCondtions

CheckCondtions returns the followings state table: * If all are True, then it returns True. * If all are True or Unknown, then it returns Unknown. * If any are False, then it returns False.

func NewUnstructured

func NewUnstructured(m map[string]interface{}) *unstructured.Unstructured

NewUnstructured returns an Unstructured object that is populated by a map of fields with their associated values. Each field should be separated by periods. So for example, if we wanted to create this struct:

{

"metadata": {
  "generation": 101,
},
"status": {
  "observedGeneration": 99
}

}

This would be expressed with: map[string]interface{} {

"metadata.generation": 101,
"status.observedGeneration": 99,

}

func SetNestedFieldNoCopy

func SetNestedFieldNoCopy(obj map[string]interface{}, value interface{}, fields ...string) error

SetNestedFieldNoCopy is shameless copied from https://github.com/kubernetes/kubernetes/blob/v1.14.10/staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/unstructured/helpers.go

Types

This section is empty.

Jump to

Keyboard shortcuts

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