Documentation ¶
Index ¶
- type Cache
- func (c *Cache) DeleteByAnimeID(ctx context.Context, animeID int64) (int, error)
- func (c *Cache) DeleteByUsername(ctx context.Context, username string) (int, error)
- func (c *Cache) DeleteNotInList(ctx context.Context, username string, ids []int64, status string) (int, error)
- func (c *Cache) Get(ctx context.Context, data entity.GetUserAnimeRequest) ([]*entity.UserAnime, int, int, error)
- func (c *Cache) GetOldUsernames(ctx context.Context) ([]string, int, error)
- func (c *Cache) IsOld(ctx context.Context, username string) (bool, int, error)
- func (c *Cache) Update(ctx context.Context, data entity.UserAnime) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache struct {
// contains filtered or unexported fields
}
Cache contains functions for user cache.
func New ¶
func New(cacher cache.Cacher, repo repository.Repository) *Cache
New to create new user cache.
func (*Cache) DeleteByAnimeID ¶ added in v0.3.2
DeleteByAnimeID to delete by anime id.
func (*Cache) DeleteByUsername ¶ added in v0.9.0
DeleteByUsername to delete by username.
func (*Cache) DeleteNotInList ¶ added in v0.3.0
func (c *Cache) DeleteNotInList(ctx context.Context, username string, ids []int64, status string) (int, error)
DeleteNotInList to delete anime not in list.
func (*Cache) Get ¶
func (c *Cache) Get(ctx context.Context, data entity.GetUserAnimeRequest) ([]*entity.UserAnime, int, int, error)
Get to get user anime.
func (*Cache) GetOldUsernames ¶ added in v0.3.0
GetOldUsernames to get old username.
Click to show internal directories.
Click to hide internal directories.