captcha.go 735 B

12345678910111213141516171819202122232425262728
  1. // ================================================================================
  2. // Code generated by GoFrame CLI tool. DO NOT EDIT.
  3. // You can delete these comments if you wish manually maintain this interface file.
  4. // ================================================================================
  5. package service
  6. import (
  7. "context"
  8. )
  9. type ICaptcha interface {
  10. GetVerifyImgString(ctx context.Context) (idKeyC string, base64stringC string, err error)
  11. VerifyString(id, answer string) bool
  12. }
  13. var localCaptcha ICaptcha
  14. func Captcha() ICaptcha {
  15. if localCaptcha == nil {
  16. panic("implement not found for interface ICaptcha, forgot register?")
  17. }
  18. return localCaptcha
  19. }
  20. func RegisterCaptcha(i ICaptcha) {
  21. localCaptcha = i
  22. }