Skip to content

DatasourceVariableBuilder🔗

Constructor🔗

func NewDatasourceVariableBuilder(name string) *DatasourceVariableBuilder

Methods🔗

Build🔗

Builds the object.

func (builder *DatasourceVariableBuilder) Build() (VariableModel, error)

AllValue🔗

Custom all value

func (builder *DatasourceVariableBuilder) AllValue(allValue string) *DatasourceVariableBuilder

Current🔗

Shows current selected variable text/value on the dashboard

func (builder *DatasourceVariableBuilder) Current(current dashboard.VariableOption) *DatasourceVariableBuilder

Description🔗

Description of variable. It can be defined but null.

func (builder *DatasourceVariableBuilder) Description(description string) *DatasourceVariableBuilder

Hide🔗

Visibility configuration for the variable

func (builder *DatasourceVariableBuilder) Hide(hide dashboard.VariableHide) *DatasourceVariableBuilder

IncludeAll🔗

Whether all value option is available or not

func (builder *DatasourceVariableBuilder) IncludeAll(includeAll bool) *DatasourceVariableBuilder

Label🔗

Optional display name

func (builder *DatasourceVariableBuilder) Label(label string) *DatasourceVariableBuilder

Multi🔗

Whether multiple values can be selected or not from variable value list

func (builder *DatasourceVariableBuilder) Multi(multi bool) *DatasourceVariableBuilder

Name🔗

Name of variable

func (builder *DatasourceVariableBuilder) Name(name string) *DatasourceVariableBuilder

Regex🔗

Optional field, if you want to extract part of a series name or metric node segment.

Named capture groups can be used to separate the display text and value.

func (builder *DatasourceVariableBuilder) Regex(regex string) *DatasourceVariableBuilder

Type🔗

Query used to fetch values for a variable

func (builder *DatasourceVariableBuilder) Type(stringArg string) *DatasourceVariableBuilder

See also🔗