Documentation ¶
Index ¶
- func APIAddPostAction(c *gin.Context)
- func APIMarkdown(c *gin.Context)
- func AddPost(post *model.Post) (err error)
- func BaseController(c *gin.Context)
- func DeletePostCategory(postID uint64) error
- func EditPost(postID uint64, postTitle string, postContent string, termIDs []uint64) error
- func EditPostCategory(postID uint64, termIDs []uint64) ([]*model.DBPost, error)
- func GetAllPost() ([]*model.Post, error)
- func GetDeletePost(c *gin.Context)
- func GetEditPost(c *gin.Context)
- func GetPostByID(postID uint64) (post *model.Post, err error)
- func GetPostCategorys(postID uint64) (cats []*model.Category, err error)
- func GetPostDetail(c *gin.Context)
- func GetPostInsert(c *gin.Context)
- func GetPostLabels(postID uint64) (labs []*model.Label, err error)
- func GetPostList(c *gin.Context)
- func GetPosts(cats []uint64, page uint) (posts []*model.Post, err error)
- func GetPostsByCategory(catID uint64, postStatus string) ([]*model.Post, error)
- func InsertInheritPost(postID uint64) (ID uint64, err error)
- func InsertPublishPost(postAuthor uint64, postTitle string, postContent string, termIDs []uint64) (postID uint64, err error)
- func Markdown(content []byte) ([]byte, error)
- func PostAddTerms(id uint64, termIDs []uint64) error
- func PostEditPost(c *gin.Context)
- func PostInsertPost(c *gin.Context)
- func Register()
- type FormAPIAddPost
- type FormAPIMarkdown
- type FormAPIPostComment
- type FormEditPost
- type FormGetEditPost
- type FormPostPost
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeletePostCategory ¶
DeletePostCategory 删除文章分类 @since 0.0.1
func EditPostCategory ¶
EditPostCategory 编辑文章分类 @since 0.0.1
func GetPostByID ¶
GetPostByID 通过 ID 获取文章 @since 0.0.1
func GetPostCategorys ¶
GetPostCategorys 获取文章的分类标签???关联项 @since 0.0.1
func GetPostLabels ¶
GetPostLabels 获取文章 label @since 0.0.1
func GetPostsByCategory ¶
GetPostsByCategory 通过分类 ID 获取文章 @since 0.0.1
func InsertInheritPost ¶
InsertInheritPost 创建文章版本简易方法 @since 0.0.1
func InsertPublishPost ¶
func InsertPublishPost(postAuthor uint64, postTitle string, postContent string, termIDs []uint64) (postID uint64, err error)
InsertPublishPost 新建文章简易方法 准备删除1022 @since 0.0.1
func PostAddTerms ¶
PostAddTerms 给文章添加分类 @since 0.0.1
Types ¶
type FormAPIAddPost ¶
type FormAPIAddPost struct { Title string `json:"PostTitle" binding:"required"` Content string `json:"PostContent" binding:"required"` Categorys []uint64 `json:"categorys" binding:"required"` Labels []uint64 `json:"labels"` }
FormAPIAddPost 保存文章的表单 @since 0.0.1
type FormAPIMarkdown ¶
type FormAPIMarkdown struct {
Content string `form:"content"`
}
FormAPIMarkdown 表单 @since 0.0.3
type FormAPIPostComment ¶
type FormAPIPostComment struct { CommentPostID uint64 `form:"comment_post_id" binding:"required"` CommentParent uint64 `form:"comment_parent" ` CommentContent string `form:"comment_content" binding:"required"` UserID uint64 `form:"user_id" binding:"required"` }
FormAPIPostComment 提交评论表单 @since 0.0.1
type FormEditPost ¶
type FormEditPost struct { PostID uint64 `form:"post_id" binding:"required"` PostTitle string `form:"post_title" binding:"required"` PostContent string `form:"post_content" binding:"required"` TermIDs []uint64 `form:"post_term[]" binding:"required"` }
FormEditPost 发布文章表单 @since 0.0.1
type FormGetEditPost ¶
type FormGetEditPost struct {
PostID uint64 `form:"post_id"`
}
FormGetEditPost 表单 @since 0.0.1
type FormPostPost ¶
type FormPostPost struct { PostTitle string `form:"post_title" binding:"required"` PostContent string `form:"post_content" binding:"required"` TermID []uint64 `form:"post_term[]" binding:"required"` }
FormPostPost 发布文章表单 @since 0.0.1
Click to show internal directories.
Click to hide internal directories.