aboutsummaryrefslogtreecommitdiffstats
path: root/notes/golang.txt
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2018-05-09 18:39:48 -0700
committerBryan Newbold <bnewbold@robocracy.org>2018-05-09 18:39:48 -0700
commitabb4e98e740b8695eae235b6459023cf9e6dfeeb (patch)
treeb5dbf8e5c57289f1b71682c7a85467f7dd1a2e8c /notes/golang.txt
parent0679a97b88b1be704fbbfa0b498cfc289fdde6ae (diff)
downloadfatcat-abb4e98e740b8695eae235b6459023cf9e6dfeeb.tar.gz
fatcat-abb4e98e740b8695eae235b6459023cf9e6dfeeb.zip
update notes/docs
Diffstat (limited to 'notes/golang.txt')
-rw-r--r--notes/golang.txt24
1 files changed, 15 insertions, 9 deletions
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