dao

package
v0.0.0-...-bc86f42 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2021 License: BSD-3-Clause Imports: 2 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(dbEngine *gorm.DB) *Dao

func (*Dao) CreateArticle

func (d *Dao) CreateArticle(title, description, content, author, categoryName, tagName string, authorId, categoryId, tagId int) error

func (*Dao) CreateCategory

func (d *Dao) CreateCategory(name string) error

func (*Dao) CreateTag

func (d *Dao) CreateTag(name string) error

func (*Dao) CreateUser

func (d *Dao) CreateUser(username, email, password string) error

func (*Dao) DeleteArticle

func (d *Dao) DeleteArticle(id uint) (int64, error)

func (*Dao) DeleteCategory

func (d *Dao) DeleteCategory(id uint) (int64, error)

func (*Dao) DeleteTag

func (d *Dao) DeleteTag(id uint) (int64, error)

func (*Dao) DeleteUser

func (d *Dao) DeleteUser(id uint) (int64, error)

func (*Dao) GetArticleById

func (d *Dao) GetArticleById(id uint) (model.Article, error)

func (*Dao) GetArticlesList

func (d *Dao) GetArticlesList() ([]model.Article, error)

func (*Dao) GetCategoriesList

func (d *Dao) GetCategoriesList() ([]model.Category, error)

func (*Dao) GetCategoryById

func (d *Dao) GetCategoryById(id uint) (model.Category, error)

func (*Dao) GetTagById

func (d *Dao) GetTagById(id uint) (model.Tag, error)

func (*Dao) GetTagsList

func (d *Dao) GetTagsList() ([]model.Tag, error)

func (*Dao) GetUserByEmail

func (d *Dao) GetUserByEmail(email, password string) (model.User, error)

func (*Dao) GetUserByUid

func (d *Dao) GetUserByUid(id uint) (model.User, error)

func (*Dao) GetUserList

func (d *Dao) GetUserList(pageOffset, pageSize int) ([]model.User, error)

func (*Dao) UpdateArticle

func (d *Dao) UpdateArticle(id uint, title, description, content, author, categoryName, tagName string, authorId, categoryId, tagId int) (int64, error)

func (*Dao) UpdateCategory

func (d *Dao) UpdateCategory(id uint, name string) (int64, error)

func (*Dao) UpdateTag

func (d *Dao) UpdateTag(id uint, name string) (int64, error)

func (*Dao) UpdateUser

func (d *Dao) UpdateUser(id uint, username, email, password string) (int64, error)

Jump to

Keyboard shortcuts

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