Documentation ¶
Index ¶
- func ProvideAs[T any](i *Injector, tags ...any) T
- func Type[T any]() reflect.Type
- type ArrayOf
- type BindArrayOf
- type BindArraySliceOf
- type Binder
- type BinderRegistry
- type Binding
- type Bindings
- type Closer
- type Const
- type Debug
- type Debugger
- type DuplicateBindingError
- type DuplicateKeyError
- type EmptyArrayOf
- type Error
- type Func
- type GenericError
- type Injector
- func (i *Injector) ArgsProvider() rfl.ArgsProvider
- func (i *Injector) Bindings() Bindings
- func (i *Injector) Debug() Debug
- func (i *Injector) Inject(fn any) []any
- func (i *Injector) InjectOne(fn any) any
- func (i *Injector) NewChild(bs Bindings) *Injector
- func (i *Injector) Parent() *Injector
- func (i *Injector) Provide(o any) any
- func (i *Injector) ProvideArgs(fn any) []any
- func (i *Injector) TryProvide(o any) (any, bool)
- type Key
- type KeyError
- type KeyOf
- type Link
- type Provider
- type Singleton
- type UnboundKeyError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BindArrayOf ¶
type BindArraySliceOf ¶
type BinderRegistry ¶
type BinderRegistry struct {
// contains filtered or unexported fields
}
func NewBinderRegistry ¶
func NewBinderRegistry() *BinderRegistry
func (*BinderRegistry) Bind ¶
func (r *BinderRegistry) Bind() Bindings
func (*BinderRegistry) Register ¶
func (r *BinderRegistry) Register(bs ...Binder) *BinderRegistry
func (*BinderRegistry) Seal ¶
func (r *BinderRegistry) Seal() *BinderRegistry
type Bindings ¶
type Bindings interface { bt.Traversable[Binding] // contains filtered or unexported methods }
type DuplicateBindingError ¶
type DuplicateBindingError struct {
KeyError
}
func (DuplicateBindingError) Error ¶
func (e DuplicateBindingError) Error() string
type DuplicateKeyError ¶
type DuplicateKeyError struct {
KeyError
}
func (DuplicateKeyError) Error ¶
func (e DuplicateKeyError) Error() string
type EmptyArrayOf ¶
type EmptyArrayOf[T any] struct{}
type GenericError ¶
type GenericError struct {
Err error
}
func (GenericError) Error ¶
func (e GenericError) Error() string
func (GenericError) Unwrap ¶
func (e GenericError) Unwrap() error
type Injector ¶
type Injector struct {
// contains filtered or unexported fields
}
func NewDeferInjector ¶
func NewInjector ¶
func (*Injector) ArgsProvider ¶
func (i *Injector) ArgsProvider() rfl.ArgsProvider
func (*Injector) ProvideArgs ¶
type Provider ¶
type Provider interface { String() string // contains filtered or unexported methods }
type UnboundKeyError ¶
type UnboundKeyError struct {
KeyError
}
func (UnboundKeyError) Error ¶
func (e UnboundKeyError) Error() string
Click to show internal directories.
Click to hide internal directories.