├── .air.toml ├── .env.sample ├── .github └── ISSUE_TEMPLATE │ ├── bug_report.md │ └── feature_request.md ├── .gitignore ├── LICENSE ├── Readme.md ├── api ├── resource │ ├── health │ │ ├── handler.go │ │ └── model.go │ ├── item │ │ ├── handler.go │ │ ├── model.go │ │ ├── repository.go │ │ └── service.go │ └── migrations.go └── router │ ├── item_router.go │ ├── middleware │ ├── authentication.go │ ├── content_type.go │ ├── cors.go │ ├── inject_deps.go │ ├── middlewares.go │ ├── request_id.go │ └── requestlog.go │ └── router.go ├── cmd └── main.go ├── config └── config.go ├── generate_tokens.py ├── go.mod ├── go.sum └── pkg ├── constants └── consts.go ├── contextkeys ├── contextkeys.go └── helpers.go ├── logger └── logger.go ├── router ├── mount.go └── respond.go └── validator ├── context_validator.go └── json_validator.go /.air.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/.air.toml -------------------------------------------------------------------------------- /.env.sample: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/.env.sample -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/.github/ISSUE_TEMPLATE/bug_report.md -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/.github/ISSUE_TEMPLATE/feature_request.md -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/.gitignore -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/LICENSE -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/Readme.md -------------------------------------------------------------------------------- /api/resource/health/handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/resource/health/handler.go -------------------------------------------------------------------------------- /api/resource/health/model.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/resource/health/model.go -------------------------------------------------------------------------------- /api/resource/item/handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/resource/item/handler.go -------------------------------------------------------------------------------- /api/resource/item/model.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/resource/item/model.go -------------------------------------------------------------------------------- /api/resource/item/repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/resource/item/repository.go -------------------------------------------------------------------------------- /api/resource/item/service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/resource/item/service.go -------------------------------------------------------------------------------- /api/resource/migrations.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/resource/migrations.go -------------------------------------------------------------------------------- /api/router/item_router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/router/item_router.go -------------------------------------------------------------------------------- /api/router/middleware/authentication.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/router/middleware/authentication.go -------------------------------------------------------------------------------- /api/router/middleware/content_type.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/router/middleware/content_type.go -------------------------------------------------------------------------------- /api/router/middleware/cors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/router/middleware/cors.go -------------------------------------------------------------------------------- /api/router/middleware/inject_deps.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/router/middleware/inject_deps.go -------------------------------------------------------------------------------- /api/router/middleware/middlewares.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/router/middleware/middlewares.go -------------------------------------------------------------------------------- /api/router/middleware/request_id.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/router/middleware/request_id.go -------------------------------------------------------------------------------- /api/router/middleware/requestlog.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/router/middleware/requestlog.go -------------------------------------------------------------------------------- /api/router/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/api/router/router.go -------------------------------------------------------------------------------- /cmd/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/cmd/main.go -------------------------------------------------------------------------------- /config/config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/config/config.go -------------------------------------------------------------------------------- /generate_tokens.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/generate_tokens.py -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/go.sum -------------------------------------------------------------------------------- /pkg/constants/consts.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/pkg/constants/consts.go -------------------------------------------------------------------------------- /pkg/contextkeys/contextkeys.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/pkg/contextkeys/contextkeys.go -------------------------------------------------------------------------------- /pkg/contextkeys/helpers.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/pkg/contextkeys/helpers.go -------------------------------------------------------------------------------- /pkg/logger/logger.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/pkg/logger/logger.go -------------------------------------------------------------------------------- /pkg/router/mount.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/pkg/router/mount.go -------------------------------------------------------------------------------- /pkg/router/respond.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/pkg/router/respond.go -------------------------------------------------------------------------------- /pkg/validator/context_validator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/pkg/validator/context_validator.go -------------------------------------------------------------------------------- /pkg/validator/json_validator.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Trakora/production-go-api-template/HEAD/pkg/validator/json_validator.go --------------------------------------------------------------------------------