db

package
v0.0.0-...-703e329 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const DB_PATH = "../data.db"

Variables

View Source
var (
	ErrAlreadyExist  = errors.New("DB: A datum is exist for that date")
	ErrInvalidTarget = errors.New("DB: target table is invalid")
)

Functions

func AddData

func AddData(target string, date int, temp float64, hr float64) error

func GetData

func GetData(target string, date int) (dbStruct, error)

func GetLatestData

func GetLatestData(target string) (dbStruct, error)

Types

type Data

type Data struct {
	Date []int
	Temp []float64
	HR   []float64
}

func GetDataSet

func GetDataSet(target string, duration int, start int, limit int) (Data, error)

type TrashScanner

type TrashScanner struct{}

func (TrashScanner) Scan

func (TrashScanner) Scan(interface{}) error

Jump to

Keyboard shortcuts

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