rediscache

package
v0.0.0-...-f5f0fde Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedisCache

func NewRedisCache(opt *redis.Options) (*redis.Client, error)

Types

type ReserveCache

type ReserveCache struct {
	// contains filtered or unexported fields
}

func NewReserveCache

func NewReserveCache(rdb *redis.Client, logger *logrus.Logger) *ReserveCache

func (*ReserveCache) DeletePlacesReservation

func (c *ReserveCache) DeletePlacesReservation(ctx context.Context, reservationId string) (err error)

func (*ReserveCache) GetReservation

func (c *ReserveCache) GetReservation(ctx context.Context,
	reservationId string) (places []models.Place, screeningId int64, err error)

func (*ReserveCache) GetReservedPlacesForScreening

func (c *ReserveCache) GetReservedPlacesForScreening(ctx context.Context, screeningId int64) (places []models.Place, err error)

func (*ReserveCache) GetScreeningsReservedPlaces

func (c *ReserveCache) GetScreeningsReservedPlaces(ctx context.Context,
	ids []int64) (reservedPlaces map[int64][]models.Place, err error)

func (*ReserveCache) PingContext

func (c *ReserveCache) PingContext(ctx context.Context) error

func (*ReserveCache) ReservePlaces

func (c *ReserveCache) ReservePlaces(ctx context.Context,
	screeningId int64, places []models.Place, ttl time.Duration) (reservationId string, err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL