Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
Functions ¶
func PostCountByTid ¶
func PostGetNavMap ¶
func PostSetAllTags ¶
func PostSetTags ¶
func PostSetTags(post *Post)
func PostTagSetName ¶
func PostTagSetName(postTags ...PostTag)
Types ¶
type Archive ¶
func PostGetArchives ¶
func PostGetArchives() []Archive
type Post ¶
type Post struct { gorm.Model Author string Title string Path string Des string Content string Draft bool PublishedAt *time.Time HTML string `gorm:"-"` Tags []*Tag `gorm:"-"` }
func PostGetByPath ¶
func PostGetPage ¶
func PostGetPageByTid ¶
type PostTag ¶
type PostTag struct { ID uint PostID uint TagID uint PostCount uint TagValue string `gorm:"-"` TagName string `gorm:"-"` }
func PostTagCountGroupByTid ¶
func PostTagCountGroupByTid() []PostTag
func PostTagGetByPids ¶
func PostTagsGetByPid ¶
Click to show internal directories.
Click to hide internal directories.