diff options
author | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-09 18:39:48 -0700 |
---|---|---|
committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-05-09 18:39:48 -0700 |
commit | abb4e98e740b8695eae235b6459023cf9e6dfeeb (patch) | |
tree | b5dbf8e5c57289f1b71682c7a85467f7dd1a2e8c | |
parent | 0679a97b88b1be704fbbfa0b498cfc289fdde6ae (diff) | |
download | fatcat-abb4e98e740b8695eae235b6459023cf9e6dfeeb.tar.gz fatcat-abb4e98e740b8695eae235b6459023cf9e6dfeeb.zip |
update notes/docs
-rw-r--r-- | golang/README.md | 2 | ||||
-rw-r--r-- | notes/golang.txt | 24 |
2 files changed, 17 insertions, 9 deletions
diff --git a/golang/README.md b/golang/README.md index 49410352..c0e3da5e 100644 --- a/golang/README.md +++ b/golang/README.md @@ -15,6 +15,8 @@ fatcatd is essentially just glue between two declarative schemas: - postgres 9.6+ running locally - golang environment configured - https://github.com/golang/dep +- checkout (or symlink) this repo to $GOPATH/src/git.archive.org/bnewbold/fatcat +- dep ensure On debian/ubuntu: 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 |