Grokking Advanced Go
0% completed
Capstone: Design and Domain Types
The order service in this chapter makes four promises to the programs that call it, which are called its clients:
- It accepts a new order only when every field is valid, and one response reports every problem.
- It sets the order ID and the paid status itself, and it never takes them from a client.
- It keeps money as an
int64count of cents, in its JSON as well as in memory. - It reports each failure with a stable code, and internal error text never reaches a client.
It also leaves out three things. It keeps orders in memory, so a restart loses them
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%