resource

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RESTMapper

type RESTMapper struct {
	// contains filtered or unexported fields
}

func NewRESTMapper

func NewRESTMapper(cachedDiscoveryClient discovery.CachedDiscoveryInterface) *RESTMapper

NewForConfig creates a new restmapper or returns an error.

type Resource

type Resource struct {
	ResourceId

	// Optional, this is the most recent value returned by the server if available. It will
	// typically be in unstructured or internal forms, depending on how the Builder was
	// defined. If retrieved from the server, the Builder expects the mapping client to
	// decide the final form. Use the AsVersioned, AsUnstructured, and AsInternal helpers
	// to alter the object versions.
	Object runtime.Object
}

func (*Resource) Create

func (i *Resource) Create(ctx context.Context, cl client.Interface, options *metav1.CreateOptions) error

func (*Resource) Delete

func (i *Resource) Delete(ctx context.Context, cl client.Interface, options *metav1.DeleteOptions) error

func (*Resource) Get

func (i *Resource) Get(ctx context.Context, cl client.Interface) error

func (Resource) GetRestMapping

func (r Resource) GetRestMapping(restMapper *RESTMapper) error

func (Resource) GroupVersionKind

func (r Resource) GroupVersionKind() *schema.GroupVersionKind

func (Resource) GroupVersionResource

func (r Resource) GroupVersionResource() *schema.GroupVersionResource

func (Resource) NamespaceScoped

func (r Resource) NamespaceScoped() bool

func (*Resource) Patch

func (i *Resource) Patch(ctx context.Context, cl client.Interface, pt types.PatchType, data []byte, options *metav1.PatchOptions) error

func (*Resource) Update

func (i *Resource) Update(ctx context.Context, cl client.Interface, options *metav1.UpdateOptions) error

type ResourceCreator

type ResourceCreator struct {
	// contains filtered or unexported fields
}

func NewResourceCreator

func NewResourceCreator() *ResourceCreator

func (*ResourceCreator) NewResourceInfo

func (c *ResourceCreator) NewResourceInfo(groupVersionKind schema.GroupVersionKind, obj runtime.Object) (*Resource, error)

type ResourceId

type ResourceId struct {
	// contains filtered or unexported fields
}

func (ResourceId) GetRestMapping

func (r ResourceId) GetRestMapping(restMapper *RESTMapper) error

func (ResourceId) GroupVersionKind

func (r ResourceId) GroupVersionKind() *schema.GroupVersionKind

func (ResourceId) GroupVersionResource

func (r ResourceId) GroupVersionResource() *schema.GroupVersionResource

func (*ResourceId) Name

func (r *ResourceId) Name() string

func (*ResourceId) Namespace

func (r *ResourceId) Namespace() (string, bool)

func (ResourceId) NamespaceScoped

func (r ResourceId) NamespaceScoped() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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