Documentation
¶
Index ¶
- func Provide(ref interface{}, funcImplementation interface{})
- func ProvideExtension(pMap interface{}, key interface{}, extension interface{})
- func Require(toInject interface{})
- func Reset()
- type EImplementationNotProvided
- type EIncompatibleTypes
- type EMultipleImplementations
- type EMultipleValues
- type ENonAssignableRequirement
- type EProvidedNotUsed
- type Errors
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Provide ¶
func Provide(ref interface{}, funcImplementation interface{})
Provide registers implementation of ref type
func ProvideExtension ¶
func ProvideExtension(pMap interface{}, key interface{}, extension interface{})
ProvideExtension s.e.
Types ¶
type EImplementationNotProvided ¶
type EImplementationNotProvided struct {
// contains filtered or unexported fields
}
EImplementationNotProvided error occurs if there is no implementation provided for a type
func (*EImplementationNotProvided) Error ¶
func (e *EImplementationNotProvided) Error() string
type EIncompatibleTypes ¶
type EIncompatibleTypes struct {
// contains filtered or unexported fields
}
EIncompatibleTypes error occurs if type of a requirement is incompatible to provided implementation
func (*EIncompatibleTypes) Error ¶
func (e *EIncompatibleTypes) Error() string
type EMultipleImplementations ¶
type EMultipleImplementations struct {
// contains filtered or unexported fields
}
EMultipleImplementations occurs if there are more than one provided implementation for one type
func (*EMultipleImplementations) Error ¶
func (e *EMultipleImplementations) Error() string
type EMultipleValues ¶
type EMultipleValues struct {
// contains filtered or unexported fields
}
EMultipleValues error occurs if more than one value is provided per one key by ProvideMapValue() call
func (*EMultipleValues) Error ¶
func (e *EMultipleValues) Error() string
type ENonAssignableRequirement ¶
type ENonAssignableRequirement struct {
// contains filtered or unexported fields
}
ENonAssignableRequirement error occurs if non-assignable (e.g. not variable) requirement is declared
func (*ENonAssignableRequirement) Error ¶
func (e *ENonAssignableRequirement) Error() string
type EProvidedNotUsed ¶
type EProvidedNotUsed struct {
// contains filtered or unexported fields
}
EProvidedNotUsed error occurs if something is provided but not required
func (*EProvidedNotUsed) Error ¶
func (e *EProvidedNotUsed) Error() string
Click to show internal directories.
Click to hide internal directories.