Documentation ¶
Index ¶
- Variables
- func AddScopedITime(builder *di.Builder, implType reflect.Type)
- func AddScopedITimeByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedITimeUtils(builder *di.Builder, implType reflect.Type)
- func AddScopedITimeUtilsByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonITime(builder *di.Builder, implType reflect.Type)
- func AddSingletonITimeByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonITimeByObj(builder *di.Builder, obj interface{})
- func AddSingletonITimeUtils(builder *di.Builder, implType reflect.Type)
- func AddSingletonITimeUtilsByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonITimeUtilsByObj(builder *di.Builder, obj interface{})
- func AddTransientITime(builder *di.Builder, implType reflect.Type)
- func AddTransientITimeByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientITimeUtils(builder *di.Builder, implType reflect.Type)
- func AddTransientITimeUtilsByFunc(builder *di.Builder, implType reflect.Type, ...)
- func RemoveAllITime(builder *di.Builder)
- func RemoveAllITimeUtils(builder *di.Builder)
- type ITime
- type ITimeUtils
- type TimeNow
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeITime = di.GetInterfaceReflectType((*ITime)(nil))
ReflectTypeITime used when your service claims to implement ITime
var ReflectTypeITimeUtils = di.GetInterfaceReflectType((*ITimeUtils)(nil))
ReflectTypeITimeUtils used when your service claims to implement ITimeUtils
Functions ¶
func AddScopedITime ¶
AddScopedITime adds a type that implements ITime
func AddScopedITimeByFunc ¶
func AddScopedITimeByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedITimeByFunc adds a type by a custom func
func AddScopedITimeUtils ¶
AddScopedITimeUtils adds a type that implements ITimeUtils
func AddScopedITimeUtilsByFunc ¶
func AddScopedITimeUtilsByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddScopedITimeUtilsByFunc adds a type by a custom func
func AddSingletonITime ¶
AddSingletonITime adds a type that implements ITime
func AddSingletonITimeByFunc ¶
func AddSingletonITimeByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonITimeByFunc adds a type by a custom func
func AddSingletonITimeByObj ¶
AddSingletonITimeByObj adds a prebuilt obj
func AddSingletonITimeUtils ¶
AddSingletonITimeUtils adds a type that implements ITimeUtils
func AddSingletonITimeUtilsByFunc ¶
func AddSingletonITimeUtilsByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddSingletonITimeUtilsByFunc adds a type by a custom func
func AddSingletonITimeUtilsByObj ¶
AddSingletonITimeUtilsByObj adds a prebuilt obj
func AddTransientITime ¶
AddTransientITime adds a type that implements ITime
func AddTransientITimeByFunc ¶
func AddTransientITimeByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientITimeByFunc adds a type by a custom func
func AddTransientITimeUtils ¶
AddTransientITimeUtils adds a type that implements ITimeUtils
func AddTransientITimeUtilsByFunc ¶
func AddTransientITimeUtilsByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error))
AddTransientITimeUtilsByFunc adds a type by a custom func
func RemoveAllITime ¶
RemoveAllITime removes all ITime from the DI
func RemoveAllITimeUtils ¶
RemoveAllITimeUtils removes all ITimeUtils from the DI
Types ¶
type ITime ¶
ITime ...
func GetITimeFromContainer ¶
GetITimeFromContainer alternative to SafeGetITimeFromContainer but panics of object is not present
func GetManyITimeFromContainer ¶ added in v0.1.179
GetManyITimeFromContainer alternative to SafeGetManyITimeFromContainer but panics of object is not present
func SafeGetITimeFromContainer ¶
SafeGetITimeFromContainer trys to get the object by type, will not panic, returns nil and error
type ITimeUtils ¶
type ITimeUtils interface { // StartOfMonthUTC where offsetMonth is 0-based (0 = Current Month) StartOfMonthUTC(offsetMonth int) time.Time }
ITimeUtils ...
func GetITimeUtilsFromContainer ¶
func GetITimeUtilsFromContainer(ctn di.Container) ITimeUtils
GetITimeUtilsFromContainer alternative to SafeGetITimeUtilsFromContainer but panics of object is not present
func GetManyITimeUtilsFromContainer ¶ added in v0.1.179
func GetManyITimeUtilsFromContainer(ctn di.Container) []ITimeUtils
GetManyITimeUtilsFromContainer alternative to SafeGetManyITimeUtilsFromContainer but panics of object is not present
func SafeGetITimeUtilsFromContainer ¶
func SafeGetITimeUtilsFromContainer(ctn di.Container) (ITimeUtils, error)
SafeGetITimeUtilsFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetManyITimeUtilsFromContainer ¶ added in v0.1.179
func SafeGetManyITimeUtilsFromContainer(ctn di.Container) ([]ITimeUtils, error)
SafeGetManyITimeUtilsFromContainer trys to get the object by type, will not panic, returns nil and error