Documentation
¶
Index ¶
- Constants
- func FormatTime(t string, timeFormat string) string
- type Alert
- type AlertOption
- type ChartType
- type CreateAlertPayload
- type CreateQueryPayload
- type Dashboard
- type DashboardSpec
- type Datasource
- type DatasourceOptions
- type FieldConfig
- type Forwarder
- type ForwarderConfig
- type GrafanaDashboard
- type GrafanaPanel
- type GrafanaRow
- type GrafanaTemplate
- type JobDetails
- type JobStatus
- type Mapping
- type Query
- type QueryOptions
- type QueryResult
- type QueryResultColumn
- type QueryResultData
- type QuerySchedule
- type Resource
- type Target
- type Visualization
- type VisualizationPayload
- type VisualizationScale
- type Widget
- type WidgetOptions
- type WidgetParameterMappings
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func FormatTime ¶
Types ¶
type Alert ¶
type Alert struct {
Id int `json:"id"`
Name string `json:"name"`
AlertOption `json:"options"`
State string `json:"state"`
LastTriggered string `json:"last_triggered_at"`
Rearm int `json:"rearm"`
Query `json:"query"`
QueryId int `json:"query_id"`
}
func (*Alert) FormatAlert ¶
func (Alert) GetColumns ¶
func (Alert) GetTableData ¶
type AlertOption ¶
type CreateAlertPayload ¶
type CreateAlertPayload struct {
Name string `json:"name"`
AlertOption `json:"options"`
Rearm int `json:"rearm"`
QueryId int `json:"query_id"`
}
type CreateQueryPayload ¶
type CreateQueryPayload struct {
Name string `json:"name"`
Description string `json:"description"`
DatasourceId int `json:"data_source_id"`
Query string `json:"query"`
Tags []string `json:"tags"`
QueryOptions `json:"options"`
*QuerySchedule `json:"schedule"`
}
type DashboardSpec ¶
type DashboardSpec struct {
Dashboard Dashboard `json:"dashboard"`
Datasources map[string]Datasource `json:"datasources"`
Widgets []Widget `json:"widgets,omitempty"`
Alerts []Alert `json:"alerts,omitempty"`
}
type Datasource ¶
type Datasource struct {
Id int `json:"id"`
Name string `json:"name"`
DatasourceType string `json:"type"`
Options DatasourceOptions `json:"options"`
}
type DatasourceOptions ¶
type DatasourceOptions struct {
Url string `json:"url"`
}
type FieldConfig ¶
type Forwarder ¶
type Forwarder struct {
Config ForwarderConfig `json:"config" yaml:"config"`
Id int `json:"id" yaml:"id"`
Name string `json:"name" yaml:"name"`
Schema string `json:"schema" yaml:"schema"`
}
func (Forwarder) GetColumns ¶
func (Forwarder) GetTableData ¶
type ForwarderConfig ¶
type ForwarderConfig struct {
ApiKey string `json:"api_key,omitempty" yaml:"api_key,omitempty" yaml:"api_key,omitempty" yaml:"api_key,omitempty"`
Host string `json:"host,omitempty" yaml:"host,omitempty" yaml:"host,omitempty" yaml:"host,omitempty"`
Tags string `json:"tags,omitempty" yaml:"tags,omitempty" yaml:"tags,omitempty" yaml:"tags,omitempty"`
Type string `json:"type,omitempty" yaml:"type,omitempty" yaml:"type,omitempty" yaml:"type,omitempty"`
BufferSize string `json:"buffer_size,omitempty" yaml:"buffer_size,omitempty" yaml:"buffer_size,omitempty" yaml:"buffer_size,omitempty"`
Port string `json:"port,omitempty" yaml:"port,omitempty"`
AccessKey string `json:"access_key,omitempty" yaml:"access_key,omitempty"`
Bucket string `json:"bucket,omitempty" yaml:"bucket,omitempty"`
Endpoint string `json:"endpoint,omitempty" yaml:"endpoint,omitempty"`
FilterForward string `json:"filter_forward,omitempty" yaml:"filter_forward,omitempty"`
FlushToBucketIntervalInSeconds string `json:"flush_to_bucket_interval_in_seconds,omitempty" yaml:"flush_to_bucket_interval_in_seconds,omitempty"`
MaxObjectSizeInBytes string `json:"max_object_size_in_bytes,omitempty" yaml:"max_object_size_in_bytes,omitempty"`
Region string `json:"region,omitempty" yaml:"region,omitempty"`
SecretKey string `json:"secret_key,omitempty" yaml:"secret_key,omitempty"`
Stream string `json:"stream,omitempty" yaml:"stream,omitempty"`
Password string `json:"password,omitempty" yaml:"password,omitempty"`
User string `json:"user,omitempty" yaml:"user,omitempty"`
AccountKey string `json:"account_key,omitempty" yaml:"account_key,omitempty"`
AccountName string `json:"account_name,omitempty" yaml:"account_name,omitempty"`
ContainerName string `json:"container_name,omitempty" yaml:"container_name,omitempty"`
JsonKey string `json:"json_key,omitempty" yaml:"json_key,omitempty"`
Topic string `json:"topic,omitempty" yaml:"topic,omitempty"`
ProjectId string `json:"project_id,omitempty" yaml:"project_id,omitempty"`
ConnectionString string `json:"connection_string,omitempty" yaml:"connection_string,omitempty"`
EventHubName string `json:"event_hub_name,omitempty" yaml:"event_hub_name,omitempty"`
ApiToken string `json:"apitoken,omitempty" yaml:"apitoken,omitempty"`
Urls string `json:"urls,omitempty" yaml:"urls,omitempty"`
}
type GrafanaDashboard ¶
type GrafanaDashboard struct {
Inputs []map[string]string `json:"__inputs"`
Requires []map[string]string `json:"__requires"`
Panels []GrafanaPanel
Templating map[string][]GrafanaTemplate
Title string `json:"title"`
}
func (*GrafanaDashboard) UnmarshalJSON ¶
func (d *GrafanaDashboard) UnmarshalJSON(data []byte) error
type GrafanaPanel ¶
type GrafanaPanel struct {
FieldConfig `json:"fieldConfig"`
GridPos map[string]int `json:"gridPos"`
Targets []Target `json:"targets"`
Title string `json:"title"`
Type string `json:"type"`
Options map[string]interface{} `json:"options"`
XAxis map[string]interface{} `json:"xaxis"`
Format string `json:"format"`
Datasource string `json:"datasource"`
}
func (*GrafanaPanel) MarshalJson ¶
func (p *GrafanaPanel) MarshalJson() ([]byte, error)
func (*GrafanaPanel) UnmarshalJSON ¶
func (p *GrafanaPanel) UnmarshalJSON(data []byte) error
type GrafanaRow ¶
type GrafanaRow struct {
Title string `json:"title"`
Panels []GrafanaPanel `json:"panels"`
}
type GrafanaTemplate ¶
type GrafanaTemplate struct {
Datasource string `json:"datasource"`
Label string `json:"label"`
Name string `json:"name"`
Query interface{} `json:"query"`
Refresh int `json:"refresh"`
Type string `json:"type"`
Options []map[string]interface{} `json:"options,omitempty"`
}
func (*GrafanaTemplate) MarshalJson ¶
func (t *GrafanaTemplate) MarshalJson() ([]byte, error)
func (*GrafanaTemplate) UnmarshalJSON ¶
func (t *GrafanaTemplate) UnmarshalJSON(data []byte) error
type JobDetails ¶
type Mapping ¶
type Mapping struct {
Application string `json:"application"`
Createts int `json:"createts"`
Name string `json:"name"`
ID int `json:"id"`
Namespace string `json:"namespace"`
Updatets int `json:"updatets"`
}
func (Mapping) GetColumns ¶
func (Mapping) GetTableData ¶
type Query ¶
type Query struct {
Id int `json:"id,omitempty"`
LatestQueryDataId int `json:"latest_query_data_id,omitempty"`
Name string `json:"name"`
Description string `json:"description"`
Query string `json:"query"`
IsArchived bool `json:"is_archived"`
IsDraft bool `json:"is_draft"`
DataSourceId int `json:"data_source_id,omitempty"`
Version int `json:"version"`
Tags []string `json:"tags"`
QueryOptions `json:"options"`
*QuerySchedule `json:"schedule"`
}
type QueryOptions ¶
type QueryOptions struct {
Parameters []map[string]interface{} `json:"parameters"`
}
type QueryResult ¶
type QueryResult struct {
Id int `json:"id,omitempty"`
DataSourceId int `json:"data_source_id"`
Query string `json:"query"`
Data QueryResultData `json:"data,omitempty"`
Runtime float64 `json:"runtime,omitempty"`
RetrievedAt string `json:"retrieved_at,omitempty"`
Parameters map[string]string `json:"parameters"`
MaxAge int `json:"max_age"`
QueryHash string `json:"query_hash"`
}
type QueryResultColumn ¶
type QueryResultData ¶
type QueryResultData struct {
Columns []*QueryResultColumn `json:"columns"`
Rows []*map[string]string `json:"rows"`
Processed bool `json:"-"`
}
type QuerySchedule ¶
type Visualization ¶
type VisualizationPayload ¶
type VisualizationScale ¶
func GetVisualizationScale ¶
func GetVisualizationScale() VisualizationScale
type WidgetOptions ¶
Click to show internal directories.
Click to hide internal directories.