Documentation ¶
Index ¶
- Variables
- func AddScopedIServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedIServiceProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddScopedISingletonServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedISingletonServiceProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedISingletonServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedISingletonServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonIServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonIServiceProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIServiceProviderByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonIServiceProviderByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonIServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonISingletonServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonISingletonServiceProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonISingletonServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonISingletonServiceProviderByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonISingletonServiceProviderByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonISingletonServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientIServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientIServiceProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientISingletonServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientISingletonServiceProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientISingletonServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientISingletonServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func GetIServiceProviderDefinition(ctn di.Container) *di.Def
- func GetIServiceProviderDefinitions(ctn di.Container) []*di.Def
- func GetISingletonServiceProviderDefinition(ctn di.Container) *di.Def
- func GetISingletonServiceProviderDefinitions(ctn di.Container) []*di.Def
- func RemoveAllIServiceProvider(builder *di.Builder)
- func RemoveAllISingletonServiceProvider(builder *di.Builder)
- type IServiceProvider
- func GetIServiceProviderFromContainer(ctn di.Container) IServiceProvider
- func GetManyIServiceProviderFromContainer(ctn di.Container) []IServiceProvider
- func SafeGetIServiceProviderFromContainer(ctn di.Container) (IServiceProvider, error)
- func SafeGetManyIServiceProviderFromContainer(ctn di.Container) ([]IServiceProvider, error)
- type IServiceProviderInternal
- type ISingletonServiceProvider
- func GetISingletonServiceProviderFromContainer(ctn di.Container) ISingletonServiceProvider
- func GetManyISingletonServiceProviderFromContainer(ctn di.Container) []ISingletonServiceProvider
- func SafeGetISingletonServiceProviderFromContainer(ctn di.Container) (ISingletonServiceProvider, error)
- func SafeGetManyISingletonServiceProviderFromContainer(ctn di.Container) ([]ISingletonServiceProvider, error)
- type ISingletonServiceProviderInternal
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeIServiceProvider = di.GetInterfaceReflectType((*IServiceProvider)(nil))
ReflectTypeIServiceProvider used when your service claims to implement IServiceProvider
var ReflectTypeISingletonServiceProvider = di.GetInterfaceReflectType((*ISingletonServiceProvider)(nil))
ReflectTypeISingletonServiceProvider used when your service claims to implement ISingletonServiceProvider
Functions ¶
func AddScopedIServiceProvider ¶
func AddScopedIServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddScopedIServiceProvider adds a type that implements IServiceProvider
func AddScopedIServiceProviderByFunc ¶
func AddScopedIServiceProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedIServiceProviderByFunc adds a type by a custom func
func AddScopedIServiceProviderByFuncWithMetadata ¶ added in v0.1.217
func AddScopedIServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIServiceProviderByFuncWithMetadata adds a type by a custom func
func AddScopedIServiceProviderWithMetadata ¶ added in v0.1.217
func AddScopedIServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIServiceProviderWithMetadata adds a type that implements IServiceProvider
func AddScopedISingletonServiceProvider ¶
func AddScopedISingletonServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddScopedISingletonServiceProvider adds a type that implements ISingletonServiceProvider
func AddScopedISingletonServiceProviderByFunc ¶
func AddScopedISingletonServiceProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedISingletonServiceProviderByFunc adds a type by a custom func
func AddScopedISingletonServiceProviderByFuncWithMetadata ¶ added in v0.1.217
func AddScopedISingletonServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedISingletonServiceProviderByFuncWithMetadata adds a type by a custom func
func AddScopedISingletonServiceProviderWithMetadata ¶ added in v0.1.217
func AddScopedISingletonServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedISingletonServiceProviderWithMetadata adds a type that implements ISingletonServiceProvider
func AddSingletonIServiceProvider ¶
func AddSingletonIServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonIServiceProvider adds a type that implements IServiceProvider
func AddSingletonIServiceProviderByFunc ¶
func AddSingletonIServiceProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonIServiceProviderByFunc adds a type by a custom func
func AddSingletonIServiceProviderByFuncWithMetadata ¶ added in v0.1.217
func AddSingletonIServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIServiceProviderByFuncWithMetadata adds a type by a custom func
func AddSingletonIServiceProviderByObj ¶
func AddSingletonIServiceProviderByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonIServiceProviderByObj adds a prebuilt obj
func AddSingletonIServiceProviderByObjWithMetadata ¶ added in v0.1.217
func AddSingletonIServiceProviderByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIServiceProviderByObjWithMetadata adds a prebuilt obj
func AddSingletonIServiceProviderWithMetadata ¶ added in v0.1.217
func AddSingletonIServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIServiceProviderWithMetadata adds a type that implements IServiceProvider
func AddSingletonISingletonServiceProvider ¶
func AddSingletonISingletonServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonISingletonServiceProvider adds a type that implements ISingletonServiceProvider
func AddSingletonISingletonServiceProviderByFunc ¶
func AddSingletonISingletonServiceProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonISingletonServiceProviderByFunc adds a type by a custom func
func AddSingletonISingletonServiceProviderByFuncWithMetadata ¶ added in v0.1.217
func AddSingletonISingletonServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonISingletonServiceProviderByFuncWithMetadata adds a type by a custom func
func AddSingletonISingletonServiceProviderByObj ¶
func AddSingletonISingletonServiceProviderByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonISingletonServiceProviderByObj adds a prebuilt obj
func AddSingletonISingletonServiceProviderByObjWithMetadata ¶ added in v0.1.217
func AddSingletonISingletonServiceProviderByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonISingletonServiceProviderByObjWithMetadata adds a prebuilt obj
func AddSingletonISingletonServiceProviderWithMetadata ¶ added in v0.1.217
func AddSingletonISingletonServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonISingletonServiceProviderWithMetadata adds a type that implements ISingletonServiceProvider
func AddTransientIServiceProvider ¶
func AddTransientIServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientIServiceProvider adds a type that implements IServiceProvider
func AddTransientIServiceProviderByFunc ¶
func AddTransientIServiceProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientIServiceProviderByFunc adds a type by a custom func
func AddTransientIServiceProviderByFuncWithMetadata ¶ added in v0.1.217
func AddTransientIServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIServiceProviderByFuncWithMetadata adds a type by a custom func
func AddTransientIServiceProviderWithMetadata ¶ added in v0.1.217
func AddTransientIServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIServiceProviderWithMetadata adds a type that implements IServiceProvider
func AddTransientISingletonServiceProvider ¶
func AddTransientISingletonServiceProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientISingletonServiceProvider adds a type that implements ISingletonServiceProvider
func AddTransientISingletonServiceProviderByFunc ¶
func AddTransientISingletonServiceProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientISingletonServiceProviderByFunc adds a type by a custom func
func AddTransientISingletonServiceProviderByFuncWithMetadata ¶ added in v0.1.217
func AddTransientISingletonServiceProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientISingletonServiceProviderByFuncWithMetadata adds a type by a custom func
func AddTransientISingletonServiceProviderWithMetadata ¶ added in v0.1.217
func AddTransientISingletonServiceProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientISingletonServiceProviderWithMetadata adds a type that implements ISingletonServiceProvider
func GetIServiceProviderDefinition ¶ added in v0.1.217
GetIServiceProviderDefinition returns that last definition registered that this container can provide
func GetIServiceProviderDefinitions ¶ added in v0.1.217
GetIServiceProviderDefinitions returns all definitions that this container can provide
func GetISingletonServiceProviderDefinition ¶ added in v0.1.217
GetISingletonServiceProviderDefinition returns that last definition registered that this container can provide
func GetISingletonServiceProviderDefinitions ¶ added in v0.1.217
GetISingletonServiceProviderDefinitions returns all definitions that this container can provide
func RemoveAllIServiceProvider ¶
RemoveAllIServiceProvider removes all IServiceProvider from the DI
func RemoveAllISingletonServiceProvider ¶
RemoveAllISingletonServiceProvider removes all ISingletonServiceProvider from the DI
Types ¶
type IServiceProvider ¶
IServiceProvider interface
func GetIServiceProviderFromContainer ¶
func GetIServiceProviderFromContainer(ctn di.Container) IServiceProvider
GetIServiceProviderFromContainer alternative to SafeGetIServiceProviderFromContainer but panics of object is not present
func GetManyIServiceProviderFromContainer ¶ added in v0.1.178
func GetManyIServiceProviderFromContainer(ctn di.Container) []IServiceProvider
GetManyIServiceProviderFromContainer alternative to SafeGetManyIServiceProviderFromContainer but panics of object is not present
func SafeGetIServiceProviderFromContainer ¶
func SafeGetIServiceProviderFromContainer(ctn di.Container) (IServiceProvider, error)
SafeGetIServiceProviderFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetManyIServiceProviderFromContainer ¶ added in v0.1.178
func SafeGetManyIServiceProviderFromContainer(ctn di.Container) ([]IServiceProvider, error)
SafeGetManyIServiceProviderFromContainer trys to get the object by type, will not panic, returns nil and error
type IServiceProviderInternal ¶
type IServiceProviderInternal interface { IServiceProvider SetContainer(di.Container) }
IServiceProviderInternal interface
type ISingletonServiceProvider ¶
ISingletonServiceProvider interface
func GetISingletonServiceProviderFromContainer ¶
func GetISingletonServiceProviderFromContainer(ctn di.Container) ISingletonServiceProvider
GetISingletonServiceProviderFromContainer alternative to SafeGetISingletonServiceProviderFromContainer but panics of object is not present
func GetManyISingletonServiceProviderFromContainer ¶ added in v0.1.178
func GetManyISingletonServiceProviderFromContainer(ctn di.Container) []ISingletonServiceProvider
GetManyISingletonServiceProviderFromContainer alternative to SafeGetManyISingletonServiceProviderFromContainer but panics of object is not present
func SafeGetISingletonServiceProviderFromContainer ¶
func SafeGetISingletonServiceProviderFromContainer(ctn di.Container) (ISingletonServiceProvider, error)
SafeGetISingletonServiceProviderFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetManyISingletonServiceProviderFromContainer ¶ added in v0.1.178
func SafeGetManyISingletonServiceProviderFromContainer(ctn di.Container) ([]ISingletonServiceProvider, error)
SafeGetManyISingletonServiceProviderFromContainer trys to get the object by type, will not panic, returns nil and error
type ISingletonServiceProviderInternal ¶
type ISingletonServiceProviderInternal interface { ISingletonServiceProvider SetContainer(di.Container) }
ISingletonServiceProviderInternal interface