Documentation ¶
Index ¶
- type Cache
- func (c *Cache) DeleteByID(ctx context.Context, id int64) (int, error)
- func (c *Cache) Get(ctx context.Context, data entity.GetRequest) ([]*entity.Anime, int, int, error)
- func (c *Cache) GetByID(ctx context.Context, id int64) (data *entity.Anime, code int, err error)
- func (c *Cache) GetByIDs(ctx context.Context, ids []int64) ([]*entity.Anime, int, error)
- func (c *Cache) GetHistories(ctx context.Context, data entity.GetHistoriesRequest) ([]entity.History, int, error)
- func (c *Cache) GetIDs(ctx context.Context) ([]int64, int, error)
- func (c *Cache) GetMaxID(ctx context.Context) (int64, int, error)
- func (c *Cache) GetOldFinishedIDs(ctx context.Context) ([]int64, int, error)
- func (c *Cache) GetOldNotYetIDs(ctx context.Context) ([]int64, int, error)
- func (c *Cache) GetOldReleasingIDs(ctx context.Context) ([]int64, int, error)
- func (c *Cache) GetRelatedByIDs(ctx context.Context, ids []int64) ([]*entity.AnimeRelated, int, error)
- func (c *Cache) IsOld(ctx context.Context, id int64) (bool, int, error)
- func (c *Cache) Update(ctx context.Context, data entity.Anime) (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 anime cache.
func New ¶
func New(cacher cache.Cacher, repo repository.Repository) *Cache
New to create new anime cache.
func (*Cache) DeleteByID ¶ added in v0.3.2
DeleteByID to delete by id.
func (*Cache) GetHistories ¶ added in v0.9.0
func (c *Cache) GetHistories(ctx context.Context, data entity.GetHistoriesRequest) ([]entity.History, int, error)
GetHistories to get histories.
func (*Cache) GetOldFinishedIDs ¶
GetOldFinishedIDs to get old finished anime ids.
func (*Cache) GetOldNotYetIDs ¶
GetOldNotYetIDs to get old not yet released anime ids.
func (*Cache) GetOldReleasingIDs ¶
GetOldReleasingIDs to get old releasing anime ids.
func (*Cache) GetRelatedByIDs ¶ added in v0.3.0
func (c *Cache) GetRelatedByIDs(ctx context.Context, ids []int64) ([]*entity.AnimeRelated, int, error)
GetRelatedByIDs to get related by ids.
Click to show internal directories.
Click to hide internal directories.