/garagesale

A RESTful Go web service

Primary LanguageGo

GitHub go.mod Go version  Go Report Card

Image

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

  1. Go's net/http
  2. Docker
  3. PostgreSQL
  4. JSON Web Tokens
  5. Zipkin
  6. OpenCensus

Run on local system

  1. Run docker-compose up
  2. Use cmd/sales-admin/main.go to migrate schema / seed database / add user / generate private key
  3. 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)

  1. The complete guide to Go net/http timeouts
  2. So you want to expose Go on the Internet
  3. Parsing JSON files With Golang
  4. Go database/sql tutorial
  5. Docker Compose
  6. Docker logs
  7. Package Oriented Design
  8. Package conf
  9. Error Handling in Go
  10. Package initialization and program execution order
  11. How to collect, standardize, and centralize Golang logs
  12. Error handling and Go
  13. Structs and Interfaces (This is part of a book from 2012. Outdated, but a good read nonetheless.)
  14. Understanding the context package in golang
  15. Go: Context and Cancellation by Propagation
  16. PostgreSQL Joins
  17. PostgreSQL SUM Function
  18. Profiling Go Programs
  19. Middleware (Advanced)
  20. Creating a Middleware in Golang for JWT based Authentication
  21. How to instrument Go code with custom expvar metrics
  22. Go App Monitoring: expvar, Prometheus and StatsD
  23. Expose application metrics with expvar
  24. Golang context.WithValue
  25. How to pass context in golang request to middleware
  26. How To Use Struct Tags in Go
  27. Tags in Golang
  28. JSON Web Token Claims
  29. Implementing JSON Web Token (JWT) to secure your app
  30. Symmetric vs Asymmetric JWTs
  31. Hacking JSON Web Tokens (JWTs)
  32. Critical vulnerabilities in JSON Web Token libraries
  33. Zipkin Tutorial: Get Started Easily With Distributed Tracing
  34. OpenCensus Tracing