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 ¶
func GetApp() *iris.Application
func NewJSONOutput ¶
func NewValidator ¶
func NewValidator()
Types ¶
type BookHandler ¶
type BookHandler struct { Ctx iris.Context UserService model.UserService ClippingService model.ClippingService BookService model.BookService MailService model.MailService }
func (*BookHandler) GetClippingsBy ¶
func (*BookHandler) PutClippingsBy ¶
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 ¶
func (h *ClippingHandler) GetBookBy(doubanID string) mvc.Response
TODO: GetBookBy change url to douban book like
func (*ClippingHandler) GetBooksBy ¶
func (h *ClippingHandler) GetBooksBy(id int64) output
func (*ClippingHandler) GetBy ¶
func (h *ClippingHandler) GetBy(id model.ClippingID) mvc.Response
func (*ClippingHandler) GetClippingsBy ¶
func (h *ClippingHandler) GetClippingsBy(uid model.UserID) mvc.Response
GetByUser will return clippings that created by the user
func (*ClippingHandler) PostCreate ¶
func (h *ClippingHandler) PostCreate(jwtUid model.UserID) mvc.Response
func (*ClippingHandler) PostMultipCreate ¶
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 ¶
func (h *CommentHandler) GetCommentBy(clippingId model.ClippingID) output
GetByClipping will return comments that belongs to this clipping
type MiscHandler ¶
type MiscHandler struct { Ctx iris.Context ImageService model.ImageService }
func (MiscHandler) PostUploadImage ¶
func (m MiscHandler) PostUploadImage() output
type ResourceResponse ¶
type ResourceResponse struct {
FilePath string `json:"filePath"`
}
type SearchHandler ¶
type SearchHandler struct { Ctx iris.Context SearchService model.SearchService }
func (SearchHandler) PostAll ¶
func (s SearchHandler) PostAll() mvc.Response
type StatusHandler ¶
func (*StatusHandler) GetStatus ¶
func (s *StatusHandler) GetStatus() output
type UserHandler ¶
type UserHandler struct { Ctx iris.Context Service model.UserService ClippingService model.ClippingService MailService model.MailService GithubService model.GithubService WechatService model.WechatService }
func (*UserHandler) GetBy ¶
func (h *UserHandler) GetBy(id int64) output
func (*UserHandler) GetVerifyBy ¶
func (h *UserHandler) GetVerifyBy(code string) output
func (*UserHandler) PostGithub ¶
func (h *UserHandler) PostGithub() output
func (*UserHandler) PostLogin ¶
func (h *UserHandler) PostLogin() mvc.Response
func (*UserHandler) PostSignup ¶
func (h *UserHandler) PostSignup() mvc.Response
PostSignup will register a new user 首先根据 fp 验证是否超过两次, 然后进行数据库存储, 然后根据 user id 生成 code,之后发送注册邮件 注册完成后不可直接登陆,需要验证邮箱
func (*UserHandler) PostWechat ¶
func (h *UserHandler) PostWechat() mvc.Response
func (*UserHandler) PostWechatBind ¶
func (h *UserHandler) PostWechatBind() mvc.Response
type VersionHandler ¶
type VersionHandler struct { Ctx iris.Context VersionService model.VersionService }
func (*VersionHandler) GetBy ¶
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.