Documentation
¶
Index ¶
- Constants
- type DB
- func (db *DB) Flush() error
- func (db *DB) Get(key string) (string, error)
- func (db *DB) GetData(key string, data interface{}) error
- func (db *DB) GetPalette() ([]color.RGBA, error)
- func (db *DB) GetSnapshot() (api.MasterSnapshot, error)
- func (db *DB) GetTask(id int) (api.Task, error)
- func (db *DB) PullTask() (api.Task, error)
- func (db *DB) PushTask(task api.Task) error
- func (db *DB) PushTaskID(id int) error
- func (db *DB) SaveSnapshot(snapshot api.MasterSnapshot) error
- func (db *DB) SaveTask(task api.Task) error
- func (db *DB) Set(key string, value string) error
- func (db *DB) SetData(key string, data interface{}) error
- func (db *DB) SetPalette(palette []color.RGBA) error
Constants ¶
View Source
const PaletteKey = "palette"
View Source
const SnapshotKey = "snapshot"
View Source
const TaskQueueKey = "task_queue"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DB ¶
type DB struct {
Client *redis.Client
}
func NewConnection ¶
func NewConnection() DB
func NewTestConnection ¶
func NewTestConnection() DB
func (*DB) GetSnapshot ¶
func (db *DB) GetSnapshot() (api.MasterSnapshot, error)
func (*DB) PushTaskID ¶
func (*DB) SaveSnapshot ¶
func (db *DB) SaveSnapshot(snapshot api.MasterSnapshot) error
Click to show internal directories.
Click to hide internal directories.