Documentation
¶
Index ¶
- func NewRedisCache(opt *redis.Options) (*redis.Client, error)
- type CinemaCache
- func (c *CinemaCache) CacheCinema(ctx context.Context, cinema models.Cinema, ttl time.Duration) (err error)
- func (c *CinemaCache) CacheCinemasCities(ctx context.Context, cities []models.City, ttl time.Duration) (err error)
- func (c *CinemaCache) CacheCinemasInCity(ctx context.Context, id int32, cinemas []models.Cinema, ttl time.Duration) (err error)
- func (c *CinemaCache) CacheHallConfiguraion(ctx context.Context, id int32, places []models.Place, ttl time.Duration) (err error)
- func (c *CinemaCache) CacheHalls(ctx context.Context, halls []models.Hall, ttl time.Duration) (err error)
- func (c *CinemaCache) GetCinema(ctx context.Context, id int32) (cinema models.Cinema, err error)
- func (c *CinemaCache) GetCinemasCities(ctx context.Context) (cities []models.City, err error)
- func (c *CinemaCache) GetCinemasInCity(ctx context.Context, cityID int32) (cinemas []models.Cinema, err error)
- func (c *CinemaCache) GetHallConfiguraion(ctx context.Context, id int32) (places []models.Place, err error)
- func (c *CinemaCache) GetHalls(ctx context.Context, ids []int32) (halls []models.Hall, notFoundedIds []int32, err error)
- func (c *CinemaCache) PingContext(ctx context.Context) error
- type Metrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRedisCache ¶
func NewRedisCache(opt *redis.Options) (*redis.Client, error)
Types ¶
type CinemaCache ¶
type CinemaCache struct {
// contains filtered or unexported fields
}
func NewCinemaCache ¶
func NewCinemaCache(logger *logrus.Logger, cinemasCitiesRdb, cinemasRdb, citiesRdb, hallsConfigurationsRdb, hallsRdb *redis.Client, metrics Metrics) *CinemaCache
func (*CinemaCache) CacheCinema ¶
func (*CinemaCache) CacheCinemasCities ¶
func (*CinemaCache) CacheCinemasInCity ¶
func (*CinemaCache) CacheHallConfiguraion ¶
func (*CinemaCache) CacheHalls ¶
func (*CinemaCache) GetCinemasCities ¶
func (*CinemaCache) GetCinemasInCity ¶
func (*CinemaCache) GetHallConfiguraion ¶
func (*CinemaCache) PingContext ¶
func (c *CinemaCache) PingContext(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.