I started this day from researching postgres migration tools for golang. I decided to use goose package for the sake of it’s simplicity.
I am also working on endpoint authorization. I am planing to create a table for access tokens with default UUIDv4 value and an index for fast retrieval. In the future I should leverage faster caching solution like redis.
I am also taking a step back to automate database initiation. This will come useful for integration testing later. For now this will be a bunch of shell and sql scripts probably called by a docker file. The database initiation consist of:
– creation of postgres roles
– creation of three schemas – one for postgis extension, one for gadm database and one for tables related to the api like e.g. access tokens table.
– GADM geopackage ingestion ( requires GDAL installation )
– cleanup