post

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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 Bind

func Bind(c *fiber.Ctx, post *model.Post) error

func BindCategory

func BindCategory(c *fiber.Ctx, category *model.Category) error

func BindTag

func BindTag(c *fiber.Ctx, tag *model.Tag) error

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) Count

func (pd PostDao) Count() int64

func (PostDao) CountByDraft

func (pd PostDao) CountByDraft() int64

func (PostDao) CountByPublished

func (pd PostDao) CountByPublished() int64

func (PostDao) CountByTrash

func (pd PostDao) CountByTrash() int64

func (PostDao) CountCatgegory

func (pd PostDao) CountCatgegory() int64

func (PostDao) CountTag

func (pd PostDao) CountTag() int64

func (PostDao) DeleteByIds

func (pd PostDao) DeleteByIds(ids []uint)

func (PostDao) DeleteCategoriesByIds

func (pd PostDao) DeleteCategoriesByIds(ids []uint)

func (PostDao) DeletePermanetlyByIds

func (pd PostDao) DeletePermanetlyByIds(ids []uint)

func (PostDao) DeleteTagsByIds

func (pd PostDao) DeleteTagsByIds(ids []uint)

func (PostDao) GetAllByPage

func (pd PostDao) GetAllByPage(page, numPerPage int) []model.Post

func (PostDao) GetByID

func (pd PostDao) GetByID(id uint) (*model.Post, error)

func (PostDao) GetBySlug

func (pd PostDao) GetBySlug(slug string) (*model.Post, error)

func (PostDao) GetCategories

func (pd PostDao) GetCategories() []model.Category

func (PostDao) GetCategoriesByPage

func (pd PostDao) GetCategoriesByPage(page, numPerPage int) []model.Category

func (PostDao) GetCategoryByID

func (pd PostDao) GetCategoryByID(id uint) (*model.Category, error)

func (PostDao) GetDraftListByPage

func (pd PostDao) GetDraftListByPage(page, numPerPage int, categoryID int, q string) []model.Post

func (PostDao) GetListByPage

func (pd PostDao) GetListByPage(page, numPerPage int, categoryID int, q string) []model.Post

func (PostDao) GetPublishedListByPage

func (pd PostDao) GetPublishedListByPage(page, numPerPage int, categoryID int, q string) []model.Post

func (PostDao) GetTagByID

func (pd PostDao) GetTagByID(id uint) (*model.Tag, error)

func (PostDao) GetTagsByPage

func (pd PostDao) GetTagsByPage(page, numPerPage int) []model.Tag

func (PostDao) GetTrashListByPage

func (pd PostDao) GetTrashListByPage(page, numPerPage int, categoryID int, q string) []model.Post

func (PostDao) RestoreByIds

func (pd PostDao) RestoreByIds(ids []uint)

func (PostDao) UpdateDraft

func (pd PostDao) UpdateDraft(value uint)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL