Documentation ¶
Index ¶
- Variables
- func AddContainerAccessorFunc(builder *di.Builder, fnc ContainerAccessor)
- func RemoveAllContainerAccessorFunc(builder *di.Builder)
- type ContainerAccessor
- func GetContainerAccessorFromContainer(ctn di.Container) ContainerAccessor
- func GetManyContainerAccessorFromContainer(ctn di.Container) []ContainerAccessor
- func SafeGetContainerAccessorFromContainer(ctn di.Container) (ContainerAccessor, error)
- func SafeGetManyContainerAccessorFromContainer(ctn di.Container) ([]ContainerAccessor, error)
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeContainerAccessor = reflect.TypeOf(ContainerAccessor(nil))
ReflectTypeContainerAccessor used when your service claims to implement ContainerAccessor
Functions ¶
func AddContainerAccessorFunc ¶
func AddContainerAccessorFunc(builder *di.Builder, fnc ContainerAccessor)
AddSingletonContainerAccessorFunc adds a func to the DI
func RemoveAllContainerAccessorFunc ¶
RemoveAllContainerAccessorFunc removes all ContainerAccessor functions from the DI
Types ¶
type ContainerAccessor ¶
func GetContainerAccessorFromContainer ¶
func GetContainerAccessorFromContainer(ctn di.Container) ContainerAccessor
GetContainerAccessorFromContainer alternative to SafeGetContainerAccessorFromContainer but panics of object is not present
func GetManyContainerAccessorFromContainer ¶
func GetManyContainerAccessorFromContainer(ctn di.Container) []ContainerAccessor
GetManyContainerAccessorFromContainer alternative to SafeGetManyContainerAccessorFromContainer but panics of object is not present
func SafeGetContainerAccessorFromContainer ¶
func SafeGetContainerAccessorFromContainer(ctn di.Container) (ContainerAccessor, error)
SafeGetContainerAccessorFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetManyContainerAccessorFromContainer ¶
func SafeGetManyContainerAccessorFromContainer(ctn di.Container) ([]ContainerAccessor, error)
SafeGetManyContainerAccessorFromContainer trys to get the object by type, will not panic, returns nil and error