middleware

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2023 License: AGPL-3.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckTokenWareMiddleware added in v0.5.1

type CheckTokenWareMiddleware struct {
	UserRpc user.User
	AuthRpc auth.Auth
	// contains filtered or unexported fields
}

func NewCheckTokenWareMiddleware added in v0.5.1

func NewCheckTokenWareMiddleware(cfg config.Config, UserRpc user.User, AuthRpc auth.Auth) *CheckTokenWareMiddleware

func (*CheckTokenWareMiddleware) Handle added in v0.5.1

func (*CheckTokenWareMiddleware) OpenAuth added in v0.5.1

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

func (*CheckTokenWareMiddleware) UserAuth added in v0.5.1

type SetupWareMiddleware added in v0.5.1

type SetupWareMiddleware struct {
	LogRpc operLog.Log
	// contains filtered or unexported fields
}

func NewSetupWareMiddleware added in v0.5.1

func NewSetupWareMiddleware(cfg config.Config, LogRpc operLog.Log) *SetupWareMiddleware

func (*SetupWareMiddleware) Handle added in v0.5.1

type TeardownWareMiddleware added in v0.5.1

type TeardownWareMiddleware struct {
	LogRpc operLog.Log
	// contains filtered or unexported fields
}

func NewTeardownWareMiddleware added in v0.5.1

func NewTeardownWareMiddleware(cfg config.Config, LogRpc operLog.Log) *TeardownWareMiddleware

func (*TeardownWareMiddleware) GetCityByIp added in v0.5.1

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

获取ip所属城市

func (*TeardownWareMiddleware) Handle added in v0.5.1

func (*TeardownWareMiddleware) OperationLogRecord added in v0.5.1

func (m *TeardownWareMiddleware) OperationLogRecord(ctx context.Context, r *http.Request)

接口操作日志记录

Jump to

Keyboard shortcuts

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