handheldevent

package
v0.0.0-...-de2618e Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Insert

func Insert(dbs *sql.DB, handheldEvent HandheldEvent) error

Insert to insert handheldEvent into database

Types

type CountType

type CountType struct {
	Count *int `json:"count"`
}

CountType represents a wrapper for count and inlinecount

func Retrieve

func Retrieve(dbs *sql.DB, query url.Values) (interface{}, *CountType, error)

Retrieve retrieves All handheld events from database

type HandheldEvent

type HandheldEvent struct {
	// Can be FullScanStart, FullScanComplete, or Calculate
	Event string `json:"event"`
	// Time event was received in epoch
	// min: 13
	Timestamp int64 `json:"timestamp"`
}

HandheldEvent represents a handheld event model

func (*HandheldEvent) Scan

func (handheldEvent *HandheldEvent) Scan(value interface{}) error

Scan implements sql.Scanner inferfaces

func (HandheldEvent) Value

func (handheldEvent HandheldEvent) Value() (driver.Value, error)

Value implements driver.Valuer inferfaces

type Response

type Response struct {
	Results interface{} `json:"results"`
	Count   *int        `json:"count,omitempty"`
}

Response is the model used to return the query response

Jump to

Keyboard shortcuts

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