decoder

package
v0.16.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2021 License: MIT Imports: 22 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidAlertValueFunc = fmt.Errorf("invalid alert value function")
View Source
var ErrInvalidColoringTarget = fmt.Errorf("invalid coloring target")
View Source
var ErrInvalidDataFormat = fmt.Errorf("invalid data format")
View Source
var ErrInvalidLegendAttribute = fmt.Errorf("invalid legend attribute")
View Source
var ErrInvalidSingleStatValueType = fmt.Errorf("invalid single stat value type")
View Source
var ErrInvalidSparkLineMode = fmt.Errorf("invalid sparkline mode")
View Source
var ErrInvalidStackdriverAggregation = fmt.Errorf("invalid stackdriver aggregation type")
View Source
var ErrInvalidStackdriverAlignment = fmt.Errorf("invalid stackdriver alignment method")
View Source
var ErrInvalidStackdriverType = fmt.Errorf("invalid stackdriver target type")
View Source
var ErrInvalidTimezone = fmt.Errorf("invalid timezone")
View Source
var ErrNoAlertThresholdDefined = fmt.Errorf("no threshold defined")
View Source
var ErrPanelNotConfigured = fmt.Errorf("panel not configured")
View Source
var ErrTargetNotConfigured = fmt.Errorf("target not configured")
View Source
var ErrVariableNotConfigured = fmt.Errorf("variable not configured")

Functions

func UnmarshalYAML

func UnmarshalYAML(input io.Reader) (builder.Builder, error)

Types

type AlertCondition added in v0.6.0

type AlertCondition struct {
	Operand   string
	Value     AlertValue `yaml:",flow"`
	Threshold AlertThreshold
}

type AlertThreshold added in v0.6.0

type AlertThreshold struct {
	HasNoValue   bool       `yaml:"has_no_value,omitempty"`
	Above        *float64   `yaml:",omitempty"`
	Below        *float64   `yaml:",omitempty"`
	OutsideRange [2]float64 `yaml:"outside_range,omitempty,flow"`
	WithinRange  [2]float64 `yaml:"within_range,omitempty,flow"`
}

type AlertValue added in v0.6.0

type AlertValue struct {
	Func     string
	QueryRef string `yaml:"ref"`
	From     string
	To       string
}

type DashboardGraph added in v0.6.0

type DashboardGraph struct {
	Title         string
	Description   string  `yaml:",omitempty"`
	Span          float32 `yaml:",omitempty"`
	Height        string  `yaml:",omitempty"`
	Transparent   bool    `yaml:",omitempty"`
	Datasource    string  `yaml:",omitempty"`
	Targets       []Target
	Axes          *GraphAxes          `yaml:",omitempty"`
	Legend        []string            `yaml:",omitempty,flow"`
	Alert         *GraphAlert         `yaml:",omitempty"`
	Visualization *GraphVisualization `yaml:",omitempty"`
}

type DashboardHeatmap added in v0.13.0

type DashboardHeatmap struct {
	Title           string
	Description     string  `yaml:",omitempty"`
	Span            float32 `yaml:",omitempty"`
	Height          string  `yaml:",omitempty"`
	Transparent     bool    `yaml:",omitempty"`
	Datasource      string  `yaml:",omitempty"`
	DataFormat      string  `yaml:"data_format,omitempty"`
	HideZeroBuckets bool    `yaml:"hide_zero_buckets"`
	HightlightCards bool    `yaml:"highlight_cards"`
	Targets         []Target
	ReverseYBuckets bool            `yaml:"reverse_y_buckets,omitempty"`
	Tooltip         *HeatmapTooltip `yaml:",omitempty"`
}

type DashboardModel added in v0.6.0

type DashboardModel struct {
	Title           string
	Editable        bool
	SharedCrosshair bool `yaml:"shared_crosshair"`
	Tags            []string
	AutoRefresh     string `yaml:"auto_refresh"`

	Time     [2]string
	Timezone string

	TagsAnnotation []dashboard.TagAnnotation `yaml:"tags_annotations"`
	Variables      []DashboardVariable

	Rows []DashboardRow
}

