stash

package
v0.0.0-...-01c0eb4 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Store store = store{}

Store is an instance of the stash store.

Functions

func Parse

func Parse(s string) string

Parse uses the built in varparser to find an instance of a variable, and in this case replace it with a value that exists with in the stash store.

func Set

func Set(key string, value StashValue)

Set sets a stash value in the map with an associated name.

Types

type StashValue

type StashValue struct {
	Name          string   `json:"name"`
	Value         string   `json:"value"`
	JsonPath      []string `json:"jsonPath"`
	Origin        string   `json:"origin"`
	RepeatRequest bool     `json:"repeatRequest"`
}

StashValue represents a value to be stored in memory, that will replace a variable that exists within the resource configuration.

e.g. if a Variant.Path is set to ${stash[path]}, if 'path' is stored in memory with an associated value, the variable will be replaced with that value.

func Get

func Get(key string) (StashValue, error)

Get tries to lookup a stash value by name and returns it if it exists.

type StashValues

type StashValues []StashValue

StashValues represents multiple stash values.

func (*StashValues) Push

func (sv *StashValues) Push()

Push pushes new stash values to the global stash store.

Jump to

Keyboard shortcuts

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