provider

package
v0.0.20 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalculationTypes

func CalculationTypes() []string

CalculationTypes The following table contains a list of calculations you can perform in Grafana. You can find these calculations in the Transform tab and in the bar gauge, gauge, and stat visualizations.

func CalculationTypesMarkdown

func CalculationTypesMarkdown() string

func CalculationTypesString

func CalculationTypesString() string

func New

func New(version string) func() provider.Provider

func NewBarGaugeDataSource

func NewBarGaugeDataSource() datasource.DataSource

func NewDashboardDataSource

func NewDashboardDataSource() datasource.DataSource

func NewGaugeDataSource

func NewGaugeDataSource() datasource.DataSource

func NewLogsDataSource added in v0.0.19

func NewLogsDataSource() datasource.DataSource

func NewStatDataSource

func NewStatDataSource() datasource.DataSource

func NewTableDataSource

func NewTableDataSource() datasource.DataSource

func NewTextDataSource

func NewTextDataSource() datasource.DataSource

func NewTimeseriesDataSource

func NewTimeseriesDataSource() datasource.DataSource

Types

type Annotation

type Annotation struct {
	Grafana    []AnnotationGrafana    `tfsdk:"grafana"`
	Prometheus []AnnotationPrometheus `tfsdk:"prometheus"`
}

type AnnotationGrafana

type AnnotationGrafana struct {
	Name        types.String                        `tfsdk:"name"`
	Enabled     types.Bool                          `tfsdk:"enabled"`
	Hidden      types.Bool                          `tfsdk:"hidden"`
	Color       types.String                        `tfsdk:"color"`
	ByDashboard []AnnotationGrafanaQueryByDashboard `tfsdk:"by_dashboard"`
	ByTags      []AnnotationGrafanaQueryByTags      `tfsdk:"by_tags"`
}

type AnnotationGrafanaQueryByDashboard

type AnnotationGrafanaQueryByDashboard struct {
	Limit types.Int64 `tfsdk:"limit"`
}

type AnnotationGrafanaQueryByTags

type AnnotationGrafanaQueryByTags struct {
	Limit    types.Int64    `tfsdk:"limit"`
	MatchAny types.Bool     `tfsdk:"match_any"`
	Tags     []types.String `tfsdk:"tags"`
}

type AnnotationPrometheus

type AnnotationPrometheus struct {
	Name    types.String              `tfsdk:"name"`
	Enabled types.Bool                `tfsdk:"enabled"`
	Hidden  types.Bool                `tfsdk:"hidden"`
	Color   types.String              `tfsdk:"color"`
	Query   AnnotationPrometheusQuery `tfsdk:"query"`
}

type AnnotationPrometheusQuery

type AnnotationPrometheusQuery struct {
	UID                 types.String `tfsdk:"datasource_uid"`
	Expr                types.String `tfsdk:"expr"`
	Step                types.String `tfsdk:"min_step"`
	Title               types.String `tfsdk:"title_format"`
	Text                types.String `tfsdk:"text_format"`
	UseValueAsTimestamp types.Bool   `tfsdk:"use_value_as_timestamp"`
	TagKeys             types.String `tfsdk:"tag_keys"`
}

type AxisDefaults

type AxisDefaults struct {
	Label     string
	Placement string
	SoftMin   *float64
	SoftMax   *float64
	Scale     ScaleDefaults
}

type AxisOptions

type AxisOptions struct {
	Label     types.String   `tfsdk:"label"`
	Placement types.String   `tfsdk:"placement"`
	SoftMin   types.Float64  `tfsdk:"soft_min"`
	SoftMax   types.Float64  `tfsdk:"soft_max"`
	Scale     []ScaleOptions `tfsdk:"scale"`
}

type BarGaugeDataSource

type BarGaugeDataSource struct {
	CompactJson bool
	Defaults    BarGaugeDefaults
}

BarGaugeDataSource defines the data source implementation.

func (*BarGaugeDataSource) Configure

func (*BarGaugeDataSource) Metadata

func (*BarGaugeDataSource) Read

func (*BarGaugeDataSource) Schema

type BarGaugeDataSourceModel

type BarGaugeDataSourceModel struct {
	Id              types.String           `tfsdk:"id"`
	Json            types.String           `tfsdk:"json"`
	CompactJson     types.Bool             `tfsdk:"compact_json"`
	Title           types.String           `tfsdk:"title"`
	Description     types.String           `tfsdk:"description"`
	Queries         []Query                `tfsdk:"queries"`
	Field           []FieldOptions         `tfsdk:"field"`
	Graph           []BarGaugeOptions      `tfsdk:"graph"`
	Overrides       []FieldOverrideOptions `tfsdk:"overrides"`
	Transformations []Transformations      `tfsdk:"transform"`
}

BarGaugeDataSourceModel describes the data source data model.

type BarGaugeDefaults

type BarGaugeDefaults struct {
	Field FieldDefaults
	Graph BarGaugeGraphDefault
}

type BarGaugeDefaultsModel

type BarGaugeDefaultsModel struct {
	Field []FieldOptions    `tfsdk:"field"`
	Graph []BarGaugeOptions `tfsdk:"graph"`
}

type BarGaugeGraphDefault

