storage

package
v0.0.0-...-75720aa Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Configuration

type Configuration struct {
	Host     string
	Port     int
	User     string
	Password string
	Database string
	InMemory bool
	Log      *logrus.Entry
}

type Storage

type Storage interface {
	GetAllPumps(ctx context.Context) ([]models.Pump, error)
	GetLastPumpState(ctx context.Context, pumpId int) (pio.State, error)
	PersistPumpState(ctx context.Context, pumpId int, state pio.State, timestamp time.Time) error
	GetCyclesToNotify(ctx context.Context) ([]models.Cycle, error)
	SetCyclesNotified(ctx context.Context, cycleIds []int) error

	Close() error
}

func NewStorage

func NewStorage(configuration Configuration) (Storage, error)

Jump to

Keyboard shortcuts

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