Documentation ¶
Index ¶
- type CheckTokenMiddleware
- func (m *CheckTokenMiddleware) GetCityByIp(ip string) string
- func (m *CheckTokenMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
- func (m *CheckTokenMiddleware) OpenAuth(w http.ResponseWriter, r *http.Request) (error, bool)
- func (m *CheckTokenMiddleware) OperationLogRecord(r *http.Request, rsp string) error
- func (m *CheckTokenMiddleware) UserAuth(w http.ResponseWriter, r *http.Request) (*userHeader.UserCtx, error)
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 (*CheckTokenMiddleware) GetCityByIp ¶ added in v0.3.1
func (m *CheckTokenMiddleware) GetCityByIp(ip string) string
获取ip所属城市
func (*CheckTokenMiddleware) Handle ¶
func (m *CheckTokenMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
func (*CheckTokenMiddleware) OpenAuth ¶ added in v0.3.0
func (m *CheckTokenMiddleware) OpenAuth(w http.ResponseWriter, r *http.Request) (error, bool)
如果有开放认证的字段才进行认证
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
func (m *CheckTokenMiddleware) UserAuth(w http.ResponseWriter, r *http.Request) (*userHeader.UserCtx, error)
Click to show internal directories.
Click to hide internal directories.