utils

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CoalesceValues

func CoalesceValues(base, override map[string]interface{}) map[string]interface{}

CoalesceValues replaces arrays and scalar values, merges maps

func MergeYAML

func MergeYAML(base, override []byte) (map[string]interface{}, error)

MergeYAML merges raw yaml, with preference given to override

func NewQuery

func NewQuery(key, query string) (*templater.TemplateReaderQuery, error)

NewQuery constructs a templater.TemplateReaderQuery by parsing the jsonpath query string

func QueryValues

func QueryValues(
	values map[string]interface{},
	queries []*templater.TemplateReaderQuery,
) (map[string]interface{}, error)

QueryValues iterates through a map[string]interface{} and executes a query, returning a map of the query name to the returned data

Types

This section is empty.

Jump to

Keyboard shortcuts

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