Documentation ¶
Index ¶
- Variables
- func AddScopedIContextAccessor(builder *di.Builder, implType reflect.Type)
- func AddScopedIContextAccessorByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIInternalContextAccessor(builder *di.Builder, implType reflect.Type)
- func AddScopedIInternalContextAccessorByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIContextAccessor(builder *di.Builder, implType reflect.Type)
- func AddSingletonIContextAccessorByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIContextAccessorByObj(builder *di.Builder, obj interface{})
- func AddSingletonIInternalContextAccessor(builder *di.Builder, implType reflect.Type)
- func AddSingletonIInternalContextAccessorByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIInternalContextAccessorByObj(builder *di.Builder, obj interface{})
- func AddTransientIContextAccessor(builder *di.Builder, implType reflect.Type)
- func AddTransientIContextAccessorByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIInternalContextAccessor(builder *di.Builder, implType reflect.Type)
- func AddTransientIInternalContextAccessorByFunc(builder *di.Builder, implType reflect.Type, ...)
- type IContextAccessor
- type IInternalContextAccessor
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeIContextAccessor = di.GetInterfaceReflectType((*IContextAccessor)(nil))
ReflectTypeIContextAccessor used when your service claims to implement IContextAccessor
var ReflectTypeIInternalContextAccessor = di.GetInterfaceReflectType((*IInternalContextAccessor)(nil))
ReflectTypeIInternalContextAccessor used when your service claims to implement IInternalContextAccessor
Functions ¶
func AddScopedIContextAccessor ¶
AddScopedIContextAccessor adds a type that implements IContextAccessor
func AddScopedIContextAccessorByFunc ¶
func AddScopedIContextAccessorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedIContextAccessorByFunc adds a type by a custom func
func AddScopedIInternalContextAccessor ¶
AddScopedIInternalContextAccessor adds a type that implements IInternalContextAccessor
func AddScopedIInternalContextAccessorByFunc ¶
func AddScopedIInternalContextAccessorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedIInternalContextAccessorByFunc adds a type by a custom func
func AddSingletonIContextAccessor ¶
AddSingletonIContextAccessor adds a type that implements IContextAccessor
func AddSingletonIContextAccessorByFunc ¶
func AddSingletonIContextAccessorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonIContextAccessorByFunc adds a type by a custom func
func AddSingletonIContextAccessorByObj ¶
AddSingletonIContextAccessorByObj adds a prebuilt obj
func AddSingletonIInternalContextAccessor ¶
AddSingletonIInternalContextAccessor adds a type that implements IInternalContextAccessor
func AddSingletonIInternalContextAccessorByFunc ¶
func AddSingletonIInternalContextAccessorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonIInternalContextAccessorByFunc adds a type by a custom func
func AddSingletonIInternalContextAccessorByObj ¶
AddSingletonIInternalContextAccessorByObj adds a prebuilt obj
func AddTransientIContextAccessor ¶
AddTransientIContextAccessor adds a type that implements IContextAccessor
func AddTransientIContextAccessorByFunc ¶
func AddTransientIContextAccessorByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientIContextAccessorByFunc adds a type by a custom func
func AddTransientIInternalContextAccessor ¶
AddTransientIInternalContextAccessor adds a type that implements IInternalContextAccessor
Types ¶
type IContextAccessor ¶
IContextAccessor ...
func GetIContextAccessorFromContainer ¶
func GetIContextAccessorFromContainer(ctn di.Container) IContextAccessor
GetIContextAccessorFromContainer alternative to SafeGetIContextAccessorFromContainer but panics of object is not present
func SafeGetIContextAccessorFromContainer ¶
func SafeGetIContextAccessorFromContainer(ctn di.Container) (IContextAccessor, error)
SafeGetIContextAccessorFromContainer trys to get the object by type, will not panic, returns nil and error
type IInternalContextAccessor ¶
type IInternalContextAccessor interface { IContextAccessor SetContext(context.Context) }
IInternalContextAccessor ...
func GetIInternalContextAccessorFromContainer ¶
func GetIInternalContextAccessorFromContainer(ctn di.Container) IInternalContextAccessor
GetIInternalContextAccessorFromContainer alternative to SafeGetIInternalContextAccessorFromContainer but panics of object is not present
func SafeGetIInternalContextAccessorFromContainer ¶
func SafeGetIInternalContextAccessorFromContainer(ctn di.Container) (IInternalContextAccessor, error)
SafeGetIInternalContextAccessorFromContainer trys to get the object by type, will not panic, returns nil and error