Documentation ¶
Overview ¶
Package devoquery implements the tools to load data running queries to Devo in a different ways and scenarios
Interfaces to grant abstraction between implementations are defined too
Index ¶
Constants ¶
const ( DevoQueryApiv2US = "https://apiv2-us.devo.com/search/query" DevoQueryApiv2EU = "https://apiv2-eu.devo.com/search/query" )
DevoQueryApiv2US is the public Devo API v2 URL of US site DevoQueryApiv2EU is the public Devo API v2 URL of EU site
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ColumnResult ¶
ColumnResult is columns specification in QueryResult
type QueryEngine ¶
type QueryEngine interface { RunNewQuery(from time.Time, to time.Time, query string) (*QueryResult, error) RunDefaultQuery(from time.Time, to time.Time) (*QueryResult, error) }
QueryEngine is the any Engine that can run queries to Devo
type QueryEngineToken ¶
type QueryEngineToken struct { DefaultQuery *string // contains filtered or unexported fields }
QueryEngineToken follow QueryEngine interface to make queries based on Token go get Data from Devo
func NewTokenEngine ¶
func NewTokenEngine(apiURL string, token string) (*QueryEngineToken, error)
NewTokenEngine create new QueryEngineToken
func NewTokenEngineDefaultQuery ¶
func NewTokenEngineDefaultQuery(apiURL string, token string, query string) (*QueryEngineToken, error)
NewTokenEngineDefaultQuery create new QueryTokenEngine with default query set
func (*QueryEngineToken) RunDefaultQuery ¶
func (dqt *QueryEngineToken) RunDefaultQuery(from time.Time, to time.Time) (*QueryResult, error)
RunDefaultQuery run default query to Devo using dqt QueryEngineToken and return result
func (*QueryEngineToken) RunNewQuery ¶
func (dqt *QueryEngineToken) RunNewQuery(from time.Time, to time.Time, query string) (*QueryResult, error)
RunNewQuery run new query to Devo using dqt QueryEngineToken and return result
type QueryResult ¶
type QueryResult struct { Columns map[string]ColumnResult DevoQueryID string Values [][]interface{} // FIXME typefied this }
QueryResult is the result after any QueryEngine execute a query
func RunDefaultQuery ¶
func RunDefaultQuery(qe QueryEngine, from time.Time, to time.Time) (*QueryResult, error)
RunDefaultQuery run default query to Devo using QueryEngine passed as argument and return result
func RunNewQuery ¶
func RunNewQuery(qe QueryEngine, from time.Time, to time.Time, query string) (*QueryResult, error)
RunNewQuery run new query to Devo using QueryEngine passed as argument and return result