v1beta1

package
v0.0.0-...-e779149 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultList

func DefaultList(objects []runtime.Object, q *query.Query, compareFunc CompareFunc, filterFunc FilterFunc, transformFuncs ...TransformFunc) ([]runtime.Object, *int64)

func DefaultObjectMetaCompare

func DefaultObjectMetaCompare(left, right metav1.Object, sortBy query.Field) bool

DefaultObjectMetaCompare return true is left greater than right

func DefaultObjectMetaFilter

func DefaultObjectMetaFilter(item metav1.Object, filter query.Filter) bool

Default metadata filter

Types

type CompareFunc

type CompareFunc func(runtime.Object, runtime.Object, query.Field) bool

CompareFunc return true is left greater than right

type FilterFunc

type FilterFunc func(runtime.Object, query.Filter) bool

type ResourceManager

type ResourceManager interface {
	IsServed(schema.GroupVersionResource) (bool, error)
	CreateObjectFromRawData(gvr schema.GroupVersionResource, rawData []byte) (client.Object, error)

	CreateResource(ctx context.Context, object client.Object) error
	UpdateResource(ctx context.Context, object client.Object) error
	PatchResource(ctx context.Context, object client.Object) error
	DeleteResource(ctx context.Context, gvr schema.GroupVersionResource, namespace string, name string) error
	GetResource(ctx context.Context, gvr schema.GroupVersionResource, namespace string, name string) (client.Object, error)
	ListResources(ctx context.Context, gvr schema.GroupVersionResource, namespace string, query *query.Query) (client.ObjectList, error)

	Get(ctx context.Context, namespace, name string, object client.Object) error
	List(ctx context.Context, namespace string, query *query.Query, object client.ObjectList) error
	Create(ctx context.Context, object client.Object) error
	Delete(ctx context.Context, object client.Object) error
	Update(ctx context.Context, old, new client.Object) error
	Patch(ctx context.Context, old, new client.Object) error
}

func New

func New(client client.Client, cache cache.Cache) ResourceManager

type TransformFunc

type TransformFunc func(runtime.Object) runtime.Object

Jump to

Keyboard shortcuts

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