metautils

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: Apache-2.0 Imports: 6 Imported by: 15

Documentation

Overview

Package metautils provides utilities to work with objects on the meta layer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertAndSetList

func ConvertAndSetList(scheme *runtime.Scheme, list runtime.Object, objs []runtime.Object) error

ConvertAndSetList converts the given runtime.Objects into the item type of the list and sets the list items to be the converted items.

func GVKForList

func GVKForList(scheme *runtime.Scheme, list runtime.Object) (schema.GroupVersionKind, error)

GVKForList determines the schema.GroupVersionKind for the given list. Effectively, this strips a 'List' suffix from the kind, if it exists.

func ListElementType

func ListElementType(list runtime.Object) (reflect.Type, error)

ListElementType returns the element type of the list. For instance, for an appsv1.DeploymentList, the element type is appsv1.Deployment.

Types

This section is empty.

Jump to

Keyboard shortcuts

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