rest

package
v0.0.0-...-e0434a4 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2019 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type REST

type REST struct {
	Logger *zap.Logger
}

func (*REST) Create

func (r *REST) Create(ctx context.Context, obj runtime.Object, createValidation rest.ValidateObjectFunc, options *metav1.CreateOptions) (runtime.Object, error)

Create creates a new version of a resource. If includeUninitialized is set, the object may be returned without completing initialization.

func (*REST) Delete

func (r *REST) Delete(ctx context.Context, name string, options *metav1.DeleteOptions) (runtime.Object, bool, error)

Delete finds a resource in the storage and deletes it. If options are provided, the resource will attempt to honor them or return an invalid request error. Although it can return an arbitrary error value, IsNotFound(err) is true for the returned error value err when the specified resource is not found. Delete *may* return the object that was deleted, or a status object indicating additional information about deletion. It also returns a boolean which is set to true if the resource was instantly deleted or false if it will be deleted asynchronously.

func (*REST) Get

func (r *REST) Get(ctx context.Context, name string, options *metav1.GetOptions) (runtime.Object, error)

Get finds a resource in the storage by name and returns it. Although it can return an arbitrary error value, IsNotFound(err) is true for the returned error value err when the specified resource is not found.

func (*REST) List

List selects resources in the storage which match to the selector. 'options' can be nil.

func (*REST) NamespaceScoped

func (r *REST) NamespaceScoped() bool

NamespaceScoped returns true if the storage is namespaced

func (*REST) New

func (r *REST) New() runtime.Object

This object must be a pointer type for use with Codec.DecodeInto([]byte, runtime.Object)

func (*REST) NewList

func (r *REST) NewList() runtime.Object

NewList returns an empty object that can be used with the List call. This object must be a pointer type for use with Codec.DecodeInto([]byte, runtime.Object)

func (*REST) Update

func (r *REST) Update(ctx context.Context, name string, objInfo rest.UpdatedObjectInfo, createValidation rest.ValidateObjectFunc, updateValidation rest.ValidateObjectUpdateFunc, forceAllowCreate bool, options *metav1.UpdateOptions) (runtime.Object, bool, error)

Update finds a resource in the storage and updates it. Some implementations may allow updates creates the object - they should set the created boolean to true.

Jump to

Keyboard shortcuts

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