| 12 | ) |
| 13 | |
| 14 | type PostCache interface { |
| 15 | Get(ctx context.Context, key string) (domain.Post, error) |
| 16 | Set(ctx context.Context, key string, post domain.Post) error |
| 17 | Del(ctx context.Context, key string) error |
| 18 | PreHeat(ctx context.Context, posts []domain.Post) error |
| 19 | GetList(ctx context.Context, page int, size int) ([]domain.Post, error) |
| 20 | SetList(ctx context.Context, page int, size int, posts []domain.Post) error |
| 21 | DelList(ctx context.Context, key string) error |
| 22 | GetPubList(ctx context.Context, page int, size int) ([]domain.Post, error) |
| 23 | SetPubList(ctx context.Context, page int, size int, posts []domain.Post) error |
| 24 | DelPubList(ctx context.Context, key string) error |
| 25 | GetPub(ctx context.Context, key string) (domain.Post, error) |
| 26 | SetPub(ctx context.Context, key string, post domain.Post) error |
| 27 | DelPub(ctx context.Context, key string) error |
| 28 | SetEmpty(ctx context.Context, key string) error |
| 29 | IsEmpty(ctx context.Context, key string) (bool, error) |
| 30 | } |
| 31 | |
| 32 | type postCache struct { |
| 33 | client redis.Cmdable |
no outgoing calls
no test coverage detected