store

package
v0.0.0-...-6056432 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	Add(ts time.Time, coordinates []float64, deviceID string) error
	Open(context.Context) error
	Close(context.Context) error
	Count(context.Context) (int64, error)
	GetTracesSince(context.Context, time.Time) ([]Trace, error)
}

func NewCSVFileStore

func NewCSVFileStore(fs afero.Fs, path string) Store

func NewSQLiteStore

func NewSQLiteStore(path string) Store

type Trace

type Trace struct {
	Time string  `json:"time"`
	Lon  float64 `json:"lon"`
	Lat  float64 `json:"lat"`
}

Jump to

Keyboard shortcuts

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