scope

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Header struct {
	Key   *regexp.Regexp
	Value *regexp.Regexp
}

type Rule

type Rule struct {
	URL    *regexp.Regexp
	Header Header
	Body   *regexp.Regexp
}

func (Rule) MarshalBinary added in v0.4.0

func (r Rule) MarshalBinary() ([]byte, error)

func (Rule) Match

func (r Rule) Match(req *http.Request, body []byte) bool

func (*Rule) UnmarshalBinary added in v0.4.0

func (r *Rule) UnmarshalBinary(data []byte) error

type Scope

type Scope struct {
	// contains filtered or unexported fields
}

func (*Scope) Match

func (s *Scope) Match(req *http.Request, body []byte) bool

func (*Scope) Rules

func (s *Scope) Rules() []Rule

func (*Scope) SetRules

func (s *Scope) SetRules(rules []Rule)

Jump to

Keyboard shortcuts

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