Home Page Icon
Home Page
Table of Contents for
Table of Contents
Close
Table of Contents
by Nathan Kozyra
Learning Go Web Development
Learning Go Web Development
Table of Contents
Learning Go Web Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
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
1. Introducing and Setting Up Go
Installing Go
Structuring a project
Code conventions
Importing packages
Handling private repositories
Dealing with versioning
Introducing the net package
Hello, Web
Summary
2. Serving and Routing
Serving files directly
Basic routing
Using more complex routing with Gorilla
Redirecting requests
Serving basic errors
Summary
3. Connecting to Data
Connecting to a database
Creating a MySQL database
Using GUID for prettier URLs
Handling 404s
Summary
4. Using Templates
Introducing templates, context, and visibility
HTML templates and text templates
Displaying variables and security
Using logic and control structures
Summary
5. Frontend Integration with RESTful APIs
Setting up the basic API endpoint
RESTful architecture and best practices
Creating our first API endpoint
Implementing security
Creating data with POST
Modifying data with PUT
Summary
6. Sessions and Cookies
Setting cookies
Capturing user information
Creating users
Enabling sessions
Letting users register
Letting users log in
Initiating a server-side session
Creating a store
Utilizing flash messages
Summary
7. Microservices and Communication
Introducing the microservice approach
Pros and cons of utilizing microservices
Understanding the heart of microservices
Communicating between microservices
Putting a message on the wire
Reading from another service
Summary
8. Logging and Testing
Introducing logging in Go
Logging to IO
Multiple loggers
Formatting your output
Using panics and fatal errors
Introducing testing in Go
Summary
9. Security
HTTPS everywhere – implementing TLS
Preventing SQL injection
Protecting against XSS
Preventing cross-site request forgery (CSRF)
Securing cookies
Using the secure middleware
Summary
10. Caching, Proxies and Improved Performance
Identifying bottlenecks
Implementing reverse proxies
Implementing caching strategies
Using Least Recently Used
Caching by file
Caching in memory
Implementing HTTP/2
Summary
Index
Search in book...
Toggle Font Controls
Playlists
Add To
Create new playlist
Name your new playlist
Playlist description (optional)
Cancel
Create playlist
Sign In
Email address
Password
Forgot Password?
Create account
Login
or
Continue with Facebook
Continue with Google
Sign Up
Full Name
Email address
Confirm Email Address
Password
Login
Create account
or
Continue with Facebook
Continue with Google
Prev
Previous Chapter
Cover
Next
Next Chapter
Learning Go Web Development
Table of Contents
Learning Go Web Development
Credits
About the Author
About the Reviewer
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
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
1. Introducing and Setting Up Go
Installing Go
Structuring a project
Code conventions
Importing packages
Handling private repositories
Dealing with versioning
Introducing the net package
Hello, Web
Summary
2. Serving and Routing
Serving files directly
Basic routing
Using more complex routing with Gorilla
Redirecting requests
Serving basic errors
Summary
3. Connecting to Data
Connecting to a database
Creating a MySQL database
Using GUID for prettier URLs
Handling 404s
Summary
4. Using Templates
Introducing templates, context, and visibility
HTML templates and text templates
Displaying variables and security
Using logic and control structures
Summary
5. Frontend Integration with RESTful APIs
Setting up the basic API endpoint
RESTful architecture and best practices
Creating our first API endpoint
Implementing security
Creating data with POST
Modifying data with PUT
Summary
6. Sessions and Cookies
Setting cookies
Capturing user information
Creating users
Enabling sessions
Letting users register
Letting users log in
Initiating a server-side session
Creating a store
Utilizing flash messages
Summary
7. Microservices and Communication
Introducing the microservice approach
Pros and cons of utilizing microservices
Understanding the heart of microservices
Communicating between microservices
Putting a message on the wire
Reading from another service
Summary
8. Logging and Testing
Introducing logging in Go
Logging to IO
Multiple loggers
Formatting your output
Using panics and fatal errors
Introducing testing in Go
Summary
9. Security
HTTPS everywhere – implementing TLS
Preventing SQL injection
Protecting against XSS
Preventing cross-site request forgery (CSRF)
Securing cookies
Using the secure middleware
Summary
10. Caching, Proxies and Improved Performance
Identifying bottlenecks
Implementing reverse proxies
Implementing caching strategies
Using Least Recently Used
Caching by file
Caching in memory
Implementing HTTP/2
Summary
Index
Add Highlight
No Comment
..................Content has been hidden....................
You can't read the all page of ebook, please click
here
login for view all page.
Day Mode
Cloud Mode
Night Mode
Reset