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
- type ApiDbCommunication
- type ApiDbCommunicationPostgres
- func (dbcomm ApiDbCommunicationPostgres) RetrieveProfile(user string) (profile bst_models.BstProfile, errs []error)
- func (dbcomm ApiDbCommunicationPostgres) RetrieveUpdateableProfiles() (profiles []bst_models.BstProfile, errs []error)
- func (dbcomm ApiDbCommunicationPostgres) SetProfile(profile bst_models.BstProfile) (errs []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 ¶
type ApiDbCommunication ¶
type ApiDbCommunication interface { SetProfile(profile bst_models.BstProfile) (errs []error) RetrieveProfile(user string) (profile bst_models.BstProfile, errs []error) RetrieveUpdateableProfiles() (profiles []bst_models.BstProfile, errs []error) }
type ApiDbCommunicationPostgres ¶
type ApiDbCommunicationPostgres struct {
// contains filtered or unexported fields
}
func CreateApiDbCommunicationPostgres ¶
func CreateApiDbCommunicationPostgres(db *gorm.DB) ApiDbCommunicationPostgres
func (ApiDbCommunicationPostgres) RetrieveProfile ¶
func (dbcomm ApiDbCommunicationPostgres) RetrieveProfile(user string) (profile bst_models.BstProfile, errs []error)
func (ApiDbCommunicationPostgres) RetrieveUpdateableProfiles ¶
func (dbcomm ApiDbCommunicationPostgres) RetrieveUpdateableProfiles() (profiles []bst_models.BstProfile, errs []error)
func (ApiDbCommunicationPostgres) SetProfile ¶
func (dbcomm ApiDbCommunicationPostgres) SetProfile(profile bst_models.BstProfile) (errs []error)
Click to show internal directories.
Click to hide internal directories.