舉報

會員
最新章節
- Summary
- Authentication versus authorization
- OAuth 2 architecture and basics
- Reading a JWT in Go
- Creating a JWT in Go
- Private claims
品牌:中圖公司
上架時間:2021-07-02 18:28:11
出版社:Packt Publishing
本書數字版權由中圖公司提供,并由其授權上海閱文信息技術有限公司制作發行
- Summary 更新時間:2021-07-02 20:14:35
- Authentication versus authorization
- OAuth 2 architecture and basics
- Reading a JWT in Go
- Creating a JWT in Go
- Private claims
- Reserved claims
- JSON web token format
- Introduction to JSON Web Tokens (JWT) and OAuth2
- Persisting client sessions with Redis
- Introducing Postman a tool for testing REST API
- Session-based authentication
- How authentication works
- Getting the code
- Handling Authentication for Our REST Services
- Summary
- Other API gateways
- Kong CLI
- API rate limiting in Kong
- API authentication in Kong
- API logging in Kong
- Adding API to Kong
- Installing a Kong database and Kong
- Introducing Docker
- Kong an open-source API gateway
- Why is an API gateway required?
- Getting the code
- Using an API Gateway to Monitor and Metricize REST API
- Summary
- Installing Supervisord
- Monitoring our Go API server with Supervisord
- Securing our Nginx proxy server
- Rate limiting our REST API
- Load balancing with Nginx
- Creating a sample Go application and proxying it
- Using server blocks
- Important Nginx paths
- What is a proxy server?
- Installing and configuring Nginx
- Getting the code
- Deploying Our REST services
- Summary
- Adding instrumentation to your microservice
- Adding logging to your microservice
- Building a REST microservice with Go Kit
- Go Kit a package for building microservices
- Monolith versus microservices
- What are microservices?
- Getting the code
- Scaling Our REST API Using Microservices
- Summary
- Creating a unit testing tool for our URL shortening service
- Using Redis for caching the API data
- Creating a CLI tool as an API client for the GitHub REST API
- Getting comfortable with the GitHub REST API
- API overview of grequests
- grequests – a REST API package for Go
- Collecting command-line arguments in CLI
- CLI – a library for building beautiful clients
- Basics for writing a command-line tool in Go
- Plan for building a REST API client
- Getting the code
- Building a REST API Client in Go and Unit Testing
- Summary
- Implementing the e-commerce REST API
- GORM a powerful ORM for Go
- Exploring the JSON store in PostgreSQL
- Defining the Base62 algorithm
- Implementing a URL shortening service using Postgres and pq
- pq a pure PostgreSQL database driver for Go
- Adding users and databases in PostgreSQL
- Installing the PostgreSQL database
- Getting the code
- Working with PostgreSQL JSON and Go
- Summary
- Bidirectional streaming with GRPC
- Introduction to GRPC
- Compiling a protocol buffer with protoc
- Enumerations and repeated fields
- Scalar values
- Protocol buffer language
- Introduction to protocol buffers
- Getting the code
- Working with Protocol Buffers and GRPC
- Summary
- Designing an e-commerce data document model
- Boosting the querying performance with indexing
- RESTful API with Gorilla Mux and MongoDB
- Introducing mgo a MongoDB driver for Go
- Working with the Mongo shell
- Installing MongoDB and using the shell
- Introduction to MongoDB
- Getting the code
- Working with MongoDB and Go to Create REST APIs
- Summary
- Building a RESTful API with Revel.go
- Building RESTful APIs with the Gin framework
- Creating database models
- Design specification
- Building a Metro Rail API with go-restful
- CRUD operations and SQLite3 basics
- go-restful a framework for REST API creation
- Getting the code
- Simplifying RESTful Services with Popular Go Frameworks
- Summary
- JSON RPC using Gorilla RPC
- Creating an RPC client
- Creating an RPC server
- What is RPC?
- Using Gorilla's Handlers middleware for Logging
- Painless middleware chaining with Alice
- Multiple middleware and chaining
- Creating a basic middleware
- What is middleware?
- Getting the code
- Working with Middleware and RPC
- Summary
- Creating a basic API layout for URL shortening services
- SQL injections in URLs and ways to avoid them
- Host-based matching
- Query-based matching
- Encoded paths
- Strict Slash
- Path Prefix
- Custom paths
- Reverse mapping URL
- Fundamentals of Gorilla Mux
- Installation
- Introducing Gorilla Mux a powerful HTTP router
- Building the simple static file server in minutes
- Program explanation
- Installation
- Introducing httprouter a lightweight HTTP router
- Running the code
- Adding multiple handlers using ServeMux
- Running the code
- ServeMux a basic router in Go
- Running the code
- Understanding Go's net/http package
- Getting the code
- Handling Routing for Our REST Services
- Summary
- Understanding the gulpfile
- Using Gulp for creating auto code compiling and server reloading
- Installing supervisord
- Monitoring your Go web server with supervisord
- Live reloading the application with supervisord and Gulp
- Breaking down the code
- Building our first service – finding the Roman numeral
- Demystifying GOPATH
- Setting up the project and running the development server
- Why Go for REST API development?
- Old and new ways of data flow in SPA
- Rise of REST API with Single Page Applications
- 5xx family (server error)
- 4xx family (client error)
- 3xx family (redirection)
- 2xx family (successful)
- Types of status codes
- Cross-Origin Resource Sharing (CORS)
- DELETE and OPTIONS
- POST PUT and PATCH
- GET
- REST verbs and status codes
- Characteristics of REST services
- REST API
- Types of web services
- Getting Started with REST API Development
- Questions
- Piracy
- Errata
- Downloading the color images of this book
- Downloading the example code
- Customer support
- Reader feedback
- Conventions
- Who this book is for
- What you need for this book
- What this book covers
- Preface
- Customer Feedback
- Why subscribe?
- www.PacktPub.com
- About the Reviewer
- Acknowledgments
- About the Author
- Credits
- 版權信息
- 封面
- 封面
- 版權信息
- Credits
- About the Author
- Acknowledgments
- About the Reviewer
- www.PacktPub.com
- Why subscribe?
- Customer Feedback
- Preface
- What this book covers
- What you need for this book
- Who this book is for
- Conventions
- Reader feedback
- Customer support
- Downloading the example code
- Downloading the color images of this book
- Errata
- Piracy
- Questions
- Getting Started with REST API Development
- Types of web services
- REST API
- Characteristics of REST services
- REST verbs and status codes
- GET
- POST PUT and PATCH
- DELETE and OPTIONS
- Cross-Origin Resource Sharing (CORS)
- Types of status codes
- 2xx family (successful)
- 3xx family (redirection)
- 4xx family (client error)
- 5xx family (server error)
- Rise of REST API with Single Page Applications
- Old and new ways of data flow in SPA
- Why Go for REST API development?
- Setting up the project and running the development server
- Demystifying GOPATH
- Building our first service – finding the Roman numeral
- Breaking down the code
- Live reloading the application with supervisord and Gulp
- Monitoring your Go web server with supervisord
- Installing supervisord
- Using Gulp for creating auto code compiling and server reloading
- Understanding the gulpfile
- Summary
- Handling Routing for Our REST Services
- Getting the code
- Understanding Go's net/http package
- Running the code
- ServeMux a basic router in Go
- Running the code
- Adding multiple handlers using ServeMux
- Running the code
- Introducing httprouter a lightweight HTTP router
- Installation
- Program explanation
- Building the simple static file server in minutes
- Introducing Gorilla Mux a powerful HTTP router
- Installation
- Fundamentals of Gorilla Mux
- Reverse mapping URL
- Custom paths
- Path Prefix
- Strict Slash
- Encoded paths
- Query-based matching
- Host-based matching
- SQL injections in URLs and ways to avoid them
- Creating a basic API layout for URL shortening services
- Summary
- Working with Middleware and RPC
- Getting the code
- What is middleware?
- Creating a basic middleware
- Multiple middleware and chaining
- Painless middleware chaining with Alice
- Using Gorilla's Handlers middleware for Logging
- What is RPC?
- Creating an RPC server
- Creating an RPC client
- JSON RPC using Gorilla RPC
- Summary
- Simplifying RESTful Services with Popular Go Frameworks
- Getting the code
- go-restful a framework for REST API creation
- CRUD operations and SQLite3 basics
- Building a Metro Rail API with go-restful
- Design specification
- Creating database models
- Building RESTful APIs with the Gin framework
- Building a RESTful API with Revel.go
- Summary
- Working with MongoDB and Go to Create REST APIs
- Getting the code
- Introduction to MongoDB
- Installing MongoDB and using the shell
- Working with the Mongo shell
- Introducing mgo a MongoDB driver for Go
- RESTful API with Gorilla Mux and MongoDB
- Boosting the querying performance with indexing
- Designing an e-commerce data document model
- Summary
- Working with Protocol Buffers and GRPC
- Getting the code
- Introduction to protocol buffers
- Protocol buffer language
- Scalar values
- Enumerations and repeated fields
- Compiling a protocol buffer with protoc
- Introduction to GRPC
- Bidirectional streaming with GRPC
- Summary
- Working with PostgreSQL JSON and Go
- Getting the code
- Installing the PostgreSQL database
- Adding users and databases in PostgreSQL
- pq a pure PostgreSQL database driver for Go
- Implementing a URL shortening service using Postgres and pq
- Defining the Base62 algorithm
- Exploring the JSON store in PostgreSQL
- GORM a powerful ORM for Go
- Implementing the e-commerce REST API
- Summary
- Building a REST API Client in Go and Unit Testing
- Getting the code
- Plan for building a REST API client
- Basics for writing a command-line tool in Go
- CLI – a library for building beautiful clients
- Collecting command-line arguments in CLI
- grequests – a REST API package for Go
- API overview of grequests
- Getting comfortable with the GitHub REST API
- Creating a CLI tool as an API client for the GitHub REST API
- Using Redis for caching the API data
- Creating a unit testing tool for our URL shortening service
- Summary
- Scaling Our REST API Using Microservices
- Getting the code
- What are microservices?
- Monolith versus microservices
- Go Kit a package for building microservices
- Building a REST microservice with Go Kit
- Adding logging to your microservice
- Adding instrumentation to your microservice
- Summary
- Deploying Our REST services
- Getting the code
- Installing and configuring Nginx
- What is a proxy server?
- Important Nginx paths
- Using server blocks
- Creating a sample Go application and proxying it
- Load balancing with Nginx
- Rate limiting our REST API
- Securing our Nginx proxy server
- Monitoring our Go API server with Supervisord
- Installing Supervisord
- Summary
- Using an API Gateway to Monitor and Metricize REST API
- Getting the code
- Why is an API gateway required?
- Kong an open-source API gateway
- Introducing Docker
- Installing a Kong database and Kong
- Adding API to Kong
- API logging in Kong
- API authentication in Kong
- API rate limiting in Kong
- Kong CLI
- Other API gateways
- Summary
- Handling Authentication for Our REST Services
- Getting the code
- How authentication works
- Session-based authentication
- Introducing Postman a tool for testing REST API
- Persisting client sessions with Redis
- Introduction to JSON Web Tokens (JWT) and OAuth2
- JSON web token format
- Reserved claims
- Private claims
- Creating a JWT in Go
- Reading a JWT in Go
- OAuth 2 architecture and basics
- Authentication versus authorization
- Summary 更新時間:2021-07-02 20:14:35