domain

package
v0.0.0-...-e972461 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleDomain

type ArticleDomain struct {
	// contains filtered or unexported fields
}

func NewArticleDomain

func NewArticleDomain(ctx context.Context, db *gorm.DB) *ArticleDomain

func (*ArticleDomain) CreateArticle

func (d *ArticleDomain) CreateArticle(title string, desc string, content string, image string,
	state uint8, createdBy string, tagID uint32) error

func (*ArticleDomain) DeleteArticle

func (d *ArticleDomain) DeleteArticle(id uint32) error

func (*ArticleDomain) GetArticle

func (d *ArticleDomain) GetArticle(id uint32, state uint8) (*entity.ArticleEntity, error)

func (*ArticleDomain) GetArticleList

func (d *ArticleDomain) GetArticleList(id uint32, state uint8, page, pageSize int) ([]*entity.ArticleEntity, int, error)

func (*ArticleDomain) UpdateArticle

func (d *ArticleDomain) UpdateArticle(artitleID uint32, title string, desc string, content string, image string,
	state uint8, modifiedBy string, tagID uint32) error

type TagDomain

type TagDomain struct {
	// contains filtered or unexported fields
}

func NewTagDomain

func NewTagDomain(ctx context.Context, db *gorm.DB) *TagDomain

func (*TagDomain) CountTag

func (d *TagDomain) CountTag(name string, state uint8) (int, error)

func (*TagDomain) CreateTag

func (d *TagDomain) CreateTag(name string, state uint8, createdBy string) error

func (*TagDomain) DeleteTag

func (d *TagDomain) DeleteTag(tagID uint32, force bool) error

func (*TagDomain) GetTagListWithCnt

func (d *TagDomain) GetTagListWithCnt(name string, state uint8, page, pageSize int) ([]*entity.TagEntity, int, error)

func (*TagDomain) UpdateTag

func (d *TagDomain) UpdateTag(id uint32, name string, state uint8, modifiedBy string) error

Jump to

Keyboard shortcuts

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