buildpath

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// IdPattern matches against a full URL, which is meant to be prefix trimed by the server's base URL.
	// This can be "#{body.x.y.z}".
	IdPattern = regexp.MustCompile(`\#\(([\w.]+)\)`)

	// ValuePattern matches against a normal string. This can be either "${path}", or "${body.x.y.z}"
	ValuePattern = regexp.MustCompile(`\$(\w*)\(([\w.]+)\)`)
)
View Source
var PathFuncs = map[string]PathFunc{
	"plain": func(s string) string { return s },
}

Functions

func BuildPath

func BuildPath(pattern string, baseURL, path string, body []byte) (string, error)

Types

type PathFunc

type PathFunc func(string) string

Jump to

Keyboard shortcuts

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