Documentation ¶
Index ¶
- type ArtId
- type Article
- type ArticleHandler
- func (h *ArticleHandler) DelPubDetail(ctx *ginx.Context, req ArtId) (ginx.Result, error)
- func (h *ArticleHandler) Detail(ctx *ginx.Context, req ArtId) (ginx.Result, error)
- func (h *ArticleHandler) List(ctx *ginx.Context, req Page, sess session.Session) (ginx.Result, error)
- func (h *ArticleHandler) PrivateRoutes(server *gin.Engine)
- func (h *ArticleHandler) PubDetail(ctx *ginx.Context, req ArtId) (ginx.Result, error)
- func (h *ArticleHandler) PubList(ctx *ginx.Context, req Page) (ginx.Result, error)
- func (h *ArticleHandler) PublicRoutes(server *gin.Engine)
- func (h *ArticleHandler) Publish(ctx *ginx.Context, req SaveReq, sess session.Session) (ginx.Result, error)
- func (h *ArticleHandler) Save(ctx *ginx.Context, req SaveReq, sess session.Session) (ginx.Result, error)
- type ArtsList
- type Author
- type Page
- type SaveReq
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Article ¶
type Article struct { Id int64 `json:"id,omitempty"` Uid int64 `json:"uid,omitempty"` Title string `json:"title,omitempty" validate:"required"` Content string `json:"content,omitempty"` Abstract string `json:"abstract,omitempty"` Ctime string `json:"ctime,omitempty"` Author Author `json:"author,omitempty"` }
type ArticleHandler ¶
type ArticleHandler struct { // 通过组合userService 来实现查询作者? UserSvc user.Service // contains filtered or unexported fields }
func NewArticleHandler ¶
func NewArticleHandler(svc service.Service, UserSvc user.Service) *ArticleHandler
func (*ArticleHandler) DelPubDetail ¶
func (*ArticleHandler) PrivateRoutes ¶
func (h *ArticleHandler) PrivateRoutes(server *gin.Engine)
func (*ArticleHandler) PublicRoutes ¶
func (h *ArticleHandler) PublicRoutes(server *gin.Engine)
Click to show internal directories.
Click to hide internal directories.