dynamic

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigFor

func ConfigFor(inConfig *rest.Config) *rest.Config

ConfigFor returns a copy of the provided config with the appropriate dynamic client defaults set.

func LegacyAPIPathResolverFunc

func LegacyAPIPathResolverFunc(kind schema.GroupVersionKind) string

LegacyAPIPathResolverFunc can resolve paths properly with the legacy API.

Types

type APIPathResolverFunc

type APIPathResolverFunc func(kind schema.GroupVersionKind) string

APIPathResolverFunc knows how to convert a groupVersion to its API path. The Kind field is optional.

type Interface

type Interface interface {
	Resource(resource schema.GroupVersionResource) NamespaceableResourceInterface
}

this dynimic client interface is inspired by k8s.io/client-go/dynamic.Interface

func NewForConfig

func NewForConfig(inConfig *rest.Config) (Interface, error)

NewForConfig creates a new dynamic client or returns an error.

func NewForConfigOrDie

func NewForConfigOrDie(c *rest.Config) Interface

NewForConfigOrDie creates a new Interface for the given config and panics if there is an error in the config.

type NamespaceableResourceInterface

type NamespaceableResourceInterface interface {
	Namespace(string) ResourceInterface
	ResourceInterface
}

type ResourceInterface

type ResourceInterface interface {
	Create(ctx context.Context, obj *unstructured.Unstructured, options metav1.CreateOptions, subresources ...string) (*unstructured.Unstructured, error)
	Update(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions, subresources ...string) (*unstructured.Unstructured, bool, error)
	UpdateStatus(ctx context.Context, obj *unstructured.Unstructured, options metav1.UpdateOptions) (*unstructured.Unstructured, error)
	Delete(ctx context.Context, name string, options metav1.DeleteOptions, subresources ...string) (*unstructured.Unstructured, bool, error)
	DeleteCollection(ctx context.Context, options metav1.DeleteOptions, listOptions metav1.ListOptions) (*unstructured.UnstructuredList, error)
	Get(ctx context.Context, name string, options metav1.GetOptions, subresources ...string) (*unstructured.Unstructured, error)
	List(ctx context.Context, opts metav1.ListOptions) (*unstructured.UnstructuredList, error)
	Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error)
	Patch(ctx context.Context, name string, pt types.PatchType, data []byte, options metav1.PatchOptions, subresources ...string) (*unstructured.Unstructured, bool, error)
}

Jump to

Keyboard shortcuts

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