Documentation
¶
Index ¶
- type CapturingRegexp
- func (c *CapturingRegexp) GetRegexp() *regexp.Regexp
- func (c *CapturingRegexp) MarshalText() ([]byte, error)
- func (c *CapturingRegexp) MarshalYAML() (interface{}, error)
- func (c *CapturingRegexp) UnmarshalJSON(data []byte) error
- func (c *CapturingRegexp) UnmarshalYAML(unmarshal func(interface{}) error) error
- type Chart
- type ChartKind
- type ConstantVariableParameter
- type Datasource
- type ExpandLayoutParameter
- type GaugeChart
- type GridCell
- type GridLayoutParameter
- type LabelNamesQueryVariableParameter
- type LabelValuesQueryVariableParameter
- type Layout
- type LayoutKind
- type LayoutParameter
- type Line
- type LineChart
- type Panel
- type PromQLQueryVariableParameter
- type Variable
- type VariableKind
- type VariableParameter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapturingRegexp ¶
CapturingRegexp is just an alias to regexp.Regexp. It used mainly to be able to override the way to unmarshall and marshall a regexp
func (*CapturingRegexp) GetRegexp ¶
func (c *CapturingRegexp) GetRegexp() *regexp.Regexp
func (*CapturingRegexp) MarshalText ¶
func (c *CapturingRegexp) MarshalText() ([]byte, error)
MarshalText is used during the marshal of a json. It will be considered as a text and not as a json struct.
func (*CapturingRegexp) MarshalYAML ¶
func (c *CapturingRegexp) MarshalYAML() (interface{}, error)
func (*CapturingRegexp) UnmarshalJSON ¶
func (c *CapturingRegexp) UnmarshalJSON(data []byte) error
func (*CapturingRegexp) UnmarshalYAML ¶
func (c *CapturingRegexp) UnmarshalYAML(unmarshal func(interface{}) error) error
type ChartKind ¶
type ChartKind string
func (*ChartKind) UnmarshalJSON ¶
func (*ChartKind) UnmarshalYAML ¶
type ConstantVariableParameter ¶
type ConstantVariableParameter struct {
VariableParameter `json:"-" yaml:"-"`
Values []string `json:"values" yaml:"values"`
}
func (*ConstantVariableParameter) UnmarshalJSON ¶
func (v *ConstantVariableParameter) UnmarshalJSON(data []byte) error
func (*ConstantVariableParameter) UnmarshalYAML ¶
func (v *ConstantVariableParameter) UnmarshalYAML(unmarshal func(interface{}) error) error
type Datasource ¶
type Datasource struct {
// Name is the name of the datasource
Name string `json:"name" yaml:"name"`
// Kind is the datasource kind
Kind datasource.Kind `json:"kind" yaml:"kind"`
// If global is true, we are referencing a global datasource.
// When set to false, we are referencing a datasource in the same project as the current dashboard.
Global bool `json:"global" yaml:"global"`
}
func (*Datasource) UnmarshalJSON ¶
func (d *Datasource) UnmarshalJSON(data []byte) error
func (*Datasource) UnmarshalYAML ¶
func (d *Datasource) UnmarshalYAML(unmarshal func(interface{}) error) error
type ExpandLayoutParameter ¶
type ExpandLayoutParameter struct {
LayoutParameter `json:"-" yaml:"-"`
Open bool `json:"open" yaml:"open"`
Children []*common.JSONRef `json:"children" yaml:"children"`
}
type GaugeChart ¶
func (*GaugeChart) UnmarshalJSON ¶
func (l *GaugeChart) UnmarshalJSON(data []byte) error
func (*GaugeChart) UnmarshalYAML ¶
func (l *GaugeChart) UnmarshalYAML(unmarshal func(interface{}) error) error
type GridLayoutParameter ¶
type GridLayoutParameter struct {
LayoutParameter `json:"-" yaml:"-"`
Children [][]GridCell `json:"children" yaml:"children"`
}
type LabelNamesQueryVariableParameter ¶
type LabelNamesQueryVariableParameter struct {
VariableParameter `json:"-" yaml:"-"`
// Matchers is the repeated series selector argument that selects the series from which to read the label names
Matchers []string `json:"matchers,omitempty" yaml:"matchers,omitempty"`
// CapturingRegexp is the regexp used to catch and filter the result of the query.
CapturingRegexp *CapturingRegexp `json:"capturing_regexp" yaml:"capturing_regexp"`
}
LabelNamesQueryVariableParameter is representing the parameter to be used when filling the variable by using the HTTP endpoint `GET /api/v1/labels` More information here: https://prometheus.io/docs/prometheus/latest/querying/api/#getting-label-names
func (*LabelNamesQueryVariableParameter) UnmarshalJSON ¶
func (v *LabelNamesQueryVariableParameter) UnmarshalJSON(data []byte) error
func (*LabelNamesQueryVariableParameter) UnmarshalYAML ¶
func (v *LabelNamesQueryVariableParameter) UnmarshalYAML(unmarshal func(interface{}) error) error
type LabelValuesQueryVariableParameter ¶
type LabelValuesQueryVariableParameter struct {
VariableParameter `json:"-" yaml:"-"`
LabelName string `json:"label_name" yaml:"label_name"`
// Matchers is the repeated series selector argument that selects the series from which to read the label values
Matchers []string `json:"matchers,omitempty" yaml:"matchers,omitempty"`
// CapturingRegexp is the regexp used to catch and filter the result of the query.
CapturingRegexp *CapturingRegexp `json:"capturing_regexp" yaml:"capturing_regexp"`
}
LabelValuesQueryVariableParameter is representing the parameter to be used when filling the variable by using the HTTP endpoint `GET /api/v1/label/<label_name>/values` More information here: https://prometheus.io/docs/prometheus/latest/querying/api/#querying-label-values
func (*LabelValuesQueryVariableParameter) UnmarshalJSON ¶
func (v *LabelValuesQueryVariableParameter) UnmarshalJSON(data []byte) error
func (*LabelValuesQueryVariableParameter) UnmarshalYAML ¶
func (v *LabelValuesQueryVariableParameter) UnmarshalYAML(unmarshal func(interface{}) error) error
type Layout ¶
type Layout struct {
Kind LayoutKind `json:"kind" yaml:"kind"`
Parameter LayoutParameter `json:"parameter" yaml:"parameter"`
}
func (*Layout) UnmarshalJSON ¶
func (*Layout) UnmarshalYAML ¶
type LayoutKind ¶
type LayoutKind string
const ( KindExpandLayout LayoutKind = "Expand" KindGridLayout LayoutKind = "Grid" )
func (*LayoutKind) UnmarshalJSON ¶
func (k *LayoutKind) UnmarshalJSON(data []byte) error
func (*LayoutKind) UnmarshalYAML ¶
func (k *LayoutKind) UnmarshalYAML(unmarshal func(interface{}) error) error
type LayoutParameter ¶
type LayoutParameter interface {
}
type Line ¶
type Line struct {
Expr string `json:"expr" yaml:"expr"`
Legend string `json:"legend,omitempty" yaml:"legend,omitempty"`
}
func (*Line) UnmarshalJSON ¶
func (*Line) UnmarshalYAML ¶
type LineChart ¶
type LineChart struct {
Chart `json:"-" yaml:"-"`
ShowLegend bool `json:"show_legend" yaml:"show_legend"`
Lines []Line `json:"lines" yaml:"lines"`
}
func (*LineChart) UnmarshalJSON ¶
func (*LineChart) UnmarshalYAML ¶
type Panel ¶
type Panel struct {
DisplayedName string `json:"displayed_name" yaml:"displayed_name"`
Kind ChartKind `json:"kind" yaml:"kind"`
Chart Chart `json:"chart" yaml:"chart"`
}
func (*Panel) UnmarshalJSON ¶
func (*Panel) UnmarshalYAML ¶
type PromQLQueryVariableParameter ¶
type PromQLQueryVariableParameter struct {
VariableParameter `json:"-" yaml:"-"`
// Expr is the PromQL expression to be used when variable should be filled by using the HTTP endpoint
// `GET /api/v1/query_range`
// More information available here: https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries
Expr string `json:"expr,omitempty" yaml:"expr,omitempty"`
// LabelName is the name of the label which is used once the PromQL query is performed to select the labelValue in the metric
LabelName string `json:"label_name" yaml:"label_name"`
CapturingRegexp *CapturingRegexp `json:"capturing_regexp" yaml:"capturing_regexp"`
}
func (*PromQLQueryVariableParameter) UnmarshalJSON ¶
func (v *PromQLQueryVariableParameter) UnmarshalJSON(data []byte) error
func (*PromQLQueryVariableParameter) UnmarshalYAML ¶
func (v *PromQLQueryVariableParameter) UnmarshalYAML(unmarshal func(interface{}) error) error
type Variable ¶
type Variable struct {
// Kind is the type of the variable. Depending of the value of Kind, it will change the content of Parameter.
Kind VariableKind `json:"kind" yaml:"kind"`
// DisplayedName is the name that would be displayed by the UI. It should be filled only if Hide is set to false.
// It is not the name used to reference the variable in others variables or in the different panels.
// The name used for the reference is the key of map of variables
DisplayedName string `json:"displayed_name,omitempty" yaml:"displayed_name,omitempty"`
// Hide will be used by the UI to decide if the variable has to be displayed
Hide bool `json:"hide" yaml:"hide"`
// Selected is the variable selected by default if it exists
Selected string `json:"selected,omitempty" yaml:"selected,omitempty"`
Parameter VariableParameter `json:"parameter" yaml:"parameter"`
}
func (*Variable) UnmarshalJSON ¶
func (*Variable) UnmarshalYAML ¶
type VariableKind ¶
type VariableKind string
const ( KindPromQLQueryVariable VariableKind = "PromQLQuery" KindLabelNamesQueryVariable VariableKind = "LabelNamesQuery" KindLabelValuesQueryVariable VariableKind = "LabelValuesQuery" KindConstantVariable VariableKind = "Constant" )
func (*VariableKind) UnmarshalJSON ¶
func (k *VariableKind) UnmarshalJSON(data []byte) error
func (*VariableKind) UnmarshalYAML ¶
func (k *VariableKind) UnmarshalYAML(unmarshal func(interface{}) error) error
type VariableParameter ¶
type VariableParameter interface {
}