middleware

package
v0.4.8 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MegaByte16 = 16 * 1024 * 1024
)

Variables

View Source
var (
	ErrXSignExpired = fmt.Errorf("接口签名已过期")
	ErrXSignInvalid = fmt.Errorf("接口签名无效")
)

Functions

This section is empty.

Types

type IXSignMiddlewareOption

type IXSignMiddlewareOption interface {
	// contains filtered or unexported methods
}

type XSignMiddleware

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

func NewXSignMiddleware

func NewXSignMiddleware(opts ...IXSignMiddlewareOption) *XSignMiddleware

func (*XSignMiddleware) ClientHTTP

func (x *XSignMiddleware) ClientHTTP(ctx context.Context, r *http.Request) error

func (*XSignMiddleware) ServerHTTP

func (x *XSignMiddleware) ServerHTTP(next http.HandlerFunc) http.HandlerFunc

type XSignMiddlewareOptionFunc

type XSignMiddlewareOptionFunc func(*XSignMiddlewareOptions)

func WithEnabled

func WithEnabled(enabled bool) XSignMiddlewareOptionFunc

func WithSignKey

func WithSignKey(signKey string) XSignMiddlewareOptionFunc

type XSignMiddlewareOptions

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

Jump to

Keyboard shortcuts

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