storage

package
v0.0.0-...-022445e Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TABLE_PREFIX = "alpr" // alpr_plates alpr_plate_images alpr_car_images alpr_properties

	CREATE_TABLE_TEMPLATE = "CREATE TABLE %s (%s)"
	SELECT_TABLE_QUERY    = "SELECT sql FROM sqlite_master WHERE type='table' AND name=?"
)

Variables

View Source
var Tables = map[string]string{
	"plates":         "id text PRIMARY KEY, start timestamp, end timestamp, camera_id int, plate string, confidence float, direction float, is_parked integer",
	"plate_images":   "id text PRIMARY KEY, image blob",
	"vehicle_images": "id text PRIMARY KEY, image blob",
	"properties":     "id text, key text, value text, confidence float",
}

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func NewStorage

func NewStorage(dbfile string) (*Storage, error)

func (*Storage) Close

func (s *Storage) Close() error

func (*Storage) StorePlate

func (s *Storage) StorePlate(plate *alpr.ALPRGroup) error

type TablePlateImages

type TablePlateImages struct {
	ID    string `db:"id"`
	Image []byte `db:"image"`
}

type TablePlates

type TablePlates struct {
	ID         string    `db:"id"`
	Start      time.Time `db:"start"`
	End        time.Time `db:"end"`
	CameraID   int       `db:"camera_id"`
	Plate      string    `db:"plate"`
	Confidence float64   `db:"confidence"`
	Direction  float64   `db:"direction"`
	IsParked   bool      `db:"is_parked"`
}

type TableProperties

type TableProperties struct {
	ID         string  `db:"id"`
	Key        string  `db:"key"`
	Value      string  `db:"value"`
	Confidence float64 `db:"confidence"`
}

type TableVehicleImages

type TableVehicleImages struct {
	ID    string `db:"id"`
	Image []byte `db:"image"`
}

Jump to

Keyboard shortcuts

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