middleware

package
v0.0.0-...-24b49fa Latest Latest
Warning

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

Go to latest
Published: May 22, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessLog

type AccessLog struct {
	Path       string        `json:"path"`
	Method     string        `json:"method"`
	ReqBody    string        `json:"req_body"`
	RespBody   string        `json:"resp_body"`
	StatusCode int           `json:"status_code"`
	Duration   time.Duration `json:"duration"`
}

type LogMiddlewareBuilder

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

func NewLogMiddlewareBuilder

func NewLogMiddlewareBuilder(
	logFn func(ctx context.Context, al AccessLog),
) *LogMiddlewareBuilder

func (*LogMiddlewareBuilder) AllowReqBody

func (l *LogMiddlewareBuilder) AllowReqBody() *LogMiddlewareBuilder

func (*LogMiddlewareBuilder) AllowRespBody

func (l *LogMiddlewareBuilder) AllowRespBody() *LogMiddlewareBuilder

func (*LogMiddlewareBuilder) Build

type LoginJWT

type LoginJWT struct {
	ijwt.Handler
	// contains filtered or unexported fields
}

func NewLoginJWTBuilder

func NewLoginJWTBuilder(hdl ijwt.Handler, ignorePaths []string) *LoginJWT

func (*LoginJWT) Build

func (m *LoginJWT) Build() gin.HandlerFunc

type LoginMiddlewareBuilder

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

func LoginMiddleware

func LoginMiddleware(ignorePaths []string) *LoginMiddlewareBuilder

func (*LoginMiddlewareBuilder) CheckLogin

func (m *LoginMiddlewareBuilder) CheckLogin() gin.HandlerFunc

Jump to

Keyboard shortcuts

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