[feat] 新增 Captcha 接口标准
This commit is contained in:
parent
02548b4e0c
commit
0d0a5ce476
13
captcha.go
Normal file
13
captcha.go
Normal file
@ -0,0 +1,13 @@
|
||||
package contracts
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"github.com/samber/do"
|
||||
)
|
||||
|
||||
type Captcha interface {
|
||||
Middleware(container *do.Injector) func(next http.Handler) http.Handler
|
||||
Verify(id, answer string, clear bool) bool
|
||||
Generate(captchaUuid string) (id, answer string)
|
||||
}
|
Loading…
Reference in New Issue
Block a user