type DashboardPanel added in v0.6.0

type DashboardPanel struct {
	Graph      *DashboardGraph      `yaml:",omitempty"`
	Table      *DashboardTable      `yaml:",omitempty"`
	SingleStat *DashboardSingleStat `yaml:"single_stat,omitempty"`
	Text       *DashboardText       `yaml:",omitempty"`
	Heatmap    *DashboardHeatmap    `yaml:",omitempty"`
}

type DashboardRow added in v0.6.0

type DashboardRow struct {
	Name   string
	Repeat string `yaml:"repeat_for,omitempty"`
	Panels []DashboardPanel
}

type DashboardSingleStat added in v0.6.0

type DashboardSingleStat struct {
	Title       string
	Description string  `yaml:",omitempty"`
	Span        float32 `yaml:",omitempty"`
	Height      string  `yaml:",omitempty"`
	Transparent bool    `yaml:",omitempty"`
	Datasource  string  `yaml:",omitempty"`
	Unit        string
	Decimals    *int   `yaml:",omitempty"`
	ValueType   string `yaml:"value_type"`
	SparkLine   string `yaml:"sparkline"`
	Targets     []Target
	Thresholds  [2]string
	Colors      [3]string
	Color       []string `yaml:",omitempty"`
}

type DashboardTable added in v0.6.0

type DashboardTable struct {
	Title                  string
	Description            string  `yaml:",omitempty"`
	Span                   float32 `yaml:",omitempty"`
	Height                 string  `yaml:",omitempty"`
	Transparent            bool    `yaml:",omitempty"`
	Datasource             string  `yaml:",omitempty"`
	Targets                []Target
	HiddenColumns          []string            `yaml:"hidden_columns,flow"`
	TimeSeriesAggregations []table.Aggregation `yaml:"time_series_aggregations"`
}

type DashboardText added in v0.6.0

type DashboardText struct {
	Title       string
	Description string  `yaml:",omitempty"`
	Span        float32 `yaml:",omitempty"`
	Height      string  `yaml:",omitempty"`
	Transparent bool    `yaml:",omitempty"`
	HTML        string  `yaml:",omitempty"`
	Markdown    string  `yaml:",omitempty"`
}

type DashboardVariable added in v0.6.0

type DashboardVariable struct {
	Interval   *VariableInterval   `yaml:",omitempty"`
	Custom     *VariableCustom     `yaml:",omitempty"`
	Query      *VariableQuery      `yaml:",omitempty"`
	Const      *VariableConst      `yaml:",omitempty"`
	Datasource *VariableDatasource `yaml:",omitempty"`
}

type GraphAlert added in v0.6.0

type GraphAlert struct {
	Title            string
	EvaluateEvery    string `yaml:"evaluate_every"`
	For              string
	If               []AlertCondition
	Notify           string            `yaml:",omitempty"`
	Notifications    []string          `yaml:",omitempty,flow"`
	Message          string            `yaml:",omitempty"`
	OnNoData         string            `yaml:"on_no_data"`
	OnExecutionError string            `yaml:"on_execution_error"`
	Tags             map[string]string `yaml:",omitempty"`
}

type GraphAxes added in v0.6.0

type GraphAxes struct {
	Left   *GraphAxis `yaml:",omitempty"`
	Right  *GraphAxis `yaml:",omitempty"`
	Bottom *GraphAxis `yaml:",omitempty"`
}

type GraphAxis added in v0.6.0

type GraphAxis struct {
	Hidden  *bool    `yaml:",omitempty"`
	Label   string   `yaml:",omitempty"`
	Unit    *string  `yaml:",omitempty"`
	Min     *float64 `yaml:",omitempty"`
	Max     *float64 `yaml:",omitempty"`
	LogBase int      `yaml:"log_base"`
}

type GraphSeriesOverride added in v0.15.2

