models

package
v0.0.0-...-1e04dac Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2018 License: GPL-3.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bike

type Bike struct {
	ID       string   `json:"id"`
	Status   int      `json:"status"`
	Location Location `json:"location"`
}

Bike model.

type Location

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

Location model.

func CreateLocation

func CreateLocation(lat, lng float64) Location

CreateLocation creates a location from given latitude and longitude.

type Trip

type Trip struct {
	ID        string     `json:"id"`
	Status    int        `json:"status"`
	BikeID    string     `json:"bike_id"`
	Locations []Location `json:"locations"`
	StartedAt time.Time  `json:"started_at"`
	EndedAt   *time.Time `json:"ended_at"`
}

Trip model.

Jump to

Keyboard shortcuts

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