├── .air.toml ├── .env.example ├── .github └── workflows │ ├── build.yml │ ├── linter.yml │ └── test.yml ├── .gitignore ├── .golangci.yml ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── docker-compose.yml ├── go.mod ├── go.sum ├── src ├── config │ ├── config.go │ ├── fiber.go │ ├── oauth2.go │ ├── roles.go │ └── tokens.go ├── controller │ ├── auth_controller.go │ ├── health_check_controller.go │ └── user_controller.go ├── database │ ├── database.go │ ├── init │ │ └── init.sql │ └── migrations │ │ ├── 20240929085103_create-table-users.down.sql │ │ ├── 20240929085103_create-table-users.up.sql │ │ ├── 20240929085107_create-table-tokens.down.sql │ │ └── 20240929085107_create-table-tokens.up.sql ├── docs │ ├── docs.go │ ├── swagger.json │ └── swagger.yaml ├── main.go ├── middleware │ ├── auth.go │ ├── jwt.go │ ├── limiter.go │ ├── logger.go │ └── recover.go ├── model │ ├── token_model.go │ └── user_model.go ├── response │ ├── auth_response.go │ ├── error_response.go │ ├── example │ │ ├── error_example.go │ │ ├── example.go │ │ ├── health_check_example.go │ │ ├── token_example.go │ │ └── user_example.go │ ├── health_check_response.go │ ├── response.go │ └── user_response.go ├── router │ ├── auth_route.go │ ├── docs_route.go │ ├── health_check_route.go │ ├── router.go │ └── user_route.go ├── service │ ├── auth_service.go │ ├── email_service.go │ ├── health_check_service.go │ ├── token_service.go │ └── user_service.go ├── utils │ ├── bcrypt.go │ ├── error.go │ ├── logrus.go │ └── verify.go └── validation │ ├── auth_validation.go │ ├── custom_validation.go │ ├── user_validation.go │ └── validation.go └── test ├── fixture ├── token_fixture.go └── user_fixture.go ├── helper └── helper.go ├── init.go ├── integration ├── auth_test.go ├── health_check_test.go └── user_test.go └── unit └── model └── user_model_test.go /.air.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/.air.toml -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/.env.example -------------------------------------------------------------------------------- /.github/workflows/build.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/.github/workflows/build.yml -------------------------------------------------------------------------------- /.github/workflows/linter.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/.github/workflows/linter.yml -------------------------------------------------------------------------------- /.github/workflows/test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/.github/workflows/test.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/.gitignore -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/.golangci.yml -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/CODE_OF_CONDUCT.md -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/README.md -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/go.sum -------------------------------------------------------------------------------- /src/config/config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/config/config.go -------------------------------------------------------------------------------- /src/config/fiber.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/config/fiber.go -------------------------------------------------------------------------------- /src/config/oauth2.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/config/oauth2.go -------------------------------------------------------------------------------- /src/config/roles.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/config/roles.go -------------------------------------------------------------------------------- /src/config/tokens.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/config/tokens.go -------------------------------------------------------------------------------- /src/controller/auth_controller.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/controller/auth_controller.go -------------------------------------------------------------------------------- /src/controller/health_check_controller.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/controller/health_check_controller.go -------------------------------------------------------------------------------- /src/controller/user_controller.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/controller/user_controller.go -------------------------------------------------------------------------------- /src/database/database.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/database/database.go -------------------------------------------------------------------------------- /src/database/init/init.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/database/init/init.sql -------------------------------------------------------------------------------- /src/database/migrations/20240929085103_create-table-users.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS users; -------------------------------------------------------------------------------- /src/database/migrations/20240929085103_create-table-users.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/database/migrations/20240929085103_create-table-users.up.sql -------------------------------------------------------------------------------- /src/database/migrations/20240929085107_create-table-tokens.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS tokens; -------------------------------------------------------------------------------- /src/database/migrations/20240929085107_create-table-tokens.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/database/migrations/20240929085107_create-table-tokens.up.sql -------------------------------------------------------------------------------- /src/docs/docs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/docs/docs.go -------------------------------------------------------------------------------- /src/docs/swagger.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/docs/swagger.json -------------------------------------------------------------------------------- /src/docs/swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/docs/swagger.yaml -------------------------------------------------------------------------------- /src/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/main.go -------------------------------------------------------------------------------- /src/middleware/auth.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/middleware/auth.go -------------------------------------------------------------------------------- /src/middleware/jwt.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/middleware/jwt.go -------------------------------------------------------------------------------- /src/middleware/limiter.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/middleware/limiter.go -------------------------------------------------------------------------------- /src/middleware/logger.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/middleware/logger.go -------------------------------------------------------------------------------- /src/middleware/recover.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/middleware/recover.go -------------------------------------------------------------------------------- /src/model/token_model.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/model/token_model.go -------------------------------------------------------------------------------- /src/model/user_model.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/model/user_model.go -------------------------------------------------------------------------------- /src/response/auth_response.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/auth_response.go -------------------------------------------------------------------------------- /src/response/error_response.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/error_response.go -------------------------------------------------------------------------------- /src/response/example/error_example.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/example/error_example.go -------------------------------------------------------------------------------- /src/response/example/example.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/example/example.go -------------------------------------------------------------------------------- /src/response/example/health_check_example.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/example/health_check_example.go -------------------------------------------------------------------------------- /src/response/example/token_example.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/example/token_example.go -------------------------------------------------------------------------------- /src/response/example/user_example.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/example/user_example.go -------------------------------------------------------------------------------- /src/response/health_check_response.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/health_check_response.go -------------------------------------------------------------------------------- /src/response/response.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/response.go -------------------------------------------------------------------------------- /src/response/user_response.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/response/user_response.go -------------------------------------------------------------------------------- /src/router/auth_route.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/router/auth_route.go -------------------------------------------------------------------------------- /src/router/docs_route.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/router/docs_route.go -------------------------------------------------------------------------------- /src/router/health_check_route.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/router/health_check_route.go -------------------------------------------------------------------------------- /src/router/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/router/router.go -------------------------------------------------------------------------------- /src/router/user_route.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/router/user_route.go -------------------------------------------------------------------------------- /src/service/auth_service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/service/auth_service.go -------------------------------------------------------------------------------- /src/service/email_service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/service/email_service.go -------------------------------------------------------------------------------- /src/service/health_check_service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/service/health_check_service.go -------------------------------------------------------------------------------- /src/service/token_service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/service/token_service.go -------------------------------------------------------------------------------- /src/service/user_service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/service/user_service.go -------------------------------------------------------------------------------- /src/utils/bcrypt.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/utils/bcrypt.go -------------------------------------------------------------------------------- /src/utils/error.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/utils/error.go -------------------------------------------------------------------------------- /src/utils/logrus.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/utils/logrus.go -------------------------------------------------------------------------------- /src/utils/verify.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/utils/verify.go -------------------------------------------------------------------------------- /src/validation/auth_validation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/validation/auth_validation.go -------------------------------------------------------------------------------- /src/validation/custom_validation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/validation/custom_validation.go -------------------------------------------------------------------------------- /src/validation/user_validation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/validation/user_validation.go -------------------------------------------------------------------------------- /src/validation/validation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/src/validation/validation.go -------------------------------------------------------------------------------- /test/fixture/token_fixture.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/test/fixture/token_fixture.go -------------------------------------------------------------------------------- /test/fixture/user_fixture.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/test/fixture/user_fixture.go -------------------------------------------------------------------------------- /test/helper/helper.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/test/helper/helper.go -------------------------------------------------------------------------------- /test/init.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/test/init.go -------------------------------------------------------------------------------- /test/integration/auth_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/test/integration/auth_test.go -------------------------------------------------------------------------------- /test/integration/health_check_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/test/integration/health_check_test.go -------------------------------------------------------------------------------- /test/integration/user_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/test/integration/user_test.go -------------------------------------------------------------------------------- /test/unit/model/user_model_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/indrayyana/go-fiber-boilerplate/HEAD/test/unit/model/user_model_test.go --------------------------------------------------------------------------------