├── .dockerignore ├── .env.example ├── .github ├── dependabot.yml └── workflows │ └── ci.yml ├── .gitignore ├── .golangci.yml ├── Dockerfile ├── LICENSE ├── Makefile ├── README.md ├── README_CN.md ├── README_RU.md ├── cmd └── app │ └── main.go ├── config └── config.go ├── docker-compose-integration-test.yml ├── docker-compose.yml ├── docs ├── docs.go ├── img │ ├── example-http-db.png │ ├── layers-1.png │ ├── layers-2.png │ └── logo.svg ├── proto │ └── v1 │ │ ├── translation.history.pb.go │ │ ├── translation.history.proto │ │ └── translation.history_grpc.pb.go ├── swagger.json └── swagger.yaml ├── go.mod ├── go.sum ├── integration-test ├── Dockerfile └── integration_test.go ├── internal ├── app │ ├── app.go │ └── migrate.go ├── controller │ ├── amqp_rpc │ │ ├── router.go │ │ └── v1 │ │ │ ├── controller.go │ │ │ ├── router.go │ │ │ └── translation.go │ ├── grpc │ │ ├── router.go │ │ └── v1 │ │ │ ├── controller.go │ │ │ ├── response │ │ │ └── translation.history.go │ │ │ ├── router.go │ │ │ └── translation.go │ ├── http │ │ ├── middleware │ │ │ ├── logger.go │ │ │ └── recovery.go │ │ ├── router.go │ │ └── v1 │ │ │ ├── controller.go │ │ │ ├── error.go │ │ │ ├── request │ │ │ └── translate.go │ │ │ ├── response │ │ │ └── error.go │ │ │ ├── router.go │ │ │ └── translation.go │ └── nats_rpc │ │ ├── router.go │ │ └── v1 │ │ ├── controller.go │ │ ├── router.go │ │ └── translation.go ├── entity │ ├── translation.go │ └── translation.history.go ├── repo │ ├── contracts.go │ ├── persistent │ │ └── translation_postgres.go │ └── webapi │ │ └── translation_google.go └── usecase │ ├── contracts.go │ ├── mocks_repo_test.go │ ├── mocks_usecase_test.go │ ├── translation │ └── translation.go │ └── translation_test.go ├── migrations ├── 20210221023242_migrate_name.down.sql └── 20210221023242_migrate_name.up.sql ├── nginx └── nginx.conf └── pkg ├── grpcserver ├── options.go └── server.go ├── httpserver ├── options.go └── server.go ├── logger └── logger.go ├── nats └── nats_rpc │ ├── client │ ├── client.go │ └── options.go │ ├── errors.go │ └── server │ ├── options.go │ └── server.go ├── postgres ├── options.go └── postgres.go └── rabbitmq └── rmq_rpc ├── client ├── client.go └── options.go ├── connection.go ├── errors.go └── server ├── options.go └── server.go /.dockerignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/.dockerignore -------------------------------------------------------------------------------- /.env.example: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/.env.example -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/.github/dependabot.yml -------------------------------------------------------------------------------- /.github/workflows/ci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/.github/workflows/ci.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/.gitignore -------------------------------------------------------------------------------- /.golangci.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/.golangci.yml -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/Dockerfile -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/LICENSE -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/README.md -------------------------------------------------------------------------------- /README_CN.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/README_CN.md -------------------------------------------------------------------------------- /README_RU.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/README_RU.md -------------------------------------------------------------------------------- /cmd/app/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/cmd/app/main.go -------------------------------------------------------------------------------- /config/config.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/config/config.go -------------------------------------------------------------------------------- /docker-compose-integration-test.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docker-compose-integration-test.yml -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docker-compose.yml -------------------------------------------------------------------------------- /docs/docs.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/docs.go -------------------------------------------------------------------------------- /docs/img/example-http-db.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/img/example-http-db.png -------------------------------------------------------------------------------- /docs/img/layers-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/img/layers-1.png -------------------------------------------------------------------------------- /docs/img/layers-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/img/layers-2.png -------------------------------------------------------------------------------- /docs/img/logo.svg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/img/logo.svg -------------------------------------------------------------------------------- /docs/proto/v1/translation.history.pb.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/proto/v1/translation.history.pb.go -------------------------------------------------------------------------------- /docs/proto/v1/translation.history.proto: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/proto/v1/translation.history.proto -------------------------------------------------------------------------------- /docs/proto/v1/translation.history_grpc.pb.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/proto/v1/translation.history_grpc.pb.go -------------------------------------------------------------------------------- /docs/swagger.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/swagger.json -------------------------------------------------------------------------------- /docs/swagger.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/docs/swagger.yaml -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/go.sum -------------------------------------------------------------------------------- /integration-test/Dockerfile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/integration-test/Dockerfile -------------------------------------------------------------------------------- /integration-test/integration_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/integration-test/integration_test.go -------------------------------------------------------------------------------- /internal/app/app.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/app/app.go -------------------------------------------------------------------------------- /internal/app/migrate.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/app/migrate.go -------------------------------------------------------------------------------- /internal/controller/amqp_rpc/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/amqp_rpc/router.go -------------------------------------------------------------------------------- /internal/controller/amqp_rpc/v1/controller.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/amqp_rpc/v1/controller.go -------------------------------------------------------------------------------- /internal/controller/amqp_rpc/v1/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/amqp_rpc/v1/router.go -------------------------------------------------------------------------------- /internal/controller/amqp_rpc/v1/translation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/amqp_rpc/v1/translation.go -------------------------------------------------------------------------------- /internal/controller/grpc/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/grpc/router.go -------------------------------------------------------------------------------- /internal/controller/grpc/v1/controller.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/grpc/v1/controller.go -------------------------------------------------------------------------------- /internal/controller/grpc/v1/response/translation.history.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/grpc/v1/response/translation.history.go -------------------------------------------------------------------------------- /internal/controller/grpc/v1/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/grpc/v1/router.go -------------------------------------------------------------------------------- /internal/controller/grpc/v1/translation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/grpc/v1/translation.go -------------------------------------------------------------------------------- /internal/controller/http/middleware/logger.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/http/middleware/logger.go -------------------------------------------------------------------------------- /internal/controller/http/middleware/recovery.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/http/middleware/recovery.go -------------------------------------------------------------------------------- /internal/controller/http/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/http/router.go -------------------------------------------------------------------------------- /internal/controller/http/v1/controller.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/http/v1/controller.go -------------------------------------------------------------------------------- /internal/controller/http/v1/error.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/http/v1/error.go -------------------------------------------------------------------------------- /internal/controller/http/v1/request/translate.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/http/v1/request/translate.go -------------------------------------------------------------------------------- /internal/controller/http/v1/response/error.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/http/v1/response/error.go -------------------------------------------------------------------------------- /internal/controller/http/v1/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/http/v1/router.go -------------------------------------------------------------------------------- /internal/controller/http/v1/translation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/http/v1/translation.go -------------------------------------------------------------------------------- /internal/controller/nats_rpc/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/nats_rpc/router.go -------------------------------------------------------------------------------- /internal/controller/nats_rpc/v1/controller.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/nats_rpc/v1/controller.go -------------------------------------------------------------------------------- /internal/controller/nats_rpc/v1/router.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/nats_rpc/v1/router.go -------------------------------------------------------------------------------- /internal/controller/nats_rpc/v1/translation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/controller/nats_rpc/v1/translation.go -------------------------------------------------------------------------------- /internal/entity/translation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/entity/translation.go -------------------------------------------------------------------------------- /internal/entity/translation.history.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/entity/translation.history.go -------------------------------------------------------------------------------- /internal/repo/contracts.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/repo/contracts.go -------------------------------------------------------------------------------- /internal/repo/persistent/translation_postgres.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/repo/persistent/translation_postgres.go -------------------------------------------------------------------------------- /internal/repo/webapi/translation_google.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/repo/webapi/translation_google.go -------------------------------------------------------------------------------- /internal/usecase/contracts.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/usecase/contracts.go -------------------------------------------------------------------------------- /internal/usecase/mocks_repo_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/usecase/mocks_repo_test.go -------------------------------------------------------------------------------- /internal/usecase/mocks_usecase_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/usecase/mocks_usecase_test.go -------------------------------------------------------------------------------- /internal/usecase/translation/translation.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/usecase/translation/translation.go -------------------------------------------------------------------------------- /internal/usecase/translation_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/internal/usecase/translation_test.go -------------------------------------------------------------------------------- /migrations/20210221023242_migrate_name.down.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS history; -------------------------------------------------------------------------------- /migrations/20210221023242_migrate_name.up.sql: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/migrations/20210221023242_migrate_name.up.sql -------------------------------------------------------------------------------- /nginx/nginx.conf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/nginx/nginx.conf -------------------------------------------------------------------------------- /pkg/grpcserver/options.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/grpcserver/options.go -------------------------------------------------------------------------------- /pkg/grpcserver/server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/grpcserver/server.go -------------------------------------------------------------------------------- /pkg/httpserver/options.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/httpserver/options.go -------------------------------------------------------------------------------- /pkg/httpserver/server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/httpserver/server.go -------------------------------------------------------------------------------- /pkg/logger/logger.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/logger/logger.go -------------------------------------------------------------------------------- /pkg/nats/nats_rpc/client/client.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/nats/nats_rpc/client/client.go -------------------------------------------------------------------------------- /pkg/nats/nats_rpc/client/options.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/nats/nats_rpc/client/options.go -------------------------------------------------------------------------------- /pkg/nats/nats_rpc/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/nats/nats_rpc/errors.go -------------------------------------------------------------------------------- /pkg/nats/nats_rpc/server/options.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/nats/nats_rpc/server/options.go -------------------------------------------------------------------------------- /pkg/nats/nats_rpc/server/server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/nats/nats_rpc/server/server.go -------------------------------------------------------------------------------- /pkg/postgres/options.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/postgres/options.go -------------------------------------------------------------------------------- /pkg/postgres/postgres.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/postgres/postgres.go -------------------------------------------------------------------------------- /pkg/rabbitmq/rmq_rpc/client/client.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/rabbitmq/rmq_rpc/client/client.go -------------------------------------------------------------------------------- /pkg/rabbitmq/rmq_rpc/client/options.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/rabbitmq/rmq_rpc/client/options.go -------------------------------------------------------------------------------- /pkg/rabbitmq/rmq_rpc/connection.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/rabbitmq/rmq_rpc/connection.go -------------------------------------------------------------------------------- /pkg/rabbitmq/rmq_rpc/errors.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/rabbitmq/rmq_rpc/errors.go -------------------------------------------------------------------------------- /pkg/rabbitmq/rmq_rpc/server/options.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/rabbitmq/rmq_rpc/server/options.go -------------------------------------------------------------------------------- /pkg/rabbitmq/rmq_rpc/server/server.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/evrone/go-clean-template/HEAD/pkg/rabbitmq/rmq_rpc/server/server.go --------------------------------------------------------------------------------