mongo_repository

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMongoDB

func NewMongoDB(connStr string) (*mongo.Client, error)

Types

type CinemaOrdersRepository

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

func NewCinemaOrdersRepository

func NewCinemaOrdersRepository(logger *logrus.Logger, db *mongo.Client,
	databaseName string) *CinemaOrdersRepository

func (*CinemaOrdersRepository) CancelOrder

func (r *CinemaOrdersRepository) CancelOrder(ctx context.Context, orderId string) (err error)

func (*CinemaOrdersRepository) ChangeOrderItemsStatus

func (r *CinemaOrdersRepository) ChangeOrderItemsStatus(ctx context.Context, orderId string,
	itemsIds []string, newStatus models.OrderItemStatus) (err error)

func (*CinemaOrdersRepository) ChangeOrderStatus

func (r *CinemaOrdersRepository) ChangeOrderStatus(ctx context.Context, orderId string, newStatus models.OrderItemStatus) (err error)

func (*CinemaOrdersRepository) GetOccupiedPlaces

func (r *CinemaOrdersRepository) GetOccupiedPlaces(ctx context.Context, screeningId int64) (places []models.Place, err error)

func (*CinemaOrdersRepository) GetOrder

func (r *CinemaOrdersRepository) GetOrder(ctx context.Context, orderId, accountId string) (res models.Order, err error)

func (*CinemaOrdersRepository) GetOrderItemsStatuses

func (r *CinemaOrdersRepository) GetOrderItemsStatuses(ctx context.Context,
	orderId string) (statuses []models.OrderItemStatus, err error)

func (*CinemaOrdersRepository) GetOrderItemsTotalPrice

func (r *CinemaOrdersRepository) GetOrderItemsTotalPrice(ctx context.Context,
	orderId string, itemsIds []string) (total uint32, err error)

func (*CinemaOrdersRepository) GetOrderScreeningId

func (r *CinemaOrdersRepository) GetOrderScreeningId(ctx context.Context, accountId, orderId string) (id int64, err error)

func (*CinemaOrdersRepository) GetOrderTotalPrice

func (r *CinemaOrdersRepository) GetOrderTotalPrice(ctx context.Context, orderId string) (price uint32, err error)

func (*CinemaOrdersRepository) GetOrders

func (r *CinemaOrdersRepository) GetOrders(ctx context.Context, accountId string,
	page, limit uint32, sort models.SortDTO) (orders []models.OrderPreview, err error)

func (*CinemaOrdersRepository) GetScreeningsOccupiedPlaces

func (r *CinemaOrdersRepository) GetScreeningsOccupiedPlaces(ctx context.Context,
	ids []int64) (res map[int64][]models.Place, err error)

func (*CinemaOrdersRepository) PingContext

func (r *CinemaOrdersRepository) PingContext(ctx context.Context) error

func (*CinemaOrdersRepository) ProcessOrder

func (r *CinemaOrdersRepository) ProcessOrder(ctx context.Context, order models.ProcessOrderDTO) (err error)

Jump to

Keyboard shortcuts

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