type BarGaugeGraphDefault struct {
	Orientation   string
	DisplayMode   string
	TextAlignment string
	TextSize      TextSizeDefaults
	ReduceOptions ReduceOptionDefaults
}

type BarGaugeOptions

type BarGaugeOptions struct {
	Orientation   types.String      `tfsdk:"orientation"`
	DisplayMode   types.String      `tfsdk:"display_mode"`
	TextAlignment types.String      `tfsdk:"text_alignment"`
	TextSize      []TextSizeOptions `tfsdk:"text_size"`
	ReduceOptions []ReduceOptions   `tfsdk:"options"`
}

type ByNameOverrideOptions

type ByNameOverrideOptions struct {
	Name  types.String   `tfsdk:"name"`
	Field []FieldOptions `tfsdk:"field"`
}

type ByQueryIDOverrideOptions

type ByQueryIDOverrideOptions struct {
	QueryID types.String   `tfsdk:"query_id"`
	Field   []FieldOptions `tfsdk:"field"`
}

type ByRegexOverrideOptions

type ByRegexOverrideOptions struct {
	Regex types.String   `tfsdk:"regex"`
	Field []FieldOptions `tfsdk:"field"`
}

type ByTypeOverrideOptions

type ByTypeOverrideOptions struct {
	Type  types.String   `tfsdk:"type"`
	Field []FieldOptions `tfsdk:"field"`
}

type CloudWatchDimension

type CloudWatchDimension struct {
	Name  types.String `tfsdk:"name"`
	Value types.String `tfsdk:"value"`
}

type CloudWatchLogGroup added in v0.0.19

type CloudWatchLogGroup struct {
	Name types.String `tfsdk:"name"`
	Arn  types.String `tfsdk:"arn"`
}

type CloudWatchLogsTarget added in v0.0.19

type CloudWatchLogsTarget struct {
	UID        types.String         `tfsdk:"uid"`
	Hide       types.Bool           `tfsdk:"hide"`
	Expression types.String         `tfsdk:"expression"`
	LogGroups  []CloudWatchLogGroup `tfsdk:"log_group"`
	Region     types.String         `tfsdk:"region"`
	RefId      types.String         `tfsdk:"ref_id"`
}

type CloudWatchMetricsTarget added in v0.0.19

type CloudWatchMetricsTarget struct {
	UID        types.String          `tfsdk:"uid"`
	Hide       types.Bool            `tfsdk:"hide"`
	Namespace  types.String          `tfsdk:"namespace"`
	MetricName types.String          `tfsdk:"metric_name"`
	Statistic  types.String          `tfsdk:"statistic"`
	Dimensions []CloudWatchDimension `tfsdk:"dimension"`
	MatchExact types.Bool            `tfsdk:"match_exact"`
	Region     types.String          `tfsdk:"region"`
	// etc
	RefId  types.String `tfsdk:"ref_id"`
	Period types.String `tfsdk:"period"`
	Label  types.String `tfsdk:"label"`
}

type CloudWatchTarget

type CloudWatchTarget struct {
	Metrics []CloudWatchMetricsTarget `tfsdk:"metrics"`
	Logs    []CloudWatchLogsTarget    `tfsdk:"logs"`
}

type CodeOptions

type CodeOptions struct {
	Language        types.String `tfsdk:"language"`
	ShowLineNumbers types.Bool   `tfsdk:"show_line_numbers"`
	ShowMiniMap     types.Bool   `tfsdk:"show_mini_map"`
}

type ColorDefaults

type ColorDefaults struct {
	Mode       string
	FixedColor string
	SeriesBy   string
}

type ColorOptions

type ColorOptions struct {
	Mode       types.String `tfsdk:"mode"`
	FixedColor types.String `tfsdk:"fixed_color"`
	SeriesBy   types.String `tfsdk:"series_by"`
}

type DashboardDataSource

type DashboardDataSource struct {
	CompactJson bool
	Defaults    DashboardDefaults
}

DashboardDataSource defines the data source implementation.

func (*DashboardDataSource) Configure

func (*DashboardDataSource) Metadata

func (*DashboardDataSource) Read

func (*DashboardDataSource) Schema

type DashboardDataSourceModel

type DashboardDataSourceModel struct {
	Id           types.String           `tfsdk:"id"`
	Json         types.String           `tfsdk:"json"`
	CompactJson  types.Bool             `tfsdk:"compact_json"`
	Title        types.String           `tfsdk:"title"`
	Description  types.String           `tfsdk:"description"`
	Version      types.Int64            `tfsdk:"version"`
	UID          types.String           `tfsdk:"uid"`
	Editable     types.Bool             `tfsdk:"editable"`
	Style        types.String           `tfsdk:"style"`
	GraphTooltip types.String           `tfsdk:"graph_tooltip"`
	Tags         []types.String         `tfsdk:"tags"`
	TimeOptions  []DashboardTimeOptions `tfsdk:"time"`
	Layout       Layout                 `tfsdk:"layout"`
	Variables    []Variable             `tfsdk:"variables"`
	Annotations  []Annotation           `tfsdk:"annotations"`
	Links        []Link                 `tfsdk:"links"`
}

DashboardDataSourceModel describes the data source data model.

