service

package
v2.21.4 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: AGPL-3.0 Imports: 45 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 EmailService added in v2.17.5

type EmailService interface {
	SendSuccessEmail(order *pb_booking_order.Order) error
	SendRejectEmail(order *pb_booking_order.Order) error
	// contains filtered or unexported methods
}

EmailService interface

func NewEmailService added in v2.17.5

func NewEmailService(
	orderService OrderService,
	clnt client.Client,
) EmailService

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
}

OrderService interface

func NewOrderService

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

NewOrderService init

type PaymentService

type PaymentService interface {
	Get(filter interface{}, projection interface{}) (*pb_payment.Payment, error)

	Init() *pb_payment.Payment
	Hold(
		orderId, publicKey string,
		amount float64,
		phone, email, currency, language, resultUrl string,
	) (string, error)
	HoldCompletion(
		orderId, publicKey string,
		amount float64,
	) error
	Status(orderId, publicKey string) (string, error)
	Refund(
		orderId, publicKey string,
		amount float64,
	) error
	Callback(data []byte, signature string) (*pb_payment.Payment, error)

	GetPublicKey(priority []string) (string, error)
}

PaymentService interface

func NewPaymentService

func NewPaymentService(
	pluginDatabaseMongoDB *plugin_database_mongodb.Plugin,
	pluginClientLiqpay *plugin_client_liqpay.Plugin,
	orderService OrderService,
) 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

		HoldUrl   opts `mapstructure:"hold_url"`
		Get       opts `mapstructure:"get"`
		Refund    opts `mapstructure:"refund"`
		GetStatus opts `mapstructure:"get_status"`
		Callback  opts `mapstructure:"callback"`
	} `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"`
	} `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