converter

package
v1.4.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NestedResources added in v0.9.0

func NestedResources(obj interface{}, resource map[string]interface{}, path ...string) ([]map[string]interface{}, bool, error)

NestedResources returns slice of resources of the type specified by obj arg on the given path inside the given resource represented by a map Additionally the function gives an indication if specified resource is found or error if the found slice does not contain resources of the given type

func ToUnstructured

func ToUnstructured(obj interface{}) (*unstructured.Unstructured, error)

ToUnstructured converts a runtime object into Unstructured, and can return errors related to it.

func ToUnstructuredAsGVK

func ToUnstructuredAsGVK(
	obj interface{},
	gvk schema.GroupVersionKind,
) (*unstructured.Unstructured, error)

ToUnstructuredAsGVK converts a runtime object into Unstructured, and set as given GVK. It can return errors related to conversion.

Types

This section is empty.

Jump to

Keyboard shortcuts

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