models

package
v0.0.0-...-ca33a47 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2018 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Overview

Package models contains various data-structures both for internal usage and payloads in the RESTapi

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilePayload

type FilePayload struct {
	UID  string
	Path string
}

FilePayload - Client side payload for inserting a track.

type FirebaseQuery

type FirebaseQuery struct {
	UID    string
	TmSk   int
	Qt     string
	OrdDir firestore.Direction
}

FirebaseQuery - struct denoting a Firebase query to receive data. UID string User ID as string TmSk int Time to skip the query to (pagination) Qt string Query type, if multiple flavors of queries exist (ex. getTracks personal and public) OrdDir firestore.Direction Which direction to order by. Default: Asc.

func NewFirebaseQuery

func NewFirebaseQuery(u string, t string, q string, od string) FirebaseQuery

NewFirebaseQuery - Initializes the query with values from strings (from header), sets TmSk = 1 and OrdDir = Asc as default.

type IgcMetadata

type IgcMetadata struct {
	Privacy     bool
	Time        int64
	UID         string
	Record      gtbackend.Record
	TrackID     string
	TrackPoints []TrackPoint
}

IgcMetadata - Contains all metadata from a IGC file as well as some additional data.

type TrackPoint

type TrackPoint struct {
	Time        int64   `json:"Time"`
	Latitude    float64 `json:"Latitude"`
	Longitude   float64 `json:"Longitude"`
	Valid       bool    `json:"Valid"`
	PressureAlt int     `json:"Pressure_alt"`
	GPSAlt      int     `json:"GPS_alt"`
	Accuracy    float64 `json:"Accuracy"`
	EngineRPM   float64 `json:"Engine_RPM"`
}

TrackPoint A TrackPoint object used to compress Track data shown to user

type User

type User struct {
	UID           string `json:"uid, omitempty"`
	Email         string `json:"email"`
	EmailVerified bool   `json:"emailVerified"`
	PhoneNumber   string `json:"phoneNumber, omitempty"`
	Password      string `json:"password"`
	DisplayName   string `json:"displayName"`
	Disabled      bool   `json:"disabled"`
}

User structure The firebase user also contains 'emailVerified' and 'photoURL'. The first is default false and should not be possible to set through a request. Our platform has no user images so ignored for now.

Jump to

Keyboard shortcuts

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