The cloud portion of Nidus
This makes it much easier to troubleshoot information related to a cell by showing detailed data about a single cell. At this point much is a placeholder, but we at least get the cell boundary coordinates and a map. This also starts to make some code common around doing things like mapping. |
||
|---|---|---|
| arcgis-go@6344702fe1 | ||
| dberrors | ||
| dbinfo | ||
| enums | ||
| factory | ||
| migrations | ||
| models | ||
| sql | ||
| static | ||
| templates | ||
| .air.toml | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| arcgis.go | ||
| auth.go | ||
| bobgen.yaml | ||
| content_negotiation.go | ||
| database.go | ||
| default.nix | ||
| endpoint.go | ||
| errors.go | ||
| fileserver.go | ||
| flake.lock | ||
| flake.nix | ||
| go.mod | ||
| go.sum | ||
| h3.go | ||
| html.go | ||
| lefthook.yml | ||
| LICENSE | ||
| main.go | ||
| notification.go | ||
| README.md | ||
| response.go | ||
| strings.go | ||
Nidus Sync
This is the software that powers Nidus Cloud Sync.
Building from source
First, you'll need Nix.
Then:
nix develop
go build .
Running
> BASE_URL=https://sync.nidus.cloud ARCGIS_CLIENT_ID=foo ARCGIS_CLIENT_SECRET=bar POSTGRES_DSN='postgresql://?host=/var/run/postgresql&dbname=nidus-sync' ./nidus-sync
Hacking
air
This project uses air for fast compile-and-test loops. You can run it with:
> BASE_URL=https://sync.nidus.cloud ARCGIS_CLIENT_ID=foo ARCGIS_CLIENT_SECRET=bar POSTGRES_DSN='postgresql://?host=/var/run/postgresql&dbname=nidus-sync' air
bob
This uses the bob query framework. You can regenerate the models for bob with:
PSQL_DSN="postgresql://dbname?host=/var/run/postgresql&sslmode=disable" go run github.com/stephenafamo/bob/gen/bobgen-psql@latest"
PSQL_DSN="postgresql://?host=/var/run/postgresql&sslmode=disable&dbname=nidus-sync" go run github.com/stephenafamo/bob/gen/bobgen-psql@latest
This will generate a bunch of files. They're already committed, you only need this if you change the database schema in some way.
goose
This uses goose. You can use the goose command line to check status and make changes
> cd migrations
> GOOSE_DRIVER=postgres GOOSE_DBSTRING="dbname=nidus-sync sslmode=disable" goose status
> GOOSE_DRIVER=postgres GOOSE_DBSTRING="dbname=nidus-sync sslmode=disable" goose down
> GOOSE_DRIVER=postgres GOOSE_DBSTRING="dbname=nidus-sync sslmode=disable" goose up