response

package
v0.0.0-...-7aa52fb Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Guard

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

func New

func New(mode string, sanitizer *sanitize.Sanitizer) *Guard

func (*Guard) Handle

func (g *Guard) Handle(resp *http.Response) (*http.Response, Result, error)

func (*Guard) Mode

func (g *Guard) Mode() Mode

func (*Guard) SetStreamObserver

func (g *Guard) SetStreamObserver(observer StreamObserver)

type Mode

type Mode string
const (
	ModeOff      Mode = "off"
	ModeDetect   Mode = "detect"
	ModeSanitize Mode = "sanitize"
	ModeBlock    Mode = "block"
)

type Result

type Result struct {
	Applied []string
	Blocked bool
}

type StreamObserver

type StreamObserver func(req *http.Request, result Result)

Jump to

Keyboard shortcuts

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