Documentation ¶
Index ¶
- func ActivateJobs(db *gorm.DB, jobNames []string)
- func AddAutomaticJob(db *gorm.DB, job api_models.AutomaticJob) error
- func DeleteJob(db *gorm.DB, jobName string)
- func RetrieveAllJobs(db *gorm.DB) []api_models.AutomaticJob
- func RetrieveNamedJobs(db *gorm.DB, jobNames []string) []api_models.AutomaticJob
- func RetrievePendingJobs(db *gorm.DB) []api_models.AutomaticJob
- func ToggleJob(db *gorm.DB, jobName string)
- func UpdateJob(db *gorm.DB, job api_models.AutomaticJob) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ActivateJobs ¶
ActivateJobs should be called on any jobs that are to be triggered. This will increment their count, as well as set the next run and last run times.
func AddAutomaticJob ¶
func AddAutomaticJob(db *gorm.DB, job api_models.AutomaticJob) error
AddAutomaticJob will create a new job.
func RetrieveAllJobs ¶
func RetrieveAllJobs(db *gorm.DB) []api_models.AutomaticJob
RetrieveAllJobs will return a slice with all AutomaticJobs in the database.
func RetrieveNamedJobs ¶
func RetrieveNamedJobs(db *gorm.DB, jobNames []string) []api_models.AutomaticJob
RetrieveNamedJobs will return a slice of all AutomaticJobs that match the jobNames in the string slice provided.
func RetrievePendingJobs ¶
func RetrievePendingJobs(db *gorm.DB) []api_models.AutomaticJob
RetrievePendingJobs will return a slice of all AutomaticJobs in the database that are enabled and due to run at any time.
func UpdateJob ¶
func UpdateJob(db *gorm.DB, job api_models.AutomaticJob) error
UpdateJob will update an existing job, or create the job if it does not yet exist.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.