middleware

package
v1.0.8 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Access

func Access(ops *AccessOptions) fiber.Handler

访问日志 中间件,官方的日志中间件不太灵活,先自己实现

func JWT added in v0.0.3

func JWT(cfg JwtConfig) fiber.Handler

jwt 验签中间件,默认自动从header中依次获取token Secret string 秘钥 Next func(c *fiber.Ctx) bool

func NotFound

func NotFound() fiber.Handler

404处理

Types

type AccessOptions added in v0.0.5

type AccessOptions struct {
	Logger      winner_logger.Logger
	LogResponse bool
}

type JwtConfig added in v0.0.3

type JwtConfig struct {
	Secret        string
	AppName       string
	BusinessLines string
	Expire        time.Duration
	Next          func(c *fiber.Ctx) bool
}

Jump to

Keyboard shortcuts

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