middleware

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 22, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Replay

func Replay(store state.Store, opts ...MiddlewareOption) gin.HandlerFunc

func Risk

func Risk(scene string, manager *risk.Manager, opts ...MiddlewareOption) gin.HandlerFunc

func RiskWithContext

func RiskWithContext(scene string, manager *risk.Manager, fill RiskContextFunc, opts ...MiddlewareOption) gin.HandlerFunc

func SecureHeaders

func SecureHeaders(opt SecureHeaderOption) gin.HandlerFunc

func Signature

func Signature(store state.Store, secret []byte, opts ...MiddlewareOption) gin.HandlerFunc

Types

type MiddlewareConfig

type MiddlewareConfig struct {
	Responder ginresponder.ErrorResponder
}

type MiddlewareOption

type MiddlewareOption func(*MiddlewareConfig)

func WithResponder

func WithResponder(responder ginresponder.ErrorResponder) MiddlewareOption

type RiskContextFunc

type RiskContextFunc func(c *gin.Context, rc *risk.Context)

type SecureHeaderOption

type SecureHeaderOption struct {
	CSP string
}

Jump to

Keyboard shortcuts

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