Documentation ¶
Index ¶
- type Cache
- func (c *Cache) DeleteByID(ctx context.Context, id int64) (int, error)
- func (c *Cache) GetAll(ctx context.Context, req entity.GetAllRequest) (_ []entity.Agency, _ int, code int, err error)
- func (c *Cache) GetAllIDs(ctx context.Context) (data []int64, code int, err error)
- func (c *Cache) GetByID(ctx context.Context, id int64) (data *entity.Agency, code int, err error)
- func (c *Cache) GetCount(ctx context.Context) (data int, 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.Agency) (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 agency cache.
func New ¶
func New(cacher cache.Cacher, repo repository.Repository) *Cache
New to create new agency cache.
func (*Cache) DeleteByID ¶ added in v0.25.0
DeleteByID to delete by id.
func (*Cache) GetAll ¶
func (c *Cache) GetAll(ctx context.Context, req entity.GetAllRequest) (_ []entity.Agency, _ int, code int, err error)
GetAll to get all.
Click to show internal directories.
Click to hide internal directories.