service

package
v0.0.0-...-82d1dcb Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 9, 2025 License: MIT Imports: 12 Imported by: 0

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 创建验证码服务实例

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL