reflect

package
v0.1.3 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LabeledCreator

type LabeledCreator[T any, M any] func() (T, M)

type LabeledTypes

type LabeledTypes[T any, M any] struct {
	LabeledTypes      map[string]*Types[T, M]
	CacheResolveFirst map[string]LabeledCreator[T, M]
}

func NewLabeledTypes

func NewLabeledTypes[T any, M any]() *LabeledTypes[T, M]

func (*LabeledTypes[T, M]) Register

func (o *LabeledTypes[T, M]) Register(label string) (ret *Types[T, M])

func (*LabeledTypes[T, M]) Resolve

func (o *LabeledTypes[T, M]) Resolve(namespace, typ string) (ret LabeledCreator[T, M])

func (*LabeledTypes[T, M]) ResolveFirst

func (o *LabeledTypes[T, M]) ResolveFirst(typ string) (ret LabeledCreator[T, M])

type Types

type Types[T any, M any] struct {
	Label string
	Types map[string]LabeledCreator[T, M]
}

func (*Types[T, M]) Register

func (o *Types[T, M]) Register(name string, creator LabeledCreator[T, M])

func (*Types[T, M]) Resolve

func (o *Types[T, M]) Resolve(name string) LabeledCreator[T, M]

Jump to

Keyboard shortcuts

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