Documentation ¶
Index ¶
- func CalculationTypes() []string
- func CalculationTypesMarkdown() string
- func CalculationTypesString() string
- func New(version string) func() provider.Provider
- func NewBarGaugeDataSource() datasource.DataSource
- func NewDashboardDataSource() datasource.DataSource
- func NewGaugeDataSource() datasource.DataSource
- func NewLogsDataSource() datasource.DataSource
- func NewStatDataSource() datasource.DataSource
- func NewTableDataSource() datasource.DataSource
- func NewTextDataSource() datasource.DataSource
- func NewTimeseriesDataSource() datasource.DataSource
- type Annotation
- type AnnotationGrafana
- type AnnotationGrafanaQueryByDashboard
- type AnnotationGrafanaQueryByTags
- type AnnotationPrometheus
- type AnnotationPrometheusQuery
- type AxisDefaults
- type AxisOptions
- type BarGaugeDataSource
- func (d *BarGaugeDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *BarGaugeDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *BarGaugeDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *BarGaugeDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type BarGaugeDataSourceModel
- type BarGaugeDefaults
- type BarGaugeDefaultsModel
- type BarGaugeGraphDefault
- type BarGaugeOptions
- type ByNameOverrideOptions
- type ByQueryIDOverrideOptions
- type ByRegexOverrideOptions
- type ByTypeOverrideOptions
- type CloudWatchDimension
- type CloudWatchLogGroup
- type CloudWatchLogsTarget
- type CloudWatchMetricsTarget
- type CloudWatchTarget
- type CodeOptions
- type ColorDefaults
- type ColorOptions
- type DashboardDataSource
- func (d *DashboardDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *DashboardDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *DashboardDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *DashboardDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type DashboardDataSourceModel
- type DashboardDefaults
- type DashboardDefaultsModel
- type DashboardTimeOptions
- type DashboardTimePickerOptions
- type Defaults
- type DefaultsModel
- type ExpressionMathTarget
- type ExpressionReduceTarget
- type ExpressionResampleTarget
- type ExpressionTarget
- type FieldDefaults
- type FieldOptions
- type FieldOverrideOptions
- type GaugeDataSource
- func (d *GaugeDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *GaugeDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *GaugeDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *GaugeDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type GaugeDataSourceModel
- type GaugeDefaults
- type GaugeDefaultsModel
- type GaugeGraphDefault
- type GaugeOptions
- type GrafanaDashboardBuilderProvider
- func (p *GrafanaDashboardBuilderProvider) Configure(ctx context.Context, req provider.ConfigureRequest, ...)
- func (p *GrafanaDashboardBuilderProvider) DataSources(ctx context.Context) []func() datasource.DataSource
- func (p *GrafanaDashboardBuilderProvider) Metadata(_ context.Context, req provider.MetadataRequest, ...)
- func (p *GrafanaDashboardBuilderProvider) Resources(ctx context.Context) []func() resource.Resource
- func (p *GrafanaDashboardBuilderProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
- type GrafanaDashboardBuilderProviderModel
- type Layout
- type Link
- type LinkDashboards
- type LinkExternal
- type LogsDataSource
- func (d *LogsDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *LogsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *LogsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *LogsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type LogsDataSourceModel
- type LogsOptions
- type MappingOptions
- type Panel
- type PrometheusTarget
- type Query
- type RangeMappingOptions
- type ReduceOptionDefaults
- type ReduceOptions
- type RegexMappingOptions
- type ScaleDefaults
- type ScaleOptions
- type Section
- type SectionRow
- type Size
- type SpecialMappingOptions
- type StatDataSource
- func (d *StatDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *StatDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *StatDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *StatDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type StatDataSourceModel
- type StatDefaults
- type StatDefaultsModel
- type StatGraphDefaults
- type StatOptions
- type TableCellOptions
- type TableColumnOptions
- type TableDataSource
- func (d *TableDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *TableDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *TableDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *TableDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type TableDataSourceModel
- type TableDefaults
- type TableDefaultsModel
- type TableFooterOptions
- type TableOptions
- type TextDataSource
- func (d *TextDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *TextDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *TextDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *TextDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type TextDataSourceModel
- type TextOptions
- type TextSizeDefaults
- type TextSizeOptions
- type ThresholdDefaults
- type ThresholdOptions
- type ThresholdStep
- type ThresholdStepDefaults
- type Time
- type TimeModel
- type TimeseriesDataSource
- func (d *TimeseriesDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, ...)
- func (d *TimeseriesDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, ...)
- func (d *TimeseriesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
- func (d *TimeseriesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, ...)
- type TimeseriesDataSourceModel
- type TimeseriesDefaults
- type TimeseriesDefaultsModel
- type TimeseriesGraphDefault
- type TimeseriesGraphOptions
- type TimeseriesLegendDefault
- type TimeseriesLegendOptions
- type TimeseriesTooltipDefaults
- type TimeseriesTooltipOptions
- type TransformationFilterFieldsByName
- type TransformationGroupBy
- type TransformationGroupingToMatrix
- type TransformationLimit
- type TransformationSeriesToRows
- type TransformationSortBy
- type Transformations
- type TransformationsStep
- type ValueMappingOptions
- type ValueMappingResult
- type Variable
- type VariableAdHoc
- type VariableAdHocDataSource
- type VariableAdHocFilter
- type VariableConstant
- type VariableCustom
- type VariableCustomOption
- type VariableDataSource
- type VariableDataSourceSelector
- type VariableIncludeAll
- type VariableInterval
- type VariableIntervalAuto
- type VariableQuery
- type VariableQuerySort
- type VariableQueryTarget
- type VariableQueryTargetPrometheus
- type VariableTextBox
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 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 AnnotationPrometheus ¶
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 BarGaugeDataSource ¶
type BarGaugeDataSource struct { CompactJson bool Defaults BarGaugeDefaults }
BarGaugeDataSource defines the data source implementation.
func (*BarGaugeDataSource) Configure ¶
func (d *BarGaugeDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*BarGaugeDataSource) Metadata ¶
func (d *BarGaugeDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*BarGaugeDataSource) Read ¶
func (d *BarGaugeDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*BarGaugeDataSource) Schema ¶
func (d *BarGaugeDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 CloudWatchLogGroup ¶ added in v0.0.19
type CloudWatchLogsTarget ¶ added in v0.0.19
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 ColorDefaults ¶
type ColorOptions ¶
type DashboardDataSource ¶
type DashboardDataSource struct { CompactJson bool Defaults DashboardDefaults }
DashboardDataSource defines the data source implementation.
func (*DashboardDataSource) Configure ¶
func (d *DashboardDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*DashboardDataSource) Metadata ¶
func (d *DashboardDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*DashboardDataSource) Read ¶
func (d *DashboardDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*DashboardDataSource) Schema ¶
func (d *DashboardDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 DashboardDefaultsModel ¶
type DashboardTimeOptions ¶
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 ExpressionReduceTarget ¶ added in v0.0.20
type ExpressionResampleTarget ¶ added in v0.0.20
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 (d *GaugeDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*GaugeDataSource) Metadata ¶
func (d *GaugeDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*GaugeDataSource) Read ¶
func (d *GaugeDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*GaugeDataSource) Schema ¶
func (d *GaugeDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 (p *GrafanaDashboardBuilderProvider) Configure(ctx context.Context, req provider.ConfigureRequest, resp *provider.ConfigureResponse)
func (*GrafanaDashboardBuilderProvider) DataSources ¶
func (p *GrafanaDashboardBuilderProvider) DataSources(ctx context.Context) []func() datasource.DataSource
func (*GrafanaDashboardBuilderProvider) Metadata ¶
func (p *GrafanaDashboardBuilderProvider) Metadata(_ context.Context, req provider.MetadataRequest, resp *provider.MetadataResponse)
func (*GrafanaDashboardBuilderProvider) Resources ¶
func (p *GrafanaDashboardBuilderProvider) Resources(ctx context.Context) []func() resource.Resource
func (*GrafanaDashboardBuilderProvider) Schema ¶
func (p *GrafanaDashboardBuilderProvider) Schema(ctx context.Context, req provider.SchemaRequest, resp *provider.SchemaResponse)
type GrafanaDashboardBuilderProviderModel ¶
type GrafanaDashboardBuilderProviderModel struct { CompactJson types.Bool `tfsdk:"compact_json"` Defaults []DefaultsModel `tfsdk:"defaults"` }
GrafanaDashboardBuilderProviderModel describes the provider data model.
type Link ¶ added in v0.0.15
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 (d *LogsDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*LogsDataSource) Metadata ¶ added in v0.0.19
func (d *LogsDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*LogsDataSource) Read ¶ added in v0.0.19
func (d *LogsDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*LogsDataSource) Schema ¶ added in v0.0.19
func (d *LogsDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 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 ReduceOptionDefaults ¶
func NewReduceOptionDefaults ¶
func NewReduceOptionDefaults() ReduceOptionDefaults
type ReduceOptions ¶
type RegexMappingOptions ¶
type ScaleDefaults ¶
type ScaleOptions ¶
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 SpecialMappingOptions ¶
type StatDataSource ¶
type StatDataSource struct { CompactJson bool Defaults StatDefaults }
StatDataSource defines the data source implementation.
func (*StatDataSource) Configure ¶
func (d *StatDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*StatDataSource) Metadata ¶
func (d *StatDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*StatDataSource) Read ¶
func (d *StatDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*StatDataSource) Schema ¶
func (d *StatDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 TableColumnOptions ¶
type TableDataSource ¶
type TableDataSource struct { CompactJson bool Defaults TableDefaults }
TableDataSource defines the data source implementation.
func (*TableDataSource) Configure ¶
func (d *TableDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*TableDataSource) Metadata ¶
func (d *TableDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*TableDataSource) Read ¶
func (d *TableDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*TableDataSource) Schema ¶
func (d *TableDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 {}
type TableOptions ¶
type TableOptions struct { Column []TableColumnOptions `tfsdk:"column"` Cell []TableCellOptions `tfsdk:"cell"` ShowHeader types.Bool `tfsdk:"show_header"` }
type TextDataSource ¶
type TextDataSource struct {
CompactJson bool
}
TextDataSource defines the data source implementation.
func (*TextDataSource) Configure ¶
func (d *TextDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*TextDataSource) Metadata ¶
func (d *TextDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*TextDataSource) Read ¶
func (d *TextDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*TextDataSource) Schema ¶
func (d *TextDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 TextSizeOptions ¶
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 ThresholdStepDefaults ¶
type TimeseriesDataSource ¶
type TimeseriesDataSource struct { CompactJson bool Defaults TimeseriesDefaults }
TimeseriesDataSource defines the data source implementation.
func (*TimeseriesDataSource) Configure ¶
func (d *TimeseriesDataSource) Configure(_ context.Context, req datasource.ConfigureRequest, resp *datasource.ConfigureResponse)
func (*TimeseriesDataSource) Metadata ¶
func (d *TimeseriesDataSource) Metadata(_ context.Context, req datasource.MetadataRequest, resp *datasource.MetadataResponse)
func (*TimeseriesDataSource) Read ¶
func (d *TimeseriesDataSource) Read(ctx context.Context, req datasource.ReadRequest, resp *datasource.ReadResponse)
func (*TimeseriesDataSource) Schema ¶
func (d *TimeseriesDataSource) Schema(ctx context.Context, req datasource.SchemaRequest, resp *datasource.SchemaResponse)
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 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 TimeseriesLegendOptions ¶
type TimeseriesTooltipDefaults ¶
type TimeseriesTooltipDefaults struct {
Mode string
}
type TransformationGroupBy ¶
type TransformationLimit ¶
type TransformationSeriesToRows ¶
type TransformationSeriesToRows struct { }
type TransformationSortBy ¶
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 ValueMappingResult ¶
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 VariableAdHocFilter ¶
type VariableConstant ¶
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 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 VariableIncludeAll ¶
type VariableInterval ¶
type VariableIntervalAuto ¶
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 VariableQueryTarget ¶
type VariableQueryTarget struct {
Prometheus []VariableQueryTargetPrometheus `tfsdk:"prometheus"`
}