type DashboardDefaults

type DashboardDefaults struct {
	Editable     bool
	Style        string
	GraphTooltip string
	Time         Time
}

type DashboardDefaultsModel

type DashboardDefaultsModel struct {
	Editable     types.Bool   `tfsdk:"editable"`
	Style        types.String `tfsdk:"style"`
	GraphTooltip types.String `tfsdk:"graph_tooltip"`
	Time         []TimeModel  `tfsdk:"default_time_range"`
}

type DashboardTimeOptions

type DashboardTimeOptions struct {
	Timezone              types.String                 `tfsdk:"timezone"`
	WeekStart             types.String                 `tfsdk:"week_start"`
	RefreshLiveDashboards types.Bool                   `tfsdk:"refresh_live_dashboards"`
	Range                 []TimeModel                  `tfsdk:"default_range"`
	TimePicker            []DashboardTimePickerOptions `tfsdk:"picker"`
}

type DashboardTimePickerOptions

type DashboardTimePickerOptions struct {
	Hide             types.Bool     `tfsdk:"hide"`
	NowDelay         types.String   `tfsdk:"now_delay"`
	RefreshIntervals []types.String `tfsdk:"refresh_intervals"`
	TimeOptions      []types.String `tfsdk:"time_options"`
}

type Defaults

type Defaults struct {
	CompactJson bool
	Dashboard   DashboardDefaults
	Timeseries  TimeseriesDefaults
	BarGauge    BarGaugeDefaults
	Stat        StatDefaults
	Gauge       GaugeDefaults
	Table       TableDefaults
}

type DefaultsModel

type DefaultsModel struct {
	Dashboard  []DashboardDefaultsModel  `tfsdk:"dashboard"`
	Timeseries []TimeseriesDefaultsModel `tfsdk:"timeseries"`
	BarGauge   []BarGaugeDefaultsModel   `tfsdk:"bar_gauge"`
	Stat       []StatDefaultsModel       `tfsdk:"stat"`
	Gauge      []GaugeDefaultsModel      `tfsdk:"gauge"`
	Table      []TableDefaultsModel      `tfsdk:"table"`
}

type ExpressionMathTarget added in v0.0.20

type ExpressionMathTarget struct {
	Expression types.String `tfsdk:"expression"`
}

type ExpressionReduceTarget added in v0.0.20

type ExpressionReduceTarget struct {
	Function    types.String  `tfsdk:"function"`
	Input       types.String  `tfsdk:"input"`
	Mode        types.String  `tfsdk:"mode"`
	ReplaceWith types.Float64 `tfsdk:"replace_with"`
}

type ExpressionResampleTarget added in v0.0.20

type ExpressionResampleTarget struct {
	Input      types.String `tfsdk:"input"`
	To         types.String `tfsdk:"to"`
	Downsample types.String `tfsdk:"downsample"`
	Upsample   types.String `tfsdk:"upsample"`
}

type ExpressionTarget added in v0.0.20

type ExpressionTarget struct {
	RefId    types.String               `tfsdk:"ref_id"`
	Hide     types.Bool                 `tfsdk:"hide"`
	Math     []ExpressionMathTarget     `tfsdk:"math"`
	Reduce   []ExpressionReduceTarget   `tfsdk:"reduce"`
	Resample []ExpressionResampleTarget `tfsdk:"resample"`
}

type FieldDefaults

type FieldDefaults struct {
	Unit       string
	Decimals   *int64
	Min        *float64
	Max        *float64
	NoValue    *float64
	Color      ColorDefaults
	Thresholds ThresholdDefaults
}

func NewFieldDefaults

func NewFieldDefaults() FieldDefaults

type FieldOptions

type FieldOptions struct {
	Unit       types.String       `tfsdk:"unit"`
	Decimals   types.Int64        `tfsdk:"decimals"`
	Min        types.Float64      `tfsdk:"min"`
	Max        types.Float64      `tfsdk:"max"`
	NoValue    types.Float64      `tfsdk:"no_value"`
	Color      []ColorOptions     `tfsdk:"color"`
	Mappings   []MappingOptions   `tfsdk:"mappings"`
	Thresholds []ThresholdOptions `tfsdk:"thresholds"`
}

type FieldOverrideOptions

type FieldOverrideOptions struct {
	ByName    []ByNameOverrideOptions    `tfsdk:"by_name"`
	ByRegex   []ByRegexOverrideOptions   `tfsdk:"by_regex"`
	ByType    []ByTypeOverrideOptions    `tfsdk:"by_type"`
	ByQueryID []ByQueryIDOverrideOptions `tfsdk:"by_query_id"`
}

type GaugeDataSource

type GaugeDataSource struct {
	CompactJson bool
	Defaults    GaugeDefaults
}

GaugeDataSource defines the data source implementation.

func (*GaugeDataSource) Configure

func (*GaugeDataSource) Metadata

func (*GaugeDataSource) Read

func (*GaugeDataSource) Schema

type GaugeDataSourceModel

