Documentation ¶
Index ¶
- Variables
- func AddScopedIItems(builder *di.Builder, implType reflect.Type)
- func AddScopedIItemsByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIRequest(builder *di.Builder, implType reflect.Type)
- func AddScopedIRequestByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIItems(builder *di.Builder, implType reflect.Type)
- func AddSingletonIItemsByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIItemsByObj(builder *di.Builder, obj interface{})
- func AddSingletonIRequest(builder *di.Builder, implType reflect.Type)
- func AddSingletonIRequestByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIRequestByObj(builder *di.Builder, obj interface{})
- func AddTransientIItems(builder *di.Builder, implType reflect.Type)
- func AddTransientIItemsByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIRequest(builder *di.Builder, implType reflect.Type)
- func AddTransientIRequestByFunc(builder *di.Builder, implType reflect.Type, ...)
- func RemoveAllIItems(builder *di.Builder)
- func RemoveAllIRequest(builder *di.Builder)
- type IInnerRequest
- type IItems
- type IRequest
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeIItems = di.GetInterfaceReflectType((*IItems)(nil))
ReflectTypeIItems used when your service claims to implement IItems
var ReflectTypeIRequest = di.GetInterfaceReflectType((*IRequest)(nil))
ReflectTypeIRequest used when your service claims to implement IRequest
Functions ¶
func AddScopedIItems ¶
AddScopedIItems adds a type that implements IItems
func AddScopedIItemsByFunc ¶
func AddScopedIItemsByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedIItemsByFunc adds a type by a custom func
func AddScopedIRequest ¶
AddScopedIRequest adds a type that implements IRequest
func AddScopedIRequestByFunc ¶
func AddScopedIRequestByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedIRequestByFunc adds a type by a custom func
func AddSingletonIItems ¶
AddSingletonIItems adds a type that implements IItems
func AddSingletonIItemsByFunc ¶
func AddSingletonIItemsByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonIItemsByFunc adds a type by a custom func
func AddSingletonIItemsByObj ¶
AddSingletonIItemsByObj adds a prebuilt obj
func AddSingletonIRequest ¶
AddSingletonIRequest adds a type that implements IRequest
func AddSingletonIRequestByFunc ¶
func AddSingletonIRequestByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonIRequestByFunc adds a type by a custom func
func AddSingletonIRequestByObj ¶
AddSingletonIRequestByObj adds a prebuilt obj
func AddTransientIItems ¶
AddTransientIItems adds a type that implements IItems
func AddTransientIItemsByFunc ¶
func AddTransientIItemsByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientIItemsByFunc adds a type by a custom func
func AddTransientIRequest ¶
AddTransientIRequest adds a type that implements IRequest
func AddTransientIRequestByFunc ¶
func AddTransientIRequestByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientIRequestByFunc adds a type by a custom func
func RemoveAllIItems ¶
RemoveAllIItems removes all IItems from the DI
func RemoveAllIRequest ¶
RemoveAllIRequest removes all IRequest from the DI
Types ¶
type IInnerRequest ¶
type IInnerRequest interface { IRequest SetMetadata(md metautils.NiceMD) SetUnaryServerInfo(info *grpc.UnaryServerInfo) SetContext(context.Context) }
IInnerRequest ...
type IItems ¶
type IItems interface { Set(key string, value interface{}) Get(key string) interface{} Delete(key string) Clear() Keys() []string GetItems() map[string]interface{} }
IItems ...
func GetIItemsFromContainer ¶
GetIItemsFromContainer alternative to SafeGetIItemsFromContainer but panics of object is not present
func GetManyIItemsFromContainer ¶ added in v0.1.178
GetManyIItemsFromContainer alternative to SafeGetManyIItemsFromContainer but panics of object is not present
func SafeGetIItemsFromContainer ¶
SafeGetIItemsFromContainer trys to get the object by type, will not panic, returns nil and error
type IRequest ¶
type IRequest interface { GetMetadata() metautils.NiceMD GetItems() IItems GetUnaryServerInfo() *grpc.UnaryServerInfo GetContext() context.Context GetContainer() di.Container GetClaimsPrincipal() contracts_claimsprincipal.IClaimsPrincipal GetServiceProvider() contracts_serviceprovider.IServiceProvider }
IRequest ...
func GetIRequestFromContainer ¶
GetIRequestFromContainer alternative to SafeGetIRequestFromContainer but panics of object is not present
func GetManyIRequestFromContainer ¶ added in v0.1.178
GetManyIRequestFromContainer alternative to SafeGetManyIRequestFromContainer but panics of object is not present
func SafeGetIRequestFromContainer ¶
SafeGetIRequestFromContainer trys to get the object by type, will not panic, returns nil and error