dao

package
v1.0.1-0...-bd443ad Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlogArticleDao

type BlogArticleDao struct {
	*ndb.NDb
	// contains filtered or unexported fields
}

func NewBlogArticleDao

func NewBlogArticleDao(ndb *ndb.NDb, log *nlog.NLog) *BlogArticleDao

func (*BlogArticleDao) CreateArticle

func (b *BlogArticleDao) CreateArticle(ctx context.Context, article *model.Article) error

func (*BlogArticleDao) DeleteArticleById

func (b *BlogArticleDao) DeleteArticleById(ctx context.Context, id string) (bool, error)

func (*BlogArticleDao) GetArticleById

func (b *BlogArticleDao) GetArticleById(ctx context.Context, id string) (article *model.Article, err error)

func (*BlogArticleDao) UpdateArticle

func (b *BlogArticleDao) UpdateArticle(ctx context.Context, article *model.Article) error

func (*BlogArticleDao) UpdateArticleSample

func (b *BlogArticleDao) UpdateArticleSample(ctx context.Context, article *model.UpdateArticleModel) error

type IBlogArticleDao

type IBlogArticleDao interface {
	CreateArticle(ctx context.Context, article *model.Article) error
	DeleteArticleById(ctx context.Context, id string) (bool, error)
	UpdateArticle(ctx context.Context, article *model.Article) error
	UpdateArticleSample(ctx context.Context, article *model.UpdateArticleModel) error
	GetArticleById(ctx context.Context, id string) (*model.Article, error)
}

Jump to

Keyboard shortcuts

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