From 44ff5f461882c309d2df580b077bd82575d6471f Mon Sep 17 00:00:00 2001 From: John Shahid Date: Thu, 3 Apr 2014 19:05:04 -0400 Subject: [PATCH] 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. --- influxdb.go | 6 ------ series.go | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 series.go diff --git a/influxdb.go b/influxdb.go index b07aaef812..e60910d0a9 100644 --- a/influxdb.go +++ b/influxdb.go @@ -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 ( diff --git a/series.go b/series.go new file mode 100644 index 0000000000..bcb9cc1ad0 --- /dev/null +++ b/series.go @@ -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 +}