mid

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 16 Imported by: 10 modules, 16 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	PenddingMinute = 24 * 60 //閒置自動登出時間,單位分鐘

	AuthTokenKey   = "Auth-Token"
	RemoteTokenKey = "Remote-Token"
)

Variables

This section is empty.

Functions

func BuildChain

func BuildChain(f http.HandlerFunc, m ...Middleware) http.HandlerFunc

buildChain builds the middlware chain recursively, functions are first class

Types

type AuthMidInter

type AuthMidInter interface {
	Middle
	AddAuthPath(path string, method string, isAuth bool, group []auth.UserPerm)
}

func NewAuthMid

func NewAuthMid(token auth.JwtToken, kid string) AuthMidInter

type DBMidDI

type DBMidDI interface {
	log.LoggerDI
	db.MongoDI
}

type DBMiddle

type DBMiddle string

type Middle

type Middle interface {
	GetName() string
	GetMiddleWare() func(f http.HandlerFunc) http.HandlerFunc
}

func NewDBMid

func NewDBMid(di DBMidDI, name string) Middle

func NewDebugMid

func NewDebugMid(name string) Middle

type Middleware

type Middleware func(http.HandlerFunc) http.HandlerFunc

Jump to

Keyboard shortcuts

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