controller

package
v0.0.0-...-c6f1323 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 9, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

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) Create

func (a ArticleController) Create(c *gin.Context)

Create 新建文章 控制器

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) List

func (a ArticleController) List(c *gin.Context)

List 查询方法

func (ArticleController) NewCreate

func (a ArticleController) NewCreate(c *gin.Context)

func (ArticleController) Update

func (a ArticleController) Update(c *gin.Context)

type Articles

type Articles struct {
	PageOffset int `json:"page_offset"`
	PageSize   int `json:"page_size"`
}

type ProfileController

type ProfileController struct {
}

func NewProfileController

func NewProfileController() ProfileController

func (ProfileController) Create

func (p ProfileController) Create(c *gin.Context)

type Uplaod

type Uplaod struct {
}

func NewUpload

func NewUpload() Uplaod

func (Uplaod) UploadFile

func (u Uplaod) UploadFile(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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL