http

package
v0.25.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Include explicitly includes the request to the auditing backend even if the request method would prevent the request to be audited (only applies for the http filter)
	Include string = "include-to-auditing"
	// Exclude explicitly excludes the request to the auditing backend even if the request method would audit the request (only applies for the http filter)
	Exclude string = "exclude-from-auditing"
)
View Source
const EntryFilterDefaultLimit int64 = 100

Variables

This section is empty.

Functions

func HttpFilter

func HttpFilter(a auditing.Auditing, logger *slog.Logger, opts ...httpFilterOpt) (restful.FilterFunction, error)

func NewHttpFilterErrorCallback

func NewHttpFilterErrorCallback(callback func(err error, response *restful.Response)) *httpFilterErrorCallback

func SerializableError

func SerializableError(err error) any

SerializableError attempts to turn an error into something that is usable for the audit backends.

most errors do not contain public fields (e.g. connect error) and when being serialized will turn into an empty map.

some error types (e.g. httperror of this library) can be serialized without any issues, so these should stay untouched.

Types

This section is empty.

Jump to

Keyboard shortcuts

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