Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IOrderLineRepository ¶
type IOrderLineRepository interface { FindOneById(ctx context.Context, id primitive.ObjectID) (*OrderLine, error) FindByOrderNumber(ctx context.Context, orderNumber string) ([]*OrderLine, error) Add(ctx context.Context, orderLine *OrderLine) error Update(ctx context.Context, orderLine *OrderLine) error }
func NewOrderLineRepository ¶
func NewOrderLineRepository(db *mongo.Database) IOrderLineRepository
type IOrderLineService ¶
type IOrderLineService interface { AddNew(ctx context.Context, sku, orderNumber string, price shared.Money) (*OrderLine, error) GetById(ctx context.Context, sku string) (*OrderLine, error) FindByOrderNumber(ctx context.Context, orderNumber string) ([]*OrderLine, error) Cancel(ctx context.Context, id string, cancelReason string) (*OrderLine, error) }
func NewOrderLineService ¶
func NewOrderLineService(repository IOrderLineRepository) IOrderLineService
type OrderLine ¶
type OrderLine struct { Id primitive.ObjectID `json:"id" bson:"_id"` Sku string `json:"sku" bson:"Sku"` OrderNumber string `json:"orderNumber" bson:"OrderNumber"` Price shared.Money `json:"price" bson:"Price"` Status string `json:"status" bson:"Status"` CancelReason string `json:"cancelReason" bson:"CancelReason"` // contains filtered or unexported fields }
func (*OrderLine) ClearDomainEvents ¶
func (u *OrderLine) ClearDomainEvents()
func (*OrderLine) GetDomainEvents ¶
func (u *OrderLine) GetDomainEvents() []ddd.IBaseEvent
func (*OrderLine) RaiseEvent ¶
func (u *OrderLine) RaiseEvent(event ddd.IBaseEvent)
type OrderPaymentRejectedEventHandler ¶
type OrderPaymentRejectedEventHandler struct {
// contains filtered or unexported fields
}
func NewOrderPaymentRejectedEventHandler ¶
func NewOrderPaymentRejectedEventHandler(orderLineService IOrderLineService) *OrderPaymentRejectedEventHandler
func (*OrderPaymentRejectedEventHandler) Handle ¶
func (s *OrderPaymentRejectedEventHandler) Handle(ctx context.Context, paymentRejected *orders.PaymentRejected) error
Click to show internal directories.
Click to hide internal directories.