Documentation ¶
Overview ¶
@Title mysql @Description 定义在多个模块用到的错误信息 @Author CaptainLee1024 2020-10-07 @Update CaptainLee1024 2020-10-07
Package mysql provides ...
Package mysql provides ...
Index ¶
- Variables
- func CheckUserExist(username string) (err error)
- func Close()
- func CreatePost(p *models.Post) (err error)
- func GetCommunityDetailByID(id int64) (communityDetail *models.CommunityDetail, err error)
- func GetCommunityList() (communityList []*models.Community, err error)
- func GetPostById(pid int64) (post *models.Post, err error)
- func GetPostList(page, size int64) (posts []*models.Post, err error)
- func GetPostListByIDs(ids []string) (postList []*models.Post, err error)
- func GetUserById(uid int64) (user *models.User, err error)
- func Init(cfg *settings.MySQLConfig) (err error)
- func InsertUser(user *models.User) (err error)
- func Login(u *models.User) (err error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func CheckUserExist ¶
CheckUserExist 检查制定用户名的用户是否存在
func CreatePost ¶
func GetCommunityDetailByID ¶
func GetCommunityDetailByID(id int64) (communityDetail *models.CommunityDetail, err error)
func GetCommunityList ¶
func GetPostListByIDs ¶
GetPostListByIDs 根据给定的id列表查询帖子数据
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.