Documentation ¶
Index ¶
- Constants
- type JobStore
- type MysqlJobStore
- func (m *MysqlJobStore) Clear() error
- func (m *MysqlJobStore) Delete(id string) error
- func (m *MysqlJobStore) Init() error
- func (m *MysqlJobStore) Insert(job *models.Job) error
- func (m *MysqlJobStore) SelectAll() ([]*models.Job, error)
- func (m *MysqlJobStore) SelectByID(id string) (*models.Job, error)
- func (m *MysqlJobStore) SetJobMeta(id string, meta map[string]string) error
- func (m *MysqlJobStore) UpdateJobStatus(id string, status types.JobStatus) error
Constants ¶
View Source
const TIME_FORMAT = "2006-01-02 15:04:05"
use pre-defined date/times to format https://golang.org/pkg/time/#Parse
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MysqlJobStore ¶
type MysqlJobStore struct {
// contains filtered or unexported fields
}
func NewMysqlJobStore ¶
func NewMysqlJobStore(c dbcommon.Config) *MysqlJobStore
func (*MysqlJobStore) Clear ¶
func (m *MysqlJobStore) Clear() error
func (*MysqlJobStore) Delete ¶
func (m *MysqlJobStore) Delete(id string) error
func (*MysqlJobStore) Init ¶
func (m *MysqlJobStore) Init() error
Creates the database and job table if it doesn't already exist
func (*MysqlJobStore) SelectByID ¶
func (m *MysqlJobStore) SelectByID(id string) (*models.Job, error)
func (*MysqlJobStore) SetJobMeta ¶
func (m *MysqlJobStore) SetJobMeta(id string, meta map[string]string) error
func (*MysqlJobStore) UpdateJobStatus ¶
func (m *MysqlJobStore) UpdateJobStatus(id string, status types.JobStatus) error
Click to show internal directories.
Click to hide internal directories.