[feat] 新增 Captcha 接口标准

This commit is contained in:
what 2024-01-29 17:24:51 +08:00
parent 02548b4e0c
commit 0d0a5ce476

13
captcha.go Normal file
View 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)
}