- You need to start docker container for postgres included.
docker-compose up -d
- Create tables and indexes
go run init_table.go
- To initialize a db store:
dbstore := postgres.NewDBA(dburl)
- To save a value:
dbstore.Save(dbObject)
- To retrieve by key:
dbstore.GetConfig(key)
- To retrieve by matching config name and value:
//returns config objects which have a url config and contains value "goo"
dbstore.GetConfigByProperty("url", "goo")