dbstorage

package
v0.0.0-...-3444db6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const DBFILE = "data/monmotion/storage.db3"
View Source
const TableName = "images"

Variables

This section is empty.

Functions

This section is empty.

Types

type DBStorage

type DBStorage struct {
	// contains filtered or unexported fields
}
var Stor DBStorage

func (*DBStorage) Close

func (ds *DBStorage) Close() error

func (*DBStorage) DeleteImages

func (ds *DBStorage) DeleteImages(device string, state mdimg.ImageState, fromdate, todate time.Time) error

func (*DBStorage) DeleteOldSequences

func (ds *DBStorage) DeleteOldSequences(cnt int) error

func (*DBStorage) DeleteSequence

func (ds *DBStorage) DeleteSequence(triggerid string) error

func (*DBStorage) ExportSequence

func (ds *DBStorage) ExportSequence(triggerid string, path string) error

func (*DBStorage) GetIDByTime

func (ds *DBStorage) GetIDByTime(device string, captured time.Time) (string, error)

func (*DBStorage) GetSequenceInfos

func (ds *DBStorage) GetSequenceInfos(triggerid string, state mdimg.ImageState) ([]SequenceImage, error)

func (*DBStorage) GetTriggerSI

func (ds *DBStorage) GetTriggerSI() ([]SequenceImage, error)

func (*DBStorage) LoadImage

func (ds *DBStorage) LoadImage(id string, image *mdimg.MDImage) error

func (*DBStorage) LoadImageInfo

func (ds *DBStorage) LoadImageInfo(id string, image *mdimg.MDImage) error

func (*DBStorage) Open

func (ds *DBStorage) Open() error

func (*DBStorage) SaveBlock

func (ds *DBStorage) SaveBlock(device string, cacheids []string, rammaxage, dbmaxage time.Duration) error

func (*DBStorage) SetStateToSequence

func (ds *DBStorage) SetStateToSequence(triggerid string, state mdimg.ImageState) error

func (*DBStorage) Vacuum

func (ds *DBStorage) Vacuum() error

type SequenceImage

type SequenceImage struct {
	ID       string
	Captured time.Time
}

type TriggerInfo

type TriggerInfo struct {
	ID          string
	Device      string
	Captured    time.Time
	PreRecoding float64 // second
	Overrun     float64 // second
	Delete      bool
}

Jump to

Keyboard shortcuts

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