Documentation
¶
Index ¶
Constants ¶
const ( // TargetTypeTimeserie captures enum value "timeserie" TargetTypeTimeserie string = "timeserie" // TargetTypeTable captures enum value "table" TargetTypeTable string = "table" )
const ( // QueryFormatJSON captures enum value "json" QueryFormatJSON string = "json" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct { // datasource Datasource string `json:"datasource,omitempty"` // enable Enable bool `json:"enable,omitempty"` // icon color IconColor string `json:"iconColor,omitempty"` // name Name string `json:"name,omitempty"` // query Query string `json:"query,omitempty"` // show line ShowLine bool `json:"showLine,omitempty"` }
Annotation Annotation is the object passed by Grafana when it fetches annotations.
swagger:model Annotation
func (*Annotation) ContextValidate ¶ added in v1.1.0
ContextValidate validates this annotation based on context it is used
func (*Annotation) MarshalBinary ¶
func (m *Annotation) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Annotation) UnmarshalBinary ¶
func (m *Annotation) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Annotations ¶
type Annotations struct { // annotation Annotation *Annotation `json:"annotation,omitempty"` // range Range *Range `json:"range,omitempty"` }
Annotations encodes the information provided by Grafana in its requests.
swagger:model Annotations
func (*Annotations) ContextValidate ¶ added in v1.1.0
ContextValidate validate this annotations based on the context it is used
func (*Annotations) MarshalBinary ¶
func (m *Annotations) MarshalBinary() ([]byte, error)
MarshalBinary interface implementation
func (*Annotations) UnmarshalBinary ¶
func (m *Annotations) UnmarshalBinary(b []byte) error
UnmarshalBinary interface implementation
type Query ¶
type Query struct { // format // Enum: [json] Format *string `json:"format,omitempty"` // interval Interval string `json:"interval,omitempty"` // interval ms IntervalMs int64 `json:"intervalMs,omitempty"` // max data points MaxDataPoints int64 `json:"maxDataPoints,omitempty"` // range Range *Range `json:"range,omitempty"` // targets Targets []*Target `json:"targets"` }
Query query data requests.
swagger:model Query
func (*Query) ContextValidate ¶ added in v1.1.0
ContextValidate validate this query based on the context it is used
func (*Query) MarshalBinary ¶
MarshalBinary interface implementation
func (*Query) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Range ¶
type Range struct { // from // Format: date-time From strfmt.DateTime `json:"from,omitempty"` // to // Format: date-time To strfmt.DateTime `json:"to,omitempty"` }
Range Range specifies the time range the request is valid for.
swagger:model Range
func (*Range) ContextValidate ¶ added in v1.1.0
ContextValidate validates this range based on context it is used
func (*Range) MarshalBinary ¶
MarshalBinary interface implementation
func (*Range) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Target ¶
type Target struct { // ref Id RefID string `json:"refId,omitempty"` // target Target string `json:"target,omitempty"` // type // Enum: [timeserie table] Type *string `json:"type,omitempty"` }
Target data target.
swagger:model Target
func (*Target) ContextValidate ¶ added in v1.1.0
ContextValidate validates this target based on context it is used
func (*Target) MarshalBinary ¶
MarshalBinary interface implementation
func (*Target) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Timeserie ¶
type Timeserie struct { // datapoints Datapoints [][]interface{} `json:"datapoints"` // target Target string `json:"target,omitempty"` }
Timeserie timeserie
swagger:model Timeserie
func (*Timeserie) ContextValidate ¶ added in v1.1.0
ContextValidate validates this timeserie based on context it is used
func (*Timeserie) MarshalBinary ¶
MarshalBinary interface implementation
func (*Timeserie) UnmarshalBinary ¶
UnmarshalBinary interface implementation
type Timeseries ¶
type Timeseries []*Timeserie
Timeseries Request object passed to datasource.query function
swagger:model Timeseries
func (Timeseries) ContextValidate ¶ added in v1.1.0
ContextValidate validate this timeseries based on the context it is used