Documentation ¶
Index ¶
- type CheckTokenWareMiddleware
- func (m *CheckTokenWareMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
- func (m *CheckTokenWareMiddleware) OpenAuth(w http.ResponseWriter, r *http.Request) (bool, *ctxs.UserCtx, error)
- func (m *CheckTokenWareMiddleware) UserAuth(w http.ResponseWriter, r *http.Request) (*ctxs.UserCtx, error)
- type SetupWareMiddleware
- type TeardownWareMiddleware
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 (*CheckTokenWareMiddleware) Handle ¶ added in v0.5.1
func (m *CheckTokenWareMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
func (*CheckTokenWareMiddleware) OpenAuth ¶ added in v0.5.1
func (m *CheckTokenWareMiddleware) OpenAuth(w http.ResponseWriter, r *http.Request) (bool, *ctxs.UserCtx, error)
如果有开放认证的字段才进行认证
func (*CheckTokenWareMiddleware) UserAuth ¶ added in v0.5.1
func (m *CheckTokenWareMiddleware) UserAuth(w http.ResponseWriter, r *http.Request) (*ctxs.UserCtx, error)
type SetupWareMiddleware ¶ added in v0.5.1
func NewSetupWareMiddleware ¶ added in v0.5.1
func NewSetupWareMiddleware(cfg config.Config, LogRpc operLog.Log) *SetupWareMiddleware
func (*SetupWareMiddleware) Handle ¶ added in v0.5.1
func (m *SetupWareMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
type TeardownWareMiddleware ¶ added in v0.5.1
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 (m *TeardownWareMiddleware) Handle(next http.HandlerFunc) http.HandlerFunc
func (*TeardownWareMiddleware) OperationLogRecord ¶ added in v0.5.1
func (m *TeardownWareMiddleware) OperationLogRecord(ctx context.Context, r *http.Request)
接口操作日志记录
Click to show internal directories.
Click to hide internal directories.