jsonaudit

package
v1.7.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONAudit

type JSONAudit struct {
	plugin.Plugin
	// contains filtered or unexported fields
}

JSONAudit logs request/response bodies for audit when the upstream response is JSON-like.

func New

func New() *JSONAudit

New builds a JSON audit plugin (call Prepare after construction via core).

func (*JSONAudit) OnRequest

func (j *JSONAudit) OnRequest(ctx *zoox.Context, _ *http.Request) error

OnRequest snapshots the client request body (bounded) for pairing with JSON responses.

func (*JSONAudit) OnResponse

func (j *JSONAudit) OnResponse(ctx *zoox.Context, res *http.Response) error

OnResponse emits one audit log line when the upstream response looks like JSON.

func (*JSONAudit) Prepare

func (j *JSONAudit) Prepare(app *zoox.Application, cfg *config.Config) error

Prepare validates options and caches defaults.

Jump to

Keyboard shortcuts

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