Summary
In this chapter, we have explored how to properly persist our data using the database/sql package from Go and how to use SQuirreL as a query builder. We have explored the repository concept to abstract our data access from how the data is stored, in our case, a SQL database. In your case, it could be anything, from files in the filesystem to NoSQL databases. To finish, we explored how to include these concepts in our API project. With all this information, you can now store your data correctly. But storing it is only half the problem; we also need to keep it safe.
In the next chapter, we will explore some key security concepts for implementing APIs.
Unlock this book’s exclusive benefits nowScan this QR code or go to packtpub.com/unlock, then search this book by name. |
![]() |
|
Note: Keep your purchase... |
