implement ApiSeries interface

This interface is defined in influxdb and is used by the code that
converts between internal series representation and the http api
representation. This is needed because the engine test suite was written
using the internal representation.
pull/743/head
John Shahid 2014-04-03 19:05:04 -04:00
parent b315c8936c
commit 44ff5f4618
2 changed files with 19 additions and 6 deletions

View File

@ -217,12 +217,6 @@ func (self *Client) AlterDatabasePrivilege(database, name string, isAdmin bool)
return self.updateDatabaseUserCommon(database, name, nil, &isAdmin)
}
type Series struct {
Name string `json:"name"`
Columns []string `json:"columns"`
Points [][]interface{} `json:"points"`
}
type TimePrecision string
const (

19
series.go Normal file
View File

@ -0,0 +1,19 @@
package influxdb
type Series struct {
Name string `json:"name"`
Columns []string `json:"columns"`
Points [][]interface{} `json:"points"`
}
func (self *Series) GetName() string {
return self.Name
}
func (self *Series) GetColumns() []string {
return self.Columns
}
func (self *Series) GetPoints() [][]interface{} {
return self.Points
}