Documentation ¶
Index ¶
- type MQSender
- type Repository
- type Service
- func (s *Service) Close()
- func (s *Service) OrderCancel(ctx context.Context, orderID int64) (err error)
- func (s *Service) OrderCreate(ctx context.Context, create *requests.OrderCreate) (orderID int64, err error)
- func (s *Service) OrderInfo(ctx context.Context, orderID int64) (info responses.OrderInfo, err error)
- func (s *Service) OrderPay(ctx context.Context, orderID int64) (err error)
- func (s *Service) StartStatusChangedEventDispatcher(ctx context.Context)
- type StatusOutboxRepository
- type StockService
- type TxManager
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService( ctx context.Context, repo Repository, stockService StockService, txManager TxManager, mqSender MQSender, statusOutboxRepository StatusOutboxRepository, ) *Service
func (*Service) OrderCancel ¶
func (*Service) OrderCreate ¶
func (*Service) StartStatusChangedEventDispatcher ¶
type StatusOutboxRepository ¶
type StatusOutboxRepository interface { CreateOrderStatusChangedEvent(ctx context.Context, orderID int64, status ordermodels.Status) error FetchNextOrderStatusChangedEvent(ctx context.Context) (ordermodels.StatusChangedEvent, error) MarkOrderStatusChangedEventAsSend(ctx context.Context, eventID int64) error }
type StockService ¶
type StockService interface { Reserve(ctx context.Context, item []ordermodels.Item) error ReserveRemove(ctx context.Context, item []stockmodels.ReserveItem) error ReserveCancel(ctx context.Context, item []stockmodels.ReserveItem) error }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.