middleware

package
v0.0.0-...-4699a84 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2024 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendGlobalMiddleWares

func AppendGlobalMiddleWares(item []MiddleWare)

AppendGlobalMiddleWares 新增全局化中间件,先于其他中间件执行

func AppendSingleMiddleWares

func AppendSingleMiddleWares(item []MiddleWare)

AppendSingleMiddleWares 新增全局路由的中间件,比global中间件晚运行

func Init

func Init(app *iris.Application)

Init 中间件初始化

func RegisterMiddleWare

func RegisterMiddleWare(app *iris.Application)

Types

type MiddleWare

type MiddleWare struct {
	Handler         context.Handler // 中间件处理器
	HandlerCnDesc   string          // 中间件处理器描述
	HandlerEnDesc   string          // 中间件处理器英文描述
	HandlerServer   string          // 中间件所属服务,用于解决所属服务在使用公共库时。不会重复注册中间件。
	MiddleWareLevel int32           // 中间件等级(影响中间件运行顺序,数值越大,等级越小)
}

MiddleWare 中间件结构体

Directories

Path Synopsis
security

Jump to

Keyboard shortcuts

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