storage

package
v0.0.0-...-9604f65 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ReefPiBucket                 = "reef-pi"
	ATOBucket                    = "ato"
	ATOUsageBucket               = "ato_usage"
	CameraBucket                 = "camera"
	CameraItemBucket             = "photos"
	InletBucket                  = "inlets"
	JackBucket                   = "jacks"
	AnalogInputBucket            = "analog_inputs"
	OutletBucket                 = "outlets"
	DoserBucket                  = "doser"
	DoserUsageBucket             = "doser_usage"
	EquipmentBucket              = "equipment"
	LightingBucket               = "lightings"
	LightingUsageBucket          = "lightings_usage"
	MacroBucket                  = "macro"
	MacroUsageBucket             = "macro_usage"
	PhBucket                     = "phprobes"
	PhCalibrationBucket          = "ph_calibration"
	PhReadingsBucket             = "ph_readings"
	TemperatureBucket            = "temperature"
	TemperatureCalibrationBucket = "temperature_calibration"
	TemperatureUsageBucket       = "temperature_usage"
	TimerBucket                  = "timers"
	ErrorBucket                  = "errors"
	DriverBucket                 = "drivers"
	JournalBucket                = "journal"
	JournalUsageBucket           = "journal_usage"
)

Variables

View Source
var ErrDoesNotExist = errors.New("entity does not exist")

Functions

func NewStore

func NewStore(fname string) (*store, error)

Types

type Extractor

type Extractor func([]byte) (interface{}, error)

type ObjectStore

type ObjectStore interface {
	RawGet(string, string) ([]byte, error)
	Get(string, string, interface{}) error
	List(string, func(string, []byte) error) error
	Create(string, func(string) interface{}) error
	CreateWithID(string, string, interface{}) error
	Update(string, string, interface{}) error
	RawUpdate(string, string, []byte) error
	Delete(string, string) error
}

type Store

type Store interface {
	ObjectStore
	Close() error
	Buckets() ([]string, error)
	SubBucket(string, string) ObjectStore
	CreateBucket(string) error
	Path() string
}

func TestDB

func TestDB() (Store, error)

Jump to

Keyboard shortcuts

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