middleware

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckTokenMiddleware

type CheckTokenMiddleware struct {
	UserRpc user.User
	LogRpc  operLog.Log
	// contains filtered or unexported fields
}

func NewCheckTokenMiddleware

func NewCheckTokenMiddleware(c config.Config, UserRpc user.User, LogRpc operLog.Log) *CheckTokenMiddleware

func (*CheckTokenMiddleware) GetCityByIp added in v0.3.1

func (m *CheckTokenMiddleware) GetCityByIp(ip string) string

获取ip所属城市

func (*CheckTokenMiddleware) Handle

func (*CheckTokenMiddleware) OpenAuth added in v0.3.0

如果有开放认证的字段才进行认证

func (*CheckTokenMiddleware) OperationLogRecord added in v0.3.1

func (m *CheckTokenMiddleware) OperationLogRecord(r *http.Request, rsp string) error

操作日志记录

func (*CheckTokenMiddleware) UserAuth added in v0.3.0

Jump to

Keyboard shortcuts

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