db

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DBFILE string

DBFILE Path to sqlite database

Functions

func GetLabelShoulderLabel

func GetLabelShoulderLabel(camid int, imageTimestamp string, username string) (int, error)

GetLabelRoadsoulderLabel get roadshoulder value for a cameraID and Datetime

func GetRoadLabelCountForCamID

func GetRoadLabelCountForCamID(camid int) (int, error)

GetLabelCountForCamID - Get numberof labels for a camera

func SaveOrUpdateRoadLabel

func SaveOrUpdateRoadLabel(camid int, label int, imageTimestamp string, userName string) error

SaveOrUpdateRoadLabel - Save road-label, update cc label if exists.

func SaveOrUpdateTemp

func SaveOrUpdateTemp(camid int, temp float64, imageTimestamp string) error

Types

type Camera

type Camera struct {
	ID         int
	ForeignID  string
	Name       string
	Latitude   float64
	Longitude  float64
	Location   string
	RoadNumber string

	Status       string
	Url          string
	Municipality string
	// contains filtered or unexported fields
}

Camera camera struc

func GetCam

func GetCam(camid int) (Camera, error)

GetCam - Get a single Camera

func GetCams

func GetCams() ([]Camera, error)

GetCams returns a list of valid webcams ( ie status ="")

type RoadLabel

type RoadLabel struct {
	ID             int
	CameraID       int
	UserName       string
	ImageTimestamp string
	Label          int
	CreatedDate    string
}

Camera camera struc

func GetAllRoadLabels

func GetAllRoadLabels() ([]RoadLabel, error)

GetAllRoadLabels all road labels

func GetRoadLabel

func GetRoadLabel(camid int, imageTimestamp string) (RoadLabel, error)

GetLabel get label1 value for a cameraID and Datetime

Jump to

Keyboard shortcuts

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