tablet

package
v0.0.0-...-79ef193 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2016 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	ID         string
	Name       string
	Token      string
	RespObj    Ride
	Rawresp    string
	StatusCode int
	Login      string
	// contains filtered or unexported fields
}

Device one unit of hive

"device":{"name":"", "device_code":"nomer", "registration_id":"id"}

func (*Device) GetRide

func (t *Device) GetRide(wg *sync.WaitGroup, cfg *config.HiveConfig, res chan result.Result) error

GetRide create connect amd get ride for that token

func (*Device) InitDevice

func (t *Device) InitDevice(cfg *config.HiveConfig) error

InitDevice generate all needed data for Device

type FactRides

type FactRides struct {
	ID         uint        `json:"id"`
	TimeStart  string      `json:"time_start"`
	RidePoints []RidePoint `json:"ride_points"`
}

FactRides - struct for json unmarshal FactRides in responce

type Order

type Order struct {
	ID            uint   `json:"id"`
	Status        string `json:"status"`
	ServiceType   string `json:"service_type"`
	ServiceObject `json:"service_object"`
}

Order - struct for json unmarshal Order in responce

type Ride

type Ride struct {
	ID        uint        `json:"id"`
	Number    string      `json:"number"`
	Duration  uint        `json:"duration"`
	Distance  float32     `json:"distance"`
	FactRides []FactRides `json:"fact_rides"`
}

Ride - basic struct for Mobile controller responce

type RidePoint

type RidePoint struct {
	ID          uint    `json:"id"`
	Number      uint    `json:"number"`
	Lat         float32 `json:"lat"`
	Lng         float32 `json:"lng"`
	AddressText string  `json:"address_text"`
	Status      string  `json:"status"`
	Kind        string  `json:"kind"`
	Order       `json:"order"`
}

RidePoint - struct for json unmarshal RidePoint in responce

type ServiceObject

type ServiceObject struct {
	ID      uint   `json:"id"`
	Name    string `json:"name"`
	ObjType string `json:"type"`
	TimeT   string `json:"time_t"`
	Phones  string `json:"phones"`
	TimeG1  string `json:"time_g1"`
	TimeG2  string `json:"time_g2"`
}

ServiceObject - struct for json unmarshal ServiceObject in responce

Jump to

Keyboard shortcuts

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