hanlder

package
v0.0.0-...-2e06f69 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommentHandler

type CommentHandler struct {
	// contains filtered or unexported fields
}

func (*CommentHandler) AddComment

func (h *CommentHandler) AddComment(ctx *gin.Context, req CommentRequest) (*apiwrap.ResponseBody[api.IdVO], error)

func (*CommentHandler) AddCommentReply

func (h *CommentHandler) AddCommentReply(ctx *gin.Context, req ReplyRequest) (*apiwrap.ResponseBody[api.IdVO], error)

func (*CommentHandler) AdminApproveComment

func (h *CommentHandler) AdminApproveComment(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*CommentHandler) AdminApproveCommentReply

func (h *CommentHandler) AdminApproveCommentReply(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*CommentHandler) AdminDeleteComment

func (h *CommentHandler) AdminDeleteComment(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*CommentHandler) AdminDeleteCommentReply

func (h *CommentHandler) AdminDeleteCommentReply(ctx *gin.Context) (*apiwrap.ResponseBody[any], error)

func (*CommentHandler) AdminDisapproveComment

func (h *CommentHandler) AdminDisapproveComment(ctx *gin.Context, req request.DisapproveCommentRequest) (*apiwrap.ResponseBody[any], error)

func (*CommentHandler) AdminDisapproveCommentReply

func (h *CommentHandler) AdminDisapproveCommentReply(ctx *gin.Context, req request.DisapproveCommentRequest) (*apiwrap.ResponseBody[any], error)

func (*CommentHandler) AdminGetComments

func (*CommentHandler) AdminUpdateCommentStatus

func (h *CommentHandler) AdminUpdateCommentStatus(ctx *gin.Context, req request.CommentStatusRequest) (*apiwrap.ResponseBody[any], error)

func (*CommentHandler) AdminUpdateReplyStatus

func (h *CommentHandler) AdminUpdateReplyStatus(ctx *gin.Context, req request.CommentStatusRequest) (*apiwrap.ResponseBody[any], error)

func (*CommentHandler) GetCommentsByPostId

func (h *CommentHandler) GetCommentsByPostId(ctx *gin.Context) (*apiwrap.ResponseBody[apiwrap.ListVO[vo.PostCommentVO]], error)

func (*CommentHandler) GetLatestCommentAndReply

func (h *CommentHandler) GetLatestCommentAndReply(ctx *gin.Context) (*apiwrap.ResponseBody[apiwrap.ListVO[vo.LatestCommentVO]], error)

func (*CommentHandler) RegisterGinRoutes

func (h *CommentHandler) RegisterGinRoutes(engine *gin.Engine)

type CommentRequest

type CommentRequest struct {
	PostId   string `json:"postId" binding:"required"`
	UserName string `json:"username" binding:"required"`
	Email    string `json:"email" binding:"required,validateEmailFormat"`
	Website  string `json:"website"`
	Content  string `json:"content" binding:"required,max=200"`
}

type ReplyRequest

type ReplyRequest struct {
	PostId string `json:"postId" binding:"required"`
	// 如果是对某个回复进行回复,则是某个回复的 id
	ReplyToId string `json:"replyToId"`
	UserName  string `json:"username" binding:"required"`
	Email     string `json:"email" binding:"required,validateEmailFormat"`
	Website   string `json:"website"`
	Content   string `json:"content" binding:"required,max=200"`
}

Jump to

Keyboard shortcuts

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