Documentation ¶
Index ¶
- Variables
- func CheckLogin(user *model.User) error
- func CheckUserExist(username string) error
- func Close()
- func CreateComment(p *model.CommentDetail) error
- func CreatePost(p *model.Post) error
- func GetAuthorNameById(id int64) (name string, err error)
- func GetCommunityDetailById(id int64) (*model.CommunityDetail, error)
- func GetCommunityList() (data []*model.Community, err error)
- func GetCommunityNameById(id int64) (data *model.Community, err error)
- func GetFatherById(id int64) (data []*model.CommentDetail, ids []int64, err error)
- func GetPostDetailById(id int64) (data *model.Post, err error)
- func GetPostList(page, size int64) (posts []*model.Post, err error)
- func GetPostOrder(ids []string) (data []*model.Post, err error)
- func GetReplayList(id int64) (data []*model.CommentDetail, err error)
- func GetUserName(id int64) (name string, err error)
- func Init()
- func InsertUser(user *model.User) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrorInvalidPassword = ehandle.MySQLInvalidPassword ErrorUserExist = ehandle.MySQLUserExist ErrorUserNotExist = errors.New("用户不存在") )
Functions ¶
func GetAuthorNameById ¶
func GetCommunityDetailById ¶
func GetCommunityDetailById(id int64) (*model.CommunityDetail, error)
GetCommunityDetailById 通过对应的社区id返回社区详情
func GetCommunityList ¶
GetCommunityList 返回所有社区名和对应的社区id
func GetCommunityNameById ¶
GetCommunityNameById 通过id 返回对应的社区名称
func GetFatherById ¶
func GetFatherById(id int64) (data []*model.CommentDetail, ids []int64, err error)
GetFatherById 查找指定帖子id的所有父级评论
func GetReplayList ¶
func GetReplayList(id int64) (data []*model.CommentDetail, err error)
GetReplayList 查找对应评论id的子评论,is_top=-1表示是子级评论
func GetUserName ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.