Building distributed applications in Gin : a hands-on guide for go developers to build and deploy distributed web apps with the Gin framework /
An effective guide to learning how to build a large-scale distributed application using the wide range of functionalities in Gin Key Features Explore the commonly used functionalities of Gin to build web applications Become well-versed with rendering HTML templates with the Gin engine Solve commonly...
Clasificación: | Libro Electrónico |
---|---|
Autor principal: | |
Formato: | Electrónico eBook |
Idioma: | Inglés |
Publicado: |
Birmingham :
Packt Publishing,
2021.
|
Temas: | |
Acceso en línea: | Texto completo (Requiere registro previo con correo institucional) |
Tabla de Contenidos:
- Cover
- Title Page
- Copyright and Credits
- Dedication
- Contributors
- Table of Contents
- Preface
- Section 1: Inside the Gin Framework
- Chapter 1: Getting Started with Gin
- Technical requirements
- What is Gin?
- Setting up the Go environment
- Linux/FreeBSD
- Windows
- MacOS
- Integrated development environment
- Installing Go tools
- Installing and configuring Gin
- Dependency management in Golang
- Writing a custom HTTP handler
- Summary
- Questions
- Further reading
- Section 2: Distributed Microservices
- Chapter 2: Setting Up API Endpoints
- Technical requirements
- Exploring API functionality
- Defining the data model
- HTTP endpoints
- Implementing HTTP routes
- POST /recipes
- GET /recipes
- PUT /recipes/{id}
- DELETE /recipes/{id}
- GET /recipes/search
- Writing the OpenAPI Specification
- Installing Go Swagger
- Swagger metadata
- Summary
- Questions
- Further reading
- Chapter 3: Managing Data Persistence with MongoDB
- Technical requirements
- Running a MongoDB Server
- Installing Docker CE
- Running a MongoDB container
- Configuring Go's MongoDB driver
- Exploring MongoDB queries
- The InsertMany operation
- The Find operation
- The InsertOne operation
- The UpdateOne operation
- Designing the project's layout
- Caching an API with Redis
- Running Redis in Docker
- Optimizing MongoDB queries
- Performance benchmark
- Summary
- Questions
- Further reading
- Chapter 4: Building API Authentication
- Technical requirements
- Exploring authentication
- Using API keys
- Introducing JWTs
- Sign-in HTTP handler
- Renewing a JWT
- Hashing and salting passwords
- Persisting client sessions and cookies
- Authenticating with Auth0
- Building an HTTPS server
- Self-signed certificates
- Summary
- Questions
- Further reading
- Chapter 5: Serving Static HTML in Gin
- Technical requirements
- Serving static files
- Rendering HTML templates
- Creating the view templates
- Creating reusable templates
- Building a self-contained web application
- Bundling static files
- Building a SPA
- Getting started with React
- Exploring React components
- Resolving cross-origin requests
- Summary
- Questions
- Further reading
- Chapter 6: Scaling a Gin Application
- Technical requirements
- Scaling workloads with a message broker
- Deploying RabbitMQ with Docker
- Exploring the Producer/Consumer pattern
- Scaling horizontally with Docker replicas
- Using Docker multi-stage builds
- Scaling services with Docker Compose
- Using the NGINX reverse proxy
- Caching assets with HTTP cache headers
- Setting HTTP caching headers
- Summary
- Further reading
- Section 3: Beyond the Basics
- Chapter 7: Testing Gin HTTP Routes
- Technical requirements
- Testing Gin HTTP handlers
- Generating code coverage reports
- Performing integration tests with Docker
- Discovering security vulnerabilities
- Gosec