resources

package
v0.8.5 Latest Latest
Warning

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

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

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

type ResourceKindMapper

type ResourceKindMapper struct {
	RestMapper meta.RESTMapper
}

ResourceKindMapper allows callers to map resources to kinds using apiserver metadata at runtime.

func (*ResourceKindMapper) NamespacedKindFor

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.

func (*ResourceKindMapper) NamespacedKindsForResources

func (m *ResourceKindMapper) NamespacedKindsForResources(resources ...string) ([]schema.GroupVersionKind, error)

NamespacedKindsForResources maps namespaced GRs to GVKs. The format used for GR is "resource.group", i.e. "replicasets.apps".

Jump to

Keyboard shortcuts

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