routing

package
v0.0.0-...-bf9f964 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(cwd ports.CWD, status int, filePath, contentType string) ports.ResponseProvider
func Header(header, want string) ports.RequestMatcher

func HeaderPresent

func HeaderPresent(header string) ports.RequestMatcher

func JSFile

func JSFile(cwd ports.CWD, status int, filePath string) ports.ResponseProvider

func Json

func Json(status int, inlineJson string) ports.ResponseProvider

func JsonPath

func JsonPath(path string, want any) (ports.RequestMatcher, error)

func Method

func Method(method string) ports.RequestMatcher

func ParseMatcher

func ParseMatcher(filters []grammar.Call) (ports.RequestMatcher, error)

func ParseResponseProvider

func ParseResponseProvider(call *grammar.Call, cwd ports.CWD) (ports.ResponseProvider, error)

func Path

func Path(path string) ports.RequestMatcher

func PathPattern

func PathPattern(pattern string) (ports.RequestMatcher, error)

func Query

func Query(key, value string) ports.RequestMatcher

func QueryPattern

func QueryPattern(key, pattern string) (ports.RequestMatcher, error)

Types

type RequestMatcherChain

type RequestMatcherChain []ports.RequestMatcher

func (RequestMatcherChain) Matches

Jump to

Keyboard shortcuts

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