custom

package
v0.11.5 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2020 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 Default

func Default(value string) Option

Default sets the default value of the variable.

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 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