Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ArchiveRoutes = []models.Route{ {Method: "GET", Pattern: "/archive/v1/list", MiddleWare: nil, HandlerFunc: getArchiveTotalByDateList}, {Method: "GET", Pattern: "/year/v1/list", MiddleWare: nil, HandlerFunc: getArchiveGrouopYearList}, }
View Source
var CommentsRoutes = []models.Route{ {Method: "POST", Pattern: "/comments/v1/add", MiddleWare: gin.HandlersChain{authmidware.UserToken}, HandlerFunc: transaction.GormTx(savePostsComments)}, {Method: "POST", Pattern: "/admin/v1/reply", MiddleWare: gin.HandlersChain{authmidware.UserToken}, HandlerFunc: transaction.GormTx(replyComments)}, {Method: "DELETE", Pattern: "/comments/v1/:id", MiddleWare: gin.HandlersChain{authmidware.AdminToken}, HandlerFunc: transaction.GormTx(deletePostsComments)}, {Method: "GET", Pattern: "/comments/v1/:id", MiddleWare: gin.HandlersChain{authmidware.AdminToken}, HandlerFunc: getPostsComments}, {Method: "GET", Pattern: "/comments-posts/v1/list", MiddleWare: nil, HandlerFunc: getPostsCommentsByPostsIdList}, {Method: "GET", Pattern: "/get/v1/comments", MiddleWare: gin.HandlersChain{authmidware.AdminToken}, HandlerFunc: getPostsCommentsList}, }
View Source
var PostsRoutes = []models.Route{ {Method: "GET", Pattern: "/health", MiddleWare: nil, HandlerFunc: Health}, {Method: "GET", Pattern: "/list/v1/posts", MiddleWare: gin.HandlersChain{middlewares.AuthUserLogMiddleware(constants.PostsList, "文章列表")}, HandlerFunc: getPostsList}, {Method: "GET", Pattern: "/weight/v1/list", MiddleWare: gin.HandlersChain{middlewares.AuthUserLogMiddleware(constants.PostsList, "权重列表")}, HandlerFunc: getWeightList}, {Method: "GET", Pattern: "/archive/v1/list", MiddleWare: nil, HandlerFunc: getArchiveTotalByDateList}, {Method: "GET", Pattern: "/hot/v1/list", MiddleWare: nil, HandlerFunc: getHotPostsList}, {Method: "POST", Pattern: "/posts/v1/add", MiddleWare: gin.HandlersChain{authmidware.AdminToken}, HandlerFunc: transaction.GormTx(savePosts)}, {Method: "GET", Pattern: "/posts/v1/:id", MiddleWare: gin.HandlersChain{middlewares.AuthUserLogMiddleware(constants.PostsDetail, "获取文章")}, HandlerFunc: getPosts}, {Method: "DELETE", Pattern: "/posts/v1/:id", MiddleWare: gin.HandlersChain{authmidware.AdminToken}, HandlerFunc: transaction.GormTx(deletePosts)}, {Method: "PUT", Pattern: "/posts/v1/update", MiddleWare: gin.HandlersChain{authmidware.AdminToken}, HandlerFunc: transaction.GormTx(updatePosts)}, {Method: "PUT", Pattern: "/status/v1/update", MiddleWare: gin.HandlersChain{authmidware.AdminToken}, HandlerFunc: transaction.GormTx(updatePostsStatus)}, }
Functions ¶
Types ¶
type PostsAndTags ¶
func (PostsAndTags) TableName ¶
func (p PostsAndTags) TableName() string
Source Files ¶
Click to show internal directories.
Click to hide internal directories.