dao

package
v0.0.0-...-fc62a26 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Article

type Article struct {
	ID            uint32 `json:"id"`
	TagID         uint32 `json:"tag_id"`
	Title         string `json:"title"`
	Desc          string `json:"desc"`
	Content       string `json:"content"`
	CoverImageUrl string `json:"cover_image_url"`
	CreatedBy     string `json:"created_by"`
	ModifiedBy    string `json:"modified_by"`
	State         uint8  `json:"state"`
}

type Dao

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

func New

func New(engine *gorm.DB) *Dao

func (*Dao) CountArticleListByTagID

func (d *Dao) CountArticleListByTagID(id uint32, state uint8) (int, error)

func (*Dao) CountTag

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

func (*Dao) CreateArticle

func (d *Dao) CreateArticle(param *Article) (*model.Article, error)

func (*Dao) CreateArticleTag

func (d *Dao) CreateArticleTag(articleID, tagID uint32, createdBy string) error

func (*Dao) CreateTag

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

func (*Dao) DeleteArticle

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

func (*Dao) DeleteArticleTag

func (d *Dao) DeleteArticleTag(articleID uint32) error

func (*Dao) DeleteTag

func (d *Dao) DeleteTag(id uint32) error

func (*Dao) GetArticle

func (d *Dao) GetArticle(id uint32, state uint8) (model.Article, error)

func (*Dao) GetArticleListByTagID

func (d *Dao) GetArticleListByTagID(id uint32, state uint8, page, pageSize int) ([]*model.ArticleRow, error)

func (*Dao) GetArticleTagByAID

func (d *Dao) GetArticleTagByAID(articleID uint32) (model.ArticleTag, error)

func (*Dao) GetArticleTagListByAIDs

func (d *Dao) GetArticleTagListByAIDs(articleIDs []uint32) ([]*model.ArticleTag, error)

func (*Dao) GetArticleTagListByTID

func (d *Dao) GetArticleTagListByTID(tagID uint32) ([]*model.ArticleTag, error)

func (*Dao) GetAuth

func (d *Dao) GetAuth(appKey, appSecret string) (model.Auth, error)

func (*Dao) GetTag

func (d *Dao) GetTag(id uint32, state uint8) (model.Tag, error)

func (*Dao) GetTagList

func (d *Dao) GetTagList(name string, state uint8, page, pageSize int) ([]*model.Tag, error)

func (*Dao) GetTagListByIDs

func (d *Dao) GetTagListByIDs(ids []uint32, state uint8) ([]*model.Tag, error)

func (*Dao) UpdateArticle

func (d *Dao) UpdateArticle(param *Article) error

func (*Dao) UpdateArticleTag

func (d *Dao) UpdateArticleTag(articleID, tagID uint32, modifiedBy string) error

func (*Dao) UpdateTag

func (d *Dao) 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