commenthandlers

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentsHandlers

type CommentsHandlers struct {
	*basichandlers.Basic
}

CommentsHandlers defined for comments APIs

func (*CommentsHandlers) Create

func (ctrl *CommentsHandlers) Create() gin.HandlerFunc

Create comment @Tags 评论 @Description 创建评论 @Accept json @Produce json @Param Authorization header string true "Authentication header" @Param CreateCommentRequest body commenthandlers.CreateCommentRequest true "创建评论" @Success 200 "{"code":200,"data":{},"message":"操作成功"}" @Router /comments/create [post]

func (*CommentsHandlers) List

func (ctrl *CommentsHandlers) List() gin.HandlerFunc

List comment @Tags 评论 @Description 列出评论 @Accept json @Produce json @Param Authorization header string true "Authentication header" @Param ListCommentRequest body commenthandlers.ListCommentRequest true "列出评论" @Success 200 "{"code":200,"data":{},"message":"操作成功"}" @Router /comments/list [post]

func (*CommentsHandlers) Remove

func (ctrl *CommentsHandlers) Remove() gin.HandlerFunc

Remove comment @Tags 评论 @Description 删除评论 @Accept json @Produce json @Param Authorization header string true "Authentication header" @Param RemoveCommentRequest body commenthandlers.RemoveCommentRequest true "删除评论" @Success 200 "{"code":200,"data":{},"message":"操作成功"}" @Router /comments/remove [post]

type CreateCommentRequest

type CreateCommentRequest struct {
	// 评论的ID
	// required: false
	// min: 0
	CommentID int `json:"commentID"`
	// 资讯的ID
	// required: false
	// min: 0
	NewsID int `json:"newsID"`
	// 举报动态的ID
	//
	// required: false
	// min: 0
	MomentID int `json:"momentID"`
	// Content
	//
	// required: false
	// min: 0
	Content string `json:"content"`
}

CreateCommentRequest is request data for creating a comment swagger:model CreateCommentRequest

type ListCommentRequest

type ListCommentRequest struct {
	// 评论的ID
	// required: false
	// min: 0
	CommentID int `json:"commentID"`
	// 资讯的ID
	// required: false
	// min: 0
	NewsID int `json:"newsID"`
	// pagination
	*basichandlers.PaginationRequest
}

ListCommentRequest model swagger:model ListCommentRequest

type RemoveCommentRequest

type RemoveCommentRequest struct {
	// 评论的ID
	// required: true
	// min: 0
	CommentID int `json:"commentID"`
}

RemoveCommentRequest is request data for remove a comment swagger:model RemoveCommentRequest

Jump to

Keyboard shortcuts

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