Documentation ¶
Index ¶
- type Cache
- func (c *Cache) GetAll(ctx context.Context, req entity.GetAllRequest) (_ []entity.Vtuber, _ int, code int, err error)
- func (c *Cache) GetAllForAgencyTree(ctx context.Context) (data []entity.Vtuber, code int, err error)
- func (c *Cache) GetAllForFamilyTree(ctx context.Context) (data []entity.Vtuber, code int, err error)
- func (c *Cache) GetAllIDs(ctx context.Context) ([]int64, int, error)
- func (c *Cache) GetAllImages(ctx context.Context, shuffle bool, limit int) (data []entity.Vtuber, code int, err error)
- func (c *Cache) GetByID(ctx context.Context, id int64) (data *entity.Vtuber, code int, err error)
- func (c *Cache) GetOldIDs(ctx context.Context) ([]int64, int, error)
- func (c *Cache) IsOld(ctx context.Context, id int64) (bool, int, error)
- func (c *Cache) UpdateByID(ctx context.Context, id int64, data entity.Vtuber) (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 vtuber cache.
func New ¶
func New(cacher cache.Cacher, repo repository.Repository) *Cache
New to create new vtuber cache.
func (*Cache) GetAll ¶ added in v0.5.0
func (c *Cache) GetAll(ctx context.Context, req entity.GetAllRequest) (_ []entity.Vtuber, _ int, code int, err error)
GetAll to get vtuber list.
func (*Cache) GetAllForAgencyTree ¶ added in v0.4.0
func (c *Cache) GetAllForAgencyTree(ctx context.Context) (data []entity.Vtuber, code int, err error)
GetAllForAgencyTree to get all for agency tree.
func (*Cache) GetAllForFamilyTree ¶ added in v0.4.0
func (c *Cache) GetAllForFamilyTree(ctx context.Context) (data []entity.Vtuber, code int, err error)
GetAllForFamilyTree to get all for family tree.
func (*Cache) GetAllImages ¶
func (c *Cache) GetAllImages(ctx context.Context, shuffle bool, limit int) (data []entity.Vtuber, code int, err error)
GetAllImages to get all images.
Click to show internal directories.
Click to hide internal directories.