newshandlers

package
v0.0.0-...-851e7b8 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateNewsCateRequest

type CreateNewsCateRequest struct {
	// 分类的名称
	//
	// required: true
	// min: 3
	Name string `json:"name"`
	// 分类主题色调 HEX 如 #FFFFFF, 默认为default
	//
	// required: true
	// min: 7
	ThemeColor string `json:"themeColor"`
	// 分类可用状态
	// 0 为不可用,1为可用,默认为1 可选填
	//
	// required: false
	// min: 0
	Status int `json:"status"`
	// 父级分类
	// 默认为null
	//
	// required: false
	// min: 0
	ParentID int `json:"parentID"`
}

CreateNewsCateRequest is request data for creating a news category swagger:model CreateNewsCateRequest

type NewsHandlers

type NewsHandlers struct {
	*basichandlers.Basic
}

NewsHandlers API controller

func (*NewsHandlers) Cates

func (n *NewsHandlers) Cates() gin.HandlerFunc

Cates will return all available categories @Tags 资讯 @Description 获取所有的资讯分类 @Accept json @Produce json @Success 200 "{"code":200,"data":{},"message":"操作成功"}" @Router /news/cates [get]

func (*NewsHandlers) CreateCate

func (n *NewsHandlers) CreateCate() gin.HandlerFunc

CreateCate defined to create a news category @Tags 资讯 @Description 创建资讯分类,仅管理员账号可以进行操作 @Accept json @Produce json @Param Authorization header string true "Authentication header" @Param CreateNewsCateRequest body newshandlers.CreateNewsCateRequest true "资讯分类" @Success 200 "{"code":200,"data":{},"message":"操作成功"}" @Router /news/createCate [post]

Jump to

Keyboard shortcuts

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