object

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Field indicates that the content of this path element is a field's name
	Field = "f"

	// Value indicates that the content of this path element is a field's value
	Value = "v"

	// Index indicates that the content of this path element is an index in an array
	Index = "i"

	// Key indicates that the content of this path element is a key value map
	Key = "k"

	// Separator separates the type of a path element from the contents
	Separator = ":"
)

Variables

This section is empty.

Functions

func AppendItem added in v0.0.11

func AppendItem(v reflect.Value, obj runtime.Object)

func DeleteFinalizer added in v0.0.7

func DeleteFinalizer(u *unstructured.Unstructured, finalizerStr string)

func EmptyCondition

func EmptyCondition(conditionType string) map[string]any

func EnsureDir

func EnsureDir(dirname string) error

func Equal

func Equal(cond1, cond2 map[string]any) bool

Equal returns true if the condition is identical to the supplied condition, ignoring the LastTransitionTime.

func Exists

func Exists(filepath string) bool

func GetCondition

func GetCondition(obj map[string]interface{}, conditionType string) map[string]any

func GetConditions

func GetConditions(status map[string]any) []any

func GetFileName

func GetFileName(filename string) ([]byte, error)

func GetGeneration

func GetGeneration(ru runtime.Unstructured) int64

func GetListPrt added in v0.0.11

func GetListPrt(listObj runtime.Object) (reflect.Value, error)

func GetObjectRefFromOwnerRef

func GetObjectRefFromOwnerRef(ownref metav1.OwnerReference) corev1.ObjectReference

func GetObjectRefFromUnstructured

func GetObjectRefFromUnstructured(u *unstructured.Unstructured) corev1.ObjectReference

func GetStatus

func GetStatus(obj map[string]any) map[string]any

func GetUnstructructered

func GetUnstructructered(obj runtime.Object) (runtime.Unstructured, error)

func GetUnstructured

func GetUnstructured(b []byte) (*unstructured.Unstructured, error)

func GetUnstructuredContent

func GetUnstructuredContent(b []byte, ct ContentType) (*unstructured.Unstructured, error)

func GetUnstructuredFromFile

func GetUnstructuredFromFile(filename string) (*unstructured.Unstructured, error)

func GetUnstructuredList

func GetUnstructuredList(b []byte) (*unstructured.UnstructuredList, error)

func GetUnstructuredListContent

func GetUnstructuredListContent(b []byte, ct ContentType) (*unstructured.UnstructuredList, error)

func IsConditionTypeReady

func IsConditionTypeReady(obj map[string]interface{}, conditionType string) bool

func IsManagedBy

func IsManagedBy(mfields []metav1.ManagedFieldsEntry, fieldManager string) bool

func Marshal

func Marshal(u *unstructured.Unstructured) ([]byte, error)

func NewCondition

func NewCondition(conditionType, msg string) map[string]any

func NewPathElement added in v0.0.7

func NewPathElement(s string) (fieldpath.PathElement, error)

NewPathElement parses a serialized path element

func PruneUnmanagedFields added in v0.0.7

func PruneUnmanagedFields(obj runtime.Unstructured, reconcilerName string)

func RemoveManagedFieldsFromUnstructured added in v0.0.11

func RemoveManagedFieldsFromUnstructured(ctx context.Context, obj runtime.Unstructured)

func RemoveResourceVersionAndGenerationFromUnstructured added in v0.0.11

func RemoveResourceVersionAndGenerationFromUnstructured(ctx context.Context, obj runtime.Unstructured)

func SetCondition

func SetCondition(obj map[string]interface{}, conditionType, msg string)

SetCondition updates the condition; when msg is an empty string the condition is interpreted as ready, otherwise failed

func SetFinalizer added in v0.0.7

func SetFinalizer(u *unstructured.Unstructured, finalizerStr string)

Types

type ContentType

type ContentType string
const (
	ContentTypeYAML ContentType = "yaml"
	ContentTypeJSON ContentType = "json"
)

Jump to

Keyboard shortcuts

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