Skip to content

QueryVariableBuilder🔗

Constructor🔗

func NewQueryVariableBuilder(name string) *QueryVariableBuilder

Methods🔗

Build🔗

Builds the object.

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

AllValue🔗

Custom all value

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

Current🔗

Shows current selected variable text/value on the dashboard

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

Datasource🔗

Data source used to fetch values for a variable. It can be defined but null.

func (builder *QueryVariableBuilder) Datasource(datasource dashboard.DataSourceRef) *QueryVariableBuilder

Description🔗

Description of variable. It can be defined but null.

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

Hide🔗

Visibility configuration for the variable

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

IncludeAll🔗

Whether all value option is available or not

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

Label🔗

Optional display name

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

Multi🔗

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

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

Name🔗

Name of variable

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

Options🔗

Options that can be selected for a variable.

func (builder *QueryVariableBuilder) Options(options []dashboard.VariableOption) *QueryVariableBuilder

Query🔗

Query used to fetch values for a variable

func (builder *QueryVariableBuilder) Query(query dashboard.StringOrMap) *QueryVariableBuilder

Refresh🔗

Options to config when to refresh a variable

func (builder *QueryVariableBuilder) Refresh(refresh dashboard.VariableRefresh) *QueryVariableBuilder

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 *QueryVariableBuilder) Regex(regex string) *QueryVariableBuilder

Sort🔗

Options sort order

func (builder *QueryVariableBuilder) Sort(sort dashboard.VariableSort) *QueryVariableBuilder

See also🔗