Documentation
¶
Index ¶
- Variables
- func NewArticleRedisCache(client redis.Cmdable) cache.ArticleCache
- func NewCodeRedisCache(cmd redis.Cmdable) cache.CodeCache
- func NewInteractiveRedisCache(client redis.Cmdable) cache.InteractiveCache
- func NewUserRedisCache(cmd redis.Cmdable) cache.UserCache
- type ArticleRedisCache
- func (a *ArticleRedisCache) DelFirstPage(ctx context.Context, uid int64) error
- func (a *ArticleRedisCache) Get(ctx context.Context, id int64) (domain.Article, error)
- func (a *ArticleRedisCache) GetFirstPage(ctx context.Context, uid int64) ([]domain.Article, error)
- func (a *ArticleRedisCache) GetPub(ctx context.Context, id int64) (domain.Article, error)
- func (a *ArticleRedisCache) Set(ctx context.Context, article domain.Article) error
- func (a *ArticleRedisCache) SetFirstPage(ctx context.Context, uid int64, articles []domain.Article) error
- func (a *ArticleRedisCache) SetPub(ctx context.Context, article domain.Article) error
- type CodeRedisCache
- type InteractiveRedisCache
- func (i *InteractiveRedisCache) DecrCollectCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) DecrLikeCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) Get(ctx context.Context, biz string, bizID int64) (domain.Interactive, error)
- func (i *InteractiveRedisCache) IncrCollectCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) IncrLikeCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) IncrReadCntIfPresent(ctx context.Context, biz string, bizID int64) error
- func (i *InteractiveRedisCache) Set(ctx context.Context, biz string, bizID int64, intr domain.Interactive) error
- type UserRedisCache
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNoCodeExp = errors.New("verification code exists but has no expiration date")
Functions ¶
func NewArticleRedisCache ¶
func NewArticleRedisCache(client redis.Cmdable) cache.ArticleCache
func NewCodeRedisCache ¶
func NewInteractiveRedisCache ¶
func NewInteractiveRedisCache(client redis.Cmdable) cache.InteractiveCache
func NewUserRedisCache ¶
Types ¶
type ArticleRedisCache ¶
type ArticleRedisCache struct { cache.BaseArticleCache // contains filtered or unexported fields }
func (*ArticleRedisCache) DelFirstPage ¶
func (a *ArticleRedisCache) DelFirstPage(ctx context.Context, uid int64) error
DelFirstPage implements cache.ArticleCache.
func (*ArticleRedisCache) GetFirstPage ¶
GetFirstPage implements cache.ArticleCache.
func (*ArticleRedisCache) SetFirstPage ¶
func (a *ArticleRedisCache) SetFirstPage( ctx context.Context, uid int64, articles []domain.Article, ) error
SetFirstPage implements cache.ArticleCache.
type CodeRedisCache ¶
type CodeRedisCache struct { cache.BaseCodeCache // contains filtered or unexported fields }
type InteractiveRedisCache ¶
type InteractiveRedisCache struct { cache.BaseInteractiveCache // contains filtered or unexported fields }
func (*InteractiveRedisCache) DecrCollectCntIfPresent ¶
func (i *InteractiveRedisCache) DecrCollectCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
DecrCollectCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) DecrLikeCntIfPresent ¶
func (i *InteractiveRedisCache) DecrLikeCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
DecrLikeCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) Get ¶
func (i *InteractiveRedisCache) Get( ctx context.Context, biz string, bizID int64, ) (domain.Interactive, error)
Get implements cache.InteractiveCache.
func (*InteractiveRedisCache) IncrCollectCntIfPresent ¶
func (i *InteractiveRedisCache) IncrCollectCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
IncrCollectorCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) IncrLikeCntIfPresent ¶
func (i *InteractiveRedisCache) IncrLikeCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
IncrLikeCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) IncrReadCntIfPresent ¶
func (i *InteractiveRedisCache) IncrReadCntIfPresent( ctx context.Context, biz string, bizID int64, ) error
IncrReadCntIfPresent implements cache.InteractiveCache.
func (*InteractiveRedisCache) Set ¶
func (i *InteractiveRedisCache) Set( ctx context.Context, biz string, bizID int64, intr domain.Interactive, ) error
Set implements cache.InteractiveCache.
type UserRedisCache ¶
type UserRedisCache struct { cache.BaseUserCache // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.