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 ConstantVariableParameter
- type Datasource
- type GridItem
- type GridLayoutCollapse
- type GridLayoutDisplay
- type GridLayoutSpec
- type LabelNamesQueryVariableParameter
- type LabelValuesQueryVariableParameter
- type Layout
- type LayoutKind
- type LayoutSpec
- 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 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 GridLayoutCollapse ¶ added in v0.5.0
type GridLayoutCollapse struct {
Open bool `json:"open" yaml:"open"`
}
type GridLayoutDisplay ¶ added in v0.5.0
type GridLayoutDisplay struct {
Title string `json:"title" yaml:"title"`
Collapse *GridLayoutCollapse `json:"collapse,omitempty" yaml:"collapse,omitempty"`
}
type GridLayoutSpec ¶ added in v0.5.0
type GridLayoutSpec struct {
Display *GridLayoutDisplay `json:"display,omitempty" yaml:"display,omitempty"`
Items []GridItem `json:"items" yaml:"items"`
}
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"`
Spec LayoutSpec `json:"spec" yaml:"spec"`
}
func (*Layout) UnmarshalJSON ¶
func (*Layout) UnmarshalYAML ¶
type LayoutKind ¶
type LayoutKind string
const (
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 LayoutSpec ¶ added in v0.5.0
type LayoutSpec interface {
}
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 {
}