[feat] 调整验证码
This commit is contained in:
parent
d0a72dfd0b
commit
50f103ab0c
@ -1,13 +1,7 @@
|
||||
package contracts
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/samber/do"
|
||||
)
|
||||
|
||||
type Captcha interface {
|
||||
HttpMiddleware(container *do.Injector) func(next http.Handler) http.Handler
|
||||
RouteMiddleware
|
||||
Verify(id int64, answer string, clear bool) error
|
||||
Generate(captchaUuid, recipient, ip string, u User) (body string, id int64, err error)
|
||||
}
|
||||
|
@ -70,6 +70,10 @@ type Route interface {
|
||||
MakeRequest(r *http.Request, params map[string]any) (*http.Request, error)
|
||||
}
|
||||
|
||||
type RouteMiddleware interface {
|
||||
HttpMiddleware(r Route) func(next http.Handler) http.Handler
|
||||
}
|
||||
|
||||
type WsClientGroup string
|
||||
type WsClientID uint
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user