Grokking Advanced Go
Vote

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:

  1. It accepts a new order only when every field is valid, and one response reports every problem.
  2. It sets the order ID and the paid status itself, and it never takes them from a client.
  3. It keeps money as an int64 count of cents, in its JSON as well as in memory.
  4. 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%


Vote for new content