datasource

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datasource

type Datasource struct {
	Builder sdk.TemplateVar
}

Datasource represents a "datasource" templated variable.

func New

func New(name string, options ...Option) *Datasource

New creates a new "query" templated variable.

type Option

type Option func(constant *Datasource)

Option represents an option that can be used to configure a query.

func Hide

func Hide() Option

Hide ensures that the variable will not be displayed.

func HideLabel

func HideLabel() Option

HideLabel ensures that this variable's label will not be displayed.

func IncludeAll

func IncludeAll() Option

IncludeAll adds an option to allow all values to be selected.

func Label

func Label(label string) Option

Label sets the label of the variable.

func Multi

func Multi() Option

Multi allows several values to be selected.

func Regex

func Regex(regex string) Option

Regex defines a filter allowing to filter the values returned by the request/query.

func Type

func Type(datasourceType string) Option

Type defines the datasource type. Example: "grafana", "stackdriver", "prometheus", ...

Jump to

Keyboard shortcuts

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