user.go 743 B

123456789101112131415161718192021222324252627282930313233
  1. // ================================================================================
  2. // Code generated and maintained 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. v1 "cris/api/user/v1"
  9. )
  10. type (
  11. IUser interface {
  12. Register(ctx context.Context, req *v1.UserRegisterReq) error
  13. Login(ctx context.Context, req *v1.UserLoginReq) error
  14. }
  15. )
  16. var (
  17. localUser IUser
  18. )
  19. func User() IUser {
  20. if localUser == nil {
  21. panic("implement not found for interface IUser, forgot register?")
  22. }
  23. return localUser
  24. }
  25. func RegisterUser(i IUser) {
  26. localUser = i
  27. }