Versions in this module Expand all Collapse all v0 v0.2.0 Feb 1, 2024 v0.1.0 Jan 25, 2024 Changes in this version + const KeyPostCheckRouter + const KeyPostDB + const KeyPostNoCheckRouter + var Dao = new(PostDao) + func BeforeQueryRenderPost(ctx *fiber.Ctx, queryResult *object.QueryResult) (any, error) + func BeforeRenderPost(ctx *fiber.Ctx, vptr any) (any, error) + func Bind(c *fiber.Ctx, post *model.Post) error + func BindCategory(c *fiber.Ctx, category *model.Category) error + func GetPostOrPageDB(ctx *fiber.Ctx, isCreate bool) *gorm.DB + type PostDao struct + 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) DeleteByIds(ids []uint) + func (pd PostDao) DeleteCategoriesByIds(ids []uint) + func (pd PostDao) DeletePermanetlyByIds(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) GetTrashListByPage(page, numPerPage int, categoryID int, q string) []model.Post + func (pd PostDao) RestoreByIds(ids []uint) + func (pd PostDao) UpdateDraft(value uint)