Documentation
¶
Index ¶
- func GetApp() *iris.Application
- func NewJSONOutput(status int, err error, data interface{}) output
- func NewValidator()
- type BookHandler
- type ClippingHandler
- func (h *ClippingHandler) GetBookBy(doubanID string) mvc.Response
- func (h *ClippingHandler) GetBooksBy(id int64) output
- func (h *ClippingHandler) GetBy(id model.ClippingID) mvc.Response
- func (h *ClippingHandler) GetClippingsBy(uid model.UserID) mvc.Response
- func (h *ClippingHandler) PostCreate(jwtUid model.UserID) mvc.Response
- func (h *ClippingHandler) PostMultipCreate(jwtUid model.UserID) output
- type CommentHandler
- type MiscHandler
- type ResourceResponse
- type SearchHandler
- type StatusHandler
- type UserHandler
- func (h *UserHandler) GetBy(id int64) output
- func (h *UserHandler) GetVerifyBy(code string) output
- func (h *UserHandler) PostGithub() output
- func (h *UserHandler) PostLogin() mvc.Response
- func (h *UserHandler) PostSignup() mvc.Response
- func (h *UserHandler) PostWechat() mvc.Response
- func (h *UserHandler) PostWechatBind() mvc.Response
- type VersionHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetApp ¶ added in v1.0.1
func GetApp() *iris.Application
func NewJSONOutput ¶ added in v1.0.1
func NewValidator ¶ added in v1.0.1
func NewValidator()
Types ¶
type BookHandler ¶ added in v1.0.2
type BookHandler struct {
Ctx iris.Context
UserService model.UserService
ClippingService model.ClippingService
BookService model.BookService
MailService model.MailService
}
func (*BookHandler) GetClippingsBy ¶ added in v1.0.2
func (*BookHandler) PutClippingsBy ¶ added in v1.0.2
func (b *BookHandler) PutClippingsBy(uid int64) mvc.Response
PutClippingsBy 目前仅可更新 book id, 还不能更新 clipping content or others
type ClippingHandler ¶
type ClippingHandler struct {
Ctx iris.Context
ClippingService model.ClippingService
UserService model.UserService
BookService model.BookService
}
func (*ClippingHandler) GetBookBy ¶ added in v1.0.2
func (h *ClippingHandler) GetBookBy(doubanID string) mvc.Response
TODO: GetBookBy change url to douban book like
func (*ClippingHandler) GetBooksBy ¶ added in v1.0.2
func (h *ClippingHandler) GetBooksBy(id int64) output
func (*ClippingHandler) GetBy ¶ added in v1.0.2
func (h *ClippingHandler) GetBy(id model.ClippingID) mvc.Response
func (*ClippingHandler) GetClippingsBy ¶ added in v1.0.1
func (h *ClippingHandler) GetClippingsBy(uid model.UserID) mvc.Response
GetByUser will return clippings that created by the user
func (*ClippingHandler) PostCreate ¶ added in v1.0.1
func (h *ClippingHandler) PostCreate(jwtUid model.UserID) mvc.Response
func (*ClippingHandler) PostMultipCreate ¶ added in v1.0.1
func (h *ClippingHandler) PostMultipCreate(jwtUid model.UserID) output
type CommentHandler ¶
type CommentHandler struct {
Ctx iris.Context
CommentService model.CommentService
ClippingService model.ClippingService
UserService model.UserService
}
func (*CommentHandler) Create ¶
func (h *CommentHandler) Create(jwtUid model.UserID) output
func (*CommentHandler) GetCommentBy ¶ added in v1.0.1
func (h *CommentHandler) GetCommentBy(clippingId model.ClippingID) output
GetByClipping will return comments that belongs to this clipping
type MiscHandler ¶ added in v1.0.2
type MiscHandler struct {
Ctx iris.Context
ImageService model.ImageService
}
func (MiscHandler) PostUploadImage ¶ added in v1.0.2
func (m MiscHandler) PostUploadImage() output
type ResourceResponse ¶ added in v1.0.2
type ResourceResponse struct {
FilePath string `json:"filePath"`
}
type SearchHandler ¶ added in v1.0.2
type SearchHandler struct {
Ctx iris.Context
SearchService model.SearchService
}
func (SearchHandler) PostAll ¶ added in v1.0.2
func (s SearchHandler) PostAll() mvc.Response
type StatusHandler ¶ added in v1.0.2
func (*StatusHandler) GetStatus ¶ added in v1.0.2
func (s *StatusHandler) GetStatus() output
type UserHandler ¶ added in v1.0.1
type UserHandler struct {
Ctx iris.Context
Service model.UserService
ClippingService model.ClippingService
MailService model.MailService
GithubService model.GithubService
WechatService model.WechatService
}
func (*UserHandler) GetBy ¶ added in v1.0.1
func (h *UserHandler) GetBy(id int64) output
func (*UserHandler) GetVerifyBy ¶ added in v1.0.1
func (h *UserHandler) GetVerifyBy(code string) output
func (*UserHandler) PostGithub ¶ added in v1.0.2
func (h *UserHandler) PostGithub() output
func (*UserHandler) PostLogin ¶ added in v1.0.1
func (h *UserHandler) PostLogin() mvc.Response
func (*UserHandler) PostSignup ¶ added in v1.0.1
func (h *UserHandler) PostSignup() mvc.Response
PostSignup will register a new user 首先根据 fp 验证是否超过两次, 然后进行数据库存储, 然后根据 user id 生成 code,之后发送注册邮件 注册完成后不可直接登陆,需要验证邮箱
func (*UserHandler) PostWechat ¶ added in v1.0.2
func (h *UserHandler) PostWechat() mvc.Response
func (*UserHandler) PostWechatBind ¶ added in v1.0.2
func (h *UserHandler) PostWechatBind() mvc.Response
type VersionHandler ¶ added in v1.0.2
type VersionHandler struct {
Ctx iris.Context
VersionService model.VersionService
}
func (*VersionHandler) GetBy ¶ added in v1.0.2
func (v *VersionHandler) GetBy(platform string) output
GetBy the platform support `Android`, `iOS`, `WindowsUWP`, `web` only
Click to show internal directories.
Click to hide internal directories.