Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatService ¶
type ChatService interface { SendMessage(message *model.ChatMessage) (map[string]interface{}, error) GetHistory(userID uint) ([]model.ChatMessage, error) }
func NewChatService ¶
func NewChatService(db *gorm.DB) ChatService
type UserService ¶
type UserService interface { Register(user *model.User) error Login(username, password, code string) (string, error) }
func NewUserService ¶
func NewUserService(db *gorm.DB, jwt *tools.JWTManager, verificationService VerificationService) UserService
NewUserService creates a new user service instance
type VerificationService ¶
type VerificationService interface { SendVerificationCode(email string) error VerifyCode(email, code string) error }
VerificationService 定义验证码服务接口
func NewVerificationService ¶
func NewVerificationService(redisClient redis.RedisClient, emailer email.EmailSender, tm template.TemplateManager) VerificationService
NewVerificationService 创建验证码服务实例
Click to show internal directories.
Click to hide internal directories.