Documentation
¶
Index ¶
- Constants
- Variables
- 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
- 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)
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 BeforeQueryRenderPost ¶
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) 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.