Documentation ¶
Overview ¶
Package sqlite stores pads and shifts in a SQLite database. Times are stored as unix timestamps, so we can easily compare them.
Shift statements must be called with shift ids that are confirmed to belong to our pad (e. g. from GetShift). Taker statements must be called with taker ids that are confirmed to belong to the selected shift.
Index ¶
- Variables
- type DB
- func (db *DB) AddPad(pad shiftpad.Pad) error
- func (db *DB) AddShift(pad *shiftpad.Pad, shift shiftpad.Shift) error
- func (db *DB) ApproveTake(shift *shiftpad.Shift, take shiftpad.Take) error
- func (db *DB) DeletePad(pad shiftpad.Pad) error
- func (db *DB) DeletePads(cutoff string) error
- func (db *DB) DeleteShift(shift *shiftpad.Shift) error
- func (db *DB) GetPad(id string) (*shiftpad.Pad, error)
- func (db *DB) GetShift(pad *shiftpad.Pad, id int) (*shiftpad.Shift, error)
- func (db *DB) GetShifts(pad *shiftpad.Pad, from, to int64) ([]shiftpad.Shift, error)
- func (db *DB) GetShiftsByEvent(pad *shiftpad.Pad, eventUID string) ([]shiftpad.Shift, error)
- func (db *DB) GetTakers(shift int) ([]shiftpad.Take, error)
- func (db *DB) TakeShift(shift *shiftpad.Shift, take shiftpad.Take) error
- func (db *DB) UpdatePad(pad *shiftpad.Pad) error
- func (db *DB) UpdatePadLastUpdated(pad *shiftpad.Pad, lastUpdated string) error
- func (db *DB) UpdateShift(shift *shiftpad.Shift) error
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type DB ¶
func (*DB) ApproveTake ¶ added in v0.5.0
func (*DB) DeletePads ¶
func (*DB) GetShiftsByEvent ¶
func (*DB) UpdatePadLastUpdated ¶
Click to show internal directories.
Click to hide internal directories.