controller

package
v0.0.0-...-228285a Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OrderTime  = "time"
	OrderScore = "score"
)

Variables

This section is empty.

Functions

func CommunityDetailHandler

func CommunityDetailHandler(c *gin.Context)

CommunityDetailHandler 返回社区板块对应的详细信息

func CommunityHandler

func CommunityHandler(c *gin.Context)

CommunityHandler 返回社区板信息

func CreateCommentHandler

func CreateCommentHandler(c *gin.Context)

CreateCommentHandler 创建评论

func CreatePostHandler

func CreatePostHandler(c *gin.Context)

CreatePostHandler 创建帖子

func GetCommentByPostIdHandler

func GetCommentByPostIdHandler(c *gin.Context)

GetCommentByPostIdHandler 加载帖子的评论信息

func GetPostByCommunityIdHandler

func GetPostByCommunityIdHandler(c *gin.Context)

GetPostByCommunityIdHandler 通过社区id来返回帖子数据

func GetPostDetailHandler

func GetPostDetailHandler(c *gin.Context)

GetPostDetailHandler 获取帖子详细信息

func GetPostHandler

func GetPostHandler(c *gin.Context)

GetPostHandler 获取帖子分页数据

func GetPostOrderHandler

func GetPostOrderHandler(c *gin.Context)

GetPostOrderHandler 根据分页参数和排列顺序返回对应的帖子数据

func LoginHandler

func LoginHandler(c *gin.Context)

LoginHandler 登录函数

func PostVoteHandler

func PostVoteHandler(c *gin.Context)

PostVoteHandler 发起投票

func ResponseSuccess

func ResponseSuccess(c *gin.Context, data interface{})

func SignUpHandler

func SignUpHandler(c *gin.Context)

SignUpHandler 注册函数

Types

type ResponseData

type ResponseData struct {
	Code int         `json:"code"`
	Msg  interface{} `json:"msg"`
	Data interface{} `json:"data,omitempty"`
}

Jump to

Keyboard shortcuts

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