filiter

package
v0.1.20241122063658 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Body

type Body struct {
	Action   string `json:"action"`
	ReqSize  string `json:"reqSize"`
	MatchExp string `json:"matchExp"`
}

func (*Body) Match

func (t *Body) Match(r *http.Request) (ok bool, err error)

func (*Body) Valid

func (t *Body) Valid() bool

type Filiter

type Filiter struct {
	ReqHeader Header `json:"reqHeader"`
	ReqUri    Uri    `json:"reqUri"`
	ResHeader Header `json:"resHeader"`
}
type Header struct {
	AccessRule string                   `json:"accessRule"`
	Items      map[string]HeaderFiliter `json:"items"`
}

func (*Header) Match

func (t *Header) Match(h http.Header) (bool, error)

func (*Header) Valid

func (t *Header) Valid() bool

type HeaderFiliter

type HeaderFiliter struct {
	Key      string `json:"key"`
	MatchExp string `json:"matchExp"`
}

func (*HeaderFiliter) Match

func (t *HeaderFiliter) Match(h http.Header) bool

type Uri

type Uri struct {
	AccessRule string            `json:"accessRule"`
	Items      map[string]string `json:"items"`
}

func (*Uri) Match

func (t *Uri) Match(r *http.Request) (bool, error)

func (*Uri) Valid

func (t *Uri) Valid() bool

Jump to

Keyboard shortcuts

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