Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created August 29, 2021 06:33
Show Gist options
  • Save percybolmer/1749da57ee9b4940d246c43c70e198f5 to your computer and use it in GitHub Desktop.
Save percybolmer/1749da57ee9b4940d246c43c70e198f5 to your computer and use it in GitHub Desktop.
// CreateOrder will chaintogether all repositories to create a order for a customer
func (o *OrderService) CreateOrder(customerID uuid.UUID, productIDs []uuid.UUID) error {
// Get the customer
c, err := o.customers.Get(customerID)
if err != nil {
return err
}
// Get each Product, Ouchie, We need a ProductRepository
return nil
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment