Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Parse ¶
Parse uses provided output specifications to extract output values from the provided raw stdout string
**Parameters:**
specs: the specs for the outputs to be extracted inStr: the raw stdout string from the step whose outputs will be extracted
**Returns:**
map[string]string: the output keys and values error: an error if there is a problem
Types ¶
type Filter ¶
Filter can be used to extract an output value from the provided string using Apply(...)
type JSONFilter ¶
type JSONFilter struct {
Path string `yaml:"json_path"`
}
JSONFilter will parse a JSON string and extract the value at the provided path (like jq)
type Spec ¶
type Spec struct {
Filters []Filter `yaml:"filters"`
}
Spec defines an output value for which a given step's stdout should be scanned
func (*Spec) Apply ¶
Apply applies all filters in this output spec to the target string in order, producing a new string
func (*Spec) UnmarshalYAML ¶
UnmarshalYAML is used to load specs from yaml files