Documentation ¶
Index ¶
- type ArticleCachedRepository
- func (repo *ArticleCachedRepository) Create(ctx context.Context, art *domain.Article) (int64, error)
- func (repo *ArticleCachedRepository) DeletePubById(ctx context.Context, aid int64) error
- func (repo *ArticleCachedRepository) GetById(ctx context.Context, aid int64) (domain.Article, error)
- func (repo *ArticleCachedRepository) GetPubById(ctx context.Context, aid int64) (domain.Article, error)
- func (repo *ArticleCachedRepository) List(ctx context.Context, offset int, limit int, uid int64) ([]domain.Article, error)
- func (repo *ArticleCachedRepository) PubList(ctx context.Context, offset int, limit int) ([]domain.Article, error)
- func (repo *ArticleCachedRepository) PubTotal(ctx context.Context) (int64, error)
- func (repo *ArticleCachedRepository) Sync(ctx context.Context, art *domain.Article) (int64, error)
- func (repo *ArticleCachedRepository) Total(ctx context.Context, uid int64) (int64, error)
- func (repo *ArticleCachedRepository) Update(ctx context.Context, art *domain.Article) error
- type ArticleRepository
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) DeletePubById ¶
func (repo *ArticleCachedRepository) DeletePubById(ctx context.Context, aid int64) error
func (*ArticleCachedRepository) GetPubById ¶
func (*ArticleCachedRepository) PubTotal ¶
func (repo *ArticleCachedRepository) PubTotal(ctx context.Context) (int64, 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
Click to show internal directories.
Click to hide internal directories.