Documentation ¶
Index ¶
- Constants
- type Option
- func AllValue(value string) Option
- func DataSource(source string) Option
- func DefaultAll() Option
- func Hide() Option
- func HideLabel() Option
- func IncludeAll() Option
- func Label(label string) Option
- func Multiple() Option
- func Refresh(refresh RefreshInterval) Option
- func Regex(regex string) Option
- func Request(request string) Option
- func Sort(order SortOrder) Option
- type Query
- type RefreshInterval
- type SortOrder
Constants ¶
View Source
const ( // Never will prevent the results from being refreshed. Never = 0 // DashboardLoad will refresh the results every time the dashboard is loaded. DashboardLoad = 1 // TimeChange will refresh the results every time the time interval changes. TimeChange = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(constant *Query)
Option represents an option that can be used to configure a query.
func DataSource ¶
DataSource sets the data source to be used by the query.
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 Multiple ¶ added in v0.21.13
func Multiple() Option
Multiple allows several values to be selected.
func Refresh ¶
func Refresh(refresh RefreshInterval) Option
Refresh defines the interval in which the values will be refreshed.
type Query ¶
type Query struct {
Builder sdk.TemplateVar
}
Query represents a "query" templated variable.
type RefreshInterval ¶ added in v0.2.0
type RefreshInterval int
RefreshInterval represents the interval at which the results of a query will be refreshed.
type SortOrder ¶ added in v0.2.0
type SortOrder int
SortOrder represents the ordering method applied to values.
const ( // None will preserve the results ordering as returned by the query. None SortOrder = 0 // AlphabeticalAsc will sort the results by ascending alphabetical order. AlphabeticalAsc SortOrder = 1 // AlphabeticalDesc will sort the results by descending alphabetical order. AlphabeticalDesc SortOrder = 2 // NumericalAsc will sort the results by ascending numerical order. NumericalAsc SortOrder = 3 // NumericalDesc will sort the results by descending numerical order. NumericalDesc SortOrder = 4 // AlphabeticalNoCaseAsc will sort the results by ascending alphabetical order, case-insensitive. AlphabeticalNoCaseAsc SortOrder = 5 // AlphabeticalNoCaseDesc will sort the results by descending alphabetical order, case-insensitive. AlphabeticalNoCaseDesc SortOrder = 6 )
Click to show internal directories.
Click to hide internal directories.