registry

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Key

type Key[K any] interface {
	comparable
	IsValid() bool

	GetMediaType() string
	GetArtifactType() string

	SetArtifact(arttype, medtatype string) K
}

type RegistrationKey

type RegistrationKey struct {
	ArtifactType string `json:"artifactType"`
	MediaType    string `json:"mediaType"`
}

func (RegistrationKey) GetArtifactType

func (k RegistrationKey) GetArtifactType() string

func (RegistrationKey) GetMediaType

func (k RegistrationKey) GetMediaType() string

func (RegistrationKey) IsValid

func (k RegistrationKey) IsValid() bool

func (RegistrationKey) Key

func (RegistrationKey) SetArtifact

func (k RegistrationKey) SetArtifact(arttype, medtatype string) RegistrationKey

func (RegistrationKey) String

func (k RegistrationKey) String() string

type Registry

type Registry[H any, K Key[K]] struct {
	// contains filtered or unexported fields
}

func NewRegistry

func NewRegistry[H any, K Key[K]]() *Registry[H, K]

func (*Registry[H, K]) Copy added in v0.4.1

func (p *Registry[H, K]) Copy() *Registry[H, K]

func (*Registry[H, K]) GetHandler

func (p *Registry[H, K]) GetHandler(key K) []H

func (*Registry[H, K]) LookupHandler

func (p *Registry[H, K]) LookupHandler(key K) []H

func (*Registry[H, K]) LookupKeys

func (p *Registry[H, K]) LookupKeys(key K) set.Set[K]

func (*Registry[H, K]) Register

func (p *Registry[H, K]) Register(key K, h H)

Jump to

Keyboard shortcuts

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