Documentation
¶
Index ¶
- Variables
- func CloseQuery(queryID uint64) (string, error)
- func GetData(queryID uint64) (string, error)
- func LogEvent(event Event) error
- func Shutdown()
- func Startup()
- type Event
- type Query
- type QueryCategoriesOptions
- type QuerySeriesOptions
- type QueryTextOptions
- type ReportColumnDisambiguation
- type ReportCondition
- type ReportEntry
Constants ¶
This section is empty.
Variables ¶
View Source
var EventsLogged uint64
EventsLogged records the number of events logged
Functions ¶
func CloseQuery ¶ added in v0.1.2
CloseQuery closes the query now
Types ¶
type Event ¶
type Event struct {
// Name - A human readable name for this event. (ie "session_new" is a new session event)
Name string
// Table - the DB table that this event modifies (or nil)
Table string
// SQLOp - the SQL operation needed to serialize the event to the DB
// 1 - INSERT // 2 - UPDATE
SQLOp int
// The columns in the DB this inserts for INSERTS or qualifies if matches for UPDATES
Columns map[string]interface{}
// The columns to modify for UPDATE events
ModifiedColumns map[string]interface{}
}
Event stores an arbitrary event
type Query ¶
Query holds the results of a database query operation
func CreateQuery ¶
CreateQuery submits a database query and returns the results
type QueryCategoriesOptions ¶ added in v0.1.2
type QueryCategoriesOptions struct {
GroupColumn string `json:"groupColumn"`
AggregationFunction string `json:"aggregationFunction"`
AggregationValue string `json:"aggregationValue"`
Limit int `json:"limit"`
OrderByColumn int `json:"orderByColumn"`
OrderAsc bool `json:"orderAsc"`
}
QueryCategoriesOptions stores the query options for CATEGORY type reports
type QuerySeriesOptions ¶ added in v0.1.2
type QuerySeriesOptions struct {
Columns []string `json:"columns"`
TimeIntervalSeconds int `json:"timeIntervalSeconds"`
}
QuerySeriesOptions stores the query options for SERIES type reports
type QueryTextOptions ¶ added in v0.1.2
type QueryTextOptions struct {
Columns []string `json:"columns"`
}
QueryTextOptions stores the query options for TEXT type reports
type ReportColumnDisambiguation ¶ added in v0.1.2
type ReportColumnDisambiguation struct {
ColumnName string `json:"columnName"`
NewColumnName string `json:"newColumnName"`
}
ReportColumnDisambiguation remove and ambigious column names (used for joins)
type ReportCondition ¶ added in v0.1.2
type ReportCondition struct {
Column string `json:"column"`
Operator string `json:"operator"`
Value interface{} `json:"value"`
}
ReportCondition holds a SQL reporting condition (ie client = 1.2.3.4)
type ReportEntry ¶ added in v0.1.2
type ReportEntry struct {
UniqueID string `json:"uniqueId"`
Name string `json:"name"`
Category string `json:"category"`
Description string `json:"description"`
DisplayOrder int `json:"displayOrder"`
ReadOnly bool `json:"readOnly"`
Type string `json:"type"`
Table string `json:"table"`
Conditions []ReportCondition `json:"conditions"`
ColumnDisambiguation []ReportColumnDisambiguation `json:"columnDisambiguation"`
UserConditions []ReportCondition `json:"userConditions"`
QueryCategories QueryCategoriesOptions `json:"queryCategories"`
QueryText QueryTextOptions `json:"queryText"`
QuerySeries QuerySeriesOptions `json:"querySeries"`
}
ReportEntry is a report entry as defined in the JSON schema
Click to show internal directories.
Click to hide internal directories.