variables

package
v1.21.4 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Variable

type Variable struct {
	// contains filtered or unexported fields
}

func NewFromEnvironment added in v1.0.6

func NewFromEnvironment(name string) *Variable

func NewVariable

func NewVariable(name, value string) *Variable

NewVariable creates new variable with given name and value

func (*Variable) Perform

func (v *Variable) Perform(str string) string

perform replaces variable in str to its value and returns result string

type Variables

type Variables struct {
	// contains filtered or unexported fields
}

func FromResponse added in v1.0.6

func FromResponse(varsToSet map[string]string, body string, isJSON bool) (vars *Variables, err error)

func New

func New() *Variables

func (*Variables) Add added in v1.0.6

func (vs *Variables) Add(v *Variable) *Variables

func (*Variables) Apply

func (*Variables) Len

func (vs *Variables) Len() int

func (*Variables) Load

func (vs *Variables) Load(variables map[string]string)

Load adds new variables and replaces values of existing

func (*Variables) Merge added in v1.0.6

func (vs *Variables) Merge(vars *Variables)

Merge adds given variables to set or overrides existed

func (*Variables) Set added in v1.0.6

func (vs *Variables) Set(name, value string)

Load adds new variables and replaces values of existing

Jump to

Keyboard shortcuts

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