db

package
v0.0.0-...-b2d8a4d Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

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

func (db *DB) Flush() error

func (*DB) Get

func (db *DB) Get(key string) (string, error)

func (*DB) GetData

func (db *DB) GetData(key string, data interface{}) error

func (*DB) GetPalette

func (db *DB) GetPalette() ([]color.RGBA, error)

func (*DB) GetSnapshot

func (db *DB) GetSnapshot() (api.MasterSnapshot, error)

func (*DB) GetTask

func (db *DB) GetTask(id int) (api.Task, error)

func (*DB) PullTask

func (db *DB) PullTask() (api.Task, error)

func (*DB) PushTask

func (db *DB) PushTask(task api.Task) error

func (*DB) PushTaskID

func (db *DB) PushTaskID(id int) error

func (*DB) SaveSnapshot

func (db *DB) SaveSnapshot(snapshot api.MasterSnapshot) error

func (*DB) SaveTask

func (db *DB) SaveTask(task api.Task) error

func (*DB) Set

func (db *DB) Set(key string, value string) error

func (*DB) SetData

func (db *DB) SetData(key string, data interface{}) error

func (*DB) SetPalette

func (db *DB) SetPalette(palette []color.RGBA) error

Jump to

Keyboard shortcuts

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