constant

package
v0.17.2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2021 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 Constant

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

Constant represents a "constant" templated variable.

func New

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

New creates a new "constant" templated variable.

type Option

type Option func(constant *Constant)

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

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 Label

func Label(label string) Option

Label sets the label of the variable.

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 constant variable.

Jump to

Keyboard shortcuts

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