custom

package
v0.22.1 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const All = "$__all"

Variables

This section is empty.

Functions

This section is empty.

Types

type Custom

type Custom struct {
	Builder sdk.TemplateVar
	// contains filtered or unexported fields
}

Custom represents a "custom" templated variable.

func New

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

New creates a new "custom" templated variable.

type Option

type Option func(constant *Custom)

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

func AllValue added in v0.12.3

func AllValue(value string) Option

AllValue define the value used when selecting the "All" option.

func Default

func Default(value string) Option

Default sets the default value of the variable.

func DefaultAll added in v0.22.0

func DefaultAll() Option

DefaultAll selects "All" values by default.

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 Multiple added in v0.21.13

func Multiple() Option

Multiple allows several values to be selected.

func Values

func Values(values ValuesMap) Option

Values sets the possible values for the variable.

type ValuesMap

type ValuesMap map[string]string

ValuesMap represent a "label" to "value" map of options for a custom variable.

Jump to

Keyboard shortcuts

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