A multitenantStack in beego, backend only, using postgres
Go to file
2018-11-13 19:03:00 +01:00
conf Changing companydb to read config file 2018-11-13 19:02:47 +01:00
controllers Some additions 2018-11-12 11:43:14 +01:00
database Adding migrations 2018-11-13 19:03:00 +01:00
models Moving Services to seperate namespaces again, auth endpoint working 2018-11-08 08:36:08 +01:00
routers adding error handling and other things 2018-11-07 16:27:39 +01:00
services Changing companydb to read config file 2018-11-13 19:02:47 +01:00
swagger Moving files and adding auth 2018-11-07 11:10:51 +01:00
tests jwt validation, getting the correct database 2018-11-07 20:13:26 +01:00
.gitignore remove lastupdate 2018-11-12 12:31:12 +01:00
bee.json adding error handling and other things 2018-11-07 16:27:39 +01:00
Dockerfile Adding generated dockerfile 2018-11-06 13:02:44 +01:00
main.go Changing companydb to read config file 2018-11-13 19:02:47 +01:00
Readme.md Update todo 2018-11-13 19:02:00 +01:00

MutlitenantStack

This is a project to demonstrate multi tenancy usage in beego using postgres and separated databases

The api was scaffolded using:

bee api multitenantStack -driver=postgres -conn="host=127.0.0.1 port=5435 user=postgres password=postgre dbname=company_template sslmode=disable"

then `bee run -downdoc=true``

To regenerate docs simply run bee generate docs

TODO

Todo till we can fork this repo

  • Not found for endpoints should be Json response
  • migrations for company_template
  • hardcoded roles
  • /register endpoint creates database, company and first admin
  • checking some roles in all endpoints
  • load db connections from config
  • user delete needs to update system
  • company delete needs to exist and update company

Notes:

  • Fixes have been placed into the beego orm for setting the timezone when using NewOrmWithDB()

Script

  • script that runs all migrations (and passes through rollback or others, show states for company, run for single company) (list, connect, migrate)