Documentation ¶
Index ¶
- Constants
- Variables
- func Bind(c *fiber.Ctx, post *model.Post) error
- func BindCategory(c *fiber.Ctx, category *model.Category) error
- func BindTag(c *fiber.Ctx, tag *model.Tag) error
- func DetailPage(c *fiber.Ctx) error
- func HTMXHomePostDetailPage(c *fiber.Ctx) error
- type PostDao
- func (pd PostDao) Count() int64
- func (pd PostDao) CountByDraft() int64
- func (pd PostDao) CountByPublished() int64
- func (pd PostDao) CountByTrash() int64
- func (pd PostDao) CountCatgegory() int64
- func (pd PostDao) CountTag() int64
- func (pd PostDao) DeleteByIds(ids []uint)
- func (pd PostDao) DeleteCategoriesByIds(ids []uint)
- func (pd PostDao) DeletePermanetlyByIds(ids []uint)
- func (pd PostDao) DeleteTagsByIds(ids []uint)
- func (pd PostDao) GetAllByPage(page, numPerPage int) []model.Post
- func (pd PostDao) GetByID(id uint) (*model.Post, error)
- func (pd PostDao) GetBySlug(slug string) (*model.Post, error)
- func (pd PostDao) GetCategories() []model.Category
- func (pd PostDao) GetCategoriesByPage(page, numPerPage int) []model.Category
- func (pd PostDao) GetCategoryByID(id uint) (*model.Category, error)
- func (pd PostDao) GetDraftListByPage(page, numPerPage int, categoryID int, q string) []model.Post
- func (pd PostDao) GetListByPage(page, numPerPage int, categoryID int, q string) []model.Post
- func (pd PostDao) GetPublishedListByPage(page, numPerPage int, categoryID int, q string) []model.Post
- func (pd PostDao) GetTagByID(id uint) (*model.Tag, error)
- func (pd PostDao) GetTagsByPage(page, numPerPage int) []model.Tag
- func (pd PostDao) GetTrashListByPage(page, numPerPage int, categoryID int, q string) []model.Post
- func (pd PostDao) RestoreByIds(ids []uint)
- func (pd PostDao) UpdateDraft(value uint)
Constants ¶
View Source
const ( KeyPostDB = "post.gorm.db" KeyPostNoCheckRouter = "post.router.nocheck" KeyPostCheckRouter = "post.router.check" )
Variables ¶
View Source
var Dao = new(PostDao)
Functions ¶
func BindCategory ¶
func DetailPage ¶ added in v0.2.0
func DetailPage(c *fiber.Ctx) error
func HTMXHomePostDetailPage ¶
func HTMXHomePostDetailPage(c *fiber.Ctx) error
HTMXHomePostDetailPage detail page
Types ¶
type PostDao ¶
type PostDao struct{}
func (PostDao) CountByDraft ¶
func (PostDao) CountByPublished ¶
func (PostDao) CountByTrash ¶
func (PostDao) CountCatgegory ¶
func (PostDao) DeleteByIds ¶
func (PostDao) DeleteCategoriesByIds ¶
func (PostDao) DeletePermanetlyByIds ¶
func (PostDao) DeleteTagsByIds ¶
func (PostDao) GetCategories ¶
func (PostDao) GetCategoriesByPage ¶
func (PostDao) GetCategoryByID ¶
func (PostDao) GetDraftListByPage ¶
func (PostDao) GetListByPage ¶
func (PostDao) GetPublishedListByPage ¶
func (PostDao) GetTrashListByPage ¶
func (PostDao) RestoreByIds ¶
func (PostDao) UpdateDraft ¶
Click to show internal directories.
Click to hide internal directories.