apimeta

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsNotNamespacedError

func IsNotNamespacedError(err error) bool

Types

type GroupKindMapper

type GroupKindMapper struct {
	RestMapper meta.RESTMapper
}

GroupKindMapper allows callers to map resources to kinds using apiserver metadata at runtime

func NewGroupKindMapper

func NewGroupKindMapper(c *rest.Config) (*GroupKindMapper, error)

func (*GroupKindMapper) NamespacedKindFor

func (r *GroupKindMapper) NamespacedKindFor(gr schema.GroupResource) (schema.GroupVersionKind, error)

NamespacedKindFor maps namespaced GR to GVK by using a DynamicRESTMapper to discover resource types at runtime. Will return an error if the resource isn't namespaced.

type NotNamespacedError

type NotNamespacedError struct {
	GroupResource schema.GroupResource
}

NotNamespacedError is returned if the mapper can find the resource, but it is not namespaced.

func (*NotNamespacedError) Error

func (e *NotNamespacedError) Error() string

Jump to

Keyboard shortcuts

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