Production ready RESTful API service.
Garagesale is a production ready RESTful API service running on docker. It is build without any framework to keep the service as light as possible.
This is a product of my work while training for Go based web services.
The open source training material is provided by Ardan Labs.
Tech stack
Run on local system
- Run
docker-compose up
- Use
cmd/sales-admin/main.go
to migrate schema / seed database / add user / generate private key - User
cmd/sales-api/main.go
to start the sales API which listens at localhost:8000 by default
A consolidated list of resources I found useful.
(Please raise an issue if you find broken links)
- The complete guide to Go net/http timeouts
- So you want to expose Go on the Internet
- Parsing JSON files With Golang
- Go database/sql tutorial
- Docker Compose
- Docker logs
- Package Oriented Design
- Package conf
- Error Handling in Go
- Package initialization and program execution order
- How to collect, standardize, and centralize Golang logs
- Error handling and Go
- Structs and Interfaces (This is part of a book from 2012. Outdated, but a good read nonetheless.)
- Understanding the context package in golang
- Go: Context and Cancellation by Propagation
- PostgreSQL Joins
- PostgreSQL SUM Function
- Profiling Go Programs
- Middleware (Advanced)
- Creating a Middleware in Golang for JWT based Authentication
- How to instrument Go code with custom expvar metrics
- Go App Monitoring: expvar, Prometheus and StatsD
- Expose application metrics with expvar
- Golang context.WithValue
- How to pass context in golang request to middleware
- How To Use Struct Tags in Go
- Tags in Golang
- JSON Web Token Claims
- Implementing JSON Web Token (JWT) to secure your app
- Symmetric vs Asymmetric JWTs
- Hacking JSON Web Tokens (JWTs)
- Critical vulnerabilities in JSON Web Token libraries
- Zipkin Tutorial: Get Started Easily With Distributed Tracing
- OpenCensus Tracing