helpers

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2014 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePoints

func CreatePoints(name string, numOfColumns, numOfPoints int) []*influxdb.Series

func CreatePointsFromFunc

func CreatePointsFromFunc(name string, numOfColumns, numOfPoints int, f func(int) float64) []*influxdb.Series

func ToMap

func ToMap(series common.ApiSeries) []map[string]interface{}

Types

type Client

type Client interface {
	RunQuery(query string, c *C, timePrecision ...influxdb.TimePrecision) []*influxdb.Series
	RunInvalidQuery(query string, c *C, timePrecision ...influxdb.TimePrecision) []*influxdb.Series
	WriteData(series []*influxdb.Series, c *C, timePrecision ...influxdb.TimePrecision)
	WriteJsonData(series string, c *C, timePrecision ...influxdb.TimePrecision)
}

type DataTestClient

type DataTestClient struct {
	// contains filtered or unexported fields
}

func (*DataTestClient) CreateDatabase

func (self *DataTestClient) CreateDatabase(db string, c *C)

func (*DataTestClient) RunInvalidQuery

func (self *DataTestClient) RunInvalidQuery(query string, c *C, timePrecision ...influxdb.TimePrecision) []*influxdb.Series

func (*DataTestClient) RunQuery

func (self *DataTestClient) RunQuery(query string, c *C, timePrecision ...influxdb.TimePrecision) []*influxdb.Series

func (*DataTestClient) SetDB

func (self *DataTestClient) SetDB(db string)

func (*DataTestClient) WriteData

func (self *DataTestClient) WriteData(series []*influxdb.Series, c *C, timePrecision ...influxdb.TimePrecision)

func (*DataTestClient) WriteJsonData

func (self *DataTestClient) WriteJsonData(seriesString string, c *C, timePrecision ...influxdb.TimePrecision)

type Point

type Point struct {
	Values []interface{}
}

type Series

type Series struct {
	*common.SerializedSeries
}

func (*Series) GetValueForPointAndColumn

func (self *Series) GetValueForPointAndColumn(pointIndex int, columnName string, c *C) interface{}

type SeriesCollection

type SeriesCollection struct {
	Members []*common.SerializedSeries
}

func ResultsToSeriesCollection

func ResultsToSeriesCollection(results []*common.SerializedSeries) *SeriesCollection

func (*SeriesCollection) GetSeries

func (self *SeriesCollection) GetSeries(name string, c *C) *Series

type Server

type Server struct {
	// contains filtered or unexported fields
}

func NewServer

func NewServer(configFile string, c *C) *Server

func NewServerWithArgs added in v0.5.12

func NewServerWithArgs(configFile string, c *C, args ...string) *Server

func NewSslServer

func NewSslServer(configFile string, c *C) *Server

func (*Server) ApiPort

func (self *Server) ApiPort() int

func (*Server) AssertContinuousQueryCount added in v0.6.0

func (self *Server) AssertContinuousQueryCount(db string, count int, c *C)

func (*Server) Delete

func (self *Server) Delete(url, body string, c *C) *http.Response

func (*Server) DoesWalExist

func (self *Server) DoesWalExist() error

func (*Server) Get

func (self *Server) Get(url string, c *C) []byte

func (*Server) GetClient added in v0.5.9

func (self *Server) GetClient(db string, c *C) *influxdb.Client

optional db

func (*Server) GetErrorBody

func (self *Server) GetErrorBody(database, query, username, password string, onlyLocal bool, c *C) (string, int)

func (*Server) GetResponse

func (self *Server) GetResponse(database, query, username, password string, onlyLocal bool, c *C) *http.Response

func (*Server) Post

func (self *Server) Post(url, data string, c *C) *http.Response

func (*Server) PostGetBody

func (self *Server) PostGetBody(url, data string, c *C) []byte

func (*Server) Query

func (self *Server) Query(database, query string, onlyLocal bool, c *C) *SeriesCollection

func (*Server) QueryAsRoot

func (self *Server) QueryAsRoot(database, query string, onlyLocal bool, c *C) *SeriesCollection

func (*Server) QueryWithUsername

func (self *Server) QueryWithUsername(database, query string, onlyLocal bool, c *C, username, password string) *SeriesCollection

func (*Server) RemoveAllContinuousQueries added in v0.6.0

func (self *Server) RemoveAllContinuousQueries(db string, c *C)

func (*Server) Request

func (self *Server) Request(method, url, data string, c *C) *http.Response

func (*Server) RunQuery

func (self *Server) RunQuery(query string, precision influxdb.TimePrecision, c *C) []*influxdb.Series

func (*Server) RunQueryAsRoot

func (self *Server) RunQueryAsRoot(query string, precision influxdb.TimePrecision, c *C) []*influxdb.Series

func (*Server) RunQueryAsUser

func (self *Server) RunQueryAsUser(query string, precision influxdb.TimePrecision, username, password string, isValid bool, c *C) []*influxdb.Series

func (*Server) SetSslOnly

func (self *Server) SetSslOnly(sslOnly bool)

func (*Server) Start

func (self *Server) Start() error

func (*Server) Stop

func (self *Server) Stop()

func (*Server) VerifyForbiddenQuery

func (self *Server) VerifyForbiddenQuery(database, query string, onlyLocal bool, c *C, username, password string) string

func (*Server) WaitForServerToStart

func (self *Server) WaitForServerToStart()

func (*Server) WaitForServerToSync

func (self *Server) WaitForServerToSync()

func (*Server) WriteData

func (self *Server) WriteData(data interface{}, c *C, precision ...influxdb.TimePrecision)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL