Documentation ¶
Index ¶
- Constants
- type Api
- func (self *Api) AnalyzeData(request *Request) error
- func (self *Api) Do(request *Request) (*Response, error)
- func (self *Api) DoJSON(jdata string) (*Response, error)
- func (self *Api) GetDatabase() *database.Database
- func (self *Api) IsPublicMethod(method string) bool
- func (self *Api) RegisterEventListener(username string, clbk func(string, string, float64))
- type Request
- type RequestParams
- type Response
- type ResponseData
Constants ¶
View Source
const (
VERSION = "5.1.2"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Api ¶
type Api struct {
// contains filtered or unexported fields
}
func (*Api) AnalyzeData ¶
func (*Api) GetDatabase ¶
func (*Api) IsPublicMethod ¶
type Request ¶
type Request struct { Id string `json:"id,omitempty"` Version string `json:"version,omitempty"` Method string `json:"method,omitempty"` Params *RequestParams `json:"params,omitempty"` }
type RequestParams ¶
type RequestParams struct { Email string `json:"email,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` Apikey string `json:"apikey,omitempty"` DeviceId string `json:"device_id,omitempty"` SensorId string `json:"sensor_id,omitempty"` LocationId string `json:"location_id,omitempty"` Latitude float64 `json:"latitude,omitempty"` Longitude float64 `json:"longitude,omitempty"` Name string `json:"name,omitempty"` Type string `json:"type,omitempty"` Timestamp *time.Time `json:"timestamp,string,omitempty"` Filter *database.Filter `json:"filter,omitempty"` Data map[string]map[string]float64 `json:"data,omitempty"` }
type Response ¶
type ResponseData ¶
type ResponseData struct { Users []*database.User `json:"users,omitempty"` User *database.User `json:"user,omitempty"` Devices []*database.Device `json:"devices,omitempty"` Device *database.Device `json:"device,omitempty"` Sensors []*database.Sensor `json:"sensors,omitempty"` Sensor *database.Sensor `json:"sensor,omitempty"` Locations *geojson.FeatureCollection `json:"locations,omitempty"` Measurements []*database.LocationMeasurements `json:"measurements,omitempty"` DeviceLocations []*database.DeviceLocations `json:"device_locations,omitempty"` MeasurementLocations []*database.MeasurementLocations `json:"measurements_locations,omitempty"` }
Click to show internal directories.
Click to hide internal directories.