type GraphSeriesOverride struct {
	Alias     string
	Color     string `yaml:",omitempty"`
	Dashes    *bool  `yaml:",omitempty"`
	Lines     *bool  `yaml:",omitempty"`
	Fill      *int   `yaml:",omitempty"`
	LineWidth *int   `yaml:"line_width,omitempty"`
}

type GraphVisualization added in v0.12.11

type GraphVisualization struct {
	NullValue string                `yaml:",omitempty"`
	Staircase bool                  `yaml:",omitempty"`
	Overrides []GraphSeriesOverride `yaml:"overrides,omitempty"`
}

type GraphiteTarget added in v0.14.0

type GraphiteTarget struct {
	Query  string
	Ref    string `yaml:",omitempty"`
	Hidden bool   `yaml:",omitempty"`
}

type HeatmapTooltip added in v0.13.0

type HeatmapTooltip struct {
	Show          bool
	ShowHistogram bool
	Decimals      *int `yaml:",omitempty"`
}

type InfluxDBTarget added in v0.15.0

type InfluxDBTarget struct {
	Query  string
	Ref    string `yaml:",omitempty"`
	Hidden bool   `yaml:",omitempty"`
}

type PrometheusTarget added in v0.6.0

type PrometheusTarget struct {
	Query          string
	Legend         string `yaml:",omitempty"`
	Ref            string `yaml:",omitempty"`
	Hidden         bool   `yaml:",omitempty"`
	Format         string `yaml:",omitempty"`
	Instant        bool   `yaml:",omitempty"`
	IntervalFactor *int   `yaml:"interval_factor,omitempty"`
}

type StackdriverAlignment added in v0.11.0

type StackdriverAlignment struct {
	Method string
	Period string
}

type StackdriverFilters added in v0.11.0

type StackdriverFilters struct {
	Eq         map[string]string `yaml:",omitempty"`
	Neq        map[string]string `yaml:",omitempty"`
	Matches    map[string]string `yaml:",omitempty"`
	NotMatches map[string]string `yaml:"not_matches,omitempty"`
}

type StackdriverTarget added in v0.11.0

type StackdriverTarget struct {
	Project     string
	Type        string
	Metric      string
	Filters     StackdriverFilters    `yaml:",omitempty"`
	Aggregation string                `yaml:",omitempty"`
	Alignment   *StackdriverAlignment `yaml:",omitempty"`
	Legend      string                `yaml:",omitempty"`
	Ref         string                `yaml:",omitempty"`
	Hidden      bool                  `yaml:",omitempty"`
	GroupBy     []string              `yaml:",omitempty"`
}

type Target added in v0.6.0

type Target struct {
	Prometheus  *PrometheusTarget  `yaml:",omitempty"`
	Graphite    *GraphiteTarget    `yaml:",omitempty"`
	InfluxDB    *InfluxDBTarget    `yaml:"influxdb,omitempty"`
	Stackdriver *StackdriverTarget `yaml:",omitempty"`
}

type VariableConst added in v0.6.0

type VariableConst struct {
	Name      string
	Label     string
	Default   string
	ValuesMap map[string]string `yaml:"values_map"`
}

type VariableCustom added in v0.6.0

type VariableCustom struct {
	Name       string
	Label      string
	Default    string
	ValuesMap  map[string]string `yaml:"values_map"`
	IncludeAll bool              `yaml:"include_all"`
	AllValue   string            `yaml:"all_value,omitempty"`
}

type VariableDatasource added in v0.12.9

type VariableDatasource struct {
	Name  string
	Label string

	Type string

	Regex      string
	IncludeAll bool `yaml:"include_all"`
}

type VariableInterval added in v0.6.0

type VariableInterval struct {
	Name    string
	Label   string
	Default string
	Values  []string `yaml:",flow"`
}

type VariableQuery added in v0.6.0

type VariableQuery struct {
	Name  string
	Label string

	Datasource string
	Request    string

	Regex      string
	IncludeAll bool   `yaml:"include_all"`
	DefaultAll bool   `yaml:"default_all"`
	AllValue   string `yaml:"all_value,omitempty"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL