Documentation ¶
Index ¶
- Variables
- func AddScopedIBackgroundTasks(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIBackgroundTasksByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIBackgroundTasksWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddScopedIJobsProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddScopedIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIJobsProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddScopedIJobsProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonIBackgroundTasks(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIBackgroundTasksByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIBackgroundTasksByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonIBackgroundTasksByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonIBackgroundTasksWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddSingletonIJobsProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddSingletonIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIJobsProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddSingletonIJobsProviderByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
- func AddSingletonIJobsProviderByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, ...)
- func AddSingletonIJobsProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientIBackgroundTasks(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIBackgroundTasksByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIBackgroundTasksWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func AddTransientIJobsProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
- func AddTransientIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIJobsProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, ...)
- func AddTransientIJobsProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, ...)
- func GetIBackgroundTasksDefinition(ctn di.Container) *di.Def
- func GetIBackgroundTasksDefinitions(ctn di.Container) []*di.Def
- func GetIJobsProviderDefinition(ctn di.Container) *di.Def
- func GetIJobsProviderDefinitions(ctn di.Container) []*di.Def
- func RemoveAllIBackgroundTasks(builder *di.Builder)
- func RemoveAllIJobsProvider(builder *di.Builder)
- type IBackgroundTasks
- func GetIBackgroundTasksFromContainer(ctn di.Container) IBackgroundTasks
- func GetManyIBackgroundTasksFromContainer(ctn di.Container) []IBackgroundTasks
- func SafeGetIBackgroundTasksFromContainer(ctn di.Container) (IBackgroundTasks, error)
- func SafeGetManyIBackgroundTasksFromContainer(ctn di.Container) ([]IBackgroundTasks, error)
- type IJobsProvider
- func GetIJobsProviderFromContainer(ctn di.Container) IJobsProvider
- func GetManyIJobsProviderFromContainer(ctn di.Container) []IJobsProvider
- func SafeGetIJobsProviderFromContainer(ctn di.Container) (IJobsProvider, error)
- func SafeGetManyIJobsProviderFromContainer(ctn di.Container) ([]IJobsProvider, error)
- type OneTimeJob
- type OneTimeJobs
- type ScheduledJob
- type ScheduledJobs
Constants ¶
This section is empty.
Variables ¶
var ReflectTypeIBackgroundTasks = di.GetInterfaceReflectType((*IBackgroundTasks)(nil))
ReflectTypeIBackgroundTasks used when your service claims to implement IBackgroundTasks
var ReflectTypeIJobsProvider = di.GetInterfaceReflectType((*IJobsProvider)(nil))
ReflectTypeIJobsProvider used when your service claims to implement IJobsProvider
Functions ¶
func AddScopedIBackgroundTasks ¶
func AddScopedIBackgroundTasks(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddScopedIBackgroundTasks adds a type that implements IBackgroundTasks
func AddScopedIBackgroundTasksByFunc ¶
func AddScopedIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedIBackgroundTasksByFunc adds a type by a custom func
func AddScopedIBackgroundTasksByFuncWithMetadata ¶ added in v0.1.217
func AddScopedIBackgroundTasksByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIBackgroundTasksByFuncWithMetadata adds a type by a custom func
func AddScopedIBackgroundTasksWithMetadata ¶ added in v0.1.217
func AddScopedIBackgroundTasksWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIBackgroundTasksWithMetadata adds a type that implements IBackgroundTasks
func AddScopedIJobsProvider ¶
func AddScopedIJobsProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddScopedIJobsProvider adds a type that implements IJobsProvider
func AddScopedIJobsProviderByFunc ¶
func AddScopedIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddScopedIJobsProviderByFunc adds a type by a custom func
func AddScopedIJobsProviderByFuncWithMetadata ¶ added in v0.1.217
func AddScopedIJobsProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIJobsProviderByFuncWithMetadata adds a type by a custom func
func AddScopedIJobsProviderWithMetadata ¶ added in v0.1.217
func AddScopedIJobsProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddScopedIJobsProviderWithMetadata adds a type that implements IJobsProvider
func AddSingletonIBackgroundTasks ¶
func AddSingletonIBackgroundTasks(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonIBackgroundTasks adds a type that implements IBackgroundTasks
func AddSingletonIBackgroundTasksByFunc ¶
func AddSingletonIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonIBackgroundTasksByFunc adds a type by a custom func
func AddSingletonIBackgroundTasksByFuncWithMetadata ¶ added in v0.1.217
func AddSingletonIBackgroundTasksByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIBackgroundTasksByFuncWithMetadata adds a type by a custom func
func AddSingletonIBackgroundTasksByObj ¶
func AddSingletonIBackgroundTasksByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonIBackgroundTasksByObj adds a prebuilt obj
func AddSingletonIBackgroundTasksByObjWithMetadata ¶ added in v0.1.217
func AddSingletonIBackgroundTasksByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIBackgroundTasksByObjWithMetadata adds a prebuilt obj
func AddSingletonIBackgroundTasksWithMetadata ¶ added in v0.1.217
func AddSingletonIBackgroundTasksWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIBackgroundTasksWithMetadata adds a type that implements IBackgroundTasks
func AddSingletonIJobsProvider ¶
func AddSingletonIJobsProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddSingletonIJobsProvider adds a type that implements IJobsProvider
func AddSingletonIJobsProviderByFunc ¶
func AddSingletonIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddSingletonIJobsProviderByFunc adds a type by a custom func
func AddSingletonIJobsProviderByFuncWithMetadata ¶ added in v0.1.217
func AddSingletonIJobsProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIJobsProviderByFuncWithMetadata adds a type by a custom func
func AddSingletonIJobsProviderByObj ¶
func AddSingletonIJobsProviderByObj(builder *di.Builder, obj interface{}, implementedTypes ...reflect.Type)
AddSingletonIJobsProviderByObj adds a prebuilt obj
func AddSingletonIJobsProviderByObjWithMetadata ¶ added in v0.1.217
func AddSingletonIJobsProviderByObjWithMetadata(builder *di.Builder, obj interface{}, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIJobsProviderByObjWithMetadata adds a prebuilt obj
func AddSingletonIJobsProviderWithMetadata ¶ added in v0.1.217
func AddSingletonIJobsProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddSingletonIJobsProviderWithMetadata adds a type that implements IJobsProvider
func AddTransientIBackgroundTasks ¶
func AddTransientIBackgroundTasks(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientIBackgroundTasks adds a type that implements IBackgroundTasks
func AddTransientIBackgroundTasksByFunc ¶
func AddTransientIBackgroundTasksByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientIBackgroundTasksByFunc adds a type by a custom func
func AddTransientIBackgroundTasksByFuncWithMetadata ¶ added in v0.1.217
func AddTransientIBackgroundTasksByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIBackgroundTasksByFuncWithMetadata adds a type by a custom func
func AddTransientIBackgroundTasksWithMetadata ¶ added in v0.1.217
func AddTransientIBackgroundTasksWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIBackgroundTasksWithMetadata adds a type that implements IBackgroundTasks
func AddTransientIJobsProvider ¶
func AddTransientIJobsProvider(builder *di.Builder, implType reflect.Type, implementedTypes ...reflect.Type)
AddTransientIJobsProvider adds a type that implements IJobsProvider
func AddTransientIJobsProviderByFunc ¶
func AddTransientIJobsProviderByFunc(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), implementedTypes ...reflect.Type)
AddTransientIJobsProviderByFunc adds a type by a custom func
func AddTransientIJobsProviderByFuncWithMetadata ¶ added in v0.1.217
func AddTransientIJobsProviderByFuncWithMetadata(builder *di.Builder, implType reflect.Type, build func(ctn di.Container) (interface{}, error), metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIJobsProviderByFuncWithMetadata adds a type by a custom func
func AddTransientIJobsProviderWithMetadata ¶ added in v0.1.217
func AddTransientIJobsProviderWithMetadata(builder *di.Builder, implType reflect.Type, metaData map[string]interface{}, implementedTypes ...reflect.Type)
AddTransientIJobsProviderWithMetadata adds a type that implements IJobsProvider
func GetIBackgroundTasksDefinition ¶ added in v0.1.217
GetIBackgroundTasksDefinition returns that last definition registered that this container can provide
func GetIBackgroundTasksDefinitions ¶ added in v0.1.217
GetIBackgroundTasksDefinitions returns all definitions that this container can provide
func GetIJobsProviderDefinition ¶ added in v0.1.217
GetIJobsProviderDefinition returns that last definition registered that this container can provide
func GetIJobsProviderDefinitions ¶ added in v0.1.217
GetIJobsProviderDefinitions returns all definitions that this container can provide
func RemoveAllIBackgroundTasks ¶ added in v0.1.144
RemoveAllIBackgroundTasks removes all IBackgroundTasks from the DI
func RemoveAllIJobsProvider ¶ added in v0.1.144
RemoveAllIJobsProvider removes all IJobsProvider from the DI
Types ¶
type IBackgroundTasks ¶
type IBackgroundTasks interface { }
IBackgroundTasks ...
func GetIBackgroundTasksFromContainer ¶
func GetIBackgroundTasksFromContainer(ctn di.Container) IBackgroundTasks
GetIBackgroundTasksFromContainer alternative to SafeGetIBackgroundTasksFromContainer but panics of object is not present
func GetManyIBackgroundTasksFromContainer ¶ added in v0.1.178
func GetManyIBackgroundTasksFromContainer(ctn di.Container) []IBackgroundTasks
GetManyIBackgroundTasksFromContainer alternative to SafeGetManyIBackgroundTasksFromContainer but panics of object is not present
func SafeGetIBackgroundTasksFromContainer ¶
func SafeGetIBackgroundTasksFromContainer(ctn di.Container) (IBackgroundTasks, error)
SafeGetIBackgroundTasksFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetManyIBackgroundTasksFromContainer ¶ added in v0.1.178
func SafeGetManyIBackgroundTasksFromContainer(ctn di.Container) ([]IBackgroundTasks, error)
SafeGetManyIBackgroundTasksFromContainer trys to get the object by type, will not panic, returns nil and error
type IJobsProvider ¶
type IJobsProvider interface { GetScheduledJobs() ScheduledJobs GetOneTimeJobs() OneTimeJobs }
IJobsProvider ...
func GetIJobsProviderFromContainer ¶
func GetIJobsProviderFromContainer(ctn di.Container) IJobsProvider
GetIJobsProviderFromContainer alternative to SafeGetIJobsProviderFromContainer but panics of object is not present
func GetManyIJobsProviderFromContainer ¶ added in v0.1.178
func GetManyIJobsProviderFromContainer(ctn di.Container) []IJobsProvider
GetManyIJobsProviderFromContainer alternative to SafeGetManyIJobsProviderFromContainer but panics of object is not present
func SafeGetIJobsProviderFromContainer ¶
func SafeGetIJobsProviderFromContainer(ctn di.Container) (IJobsProvider, error)
SafeGetIJobsProviderFromContainer trys to get the object by type, will not panic, returns nil and error
func SafeGetManyIJobsProviderFromContainer ¶ added in v0.1.178
func SafeGetManyIJobsProviderFromContainer(ctn di.Container) ([]IJobsProvider, error)
SafeGetManyIJobsProviderFromContainer trys to get the object by type, will not panic, returns nil and error
type OneTimeJob ¶
OneTimeJob type
type ScheduledJob ¶
type ScheduledJob struct { // Job must support Run() func Job cron.Job // Schedule "* */5 * * * *","@every 1h30m10s","@midnight" Schedule string }
ScheduledJob cron