Documentation ¶
Index ¶
- func WriteErrno(ctx *gin.Context, err *errno.Errno)
- func WriteError(ctx *gin.Context, code int, message string)
- func WriteResponse(ctx *gin.Context, code int, message string, data interface{})
- func WriteSuccess(ctx *gin.Context, data interface{})
- type ArticleEditReq
- type ArticleHandler
- func (h *ArticleHandler) Collect(ctx *gin.Context)
- func (h *ArticleHandler) Detail(ctx *gin.Context)
- func (h *ArticleHandler) Edit(ctx *gin.Context)
- func (h *ArticleHandler) History(ctx *gin.Context)
- func (h *ArticleHandler) Like(ctx *gin.Context)
- func (h *ArticleHandler) List(ctx *gin.Context)
- func (h *ArticleHandler) PubDetail(ctx *gin.Context)
- func (h *ArticleHandler) Publish(ctx *gin.Context)
- func (h *ArticleHandler) RegisterRoutes(g *gin.Engine)
- func (h *ArticleHandler) Withdraw(ctx *gin.Context)
- type ListResp
- type Page
- type Response
- type UserHandler
- func (h *UserHandler) Edit(ctx *gin.Context)
- func (h *UserHandler) List(ctx *gin.Context)
- func (h *UserHandler) Login(ctx *gin.Context)
- func (h *UserHandler) LoginSMS(ctx *gin.Context)
- func (h *UserHandler) Logout(ctx *gin.Context)
- func (h *UserHandler) Profile(ctx *gin.Context)
- func (h *UserHandler) RefreshToken(ctx *gin.Context)
- func (h *UserHandler) RegisterRoutes(server *gin.Engine)
- func (h *UserHandler) SendCode(ctx *gin.Context)
- func (h *UserHandler) Signup(ctx *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WriteResponse ¶
func WriteSuccess ¶
Types ¶
type ArticleEditReq ¶
type ArticleHandler ¶
type ArticleHandler struct {
// contains filtered or unexported fields
}
func NewArticleHandler ¶
func NewArticleHandler(svc service.ArticleService, interSvc service.InteractiveService) *ArticleHandler
func (*ArticleHandler) Collect ¶
func (h *ArticleHandler) Collect(ctx *gin.Context)
func (*ArticleHandler) Detail ¶
func (h *ArticleHandler) Detail(ctx *gin.Context)
func (*ArticleHandler) Edit ¶
func (h *ArticleHandler) Edit(ctx *gin.Context)
func (*ArticleHandler) History ¶
func (h *ArticleHandler) History(ctx *gin.Context)
func (*ArticleHandler) Like ¶
func (h *ArticleHandler) Like(ctx *gin.Context)
func (*ArticleHandler) List ¶
func (h *ArticleHandler) List(ctx *gin.Context)
func (*ArticleHandler) PubDetail ¶
func (h *ArticleHandler) PubDetail(ctx *gin.Context)
func (*ArticleHandler) Publish ¶
func (h *ArticleHandler) Publish(ctx *gin.Context)
func (*ArticleHandler) RegisterRoutes ¶
func (h *ArticleHandler) RegisterRoutes(g *gin.Engine)
func (*ArticleHandler) Withdraw ¶
func (h *ArticleHandler) Withdraw(ctx *gin.Context)
type Page ¶
type Page struct { Page int64 `json:"page" binding:"omitempty,gt=0"` PageSize int64 `json:"pageSize" binding:"omitempty,gt=0"` }
func (*Page) SetDefault ¶
func (p *Page) SetDefault()
type UserHandler ¶
type UserHandler struct {
// contains filtered or unexported fields
}
func NewUserHandler ¶
func NewUserHandler(svc service.UserService, codeSvc service.CodeService, jwt ginxjwt.JWT) *UserHandler
func (*UserHandler) Edit ¶
func (h *UserHandler) Edit(ctx *gin.Context)
func (*UserHandler) List ¶
func (h *UserHandler) List(ctx *gin.Context)
func (*UserHandler) Login ¶
func (h *UserHandler) Login(ctx *gin.Context)
func (*UserHandler) LoginSMS ¶
func (h *UserHandler) LoginSMS(ctx *gin.Context)
func (*UserHandler) Logout ¶
func (h *UserHandler) Logout(ctx *gin.Context)
func (*UserHandler) Profile ¶
func (h *UserHandler) Profile(ctx *gin.Context)
func (*UserHandler) RefreshToken ¶
func (h *UserHandler) RefreshToken(ctx *gin.Context)
func (*UserHandler) RegisterRoutes ¶
func (h *UserHandler) RegisterRoutes(server *gin.Engine)
func (*UserHandler) SendCode ¶
func (h *UserHandler) SendCode(ctx *gin.Context)
func (*UserHandler) Signup ¶
func (h *UserHandler) Signup(ctx *gin.Context)
Click to show internal directories.
Click to hide internal directories.