API can now be started without properly configured SMTP (it complains when it is used)
Send() function can now use alternative dialers (mostly used for testing)
Added mailhog service (make mailhog.up) to ease mail testing
Add default .env example that points to localhost:1025 (mailhog) setup
Proper unit testing
- upd(all): indent spec.json files on all apps
- upd(auth): rename auth app to cmd
- upd(sam): move orgs, teams to system
- upd(system): extend spec.json for check
- upd(codegen): include system/
- upd(codegen): always generate spec files
- upd(sam): references from auth to system
- 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