Documentation ¶
Index ¶
- Variables
- func AddScopedIItems(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedIItemsByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIItemsByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIItemsWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddScopedIRequest(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedIRequestByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIRequestByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIRequestWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonIItems(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonIItemsByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIItemsByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIItemsByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonIItemsByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonIItemsWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonIRequest(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonIRequestByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIRequestByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIRequestByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonIRequestByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonIRequestWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientIItems(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientIItemsByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIItemsByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIItemsWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientIRequest(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientIRequestByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIRequestByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIRequestWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func GetIItemsDefinition(ctn di.Container) *di.Def
- func GetIItemsDefinitions(ctn di.Container) []*di.Def
- func GetIRequestDefinition(ctn di.Container) *di.Def
- func GetIRequestDefinitions(ctn di.Container) []*di.Def
- 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), implementedTypes ...reflect.Type)
AddScopedIItemsByFunc adds a type by a custom func
func AddScopedIItemsByFuncWithMetadata ¶ added in v0.1.217
func AddScopedIItemsByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIItemsByFuncWithMetadata adds a type by a custom func
func AddScopedIItemsWithMetadata ¶ added in v0.1.217
func AddScopedIItemsWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIItemsWithMetadata adds a type that implements IItems
func AddScopedIRequest ¶
func AddScopedIRequest(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddScopedIRequest adds a type that implements IRequest
func AddScopedIRequestByFunc ¶
func AddScopedIRequestByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedIRequestByFunc adds a type by a custom func
func AddScopedIRequestByFuncWithMetadata ¶ added in v0.1.217
func AddScopedIRequestByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIRequestByFuncWithMetadata adds a type by a custom func
func AddScopedIRequestWithMetadata ¶ added in v0.1.217
func AddScopedIRequestWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIRequestWithMetadata adds a type that implements IRequest
func AddSingletonIItems ¶
func AddSingletonIItems(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonIItems adds a type that implements IItems
func AddSingletonIItemsByFunc ¶
func AddSingletonIItemsByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonIItemsByFunc adds a type by a custom func
func AddSingletonIItemsByFuncWithMetadata ¶ added in v0.1.217
func AddSingletonIItemsByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIItemsByFuncWithMetadata adds a type by a custom func
func AddSingletonIItemsByObj ¶
func AddSingletonIItemsByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonIItemsByObj adds a prebuilt obj
func AddSingletonIItemsByObjWithMetadata ¶ added in v0.1.217
func AddSingletonIItemsByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIItemsByObjWithMetadata adds a prebuilt obj
func AddSingletonIItemsWithMetadata ¶ added in v0.1.217
func AddSingletonIItemsWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIItemsWithMetadata adds a type that implements IItems
func AddSingletonIRequest ¶
func AddSingletonIRequest(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonIRequest adds a type that implements IRequest
func AddSingletonIRequestByFunc ¶
func AddSingletonIRequestByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonIRequestByFunc adds a type by a custom func
func AddSingletonIRequestByFuncWithMetadata ¶ added in v0.1.217
func AddSingletonIRequestByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIRequestByFuncWithMetadata adds a type by a custom func
func AddSingletonIRequestByObj ¶
func AddSingletonIRequestByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonIRequestByObj adds a prebuilt obj
func AddSingletonIRequestByObjWithMetadata ¶ added in v0.1.217
func AddSingletonIRequestByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIRequestByObjWithMetadata adds a prebuilt obj
func AddSingletonIRequestWithMetadata ¶ added in v0.1.217
func AddSingletonIRequestWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIRequestWithMetadata adds a type that implements IRequest
func AddTransientIItems ¶
func AddTransientIItems(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientIItems adds a type that implements IItems
func AddTransientIItemsByFunc ¶
func AddTransientIItemsByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientIItemsByFunc adds a type by a custom func
func AddTransientIItemsByFuncWithMetadata ¶ added in v0.1.217
func AddTransientIItemsByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIItemsByFuncWithMetadata adds a type by a custom func
func AddTransientIItemsWithMetadata ¶ added in v0.1.217
func AddTransientIItemsWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIItemsWithMetadata adds a type that implements IItems
func AddTransientIRequest ¶
func AddTransientIRequest(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientIRequest adds a type that implements IRequest
func AddTransientIRequestByFunc ¶
func AddTransientIRequestByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientIRequestByFunc adds a type by a custom func
func AddTransientIRequestByFuncWithMetadata ¶ added in v0.1.217
func AddTransientIRequestByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIRequestByFuncWithMetadata adds a type by a custom func
func AddTransientIRequestWithMetadata ¶ added in v0.1.217
func AddTransientIRequestWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIRequestWithMetadata adds a type that implements IRequest
func GetIItemsDefinition ¶ added in v0.1.217
GetIItemsDefinition returns that last definition registered that this container can provide
func GetIItemsDefinitions ¶ added in v0.1.217
GetIItemsDefinitions returns all definitions that this container can provide
func GetIRequestDefinition ¶ added in v0.1.217
GetIRequestDefinition returns that last definition registered that this container can provide
func GetIRequestDefinitions ¶ added in v0.1.217
GetIRequestDefinitions returns all definitions that this container can provide
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