dao

package
v0.0.0-...-3a2c885 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: GPL-3.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 Dao

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

func New

func New(engine *gorm.DB) *Dao

func (*Dao) CountArticle

func (d *Dao) CountArticle(title string, state uint8) (int, error)

func (*Dao) CountTag

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

func (*Dao) CreateArticle

func (d *Dao) CreateArticle(title, desc, content, coverImageUrl string, state uint8, 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) DeleteTag

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

func (*Dao) GetArticle

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

func (*Dao) GetArticleList

func (d *Dao) GetArticleList(title string, state uint8, page, pageSize int) ([]*model.Article, error)

func (*Dao) GetAuth

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

func (*Dao) GetTagList

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

func (*Dao) UpdateArticle

func (d *Dao) UpdateArticle(id uint32, title, desc, content, coverImgUrl string, state uint8, 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