kisamoto / cookiecutter-golang-api

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Cookiecutter Go API

An opinionated template to create Go powered API's. Whilst this is primarily for how I create projects I am always looking for improvements and other options - Pull requests welcome.

The aim here is to have the right balance between speed (both development and runtime), flexibility and modularity.

Usage

With cookiecutter installed, run:

$ cookiecutter gh:kisamoto/cookiecutter-golang-api

More info

More information is found in the internal README

ToDo

  • Authentication - Replace custom authentication with Authboss
  • Role Based Access Control - Add permissions and roles detailed in README to database and implement Authorisation checks.
  • Dockerfile - Minimal docker image for app only. Use official images for DB/Cache/Web Server wherever possible.
  • docker-compose.yml - Cluster docker-compose file. Web server; App; PostgreSQL; Redis
  • Caddyfile - Configured without Let's Encrypt for development usage but as close to production setup as possible. Includes link to ReDoc documentation app.
  • Makefile - Should include commands to build API; deploy with Docker; setup cluster with docker-compose; unit test API; functionally test API
  • Pagination - Implement 'offset' and 'cursor' based Pagination interfaces
  • Accept other encodings. By default JSON (gzipped) is used as the communication encoding between client and server. Investigate and benchmark using Protobuf as a smaller, typed communication protocol. Protobuf could also be used as the binary storage layer in the cache to keep size down.

About

License:Other


Languages

Language:Go 62.5%Language:PLpgSQL 23.5%Language:Makefile 14.1%