Documentation ¶
Index ¶
- Variables
- func AddScopedIScoped(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedIScopedByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIScoped(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonIScopedByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIScopedByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddTransientIScoped(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientIScopedByFunc(builder *di.Builder, implType reflect.Type, ...)
- func RemoveAllIScoped(builder *di.Builder)
- type IScoped
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeIScoped = di.GetInterfaceReflectType((*IScoped)(nil))
ReflectTypeIScoped used when your service claims to implement IScoped
Functions ¶
func AddScopedIScoped ¶
AddScopedIScoped adds a type that implements IScoped
func AddScopedIScopedByFunc ¶
func AddScopedIScopedByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedIScopedByFunc adds a type by a custom func
func AddSingletonIScoped ¶
func AddSingletonIScoped(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonIScoped adds a type that implements IScoped
func AddSingletonIScopedByFunc ¶
func AddSingletonIScopedByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonIScopedByFunc adds a type by a custom func
func AddSingletonIScopedByObj ¶
func AddSingletonIScopedByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonIScopedByObj adds a prebuilt obj
func AddTransientIScoped ¶
func AddTransientIScoped(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientIScoped adds a type that implements IScoped
func AddTransientIScopedByFunc ¶
func AddTransientIScopedByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientIScopedByFunc adds a type by a custom func
func RemoveAllIScoped ¶
RemoveAllIScoped removes all IScoped from the DI
Types ¶
type IScoped ¶
IScoped ...
func GetIScopedFromContainer ¶
GetIScopedFromContainer alternative to SafeGetIScopedFromContainer but panics of object is not present
func GetManyIScopedFromContainer ¶
GetManyIScopedFromContainer alternative to SafeGetManyIScopedFromContainer but panics of object is not present
func SafeGetIScopedFromContainer ¶
SafeGetIScopedFromContainer trys to get the object by type, will not panic, returns nil and error