Documentation ¶
Index ¶
- type ArticleController
- func (a ArticleController) Count(c *gin.Context)
- func (a ArticleController) Create(c *gin.Context)
- func (a ArticleController) Delete(c *gin.Context)
- func (a ArticleController) Get(c *gin.Context)
- func (a ArticleController) GetHTML(c *gin.Context)
- func (a ArticleController) List(c *gin.Context)
- func (a ArticleController) NewCreate(c *gin.Context)
- func (a ArticleController) Update(c *gin.Context)
- type Articles
- type ProfileController
- type Uplaod
- type UserController
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArticleController ¶
type ArticleController struct {
// contains filtered or unexported fields
}
ArticleController 定义一个控制器结构体
func NewArticleController ¶
func NewArticleController() ArticleController
func (ArticleController) Count ¶
func (a ArticleController) Count(c *gin.Context)
func (ArticleController) Delete ¶
func (a ArticleController) Delete(c *gin.Context)
func (ArticleController) Get ¶
func (a ArticleController) Get(c *gin.Context)
func (ArticleController) GetHTML ¶
func (a ArticleController) GetHTML(c *gin.Context)
func (ArticleController) NewCreate ¶
func (a ArticleController) NewCreate(c *gin.Context)
func (ArticleController) Update ¶
func (a ArticleController) Update(c *gin.Context)
type ProfileController ¶
type ProfileController struct { }
func NewProfileController ¶
func NewProfileController() ProfileController
func (ProfileController) Create ¶
func (p ProfileController) Create(c *gin.Context)
type UserController ¶
type UserController struct { }
func NewUserController ¶
func NewUserController() UserController
func (UserController) Login ¶
func (user UserController) Login(c *gin.Context)
Login 登录模块 @Summary 登录模块 @Description 登录 @Tags 登录 @Accept json @Produce json @Param 请求体 body service.LoginRequest true "用户名及密码" @Success 200 {object} service.LoginRequest @Failure 400 {object} errcode.Error @Failure 404 {object} errcode.Error @Failure 500 {object} errcode.Error @Router /login [post]
func (UserController) Register ¶
func (user UserController) Register(c *gin.Context)
Click to show internal directories.
Click to hide internal directories.