mysql

package
v0.8.4 Latest Latest
Warning

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

Go to latest
Published: Jul 9, 2020 License: MIT Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	TableName = "jobs"
)

Functions

This section is empty.

Types

type DB

type DB struct {
	// contains filtered or unexported fields
}

func New

func New(dsn string, tlsConfig *tls.Config) *DB

New instantiates a new DB.

func (DB) Close

func (d DB) Close() error

Close closes the connection to Postgres.

func (DB) Delete

func (d DB) Delete(id string) error

Delete deletes a persisted Job.

func (DB) Get

func (d DB) Get(id string) (*job.Job, error)

Get returns a persisted Job.

func (DB) GetAll

func (d DB) GetAll() ([]*job.Job, error)

GetAll returns all persisted Jobs.

func (DB) Save

func (d DB) Save(j *job.Job) error

Save persists a Job.

Jump to

Keyboard shortcuts

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