dao

package
v0.0.0-...-eeb3a9e Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DB    *gorm.DB
	RS    *RdbService
	Cache *redis.Client
)

Functions

This section is empty.

Types

type RdbService

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

func (*RdbService) ChangeUserName

func (rs *RdbService) ChangeUserName(user *model.User, newUserName string) (err error)

func (*RdbService) ChangeUserPwd

func (rs *RdbService) ChangeUserPwd(email string, oldPwd string, newPwd string) (err error)

func (*RdbService) CreateGroup

func (rs *RdbService) CreateGroup(groups *model.Group) error

func (*RdbService) CreateGroupUser

func (rs *RdbService) CreateGroupUser(user []*model.GroupUser) error

func (*RdbService) CreateMessage

func (rs *RdbService) CreateMessage(meg []*model.Message) error

func (*RdbService) CreateUser

func (rs *RdbService) CreateUser(user []*model.User) error

func (*RdbService) ExistGroup

func (rs *RdbService) ExistGroup(groupID int64) bool

func (*RdbService) GetGroupUsers

func (rs *RdbService) GetGroupUsers(groupID int64) (*[]model.GroupUser, error)

func (*RdbService) GetMyGroups

func (rs *RdbService) GetMyGroups(UserId int64) ([]model.Group, error)

func (*RdbService) GetUserByEmail

func (rs *RdbService) GetUserByEmail(user *model.User, Email string) error

func (*RdbService) GetUserbyId

func (rs *RdbService) GetUserbyId(user *model.User) (err error)

func (*RdbService) GetUserbyUsername

func (rs *RdbService) GetUserbyUsername(user *model.User) (err error)

func (*RdbService) IncrGroupSeq

func (rs *RdbService) IncrGroupSeq(groupID int64) (err error)

func (*RdbService) IncrGroupUserNum

func (rs *RdbService) IncrGroupUserNum(groupID int64) (err error)

func (*RdbService) QueryGroup

func (rs *RdbService) QueryGroup(groupID int64) (*model.Group, error)

func (*RdbService) SyncMessage

func (rs *RdbService) SyncMessage(receiverId int64, syncSeq int64, limit int, isNew int64) (megs []model.Message, err error)

func (*RdbService) UpdateUser

func (rs *RdbService) UpdateUser(user *model.User) (err error)

Jump to

Keyboard shortcuts

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