v1alpha3

package
v0.0.0-...-03b3356 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 8 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) *api.ListResult

func DefaultObjectList

func DefaultObjectList[T CustomResource](objects []T, q *query.Query, compareFunc CompareFunc,
	filterFunc FilterFunc, transformFuncs ...TransformFunc) *api.ListResult

func DefaultObjectMetaCompare

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

DefaultObjectMetaCompare return true is left great than right

func DefaultObjectMetaFilter

func DefaultObjectMetaFilter(item metav1.ObjectMeta, 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 great than right

type CustomResource

type CustomResource interface {
	metav1.Object
	runtime.Object
}

type ExtraLabelSelectable

type ExtraLabelSelectable interface {
	Interface
	WithRequirements(requirements []labels.Requirement)
}

ExtraLabelSelectable allows add more label selectors before listing

type FilterFunc

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

type Interface

type Interface interface {
	// Get retrieves a single object by its namespace and name
	Get(namespace, name string) (runtime.Object, error)

	// List retrieves a collection of objects matches given query
	List(namespace string, query *query.Query) (*api.ListResult, error)
}

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