/ mozey.co / blog

golang microservice

February 1, 2016

🔗 Micro-Framework

🔗 negroni

The router gorilla mux fully supports net/http

Comes with lots of middleware

🔗 goji

Choosing Libraries for Go Web Servers

negroni requires middleware for graceful shutdown and routing capability… goji is a good balance?

Project	        Lines of Go code

beego	        26,510
revel	        7,278
> goji	        4,131
> gorilla/mux	2,259
gin	            2,172
martini	        1,685
> negroni	    590

🔗 Middleware

🔗 restgate

RestGate middleware provides secure authentication for your REST API endpoints.

For free SSL certs see letsencrypt or startssl

🔗 binding and validation

Data binding from HTTP requests into structs

🔗 render

Render JSON, XML and HTML templates

🔗 gzip

GZIP response compression

🔗 context

HTTP Request Contexts & Go

Request contexts… a way to pass data alongside a HTTP request as it is processed by… middleware. This data could be a user ID, a CSRF token…

🔗 sessions

🔗 secure

🔗 nosurf

🔗 logrus





n.Run is a convenience wrapper for ListenAndServe, so ListenAndServeTLS should just work?

🔗 Tutorials

🔗 Microservice in 5 minutes with Go

0 to Microservice in 5 minutes with Go, go-microservice-template and Minke

hacker news discussion

🔗 Making a RESTful JSON API in Go

github source

json web tokens

🔗 Validation



🔗 Rookie Mistakes

🔗 Go Is Unapologetically Flawed

🔗 Workers / Scaling

Handling 1 Million Requests per Minute with Go

Auto-scaling and self-defensive services in Golang

🔗 UI

What’s the best way to bundle static resources in a Go program?

🔗 Go Proverbs

🔗 Seed

Negroni Example Postgres

Negroni Example MySQL