Building RESTful Web services with Go

Explore the necessary concepts of REST API development by building few real world services from scratch.

Access cutting-edge content as it's created

Want access to this book right now? Read as we develop it as part of our Early Access program. Click here to find out more about Early Access.

Code Files

Building RESTful Web services with Go

Naren Yellavula

Explore the necessary concepts of REST API development by building few real world services from scratch.

Quick links: > What will you learn?> Table of content

Access cutting-edge content as it's created

Want access to this book right now? Read as we develop it as part of our Early Access program. Click here to find out more about Early Access.

Mapt Subscription
FREE
$29.99/m after trial
Early Access eBook
$22.40
RRP $31.99
Save 29%
Pre-Order Print
$39.99
RRP $39.99
What do I get with a Mapt Pro subscription?
  • Unlimited access to all Packt’s 5,000+ eBooks and Videos
  • Early Access content, Progress Tracking, and Assessments
  • 1 Free eBook or Video to download and keep every month after trial
What do I get with an eBook?
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with Print & eBook?
  • Get a paperback copy of the book delivered to you
  • Download this book in EPUB, PDF, MOBI formats
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
What do I get with a Video?
  • Download this Video course in MP4 format
  • DRM FREE - read and interact with your content when you want, where you want, and how you want
  • Access this title in the Mapt reader
$0.00
$22.40
$39.99
$29.99 p/m after trial
RRP $31.99
RRP $39.99
Subscription
Early Access eBook
Pre-Order Print
Start 14 Day Trial

Frequently bought together


Building RESTful Web services with Go Book Cover
Building RESTful Web services with Go
$ 31.99
$ 22.40
Go: Design Patterns for Real-World Projects Book Cover
Go: Design Patterns for Real-World Projects
$ 71.99
$ 50.40
Buy 2 for $35.00
Save $68.98
Add to Cart

Book Details

ISBN 139781788294287
Paperback314 pages

Book Description

REST is an architectural style that tackles the challenges of building scalable web services and in today's connected world, APIs have taken a central role on the web. APIs provide the fabric through which systems interact, and REST has become synonymous with APIs. The depth, breadth, and ease of use of Go, makes it a breeze for developers to work with it to build robust Web APIs. This book takes you through the design of RESTful web services and leverages a framework like Buffalo Go to implement these services.

The book starts with a brief introduction to REST API development and how it transformed the modern web. You will learn how to handle routing and authentication of web services along with working with middleware for internal service. The book explains how to use Go frameworks to build RESTful web services and work with MongoDB to create REST API. You will learn how to integrate Postgres SQL and JSON with a Go web service and build a client library in Go for consuming REST API. You will learn how to scale APIs using the microservice architecture and deploy the REST APIs using Nginx as a proxy server. Finally you will learn how to metricize a REST API using an API Gateway.

By the end of the book you will be proficient in building RESTful APIs in Go.

Table of Contents

Chapter 1: Getting Started With the REST API Development
What is a web service or an API?
REST Verbs and Status Codes
Rise of REST API with Single Page Applications
Setting up the project and running the development server
Building our first service: finding the roman numeral
Using gulp for creating auto code compiling and server reloading
Summary
Chapter 2: Handling Routing for Our Rest Services
Getting the code
Understanding Go's net/http package
ServeMux: a basic router in Go
Introducing httprouter, a lightweight HTTP Router
Introducing Gorilla Mux, a powerful HTTP Router
Creating a Basic API Layout for URL Shortening Service
Chapter 3: Working With Middleware and RPC
Getting the code
What is a Middleware? 
Multiple middleware and chaining
Painless middleware chaining with Alice
Using Gorilla's handlers middleware for logging 
What is RPC?
JSON RPC using Gorilla RPC
 Summary
Chapter 4: Building RESTFul Services with popular Go frameworks
Chapter 5: Working with MongoDB and Go to create REST API
Chapter 6: Working with Protocol Buffers
Chapter 7: Working with PostgreSQL, JSON and Go
Chapter 8: Building a Rest API Client in Go and Unit Testing API
Chapter 9: Scaling Our Rest API Using Micro Services
Chapter 10: Deploying Our REST Services
Chapter 11: Using an API Gateway to Monitor and Metricize REST API
Chapter 12: Handling Authentication for Our REST Services
Chapter 13:

What You Will Learn

  • Create HTTP handler and introspect the Gorilla Mux router
  • OAuth 2 implementation with Go
  • Build RESTFul API with go-restful, Revel.Go and Buffalo Go
  • Create REST API with MongoDB and Go
  • Build a working client library and unit test for REST API
  • Debug, test, and profile RESTful APIs with each of the frameworks
  • Optimize and scale REST API using microservices

Authors

Table of Contents

Chapter 1: Getting Started With the REST API Development
What is a web service or an API?
REST Verbs and Status Codes
Rise of REST API with Single Page Applications
Setting up the project and running the development server
Building our first service: finding the roman numeral
Using gulp for creating auto code compiling and server reloading
Summary
Chapter 2: Handling Routing for Our Rest Services
Getting the code
Understanding Go's net/http package
ServeMux: a basic router in Go
Introducing httprouter, a lightweight HTTP Router
Introducing Gorilla Mux, a powerful HTTP Router
Creating a Basic API Layout for URL Shortening Service
Chapter 3: Working With Middleware and RPC
Getting the code
What is a Middleware? 
Multiple middleware and chaining
Painless middleware chaining with Alice
Using Gorilla's handlers middleware for logging 
What is RPC?
JSON RPC using Gorilla RPC
 Summary
Chapter 4: Building RESTFul Services with popular Go frameworks
Chapter 5: Working with MongoDB and Go to create REST API
Chapter 6: Working with Protocol Buffers
Chapter 7: Working with PostgreSQL, JSON and Go
Chapter 8: Building a Rest API Client in Go and Unit Testing API
Chapter 9: Scaling Our Rest API Using Micro Services
Chapter 10: Deploying Our REST Services
Chapter 11: Using an API Gateway to Monitor and Metricize REST API
Chapter 12: Handling Authentication for Our REST Services
Chapter 13:

Book Details

ISBN 139781788294287
Paperback314 pages
Read More

Read More Reviews

Recommended for You

Go: Design Patterns for Real-World Projects Book Cover
Go: Design Patterns for Real-World Projects
$ 71.99
$ 50.40
Mastering Swift 4 - Fourth Edition Book Cover
Mastering Swift 4 - Fourth Edition
$ 35.99
$ 25.20
Architecting Modern Java EE Applications Book Cover
Architecting Modern Java EE Applications
$ 39.99
$ 28.00
Building RESTful Web Services with PHP 7 Book Cover
Building RESTful Web Services with PHP 7
$ 35.99
$ 25.20
Go : Building DevOps Tools [Integrated Course] Book Cover
Go : Building DevOps Tools [Integrated Course]
$ 124.99
$ 106.25
RESTful Java Web Services - Third Edition Book Cover
RESTful Java Web Services - Third Edition
$ 35.99
$ 25.20