repository

package
v0.0.0-...-e68aaec Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ArticleCachedRepository

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

func (*ArticleCachedRepository) Create

func (repo *ArticleCachedRepository) Create(ctx context.Context, art *domain.Article) (int64, error)

func (*ArticleCachedRepository) DeletePubById

func (repo *ArticleCachedRepository) DeletePubById(ctx context.Context, aid int64) error

func (*ArticleCachedRepository) GetById

func (repo *ArticleCachedRepository) GetById(ctx context.Context, aid int64) (domain.Article, error)

func (*ArticleCachedRepository) GetPubById

func (repo *ArticleCachedRepository) GetPubById(ctx context.Context, aid int64) (domain.Article, error)

func (*ArticleCachedRepository) List

func (repo *ArticleCachedRepository) List(ctx context.Context,
	offset int, limit int, uid int64) ([]domain.Article, error)

func (*ArticleCachedRepository) PubList

func (repo *ArticleCachedRepository) PubList(ctx context.Context,
	offset int, limit int) ([]domain.Article, error)

func (*ArticleCachedRepository) PubTotal

func (repo *ArticleCachedRepository) PubTotal(ctx context.Context) (int64, error)

func (*ArticleCachedRepository) Sync

func (repo *ArticleCachedRepository) Sync(ctx context.Context, art *domain.Article) (int64, error)

Sync 这里的语义是同步(将文章发表到线上,即同步数据到线上表)

func (*ArticleCachedRepository) Total

func (repo *ArticleCachedRepository) Total(ctx context.Context,
	uid int64) (int64, error)

func (*ArticleCachedRepository) Update

func (repo *ArticleCachedRepository) Update(ctx context.Context, art *domain.Article) error

type ArticleRepository

type ArticleRepository interface {
	// 创作者接口
	Create(ctx context.Context, art *domain.Article) (int64, error)
	Update(ctx context.Context, art *domain.Article) error
	List(ctx context.Context, offset int, limit int, uid int64) ([]domain.Article, error)
	Total(ctx context.Context, uid int64) (int64, error)
	Sync(ctx context.Context, art *domain.Article) (int64, error)
	// 线上库查询
	PubList(ctx context.Context, offset int, limit int) ([]domain.Article, error)
	PubTotal(ctx context.Context) (int64, error)
	GetById(ctx context.Context, aid int64) (domain.Article, error)
	GetPubById(ctx context.Context, aid int64) (domain.Article, error)
	DeletePubById(ctx context.Context, aid int64) error
}

func NewArticleCachedRepository

func NewArticleCachedRepository(dao dao.ArticleDao) ArticleRepository

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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