-
Notifications
You must be signed in to change notification settings - Fork 151
/
response.go
27 lines (24 loc) · 1.07 KB
/
response.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
package influxql
// Response contains the collection of results for a query.
type Response struct {
Results []Result `json:"results,omitempty"`
Err string `json:"error,omitempty"`
}
// Result represents a resultset returned from a single statement.
// Rows represents a list of rows that can be sorted consistently by name/tag.
type Result struct {
// StatementID is just the statement's position in the query. It's used
// to combine statement results if they're being buffered in memory.
StatementID int `json:"statement_id"`
Series []*Series `json:"series,omitempty"`
Partial bool `json:"partial,omitempty"`
Err string `json:"error,omitempty"`
}
// Series represents a series of rows that share the same group key returned from the execution of a statement.
type Series struct {
Name string `json:"name,omitempty"`
Tags map[string]string `json:"tags,omitempty"`
Columns []string `json:"columns,omitempty"`
Values [][]interface{} `json:"values,omitempty"`
Partial bool `json:"partial,omitempty"`
}