[feat] 新增 Captcha 接口标准
This commit is contained in:
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)
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user