dao

package
v0.0.0-...-ca8b2fb Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2025 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MysqlManagerImpl

type MysqlManagerImpl struct {
	// contains filtered or unexported fields
}

func NewMysqlManager

func NewMysqlManager(db *gorm.DB) *MysqlManagerImpl

func (*MysqlManagerImpl) CreateChatMessage

func (m *MysqlManagerImpl) CreateChatMessage(ctx context.Context, chatMessage *model.ChatMessage) error

type RedisManagerImpl

type RedisManagerImpl struct {
	// contains filtered or unexported fields
}

func NewRedisManager

func NewRedisManager(redis *redis.Client) *RedisManagerImpl

func (*RedisManagerImpl) CheckRoomExists

func (r *RedisManagerImpl) CheckRoomExists(ctx context.Context, roomId int64) (bool, error)

func (*RedisManagerImpl) SendMessage

func (r *RedisManagerImpl) SendMessage(ctx context.Context, request *chat.ChatMessage) (err error)

使用公共的 InternalMessage 结构体作为消息的载体,便于转换。

Jump to

Keyboard shortcuts

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