type GaugeDataSourceModel struct {
	Id              types.String           `tfsdk:"id"`
	Json            types.String           `tfsdk:"json"`
	CompactJson     types.Bool             `tfsdk:"compact_json"`
	Title           types.String           `tfsdk:"title"`
	Description     types.String           `tfsdk:"description"`
	Queries         []Query                `tfsdk:"queries"`
	Field           []FieldOptions         `tfsdk:"field"`
	Graph           []GaugeOptions         `tfsdk:"graph"`
	Overrides       []FieldOverrideOptions `tfsdk:"overrides"`
	Transformations []Transformations      `tfsdk:"transform"`
}

GaugeDataSourceModel describes the data source data model.

type GaugeDefaults

type GaugeDefaults struct {
	Field FieldDefaults
	Graph GaugeGraphDefault
}

type GaugeDefaultsModel

type GaugeDefaultsModel struct {
	Field []FieldOptions `tfsdk:"field"`
	Graph []GaugeOptions `tfsdk:"graph"`
}

type GaugeGraphDefault

type GaugeGraphDefault struct {
	Orientation          string
	ShowThresholdLabels  bool
	ShowThresholdMarkers bool
	TextSize             TextSizeDefaults
	ReduceOptions        ReduceOptionDefaults
}

type GaugeOptions

type GaugeOptions struct {
	Orientation          types.String      `tfsdk:"orientation"`
	ShowThresholdLabels  types.Bool        `tfsdk:"show_threshold_labels"`
	ShowThresholdMarkers types.Bool        `tfsdk:"show_threshold_markers"`
	TextSize             []TextSizeOptions `tfsdk:"text_size"`
	ReduceOptions        []ReduceOptions   `tfsdk:"options"`
}

type GrafanaDashboardBuilderProvider

type GrafanaDashboardBuilderProvider struct {
	// contains filtered or unexported fields
}

GrafanaDashboardBuilderProvider defines the provider implementation.

func (*GrafanaDashboardBuilderProvider) Configure

func (*GrafanaDashboardBuilderProvider) DataSources

func (*GrafanaDashboardBuilderProvider) Metadata

func (*GrafanaDashboardBuilderProvider) Resources

func (*GrafanaDashboardBuilderProvider) Schema

type GrafanaDashboardBuilderProviderModel

type GrafanaDashboardBuilderProviderModel struct {
	CompactJson types.Bool      `tfsdk:"compact_json"`
	Defaults    []DefaultsModel `tfsdk:"defaults"`
}

GrafanaDashboardBuilderProviderModel describes the provider data model.

type Layout

type Layout struct {
	Sections []Section `tfsdk:"section"`
}
type Link struct {
	Dashboards []LinkDashboards `tfsdk:"dashboards"`
	External   []LinkExternal   `tfsdk:"external"`
}

type LinkDashboards added in v0.0.15

type LinkDashboards struct {
	Title                    types.String   `tfsdk:"title"`
	Tags                     []types.String `tfsdk:"tags"`
	AsDropdown               types.Bool     `tfsdk:"as_dropdown"`
	IncludeTimeRange         types.Bool     `tfsdk:"include_time_range"`
	IncludeTemplateVariables types.Bool     `tfsdk:"include_template_variables"`
	NewTab                   types.Bool     `tfsdk:"new_tab"`
}

type LinkExternal added in v0.0.15

type LinkExternal struct {
	Title                    types.String `tfsdk:"title"`
	Url                      types.String `tfsdk:"url"`
	Tooltip                  types.String `tfsdk:"tooltip"`
	Icon                     types.String `tfsdk:"icon"`
	IncludeTimeRange         types.Bool   `tfsdk:"include_time_range"`
	IncludeTemplateVariables types.Bool   `tfsdk:"include_template_variables"`
	NewTab                   types.Bool   `tfsdk:"new_tab"`
}

type LogsDataSource added in v0.0.19

type LogsDataSource struct {
	CompactJson bool
}

LogsDataSource defines the data source implementation.

func (*LogsDataSource) Configure added in v0.0.19

func (*LogsDataSource) Metadata added in v0.0.19

func (*LogsDataSource) Read added in v0.0.19

func (*LogsDataSource) Schema added in v0.0.19

type LogsDataSourceModel added in v0.0.19

type LogsDataSourceModel struct {
	Id          types.String  `tfsdk:"id"`
	Json        types.String  `tfsdk:"json"`
	CompactJson types.Bool    `tfsdk:"compact_json"`
	Title       types.String  `tfsdk:"title"`
	Description types.String  `tfsdk:"description"`
	Queries     []Query       `tfsdk:"queries"`
	Graph       []LogsOptions `tfsdk:"graph"`
}

LogsDataSourceModel describes the data source data model.

type LogsOptions added in v0.0.19

type LogsOptions struct {
	ShowTime         types.Bool   `tfsdk:"show_time"`
	ShowUniqueLabels types.Bool   `tfsdk:"show_unique_labels"`
	ShowCommonLabels types.Bool   `tfsdk:"show_common_labels"`
	WrapLines        types.Bool   `tfsdk:"wrap_lines"`
	PrettifyJson     types.Bool   `tfsdk:"prettify_json"`
	EnableLogDetails types.Bool   `tfsdk:"enable_log_details"`
	Deduplication    types.String `tfsdk:"deduplication"`
	Order            types.String `tfsdk:"order"`
}

type MappingOptions

type MappingOptions struct {
	Value   []ValueMappingOptions   `tfsdk:"value"`
	Range   []RangeMappingOptions   `tfsdk:"range"`
	Regex   []RegexMappingOptions   `tfsdk:"regex"`
	Special []SpecialMappingOptions `tfsdk:"special"`
}

type Panel

type Panel struct {
	Size   Size         `tfsdk:"size"`
	Source types.String `tfsdk:"source"`
}

type PrometheusTarget

type PrometheusTarget struct {
	UID     types.String `tfsdk:"uid"`
	Hide    types.Bool   `tfsdk:"hide"`
	Expr    types.String `tfsdk:"expr"`
	Instant types.Bool   `tfsdk:"instant"`
	Format  types.String `tfsdk:"format"`
	// etc
	RefId        types.String `tfsdk:"ref_id"`
	MinStep      types.String `tfsdk:"min_step"`
	LegendFormat types.String `tfsdk:"legend_format"`
}

type Query

type Query struct {
	MinInterval types.String       `tfsdk:"min_interval"`
	Prometheus  []PrometheusTarget `tfsdk:"prometheus"`
	CloudWatch  []CloudWatchTarget `tfsdk:"cloudwatch"`
	Expression  []ExpressionTarget `tfsdk:"expression"`
}

type RangeMappingOptions

type RangeMappingOptions struct {
	From        types.Float64 `tfsdk:"from"`
	To          types.Float64 `tfsdk:"to"`
	DisplayText types.String  `tfsdk:"display_text"`
	Color       types.String  `tfsdk:"color"`
}

type ReduceOptionDefaults

type ReduceOptionDefaults struct {
	Values      bool
	Fields      string
	Limit       *int64
	Calculation string
}

func NewReduceOptionDefaults

func NewReduceOptionDefaults() ReduceOptionDefaults

type ReduceOptions

type ReduceOptions struct {
	Values      types.Bool   `tfsdk:"values"`
	Fields      types.String `tfsdk:"fields"`
	Limit       types.Int64  `tfsdk:"limit"`
	Calculation types.String `tfsdk:"calculation"`
}

type RegexMappingOptions

type RegexMappingOptions struct {
	Pattern     types.String `tfsdk:"pattern"`
	DisplayText types.String `tfsdk:"display_text"`
	Color       types.String `tfsdk:"color"`
}

type ScaleDefaults

type ScaleDefaults struct {
	Type string
	Log  int
}

type ScaleOptions

type ScaleOptions struct {
	Type types.String `tfsdk:"type"`
	Log  types.Int64  `tfsdk:"log"`
}

type Section

type Section struct {
	Title     types.String `tfsdk:"title"`
	Collapsed types.Bool   `tfsdk:"collapsed"`
	Panels    []Panel      `tfsdk:"panel"`
	Rows      []SectionRow `tfsdk:"row"`
}

Section has two modes: auto layout and explicit rows

type SectionRow

type SectionRow struct {
	Panels []Panel `tfsdk:"panel"`
}

type Size

type Size struct {
	Width  types.Int64 `tfsdk:"width"`
	Height types.Int64 `tfsdk:"height"`
}

type SpecialMappingOptions

type SpecialMappingOptions struct {
	Match       types.String `tfsdk:"match"`
	DisplayText types.String `tfsdk:"display_text"`
	Color       types.String `tfsdk:"color"`
}

type StatDataSource

type StatDataSource struct {
	CompactJson bool
	Defaults    StatDefaults
}

StatDataSource defines the data source implementation.

func (*StatDataSource) Configure

func (*StatDataSource) Metadata

func (*StatDataSource) Read

func (*StatDataSource) Schema

type StatDataSourceModel

type StatDataSourceModel struct {
	Id              types.String           `tfsdk:"id"`
	Json            types.String           `tfsdk:"json"`
	CompactJson     types.Bool             `tfsdk:"compact_json"`
	Title           types.String           `tfsdk:"title"`
	Description     types.String           `tfsdk:"description"`
	Queries         []Query                `tfsdk:"queries"`
	Field           []FieldOptions         `tfsdk:"field"`
	Graph           []StatOptions          `tfsdk:"graph"`
	Overrides       []FieldOverrideOptions `tfsdk:"overrides"`
	Transformations []Transformations      `tfsdk:"transform"`
}

StatDataSourceModel describes the data source data model.

type StatDefaults

type StatDefaults struct {
	Field FieldDefaults
	Graph StatGraphDefaults
}

type StatDefaultsModel

type StatDefaultsModel struct {
	Field []FieldOptions `tfsdk:"field"`
	Graph []StatOptions  `tfsdk:"graph"`
}

type StatGraphDefaults

type StatGraphDefaults struct {
	Orientation   string
	TextMode      string
	ColorMode     string
	GraphMode     string
	TextAlignment string
	ReduceOptions ReduceOptionDefaults
	TextSize      TextSizeDefaults
}

type StatOptions

type StatOptions struct {
	Orientation   types.String      `tfsdk:"orientation"`
	TextMode      types.String      `tfsdk:"text_mode"`
	ColorMode     types.String      `tfsdk:"color_mode"`
	GraphMode     types.String      `tfsdk:"graph_mode"`
	TextAlignment types.String      `tfsdk:"text_alignment"`
	TextSize      []TextSizeOptions `tfsdk:"text_size"`
	ReduceOptions []ReduceOptions   `tfsdk:"options"`
}

