inverse

package
v0.0.26 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2023 License: GPL-3.0 Imports: 7 Imported by: 17

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotInjected = errors.New("qualifier not injected")

Functions

func ErrorCastingFailure

func ErrorCastingFailure(qualifier string) error

func ErrorNilContext

func ErrorNilContext(qualifier string) error

func ErrorNotInjected

func ErrorNotInjected(qualifier string) error

func ErrorResolveLoop

func ErrorResolveLoop(qualifier string) error

func GetAll

func GetAll[T any](ctx context.Context, qualifier string) ([]T, error)

func GetLast

func GetLast[T any](ctx context.Context, qualifier string) (T, error)

func Register

func Register[T any](qualifier string, injector Injector[T])

func RegisterConfiguration added in v0.0.19

func RegisterConfiguration[T any](configurationQualifier string, configuration runtime.Configuration[T])

func RegisterConfigurations added in v0.0.19

func RegisterConfigurations[T any](configurationQualifier string, configurations []runtime.Configuration[T])

func RegisterInstance added in v0.0.15

func RegisterInstance[T any](qualifier string, instance T)

func RegisterInstances added in v0.0.15

func RegisterInstances[T any](qualifier string, instances []T)

func RegisterWithConfigurationOptional added in v0.0.19

func RegisterWithConfigurationOptional[T any, I any](qualifier string, configurationQualifier string, constructor runtime.Constructor[T, I])

func RegisterWithConfigurationRequired added in v0.0.19

func RegisterWithConfigurationRequired[T any, I any](qualifier string, configurationQualifier string, constructor runtime.Constructor[T, I])

func Release

func Release()

func Reset

func Reset()

Types

type Injector

type Injector[T any] func(context.Context) (T, error)

func AnyInjector added in v0.0.14

func AnyInjector[T any](injector Injector[T]) Injector[any]

type QualifierContext

type QualifierContext struct {
	Name string
}

func Qualifier

func Qualifier(name string) QualifierContext

Jump to

Keyboard shortcuts

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