service

package
v2.16.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2021 License: AGPL-3.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DetailService

type DetailService interface {
	Create(data *pb_detail.Detail) error
	Get(filter interface{}, projection interface{}) (*pb_detail.Detail, error)
	Fetch(cityUuid, cinemaUuid, hallUuid, movieUuid, seanceUuid string) (*pb_catalog_schedule.ScheduleCombine, error)
	Marshal(data *pb_catalog_schedule.ScheduleCombine) ([]byte, error)
	Unmarshal(data []byte) (*pb_catalog_schedule.ScheduleCombine, error)
}

DetailService interface

func NewDetailService

func NewDetailService(
	pluginDatabaseMongoDB *plugin_database_mongodb.Plugin,
	clnt client.Client,
) DetailService

NewDetailService init

type OrderService

type OrderService interface {
	Create(m *pb_order.Order) error
	Update(m *pb_order.Order) error
	Delete(filter interface{}) error
	Paginate(page, perPage int64, filter, sort interface{}) ([]*pb_order.Order, int64, error)
	Get(filter interface{}, projection interface{}) (*pb_order.Order, error)

	CalculateAmount(data *pb_order.Order, amount float64) error
	GetAmount(data *pb_order.Order) (float64, error)
	SetStatusByType(
		order *pb_order.Order,
		orderStatus,
		reservationStatus,
		reservationPaymentStatus,
		menuStatus,
		menuPaymentStatus string,
	) error
}

OrderService interface

func NewOrderService

func NewOrderService(
	reservation ReservationService,
	pluginDatabaseMongoDB *plugin_database_mongodb.Plugin,
	clnt client.Client,
) OrderService

NewOrderService init

type PaymentService

type PaymentService interface {
	New(successUrl, failUrl, neutralUrl string, amount float64, paymentType, email, phone, merchantId string) *pb_payment.Payment
	Create(data *pb_payment.Payment) error
	Get(data *pb_payment.Payment) error

	Refund(data *pb_payment.Payment) error
	Cancel(data *pb_payment.Payment) error
	Finish(data *pb_payment.Payment) error

	GetPublicKey(priority []string) (string, error)
	// contains filtered or unexported methods
}

PaymentService interface

func NewPaymentService

func NewPaymentService(
	orderService OrderService,
	bid *plugin_client_bid.Plugin,
) PaymentService

NewPaymentService init

type ReservationService

type ReservationService interface {
	New(seanceWpId, wpId int64, seats []*pb_seat.Seat) *pb_reservation.Reservation
	Hold(reservation *pb_reservation.Reservation) error
	DiscountsApply(reservation *pb_reservation.Reservation) error
	Payed(reservation *pb_reservation.Reservation, contractId string) error
	Clear(reservation *pb_reservation.Reservation) error
	// Events
	EventClear(reservation *pb_reservation.Reservation) error
	// contains filtered or unexported methods
}

ReservationService interface

func NewReservationService

func NewReservationService(
	pluginDatabaseMongoDB *plugin_database_mongodb.Plugin,
	clnt client.Client,
) ReservationService

NewReservationService init

type SeatService

type SeatService interface {
	New(cinemaWpId, seanceWpId int64, seats []*pb_seat.Seat, discounts []*pb_catalog_discount.DiscountCombine) ([]*pb_seat.Seat, error)
}

SeatService interface

func NewSeatDetailService

func NewSeatDetailService(
	clnt client.Client,
) SeatService

NewSeatService init

type Service

type Service struct {
	ServiceName string `mapstructure:"service_name"`
	Booking     struct {
		RPC pb_booking.BookingService

		Create         opts `mapstructure:"create"`
		CreateMenu     opts `mapstructure:"create_menu"`
		CustomerUpdate opts `mapstructure:"customer_update"`
		Status         opts `mapstructure:"status"`
	} `mapstructure:"booking"`
	Order struct {
		RPC pb_order.OrderService

		Paginate opts `mapstructure:"paginate"`
		Get      opts `mapstructure:"get"`
		Update   opts `mapstructure:"update"`
	} `mapstructure:"order"`
	Payment struct {
		RPC pb_payment.PaymentService

		Create    opts `mapstructure:"create"`
		Get       opts `mapstructure:"get"`
		Refund    opts `mapstructure:"refund"`
		Cancel    opts `mapstructure:"cancel"`
		Finish    opts `mapstructure:"finish"`
		GetStatus opts `mapstructure:"get_status"`
	} `mapstructure:"payment"`
	Reservation struct {
		RPC pb_reservation.ReservationService

		Hold          opts `mapstructure:"hold"`
		Payed         opts `mapstructure:"payed"`
		Clear         opts `mapstructure:"clear"`
		DiscountApply opts `mapstructure:"discount_apply"`
		GetQrcode     opts `mapstructure:"get_qrcode"`
	} `mapstructure:"reservation"`
	Detail struct {
		RPC pb_detail.DetailService

		Get opts `mapstructure:"get"`
	} `mapstructure:"detail"`
}

Jump to

Keyboard shortcuts

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