registry

package
v0.0.0-...-758283c Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterType

func RegisterType(res model.ResourceTypeDescriptor)

func RegisterTypeIfAbsent

func RegisterTypeIfAbsent(res model.ResourceTypeDescriptor)

Types

type InvalidResourceTypeError

type InvalidResourceTypeError struct {
	ResType model.ResourceType
}

func (*InvalidResourceTypeError) Error

func (e *InvalidResourceTypeError) Error() string

func (*InvalidResourceTypeError) Is

func (e *InvalidResourceTypeError) Is(target error) bool

type TypeRegistry

type TypeRegistry interface {
	RegisterType(model.ResourceTypeDescriptor) error

	NewObject(model.ResourceType) (model.Resource, error)
	NewList(model.ResourceType) (model.ResourceList, error)

	MustNewObject(model.ResourceType) model.Resource
	MustNewList(model.ResourceType) model.ResourceList

	DescriptorFor(resourceType model.ResourceType) (model.ResourceTypeDescriptor, error)

	ObjectTypes(filters ...model.TypeFilter) []model.ResourceType
	ObjectDescriptors(filters ...model.TypeFilter) []model.ResourceTypeDescriptor
}

func Global

func Global() TypeRegistry

func NewTypeRegistry

func NewTypeRegistry() TypeRegistry

Jump to

Keyboard shortcuts

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