type TableCellOptions

type TableCellOptions struct {
	Inspectable types.Bool   `tfsdk:"inspectable"`
	DisplayMode types.String `tfsdk:"display_mode"`
}

type TableColumnOptions

type TableColumnOptions struct {
	Align      types.String `tfsdk:"align"`
	Filterable types.Bool   `tfsdk:"filterable"`
	Width      types.Int64  `tfsdk:"width"`
	MinWidth   types.Int64  `tfsdk:"min_width"`
}

type TableDataSource

type TableDataSource struct {
	CompactJson bool
	Defaults    TableDefaults
}

TableDataSource defines the data source implementation.

func (*TableDataSource) Configure

func (*TableDataSource) Metadata

func (*TableDataSource) Read

func (*TableDataSource) Schema

type TableDataSourceModel

type TableDataSourceModel struct {
	Id              types.String           `tfsdk:"id"`
	Json            types.String           `tfsdk:"json"`
	CompactJson     types.Bool             `tfsdk:"compact_json"`
	Title           types.String           `tfsdk:"title"`
	Description     types.String           `tfsdk:"description"`
	Queries         []Query                `tfsdk:"queries"`
	Field           []FieldOptions         `tfsdk:"field"`
	Graph           []TableOptions         `tfsdk:"graph"`
	Overrides       []FieldOverrideOptions `tfsdk:"overrides"`
	Transformations []Transformations      `tfsdk:"transform"`
}

TableDataSourceModel describes the data source data model.

type TableDefaults

type TableDefaults struct {
	Field FieldDefaults
}

type TableDefaultsModel

type TableDefaultsModel struct {
	Field []FieldOptions `tfsdk:"field"`
}

type TableFooterOptions

type TableFooterOptions struct {
	Pagination   types.Bool     `tfsdk:"pagination"`
	Fields       []types.String `tfsdk:"fields"`
	Calculations []types.String `tfsdk:"calculations"`
}

type TableOptions

type TableOptions struct {
	Column     []TableColumnOptions `tfsdk:"column"`
	Cell       []TableCellOptions   `tfsdk:"cell"`
	Footer     []TableFooterOptions `tfsdk:"footer"`
	ShowHeader types.Bool           `tfsdk:"show_header"`
}

type TextDataSource

type TextDataSource struct {
	CompactJson bool
}

TextDataSource defines the data source implementation.

func (*TextDataSource) Configure

func (*TextDataSource) Metadata

func (*TextDataSource) Read

func (*TextDataSource) Schema

type TextDataSourceModel

type TextDataSourceModel struct {
	Id          types.String  `tfsdk:"id"`
	Json        types.String  `tfsdk:"json"`
	CompactJson types.Bool    `tfsdk:"compact_json"`
	Title       types.String  `tfsdk:"title"`
	Description types.String  `tfsdk:"description"`
	Graph       []TextOptions `tfsdk:"graph"`
}

TextDataSourceModel describes the data source data model.

type TextOptions

type TextOptions struct {
	Mode        types.String  `tfsdk:"mode"`
	Content     types.String  `tfsdk:"content"`
	CodeOptions []CodeOptions `tfsdk:"code"`
}

type TextSizeDefaults

type TextSizeDefaults struct {
	Title *int64
	Value *int64
}

type TextSizeOptions

type TextSizeOptions struct {
	Title types.Int64 `tfsdk:"title"`
	Value types.Int64 `tfsdk:"value"`
}

type ThresholdDefaults

type ThresholdDefaults struct {
	Mode   string
	ShowAs string
	Steps  []ThresholdStepDefaults
}

type ThresholdOptions

type ThresholdOptions struct {
	Mode   types.String    `tfsdk:"mode"`
	ShowAs types.String    `tfsdk:"show_as"`
	Steps  []ThresholdStep `tfsdk:"step"`
}

type ThresholdStep

type ThresholdStep struct {
	Color types.String  `tfsdk:"color"`
	Value types.Float64 `tfsdk:"value"`
}

type ThresholdStepDefaults

type ThresholdStepDefaults struct {
	Color string
	Value *float64
}

type Time

type Time struct {
	From string
	To   string
}

type TimeModel

type TimeModel struct {
	From types.String `tfsdk:"from"`
	To   types.String `tfsdk:"to"`
}

type TimeseriesDataSource

type TimeseriesDataSource struct {
	CompactJson bool
	Defaults    TimeseriesDefaults
}

TimeseriesDataSource defines the data source implementation.

func (*TimeseriesDataSource) Configure

func (*TimeseriesDataSource) Metadata

func (*TimeseriesDataSource) Read

func (*TimeseriesDataSource) Schema

type TimeseriesDataSourceModel

