Skip to content

Simple clean Go REST API architecture with dependency injection and mocking example, following SOLID principles.

Notifications You must be signed in to change notification settings

apkatsikas/service-pattern-go

 
 

Repository files navigation

service-pattern-go

mocking

go tooling

  • i dont have GOROOT set
  • i deleted /usr/bin/go - go 1.15
  • to trace stuff between double quotes "PS4='+$BASH_SOURCE> ' BASH_XTRACEFD=7 bash -xl 7>&2"
  • check /etc/bash.bashrc
  • made a symlink like "ln -s /root/Go/bin/go1.20.1 /usr/bin/go"
  • be careful of /root/go vs /root/Go/

TODOS

  • update all deps once repo is ready
  • start with app serving CSV and /random endpoint
  • cleanup README
  • through composition, entity should have create/update dates
  • start new repo with this as boilerplate
  • make my model!
  • log rotation
  • figure out staticcheck or equivalent
  • negative input tests
  • 5 minute timer after insert - sync to GCS bucket
  • move from google drive to GCS bucket
  • backup logic - every night prob better than after every insert wait 5 mins...
  • suppress sqlite warnings
  • get this working in digital ocean
  • try 3 month kubernetes from google
  • create e2e tests
  • kubernetes/docker
  • GCS
  • GCS auth
  • VACUUM main into '/mnt/c/Users/apkat/Desktop/vacuum.sqlite';
  • ATTACH "/mnt/c/Users/apkat/Desktop/vacuum.sqlite" as main2;

RUnning

  • docker build -t test .
  • docker run -p 8080:8080 test

About

Simple clean Go REST API architecture with dependency injection and mocking example, following SOLID principles.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 96.3%
  • Makefile 2.7%
  • Dockerfile 1.0%