zdi

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2024 License: MIT Imports: 5 Imported by: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsPreInvoker added in v1.3.0

func IsPreInvoker(handler interface{}) bool

Types

type Injector added in v1.3.0

type Injector interface {
	Invoker
	TypeMapper
	Set(reflect.Type, reflect.Value)
	Get(reflect.Type) (reflect.Value, bool)
	SetParent(Injector)
}

func New

func New(parent ...Injector) Injector

type Invoker added in v1.3.0

type Invoker interface {
	Apply(Pointer) error
	Resolve(...Pointer) error
	Invoke(interface{}) ([]reflect.Value, error)
	InvokeWithErrorOnly(interface{}) error
}

type Option added in v1.3.0

type Option func(*mapOption)

func WithInterface added in v1.3.0

func WithInterface(ifacePtr Pointer) Option

type Pointer added in v1.3.0

type Pointer interface{}

type PreInvoker added in v1.3.0

type PreInvoker interface {
	Invoke([]interface{}) ([]reflect.Value, error)
}

type TypeMapper added in v1.3.0

type TypeMapper interface {
	Map(interface{}, ...Option) reflect.Type
	Maps(...interface{}) []reflect.Type
	Provide(interface{}, ...Option) []reflect.Type
}

Jump to

Keyboard shortcuts

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