- Config file reading (viper)
- Migrations (golang-migrate + pkger)
- Compile-time Dependency Injection (google/wire)
- Working with database (where is no GORM in this skeleton but you can easily integrate it)
- Token-Based Authentication (with sliding sessions)
Tests will be soon :)
- Create migration file in
/migrations
directory (also you can use CLI for it). - Build your application.
- Migrations applying automatically after you run compiled binary file.
google/wire - DI without magic and run-time reflection.
To append new service to initialization you should:
- Create service and "provider" for it (see NewUsersAPI in
/api/users.go
for example). - Inject provider to initialization in
wire.go
(first line//+build wireinject
is definitely needed) - Run
wire
command to generatewire_gen.go
(file with generated initialization steps) - Build/Run your app
Also you can read detailed tutorial.