type TimeseriesDataSourceModel struct {
	Id              types.String               `tfsdk:"id"`
	Json            types.String               `tfsdk:"json"`
	CompactJson     types.Bool                 `tfsdk:"compact_json"`
	Title           types.String               `tfsdk:"title"`
	Description     types.String               `tfsdk:"description"`
	Queries         []Query                    `tfsdk:"queries"`
	Legend          []TimeseriesLegendOptions  `tfsdk:"legend"`
	Tooltip         []TimeseriesTooltipOptions `tfsdk:"tooltip"`
	Field           []FieldOptions             `tfsdk:"field"`
	Axis            []AxisOptions              `tfsdk:"axis"`
	Graph           []TimeseriesGraphOptions   `tfsdk:"graph"`
	Overrides       []FieldOverrideOptions     `tfsdk:"overrides"`
	Transformations []Transformations          `tfsdk:"transform"`
}

TimeseriesDataSourceModel describes the data source data model.

type TimeseriesDefaults

type TimeseriesDefaults struct {
	Legend  TimeseriesLegendDefault
	Tooltip TimeseriesTooltipDefaults
	Field   FieldDefaults
	Axis    AxisDefaults
	Graph   TimeseriesGraphDefault
}

type TimeseriesDefaultsModel

type TimeseriesDefaultsModel struct {
	Legend  []TimeseriesLegendOptions  `tfsdk:"legend"`
	Tooltip []TimeseriesTooltipOptions `tfsdk:"tooltip"`
	Field   []FieldOptions             `tfsdk:"field"`
	Axis    []AxisOptions              `tfsdk:"axis"`
	Graph   []TimeseriesGraphOptions   `tfsdk:"graph"`
}

type TimeseriesGraphDefault

type TimeseriesGraphDefault struct {
	DrawStyle         string
	LineInterpolation string
	LineWidth         int
	FillOpacity       int
	GradientMode      string
	LineStyle         string
	SpanNulls         bool
	ShowPoints        string
	PointSize         int
	StackSeries       string
}

type TimeseriesGraphOptions

type TimeseriesGraphOptions struct {
	DrawStyle         types.String `tfsdk:"draw_style"`
	LineInterpolation types.String `tfsdk:"line_interpolation"`
	LineWidth         types.Int64  `tfsdk:"line_width"`
	FillOpacity       types.Int64  `tfsdk:"fill_opacity"`
	GradientMode      types.String `tfsdk:"gradient_mode"`
	LineStyle         types.String `tfsdk:"line_style"`
	SpanNulls         types.Bool   `tfsdk:"span_nulls"`
	ShowPoints        types.String `tfsdk:"show_points"`
	PointSize         types.Int64  `tfsdk:"point_size"`
	StackSeries       types.String `tfsdk:"stack_series"`
}

type TimeseriesLegendDefault

type TimeseriesLegendDefault struct {
	Calculations []string
	DisplayMode  string
	Placement    string
}

type TimeseriesLegendOptions

type TimeseriesLegendOptions struct {
	Calculations []types.String `tfsdk:"calculations"`
	DisplayMode  types.String   `tfsdk:"display_mode"`
	Placement    types.String   `tfsdk:"placement"`
}

type TimeseriesTooltipDefaults

type TimeseriesTooltipDefaults struct {
	Mode string
}

type TimeseriesTooltipOptions

type TimeseriesTooltipOptions struct {
	Mode types.String `tfsdk:"mode"`
}

type TransformationFilterFieldsByName

type TransformationFilterFieldsByName struct {
	Names []types.String `tfsdk:"names"`
}

type TransformationGroupBy

type TransformationGroupBy struct {
	GroupBy   []types.String            `tfsdk:"by"`
	Aggregate map[string][]types.String `tfsdk:"aggregate"`
}

type TransformationGroupingToMatrix

type TransformationGroupingToMatrix struct {
	Column types.String `tfsdk:"column"`
	Row    types.String `tfsdk:"row"`
	Cell   types.String `tfsdk:"cell"`
}

type TransformationLimit

type TransformationLimit struct {
	Limit types.Int64 `tfsdk:"limit"`
}

type TransformationSeriesToRows

type TransformationSeriesToRows struct {
}

type TransformationSortBy

type TransformationSortBy struct {
	Field   types.String `tfsdk:"field"`
	Reverse types.Bool   `tfsdk:"reverse"`
}

type Transformations

type Transformations struct {
	Steps []TransformationsStep `tfsdk:"step"`
}

type TransformationsStep

type TransformationsStep struct {
	FilterByName     []TransformationFilterFieldsByName `tfsdk:"filter_fields_by_name"`
	GroupBy          []TransformationGroupBy            `tfsdk:"group_by"`
	GroupingToMatrix []TransformationGroupingToMatrix   `tfsdk:"grouping_to_matrix"`
	Limit            []TransformationLimit              `tfsdk:"limit"`
	SeriesToRows     []TransformationSeriesToRows       `tfsdk:"series_to_rows"`
	SortBy           []TransformationSortBy             `tfsdk:"sort_by"`
}

type ValueMappingOptions

type ValueMappingOptions struct {
	Value       types.String `tfsdk:"value"`
	DisplayText types.String `tfsdk:"display_text"`
	Color       types.String `tfsdk:"color"`
}

type ValueMappingResult

type ValueMappingResult struct {
	Color string `json:"color,omitempty"`
	Text  string `json:"text,omitempty"`
	Index int    `json:"index"`
}

type Variable

