Documentation
¶
Index ¶
- type APIBook
- type APIDoc
- type APIDocV2
- type APIRegister
- type APIResponse
- type APIUser
- type BaseController
- type CommonController
- func (this *CommonController) Banners()
- func (this *CommonController) BookInfo()
- func (this *CommonController) BookLists()
- func (this *CommonController) BookListsByCids()
- func (this *CommonController) BookMenu()
- func (this *CommonController) Bookshelf()
- func (this *CommonController) Categories()
- func (this *CommonController) Download()
- func (this *CommonController) GetComments()
- func (this *CommonController) GetUserMoreInfo()
- func (this *CommonController) HistoryReadBook()
- func (this *CommonController) LatestVersion()
- func (this *CommonController) Login()
- func (this *CommonController) LoginBindWechat()
- func (this *CommonController) LoginByWechat()
- func (this *CommonController) LoginedBindWechat()
- func (this *CommonController) Rank()
- func (this *CommonController) Read()
- func (this *CommonController) Register()
- func (this *CommonController) RelatedBook()
- func (this *CommonController) SearchBook()
- func (this *CommonController) SearchDoc()
- func (this *CommonController) TODO()
- func (this *CommonController) UserFans()
- func (this *CommonController) UserFollow()
- func (this *CommonController) UserInfo()
- func (this *CommonController) UserReleaseBook()
- type LoginedController
- func (this *LoginedController) ChangeAvatar()
- func (this *LoginedController) ChangePassword()
- func (this *LoginedController) DeleteBookmarks()
- func (this *LoginedController) GetBookmarks()
- func (this *LoginedController) Logout()
- func (this *LoginedController) PostComment()
- func (this *LoginedController) Prepare()
- func (this *LoginedController) SetBookmarks()
- func (this *LoginedController) SignStatus()
- func (this *LoginedController) SignToday()
- func (this *LoginedController) Star()
- type UserMoreInfo
- type WechatBindForm
- type WechatForm
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIBook ¶
type APIBook struct {
BookId int `json:"book_id"`
BookName string `json:"book_name"`
Identify string `json:"identify"`
OrderIndex int `json:"sort"`
Description string `json:"description"`
Label string `json:"tags"`
Vcnt int `json:"view"` // 阅读
Star int `json:"star"` // 收藏
Lang string `json:"lang"`
Cover string `json:"cover"`
Score int `json:"score"` // 书籍评分,默认40,即4.0星
CntScore int `json:"cnt_score"` // 评分个数
CntComment int `json:"cnt_comment"` // 评论人数
DocCount int `json:"cnt_doc"` // 章节数量
ReleaseTime time.Time `json:"updated_at"` // 更新时间。这里用书籍的release_time 作为最后的更新时间。因为现有的更新时间不准
CreateTime time.Time `json:"created_at"` // 新建时间
MemberId int `json:"uid,omitempty"`
User string `json:"user,omitempty"` // 分享人
Author string `json:"author,omitempty"` // 原作者
AuthorURL string `json:"author_url,omitempty"` // 原作者连接地址
DocReaded int `json:"cnt_readed"` //已读章节
IsStar bool `json:"is_star"` //是否已收藏到书架
}
type APIDoc ¶
type APIDoc struct {
DocumentId int `json:"id"`
ParentId int `json:"pid"`
DocumentName string `json:"title"`
Identify string `json:"identify"`
BookId int `json:"book_id"`
BookName string `json:"book_name"`
OrderSort int `json:"sort"`
Release string `json:"content,omitempty"`
CreateTime time.Time `json:"created_at,omitempty"`
MemberId int `json:"uid"`
ModifyTime time.Time `json:"updated_at,omitempty"`
Vcnt int `json:"vcnt"`
Readed bool `json:"readed"`
Bookmark bool `json:"bookmark"`
}
type APIDocV2 ¶
type APIDocV2 struct {
DocumentId int `json:"id"`
ParentId int `json:"pid"`
DocumentName string `json:"title"`
Identify string `json:"identify"`
BookId int `json:"book_id"`
BookName string `json:"book_name"`
OrderSort int `json:"sort"`
Release interface{} `json:"content,omitempty"`
CreateTime time.Time `json:"created_at,omitempty"`
MemberId int `json:"uid"`
ModifyTime time.Time `json:"updated_at,omitempty"`
Vcnt int `json:"vcnt"`
Readed bool `json:"readed"`
Bookmark bool `json:"bookmark"`
}
type APIRegister ¶
type APIResponse ¶
type APIResponse struct {
Message string `json:"message"`
Data interface{} `json:"data,omitempty"`
}
type APIUser ¶
type APIUser struct {
Uid int `json:"uid"`
Token string `json:"token,omitempty"`
Account string `json:"username,omitempty"` //对应 member.account
Nickname string `json:"nickname"`
Email string `json:"email,omitempty"`
Phone string `json:"phone,omitempty"`
Avatar string `json:"avatar"`
Description string `json:"intro,omitempty"`
}
type BaseController ¶
type BaseController struct {
beego.Controller
Token string
Version string
}
func (*BaseController) Response ¶
func (this *BaseController) Response(httpStatus int, message string, data ...interface{})
type CommonController ¶
type CommonController struct {
BaseController
}
不登录也能调用的接口放这里
func (*CommonController) BookListsByCids ¶
func (this *CommonController) BookListsByCids()
func (*CommonController) Bookshelf ¶
func (this *CommonController) Bookshelf()
func (*CommonController) Categories ¶
func (this *CommonController) Categories()
func (*CommonController) Download ¶
func (this *CommonController) Download()
func (*CommonController) GetUserMoreInfo ¶
func (this *CommonController) GetUserMoreInfo()
func (*CommonController) HistoryReadBook ¶
func (this *CommonController) HistoryReadBook()
查询最近阅读过的书籍,返回最近50本
func (*CommonController) LatestVersion ¶
func (this *CommonController) LatestVersion()
func (*CommonController) LoginBindWechat ¶
func (this *CommonController) LoginBindWechat()
func (*CommonController) LoginedBindWechat ¶
func (this *CommonController) LoginedBindWechat()
func (*CommonController) Rank ¶
func (this *CommonController) Rank()
func (*CommonController) Read ¶
func (this *CommonController) Read()
func (*CommonController) RelatedBook ¶
func (this *CommonController) RelatedBook()
func (*CommonController) TODO ¶
func (this *CommonController) TODO()
func (*CommonController) UserFans ¶
func (this *CommonController) UserFans()
func (*CommonController) UserFollow ¶
func (this *CommonController) UserFollow()
func (*CommonController) UserReleaseBook ¶
func (this *CommonController) UserReleaseBook()
如果不传用户id,则表示查询当前登录的用户发布的书籍
type LoginedController ¶
type LoginedController struct {
BaseController
}
登录之后才能调用的接口放这里
func (*LoginedController) ChangePassword ¶
func (this *LoginedController) ChangePassword()
func (*LoginedController) DeleteBookmarks ¶
func (this *LoginedController) DeleteBookmarks()
func (*LoginedController) GetBookmarks ¶
func (this *LoginedController) GetBookmarks()
func (*LoginedController) Logout ¶
func (this *LoginedController) Logout()
func (*LoginedController) PostComment ¶
func (this *LoginedController) PostComment()
func (*LoginedController) Prepare ¶
func (this *LoginedController) Prepare()
func (*LoginedController) SetBookmarks ¶
func (this *LoginedController) SetBookmarks()
type UserMoreInfo ¶
type UserMoreInfo struct {
MemberId int `json:"uid"`
SignedAt int `json:"signed_at"` // 签到时间
CreatedAt int `json:"created_at"` // 注册时间
TotalSign int `json:"total_sign"` // 总签到天数
TotalContinuousSign int `json:"total_continuous_sign"` // 总连续签到天数
HistoryContinuousSign int `json:"history_continuous_sign"` // 历史连续签到天数
TodayReading int `json:"today_reading"` // 今日阅读时长
MonthReading int `json:"month_reading"` // 本月阅读时长
TotalReading int `json:"total_reading"` // 总阅读时长
}
type WechatBindForm ¶
type WechatForm ¶
Click to show internal directories.
Click to hide internal directories.