Last active
January 18, 2019 14:07
-
-
Save italolelis/15ec1a53a8c814697b6ce3f592167b2a to your computer and use it in GitHub Desktop.
Order repository definition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// WriteRepository represents the write operations for an order | |
type WriteRepository interface { | |
Add(context.Context, *Order) error | |
Remove(context.Context, uuid.UUID) error | |
} | |
// ReadRepository represents the read operations for an order | |
type ReadRepository interface { | |
FindOneByID(context.Context, uuid.UUID) (*Order, error) | |
} | |
// Service is the interface that provides coffee methods. | |
type Service interface { | |
CreateOrder(ctx context.Context, name string, items Items) (uuid.UUID, error) | |
RequestOrder(ctx context.Context, orderID string) (*Order, error) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment