db

package
v0.0.0-...-735ccfd Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	DB *sqlx.DB
}

func NewDB

func NewDB(d *sql.DB) *DB

func (*DB) CreateJob

func (db *DB) CreateJob(job *types.Job) error

CreateJob is a tiny method to make sure the db is alive

func (*DB) GetJobs

func (db *DB) GetJobs() ([]*types.Job, error)

func (*DB) GetPendingJobs

func (db *DB) GetPendingJobs() ([]*types.Job, error)

GetPendingJobs gets jobs where try > -1 and try < 4 and sent is false

func (*DB) Ping

func (db *DB) Ping() error

Ping is a tiny method to make sure the db is alive

func (*DB) UpdateJob

func (db *DB) UpdateJob(job *types.Job) error

Jump to

Keyboard shortcuts

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