registry

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: Apache-2.0 Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendItem

func AppendItem(v reflect.Value, obj runtime.Object)

func GetListPrt

func GetListPrt(listObj runtime.Object) (reflect.Value, error)

func NewStorage

func NewStorage(ctx context.Context, pathInRepo, dbpath string, gr schema.GroupResource, newFn NewFn, newListFn NewListFn, strategy rest.Strategy, fieldManager *managedfields.FieldManager) rest.Storage

func NewStrategy

func NewStrategy(
	namespaceScoped bool,
	gvk schema.GroupVersionKind,
	schemaValidator, statusSchemaValidator apiextensionsvalidation.SchemaValidator,
	structuralSchema *structuralschema.Structural,
	defaulter runtime.ObjectDefaulter,
	preparator APIPrepator,
) strategy

func UpdateGeneration

func UpdateGeneration(new metav1.Object, generation int64)

func UpdateResourceVersion

func UpdateResourceVersion(new, old metav1.Object) error

func ValidateObjectMetaAccessorUpdate

func ValidateObjectMetaAccessorUpdate(newMeta, oldMeta metav1.Object, newGeneration, oldGeneration int64, fldPath *field.Path) field.ErrorList

ValidateObjectMetaAccessorUpdate validates an object's metadata when updated.

Types

type APIPrepator

type APIPrepator interface {
	PrepareForCreate(ctx context.Context, obj runtime.Unstructured) error
	PrepareForUpdate(ctx context.Context, obj, old runtime.Unstructured) error
	PrepareForDelete(ctx context.Context, obj runtime.Unstructured) error
}

type NewFn

type NewFn func() runtime.Unstructured

type NewListFn

type NewListFn func() runtime.Unstructured

type NewStorageFn

type NewStorageFn func(ctx context.Context, dbpath string) rest.Storage

type StorageCreator

type StorageCreator struct {
	GroupResource schema.GroupResource
	NewFn         NewFn
	NewListFn     NewListFn
	Strategy      rest.Strategy
	FieldManager  *managedfields.FieldManager
}

func (StorageCreator) NewStorage

func (r StorageCreator) NewStorage(ctx context.Context, pathInRepo, dbpath string) rest.Storage

Jump to

Keyboard shortcuts

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