Documentation
¶
Index ¶
- Variables
- func DbInit(SqliteDbPath string) (bool, error)
- func QueryAuthorBooks(authorid, limit, start int) []models.BookVo
- func QueryAuthorBooksCount(authorid int) int
- func QueryAuthors(limit, start int) []models.Author
- func QueryAuthorsCount() int64
- func QueryBook(bookid int) models.BookVo
- func QueryBookFile(bookid int) (*os.File, error)
- func QueryBookFileByte(bookid int) []byte
- func QueryBookRating(bookid int) int
- func QueryBookTags(bookid int) []models.Tag
- func QueryBooks(limit, start int) []models.BookVo
- func QueryBooksCount() int64
- func QueryCoverImg(bookid int) []byte
- func QueryDiscoverBooks(limit, start int) []models.BookVo
- func QueryLanguageBooks(lang_code, limit, start int) []models.BookVo
- func QueryLanguageBooksCount(lang_code int) int
- func QueryLanguages(limit, start int) []models.Language
- func QueryLanguagesCount() int64
- func QueryNewBooks(limit, start int) []models.BookVo
- func QueryRatingBooks(limit, start int) []models.BookVo
- func QueryTagBooks(tagid, limit, start int) []models.BookVo
- func QueryTagBooksCount(tagid int) int
- func QueryTags(limit, start int) []models.Tag
- func QueryTagsCount() int64
- type RoleActionService
- type UserRoleService
- type UserService
- func (userService UserService) DeleteUser(userId string) bool
- func (userService UserService) FreshLoginSession(loginSession string, UserId string)
- func (userService UserService) GetLoginUser(loginSession string) (models.UserInfo, bool)
- func (userService UserService) GetUserById(Id string) models.UserInfo
- func (userService UserService) GetUserByLoginName(loginName string) (models.UserInfo, bool)
- func (userService UserService) QueryUser(name string, limit, start int) []models.UserInfo
- func (userService UserService) QueryUserCount(name string) int64
- func (userService UserService) Regist(user models.UserInfo) bool
- func (userService UserService) UpdateInfo(user models.UserInfo) bool
- func (userService UserService) UpdatePassword(user models.UserInfo) bool
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultUserService = UserService{} DefaultUserRoleService = UserRoleService{} DefaultRoleActionService = RoleActionService{} )
Functions ¶
func QueryAuthorBooks ¶
author books info
func QueryBookTags ¶ added in v0.0.2
query more tags by bookid
func QueryDiscoverBooks ¶
discover books info
func QueryLanguageBooks ¶
languages books info
Types ¶
type RoleActionService ¶ added in v0.0.2
type RoleActionService struct {
}
func (RoleActionService) GetRoleActionByControllerMethodRole ¶ added in v0.0.2
func (service RoleActionService) GetRoleActionByControllerMethodRole(controller, method, role string) models.RoleAction
type UserRoleService ¶ added in v0.0.2
type UserRoleService struct {
}
func (UserRoleService) GetRoleByUser ¶ added in v0.0.2
func (service UserRoleService) GetRoleByUser(userId string) models.Role
type UserService ¶ added in v0.0.2
type UserService struct {
}
func (UserService) DeleteUser ¶ added in v0.0.2
func (userService UserService) DeleteUser(userId string) bool
set valid = 1 ,not allow delete admin
func (UserService) FreshLoginSession ¶ added in v0.0.2
func (userService UserService) FreshLoginSession(loginSession string, UserId string)
func (UserService) GetLoginUser ¶ added in v0.0.2
func (userService UserService) GetLoginUser(loginSession string) (models.UserInfo, bool)
func (UserService) GetUserById ¶ added in v0.0.2
func (userService UserService) GetUserById(Id string) models.UserInfo
获取user信息
func (UserService) GetUserByLoginName ¶ added in v0.0.2
func (userService UserService) GetUserByLoginName(loginName string) (models.UserInfo, bool)
func (UserService) QueryUser ¶ added in v0.0.2
func (userService UserService) QueryUser(name string, limit, start int) []models.UserInfo
find user by username or login name
func (UserService) QueryUserCount ¶ added in v0.0.2
func (userService UserService) QueryUserCount(name string) int64
func (UserService) Regist ¶ added in v0.0.2
func (userService UserService) Regist(user models.UserInfo) bool
func (UserService) UpdateInfo ¶ added in v0.0.2
func (userService UserService) UpdateInfo(user models.UserInfo) bool
update info .not in password or other.
func (UserService) UpdatePassword ¶ added in v0.0.2
func (userService UserService) UpdatePassword(user models.UserInfo) bool
change password and salt
Click to show internal directories.
Click to hide internal directories.