Documentation ¶
Index ¶
- func APIAddPostAction(c *gin.Context)
- func APIGETPostColumns(c *gin.Context)
- func APIGETPosts(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 GETPostsBySQL(sqlStr string) ([]*model.Post, 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(catids []uint64, pagination *pagination.Pagination) (*[]model.Post, uint64, error)
- func GetPostsByCategory(catID uint64, postStatus string) ([]*model.Post, error)
- func GetPostsed(cats []uint64, page uint) (posts []*model.Post, err 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 APIGETPostsForm
- type Filter
- type FormAPIAddPost
- type FormAPIMarkdown
- type FormAPIPostComment
- type FormEditPost
- type FormGetEditPost
- type FormPostPost
- type Search
- type SearchPosts
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 GETPostsBySQL ¶ added in v0.0.5
GETPostsBySQL 通过自动生成的 sql 查询文章信息 @since 0.0.4
func GetPostByID ¶
GetPostByID 通过 ID 获取文章 @since 0.0.1
func GetPostCategorys ¶
GetPostCategorys 获取文章的分类标签???关联项 @since 0.0.1
func GetPostLabels ¶
GetPostLabels 获取文章 label @since 0.0.1
func GetPostList ¶
GetPostList 文章列表 @since 0.0.1 @since 0.0.4 改为 VUE
func GetPosts ¶
func GetPosts(catids []uint64, pagination *pagination.Pagination) (*[]model.Post, uint64, error)
func GetPostsByCategory ¶
GetPostsByCategory 通过分类 ID 获取文章 @since 0.0.1
func GetPostsed ¶ added in v0.0.12
GetPosts 查找文章 @since 0.0.1 @since 0.0.12 这个函数只用在取菜单分类了 不是查找文章 所以改为ed used修改后删除
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 APIGETPostsForm ¶ added in v0.0.12
type APIGETPostsForm struct { pagination.Form CatIDs []uint64 `form:"cat_ids[]"` }
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
type SearchPosts ¶ added in v0.0.5
SearchPosts 实现 @since 0.0.4
func (*SearchPosts) BaseQuery ¶ added in v0.0.5
func (s *SearchPosts) BaseQuery() string
BaseQuery 基础查询语句 @since 0.0.4
func (*SearchPosts) MySQLFilter ¶ added in v0.0.5
func (s *SearchPosts) MySQLFilter() (string, error)
MySQLFilter 查询过滤条件 @since 0.0.4
func (*SearchPosts) SQL ¶ added in v0.0.5
func (s *SearchPosts) SQL(c *gin.Context) (string, error)
SQL 生成查询用 sql @since
func (*SearchPosts) SQLMap ¶ added in v0.0.5
func (s *SearchPosts) SQLMap() map[string]string
SQLMap 字段与数据库字段对应关系 @since 0.0.4