job_store

package
v0.10.0-rc1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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 JobStore

type JobStore interface {
	Init() error
	Delete(string) error
	Insert(*models.Job) error
	SelectAll() ([]*models.Job, error)
	SelectByID(string) (*models.Job, error)
	UpdateJobStatus(string, types.JobStatus) error
	SetJobMeta(string, map[string]string) error
}

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) Insert

func (m *MysqlJobStore) Insert(job *models.Job) error

func (*MysqlJobStore) SelectAll

func (m *MysqlJobStore) SelectAll() ([]*models.Job, error)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL