Oreilly - Building RESTful APIs with Go
by Bartlomiej Walczak | Publisher: Packt Publishing | Release Date: December 2018 | ISBN: 9781789614992
Create and troubleshoot robust and secure RESTful APIs with Go, Echo, and JWEAbout This VideoBuild and deploy RESTful web services in a production environmentMake your API more secure using basic auth and encrypted JSONSecure go applications for deployment with scalability in mind.In DetailREST is an architectural style that tackles the challenges of building scalable web services. APIs provide the fabric through which systems interact, and REST has become synonymous with APIs. The depth, breadth, and ease of use of Go, make it a breeze for developers to work with it to build robust Web APIs. This course will teach you to build a RESTful web server. You will learn to add routing and handle requests, thus making your APIs more RESTful. Later, by testing and profiling your code you will ensure it runs correctly and behaves well at scale. Moving on with security, you will learn to log requests and outcomes of API calls and speed up performance using the Echo framework. By the end of this course, you will have the knowledge you need to start building your own enterprise-grade RESTful web services that are production-ready, secure, scalable, and reliable.Al the codes and supporting files are available on GitHub at https://github.com/PacktPublishing/Building-RESTful-APIs-with-GoDownloading the example code for this course: You can download the example code files for all Packt video courses you have purchased from your account at http://www.PacktPub.com. If you purchased this course elsewhere, you can visit http://www.PacktPub.com/support and register to have the files e-mailed directly to you.
- Chapter 1 : RESTful API in Go - Why?
- The Course Overview 00:02:07
- Useful Tools 00:05:11
- Why Go? 00:03:49
- Chapter 2 : Your First API Server
- Building an API Web Server 00:05:00
- Creating the Default Route 00:01:36
- Creating the Default Handler 00:01:56
- Custom Error Message 00:01:23
- Using Postman to Test API 00:02:23
- Chapter 3 : Making Your API RESTful
- Outlining the API 00:03:57
- Setting Up a Data Store 00:04:12
- Record Manipulation 00:08:12
- Creating a Custom Handler 00:08:06
- Retrieving a List (GET) 00:05:14
- Creating an Item (POST) 00:08:27
- Retrieving an Item (GET) 00:07:31
- Replacing an Item (PUT) 00:02:16
- Updating an Item (PATCH) 00:01:50
- Removing an Item (DELETE) 00:02:58
- Retrieving Headers (HEAD) 00:02:54
- Retrieving Options (OPTIONS) 00:05:00
- Chapter 4 : Testing and Profiling
- Why Are Tests Important? 00:04:11
- An Ideal Unit Test 00:11:35
- A Minimum Viable Unit Test 00:06:36
- Benchmarking 00:07:09
- Caching 00:14:38
- Creating a Custom Writer 00:08:31
- Mocking for Unit Tests 00:09:03
- Benchmarking Cached Code 00:08:37
- Chapter 5 : Frameworks and Middleware
- Echo Framework 00:03:16
- First Steps in Echo 00:03:55
- Recreating Our API in Echo 00:09:53
- Middleware 00:08:43
- Summary 00:02:43