type Variable struct {
	Custom     []VariableCustom     `tfsdk:"custom"`
	Constant   []VariableConstant   `tfsdk:"const"`
	TextBox    []VariableTextBox    `tfsdk:"textbox"`
	AdHoc      []VariableAdHoc      `tfsdk:"adhoc"`
	DataSource []VariableDataSource `tfsdk:"datasource"`
	Query      []VariableQuery      `tfsdk:"query"`
	Interval   []VariableInterval   `tfsdk:"interval"`
}

type VariableAdHoc

type VariableAdHoc struct {
	Name        types.String            `tfsdk:"name"`
	Label       types.String            `tfsdk:"label"`
	Description types.String            `tfsdk:"description"`
	Hide        types.String            `tfsdk:"hide"`
	DataSource  VariableAdHocDataSource `tfsdk:"datasource"`
	Filters     []VariableAdHocFilter   `tfsdk:"filter"`
}

type VariableAdHocDataSource

type VariableAdHocDataSource struct {
	Type types.String `tfsdk:"type"`
	UID  types.String `tfsdk:"uid"`
}

type VariableAdHocFilter

type VariableAdHocFilter struct {
	Key      types.String `tfsdk:"key"`
	Operator types.String `tfsdk:"operator"`
	Value    types.String `tfsdk:"value"`
}

type VariableConstant

type VariableConstant struct {
	Name        types.String `tfsdk:"name"`
	Label       types.String `tfsdk:"label"`
	Description types.String `tfsdk:"description"`
	Value       types.String `tfsdk:"value"`
}

type VariableCustom

type VariableCustom struct {
	Name        types.String           `tfsdk:"name"`
	Label       types.String           `tfsdk:"label"`
	Description types.String           `tfsdk:"description"`
	Hide        types.String           `tfsdk:"hide"`
	Options     []VariableCustomOption `tfsdk:"option"`
	Multi       types.Bool             `tfsdk:"multi"`
	IncludeAll  []VariableIncludeAll   `tfsdk:"include_all"`
}

type VariableCustomOption

type VariableCustomOption struct {
	Selected types.Bool   `tfsdk:"selected"`
	Text     types.String `tfsdk:"text"`
	Value    types.String `tfsdk:"value"`
}

type VariableDataSource

type VariableDataSource struct {
	Name        types.String               `tfsdk:"name"`
	Label       types.String               `tfsdk:"label"`
	Description types.String               `tfsdk:"description"`
	Hide        types.String               `tfsdk:"hide"`
	Multi       types.Bool                 `tfsdk:"multi"`
	IncludeAll  []VariableIncludeAll       `tfsdk:"include_all"`
	DataSource  VariableDataSourceSelector `tfsdk:"source"`
}

type VariableDataSourceSelector

type VariableDataSourceSelector struct {
	Type   types.String `tfsdk:"type"`
	Filter types.String `tfsdk:"filter"`
}

type VariableIncludeAll

type VariableIncludeAll struct {
	Enabled     types.Bool   `tfsdk:"enabled"`
	CustomValue types.String `tfsdk:"custom_value"`
}

type VariableInterval

type VariableInterval struct {
	Name        types.String           `tfsdk:"name"`
	Label       types.String           `tfsdk:"label"`
	Description types.String           `tfsdk:"description"`
	Hide        types.String           `tfsdk:"hide"`
	Intervals   []types.String         `tfsdk:"intervals"`
	Auto        []VariableIntervalAuto `tfsdk:"auto"`
}

type VariableIntervalAuto

type VariableIntervalAuto struct {
	Enabled     types.Bool   `tfsdk:"enabled"`
	StepCount   types.Int64  `tfsdk:"step_count"`
	MinInterval types.String `tfsdk:"min_interval"`
}

type VariableQuery

type VariableQuery struct {
	Name        types.String          `tfsdk:"name"`
	Label       types.String          `tfsdk:"label"`
	Description types.String          `tfsdk:"description"`
	Hide        types.String          `tfsdk:"hide"`
	Refresh     types.String          `tfsdk:"refresh"`
	Multi       types.Bool            `tfsdk:"multi"`
	IncludeAll  []VariableIncludeAll  `tfsdk:"include_all"`
	Sort        []VariableQuerySort   `tfsdk:"sort"`
	Regex       types.String          `tfsdk:"regex"`
	Target      []VariableQueryTarget `tfsdk:"target"`
}

type VariableQuerySort

type VariableQuerySort struct {
	Type  types.String `tfsdk:"type"`
	Order types.String `tfsdk:"order"`
}

type VariableQueryTarget

type VariableQueryTarget struct {
	Prometheus []VariableQueryTargetPrometheus `tfsdk:"prometheus"`
}

type VariableQueryTargetPrometheus

type VariableQueryTargetPrometheus struct {
	UID  types.String `tfsdk:"uid"`
	Expr types.String `tfsdk:"expr"`
}

type VariableTextBox

type VariableTextBox struct {
	Name         types.String `tfsdk:"name"`
	Label        types.String `tfsdk:"label"`
	Description  types.String `tfsdk:"description"`
	DefaultValue types.String `tfsdk:"default_value"`
	Hide         types.String `tfsdk:"hide"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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