server

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: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(s store.Store, apiKey string, options ...Configurator) http.Handler

Types

type Configurator

type Configurator func(srv *server)

func ExposeMetrics

func ExposeMetrics(value bool) Configurator

type Geometry

type Geometry struct {
	Type        string    `json:"type"`
	Coordinates []float64 `json:"coordinates"`
}

type Location

type Location struct {
	Type       string     `json:"type"`
	Geometry   Geometry   `json:"geometry"`
	Properties Properties `json:"properties"`
}

type Properties

type Properties struct {
	Timestamp string  `json:"timestamp"`
	Altitude  float64 `json:"altitude"`
	DeviceID  string  `json:"device_id"`
}

type Request

type Request struct {
	Locations []Location `json:"locations"`
}

type Response

type Response struct {
	Result string `json:"result"`
}

Jump to

Keyboard shortcuts

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