Documentation ¶
Index ¶
- Variables
- func AddScopedITransient(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedITransientByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedITransientByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedITransientWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonITransient(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonITransientByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonITransientByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonITransientByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonITransientByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonITransientWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientITransient(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientITransientByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientITransientByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientITransientWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func GetITransientDefinition(ctn di.Container) *di.Def
- func GetITransientDefinitions(ctn di.Container) []*di.Def
- func RemoveAllITransient(builder *di.Builder)
- type ITransient
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeITransient = di.GetInterfaceReflectType((*ITransient)(nil))
ReflectTypeITransient used when your service claims to implement ITransient
Functions ¶
func AddScopedITransient ¶
func AddScopedITransient(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddScopedITransient adds a type that implements ITransient
func AddScopedITransientByFunc ¶
func AddScopedITransientByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedITransientByFunc adds a type by a custom func
func AddScopedITransientByFuncWithMetadata ¶ added in v0.1.217
func AddScopedITransientByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedITransientByFuncWithMetadata adds a type by a custom func
func AddScopedITransientWithMetadata ¶ added in v0.1.217
func AddScopedITransientWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedITransientWithMetadata adds a type that implements ITransient
func AddSingletonITransient ¶
func AddSingletonITransient(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonITransient adds a type that implements ITransient
func AddSingletonITransientByFunc ¶
func AddSingletonITransientByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonITransientByFunc adds a type by a custom func
func AddSingletonITransientByFuncWithMetadata ¶ added in v0.1.217
func AddSingletonITransientByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonITransientByFuncWithMetadata adds a type by a custom func
func AddSingletonITransientByObj ¶
func AddSingletonITransientByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonITransientByObj adds a prebuilt obj
func AddSingletonITransientByObjWithMetadata ¶ added in v0.1.217
func AddSingletonITransientByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonITransientByObjWithMetadata adds a prebuilt obj
func AddSingletonITransientWithMetadata ¶ added in v0.1.217
func AddSingletonITransientWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonITransientWithMetadata adds a type that implements ITransient
func AddTransientITransient ¶
func AddTransientITransient(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientITransient adds a type that implements ITransient
func AddTransientITransientByFunc ¶
func AddTransientITransientByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientITransientByFunc adds a type by a custom func
func AddTransientITransientByFuncWithMetadata ¶ added in v0.1.217
func AddTransientITransientByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientITransientByFuncWithMetadata adds a type by a custom func
func AddTransientITransientWithMetadata ¶ added in v0.1.217
func AddTransientITransientWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientITransientWithMetadata adds a type that implements ITransient
func GetITransientDefinition ¶ added in v0.1.217
GetITransientDefinition returns that last definition registered that this container can provide
func GetITransientDefinitions ¶ added in v0.1.217
GetITransientDefinitions returns all definitions that this container can provide
func RemoveAllITransient ¶
RemoveAllITransient removes all ITransient from the DI
Types ¶
type ITransient ¶
ITransient ...
func GetITransientFromContainer ¶
func GetITransientFromContainer(ctn di.Container) ITransient
GetITransientFromContainer alternative to SafeGetITransientFromContainer but panics of object is not present
func GetManyITransientFromContainer ¶
func GetManyITransientFromContainer(ctn di.Container) []ITransient
GetManyITransientFromContainer alternative to SafeGetManyITransientFromContainer but panics of object is not present
func SafeGetITransientFromContainer ¶
func SafeGetITransientFromContainer(ctn di.Container) (ITransient, error)
SafeGetITransientFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetManyITransientFromContainer ¶
func SafeGetManyITransientFromContainer(ctn di.Container) ([]ITransient, error)
SafeGetManyITransientFromContainer trys to get the object by type, will not panic, returns nil and error