- config fixes for singleton values (most)
- add monitor into internal/metrics
- clean up cmd folders to remove monitor
- implement versions on all apps
- moved rbac store and config to internal pkg,
- split auth authenticators to internal pkg,
- add rbac config object to internal/config,
- update package imports and references for auth,
- clean up main with pkg aliases
- introduces auth package, for common (sam, crm) auth handlers
- routes are now generated inside server package, each handler got its own MountRoutes(r chi.Router, middlewares ...func(http.Handler) http.Handler)
- there MountRoute methods are now called from non-generated code so we can inject services to (rest) controllers
For dsn & addr: explicit config via flag has priority over env variables. Final failsafe is hardcoded default values
Env variables:
- SAM_DB_DSN
- SAM_HTTP_ADDR