multitenantStack/Readme.md

47 lines
1.4 KiB
Markdown
Raw Permalink Normal View History

2018-11-06 11:31:49 +00:00
# MutlitenantStack
2018-11-07 10:10:51 +00:00
This is a project to demonstrate multi tenancy usage in beego using postgres and separated databases
2018-11-06 11:31:49 +00:00
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`
2018-11-07 10:10:51 +00:00
## TODO
2018-11-13 18:02:00 +00:00
Todo till we can fork this repo
2018-11-16 12:55:28 +00:00
- ~~/register endpoint creates database, company and first admin~~
- ~~load db connections from config~~
- ~~user delete needs to update system~~
- ~~company delete needs to exist and update usercompanymap~~
- ~~last modified in update for all tables~~
- ~~modifiedby (companyuserid) relation~~
- ~~checking some roles in all controller endpoints~~
- ~~return error in case of not found~~
- ~~go through all endpoints for errors~~
## Notes:
2018-11-14 17:49:49 +00:00
- Fixes have been placed into the beego orm for setting the timezone when using NewOrmWithDB() (Already merged)
- Bee needs the dir patch (merge pending)
2018-11-12 10:43:14 +00:00
2018-11-13 18:02:00 +00:00
## Script
2018-11-12 10:43:14 +00:00
2018-11-14 17:49:49 +00:00
- ~~script that runs all migrations (and passes through rollback or others, show states for company, run for single company) (list, connect, migrate)~~
2018-11-13 20:38:43 +00:00
## dependencies
github.com/kennygrant/sanitize
github.com/astaxie/beego
github.com/beego/bee
github.com/dgrijalva/jwt-go
golang.org/x/crypto/bcrypt
2018-11-17 11:30:51 +00:00
## Final Notes:
On 17.11.18 this project was considered a complete template and forked for granny