-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patharrayresponse.go
62 lines (52 loc) · 1.92 KB
/
arrayresponse.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
package core
// ArrayResponse is the default response format for sending content back used by the server
type ArrayResponse struct {
Count int `json:"@iot.count,omitempty"`
NextLink string `json:"@iot.nextLink,omitempty"`
Data *interface{} `json:"value"`
}
// ArrayResponseEndpoint can be used to parse an array response containing endpoint information
type ArrayResponseEndpoint struct {
ArrayResponse
Data []*Endpoint `json:"value"`
}
// ArrayResponseThings can be used to parse an array response containing things
type ArrayResponseThings struct {
ArrayResponse
Data []*Thing `json:"value"`
}
// ArrayResponseLocations can be used to parse an array response containing locations
type ArrayResponseLocations struct {
ArrayResponse
Data []*Location `json:"value"`
}
// ArrayResponseHistoricalLocations can be used to parse an array response containing historical locations
type ArrayResponseHistoricalLocations struct {
ArrayResponse
Data []*HistoricalLocation `json:"value"`
}
// ArrayResponseDatastreams can be used to parse an array response containing datastreams
type ArrayResponseDatastreams struct {
ArrayResponse
Data []*Datastream `json:"value"`
}
// ArrayResponseSensors can be used to parse an array response containing sensors
type ArrayResponseSensors struct {
ArrayResponse
Data []*Sensor `json:"value"`
}
// ArrayResponseObservedProperty can be used to parse an array response containing observed properties
type ArrayResponseObservedProperty struct {
ArrayResponse
Data []*ObservedProperty `json:"value"`
}
// ArrayResponseObservations can be used to parse an array response containing observations
type ArrayResponseObservations struct {
ArrayResponse
Data []*Observation `json:"value"`
}
// ArrayResponseFeaturesOfInterest can be used to parse an array response containing features of interest
type ArrayResponseFeaturesOfInterest struct {
ArrayResponse
Data []*FeatureOfInterest `json:"value"`
}