middleware

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

View Source
var (
	PayPasswordHeader = "X-Pay-Password"
	SignatureHeader   = "X-Signature"
)
View Source
var (
	ContextUidField = "uid"
)

Functions

func AuthPayPassword

func AuthPayPassword(c *gin.Context)

交易密码的验证中间件

func Authenticate

func Authenticate(isAdmin bool) gin.HandlerFunc

Token 验证中间件

func CORS

func CORS() gin.HandlerFunc

func Common

func Common(c *gin.Context)

func GracefulExit

func GracefulExit() gin.HandlerFunc

优雅退出中间件 再接收到退出指令之后,则 HTTP 服务不再接收新的请求

Types

This section is empty.

Jump to

Keyboard shortcuts

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