Documentation
¶
Index ¶
- Constants
- func GetFnName(fn reflect.Value) string
- func GetProvideAllInputTypes(typ reflect.Type) []reflect.Type
- func SetLog(handler slog.Handler)
- type Dix
- func (dix *Dix) GetObjects() map[reflect.Type]map[string][]reflect.Value
- func (dix *Dix) GetProviderDetails() []ProviderDetails
- func (dix *Dix) GetProviders() map[reflect.Type][]*providerFn
- func (dix *Dix) Inject(param any, opts ...Option) any
- func (dix *Dix) Option() Options
- func (dix *Dix) Provide(param any)
- type Option
- type Options
- type ProviderDetails
Constants ¶
View Source
const (
// InjectMethodPrefix can inject objects, as long as the method of this object contains a prefix of `InjectMethodPrefix`
InjectMethodPrefix = "DixInject"
)
Variables ¶
This section is empty.
Functions ¶
func GetProvideAllInputTypes ¶
GetProvideAllInputTypes returns all input types for a given type, including struct fields This is a public version of getProvideAllInputs that returns types instead of internal structures
Types ¶
type Dix ¶
type Dix struct {
// contains filtered or unexported fields
}
func (*Dix) GetObjects ¶
GetObjects returns a copy of the objects map for inspection This is useful for HTTP visualization endpoints
func (*Dix) GetProviderDetails ¶
func (dix *Dix) GetProviderDetails() []ProviderDetails
GetProviderDetails returns detailed information about all providers
func (*Dix) GetProviders ¶
GetProviders returns a copy of the providers map for inspection This is useful for HTTP visualization endpoints
type Options ¶
type Options struct {
// AllowValuesNull allows result to be nil
AllowValuesNull bool
}
type ProviderDetails ¶
ProviderDetails contains detailed information about a provider
Click to show internal directories.
Click to hide internal directories.