v1

package
v0.0.0-...-98ac406 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromEntitlementHandlerToHandler

func FromEntitlementHandlerToHandler(sync EntitlementHandler) generic.Handler

func FromRequestHandlerToHandler

func FromRequestHandlerToHandler(sync RequestHandler) generic.Handler

func RegisterEntitlementGeneratingHandler

func RegisterEntitlementGeneratingHandler(ctx context.Context, controller EntitlementController, apply apply.Apply,
	condition condition.Cond, name string, handler EntitlementGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterEntitlementStatusHandler

func RegisterEntitlementStatusHandler(ctx context.Context, controller EntitlementController, condition condition.Cond, name string, handler EntitlementStatusHandler)

func RegisterRequestGeneratingHandler

func RegisterRequestGeneratingHandler(ctx context.Context, controller RequestController, apply apply.Apply,
	condition condition.Cond, name string, handler RequestGeneratingHandler, opts *generic.GeneratingHandlerOptions)

func RegisterRequestStatusHandler

func RegisterRequestStatusHandler(ctx context.Context, controller RequestController, condition condition.Cond, name string, handler RequestStatusHandler)

func UpdateEntitlementDeepCopyOnChange

func UpdateEntitlementDeepCopyOnChange(client EntitlementClient, obj *v1.Entitlement, handler func(obj *v1.Entitlement) (*v1.Entitlement, error)) (*v1.Entitlement, error)

func UpdateRequestDeepCopyOnChange

func UpdateRequestDeepCopyOnChange(client RequestClient, obj *v1.Request, handler func(obj *v1.Request) (*v1.Request, error)) (*v1.Request, error)

Types

type EntitlementCache

type EntitlementCache interface {
	Get(namespace, name string) (*v1.Entitlement, error)
	List(namespace string, selector labels.Selector) ([]*v1.Entitlement, error)

	AddIndexer(indexName string, indexer EntitlementIndexer)
	GetByIndex(indexName, key string) ([]*v1.Entitlement, error)
}

type EntitlementClient

type EntitlementClient interface {
	Create(*v1.Entitlement) (*v1.Entitlement, error)
	Update(*v1.Entitlement) (*v1.Entitlement, error)
	UpdateStatus(*v1.Entitlement) (*v1.Entitlement, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Entitlement, error)
	List(namespace string, opts metav1.ListOptions) (*v1.EntitlementList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Entitlement, err error)
}

type EntitlementController

type EntitlementController interface {
	generic.ControllerMeta
	EntitlementClient

	OnChange(ctx context.Context, name string, sync EntitlementHandler)
	OnRemove(ctx context.Context, name string, sync EntitlementHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() EntitlementCache
}

func NewEntitlementController

func NewEntitlementController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) EntitlementController

type EntitlementGeneratingHandler

type EntitlementGeneratingHandler func(obj *v1.Entitlement, status v1.EntitlementStatus) ([]runtime.Object, v1.EntitlementStatus, error)

type EntitlementHandler

type EntitlementHandler func(string, *v1.Entitlement) (*v1.Entitlement, error)

type EntitlementIndexer

type EntitlementIndexer func(obj *v1.Entitlement) ([]string, error)

type EntitlementStatusHandler

type EntitlementStatusHandler func(obj *v1.Entitlement, status v1.EntitlementStatus) (v1.EntitlementStatus, error)

type Interface

type Interface interface {
	Entitlement() EntitlementController
	Request() RequestController
}

func New

func New(controllerFactory controller.SharedControllerFactory) Interface

type RequestCache

type RequestCache interface {
	Get(namespace, name string) (*v1.Request, error)
	List(namespace string, selector labels.Selector) ([]*v1.Request, error)

	AddIndexer(indexName string, indexer RequestIndexer)
	GetByIndex(indexName, key string) ([]*v1.Request, error)
}

type RequestClient

type RequestClient interface {
	Create(*v1.Request) (*v1.Request, error)
	Update(*v1.Request) (*v1.Request, error)
	UpdateStatus(*v1.Request) (*v1.Request, error)
	Delete(namespace, name string, options *metav1.DeleteOptions) error
	Get(namespace, name string, options metav1.GetOptions) (*v1.Request, error)
	List(namespace string, opts metav1.ListOptions) (*v1.RequestList, error)
	Watch(namespace string, opts metav1.ListOptions) (watch.Interface, error)
	Patch(namespace, name string, pt types.PatchType, data []byte, subresources ...string) (result *v1.Request, err error)
}

type RequestController

type RequestController interface {
	generic.ControllerMeta
	RequestClient

	OnChange(ctx context.Context, name string, sync RequestHandler)
	OnRemove(ctx context.Context, name string, sync RequestHandler)
	Enqueue(namespace, name string)
	EnqueueAfter(namespace, name string, duration time.Duration)

	Cache() RequestCache
}

func NewRequestController

func NewRequestController(gvk schema.GroupVersionKind, resource string, namespaced bool, controller controller.SharedControllerFactory) RequestController

type RequestGeneratingHandler

type RequestGeneratingHandler func(obj *v1.Request, status v1.RequestStatus) ([]runtime.Object, v1.RequestStatus, error)

type RequestHandler

type RequestHandler func(string, *v1.Request) (*v1.Request, error)

type RequestIndexer

type RequestIndexer func(obj *v1.Request) ([]string, error)

type RequestStatusHandler

type RequestStatusHandler func(obj *v1.Request, status v1.RequestStatus) (v1.RequestStatus, error)

Jump to

Keyboard shortcuts

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