From abb4e98e740b8695eae235b6459023cf9e6dfeeb Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 9 May 2018 18:39:48 -0700 Subject: update notes/docs --- notes/golang.txt | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'notes') diff --git a/notes/golang.txt b/notes/golang.txt index 0730f409..404741e8 100644 --- a/notes/golang.txt +++ b/notes/golang.txt @@ -1,25 +1,31 @@ ## Database Schema / ORM / Generation +start simple, with pg (or sqlx if we wanted to be DB-agnostic): - pq: basic postgres driver and ORM (similar to sqlalchemy?) - sqlx: small extensions to builtin sql; row to struct mapping -code generation from SQL schema: +debug postgres with gocmdpev + +later, if code is too duplicated, look in to sqlboiler (first) or xo (second): - https://github.com/xo/xo - https://github.com/volatiletech/sqlboiler -- kallax -database migrations: -- goose -- https://github.com/mattes/migrate +later, to do migrations, use goose, or consider alembic (python) for +auto-generation +- https://github.com/steinbacher/goose +- possibly auto-generate with python alembic -maybe also: +for identifiers, consider either built-in postgres UUID, or: +- https://github.com/rs/xid - https://github.com/oklog/ulid like a UUID, but base32 and "sortable" (timestamp + random) -for auth, start with oauth2... orcid? +## API In General -debug postgres with gocmdpev +Hope to use Kong for authentication. + +start with oauth2... orcid? ## OpenAPI/Swagger @@ -35,5 +41,5 @@ also look at ReDoc as a UI; all in-brower generated from JSON (react) ## Non-API stuff - logrus structured logging (or zap?) -- testify tests +- testify tests (and assert?) - viper config -- cgit v1.2.3