├── .env.example ├── .github ├── pull_request_template.md └── workflows │ └── go.yml ├── .gitignore ├── CONTRIBUTING.md ├── Makefile ├── README.md ├── cmd └── api │ ├── core │ ├── league.go │ ├── player.go │ ├── respond_error.go │ ├── tournament.go │ └── tournament_edition.go │ ├── handlers │ ├── league │ │ ├── create.go │ │ ├── delete.go │ │ ├── delete_test.go │ │ ├── get.go │ │ └── handler.go │ ├── player │ │ ├── create.go │ │ ├── create_test.go │ │ ├── delete.go │ │ ├── get.go │ │ └── handler.go │ └── tournament │ │ ├── create.go │ │ ├── delete.go │ │ └── handler.go │ └── main.go ├── docker-compose.yaml ├── go.mod ├── go.sum ├── mocks ├── mock_league_repository.go ├── mock_league_service.go ├── mock_player_repository.go ├── mock_player_service.go ├── mock_team_repository.go └── mock_tournament_repository.go └── pkg ├── domain ├── app_error.go ├── app_error_test.go ├── contact_info.go ├── date.go ├── league.go ├── player.go ├── team.go ├── tournament.go └── tournament_edition.go ├── ports ├── league.go ├── player.go ├── team.go └── tournament.go ├── repositories └── mongo │ ├── connect_client.go │ ├── league │ ├── delete.go │ ├── delete_test.go │ ├── get.go │ ├── insert.go │ └── repository.go │ ├── player │ ├── delete.go │ ├── get.go │ ├── get_players.go │ ├── get_players_test.go │ ├── insert.go │ └── repository.go │ ├── team │ ├── delete.go │ ├── get.go │ ├── insert.go │ └── repository.go │ └── tournament │ ├── delete.go │ ├── insert.go │ └── repository.go └── services ├── league ├── create.go ├── create_test.go ├── delete.go ├── delete_test.go ├── get.go ├── get_test.go └── service.go ├── player ├── create.go ├── delete.go ├── get.go ├── get_test.go └── service.go ├── team ├── create.go ├── delete.go ├── delete_test.go ├── get.go ├── get_test.go └── service.go └── tournament ├── create.go ├── create_test.go ├── delete.go ├── delete_test.go └── service.go /.env.example: -------------------------------------------------------------------------------- 1 | # DATABASE 2 | MONGO_URI=mongodb+srv://:@/ 3 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/.github/pull_request_template.md -------------------------------------------------------------------------------- /.github/workflows/go.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/.github/workflows/go.yml -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/.gitignore -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/CONTRIBUTING.md -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/Makefile -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/README.md -------------------------------------------------------------------------------- /cmd/api/core/league.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/core/league.go -------------------------------------------------------------------------------- /cmd/api/core/player.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/core/player.go -------------------------------------------------------------------------------- /cmd/api/core/respond_error.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/core/respond_error.go -------------------------------------------------------------------------------- /cmd/api/core/tournament.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/core/tournament.go -------------------------------------------------------------------------------- /cmd/api/core/tournament_edition.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/core/tournament_edition.go -------------------------------------------------------------------------------- /cmd/api/handlers/league/create.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/league/create.go -------------------------------------------------------------------------------- /cmd/api/handlers/league/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/league/delete.go -------------------------------------------------------------------------------- /cmd/api/handlers/league/delete_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/league/delete_test.go -------------------------------------------------------------------------------- /cmd/api/handlers/league/get.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/league/get.go -------------------------------------------------------------------------------- /cmd/api/handlers/league/handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/league/handler.go -------------------------------------------------------------------------------- /cmd/api/handlers/player/create.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/player/create.go -------------------------------------------------------------------------------- /cmd/api/handlers/player/create_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/player/create_test.go -------------------------------------------------------------------------------- /cmd/api/handlers/player/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/player/delete.go -------------------------------------------------------------------------------- /cmd/api/handlers/player/get.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/player/get.go -------------------------------------------------------------------------------- /cmd/api/handlers/player/handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/player/handler.go -------------------------------------------------------------------------------- /cmd/api/handlers/tournament/create.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/tournament/create.go -------------------------------------------------------------------------------- /cmd/api/handlers/tournament/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/tournament/delete.go -------------------------------------------------------------------------------- /cmd/api/handlers/tournament/handler.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/handlers/tournament/handler.go -------------------------------------------------------------------------------- /cmd/api/main.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/cmd/api/main.go -------------------------------------------------------------------------------- /docker-compose.yaml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/docker-compose.yaml -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/go.mod -------------------------------------------------------------------------------- /go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/go.sum -------------------------------------------------------------------------------- /mocks/mock_league_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/mocks/mock_league_repository.go -------------------------------------------------------------------------------- /mocks/mock_league_service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/mocks/mock_league_service.go -------------------------------------------------------------------------------- /mocks/mock_player_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/mocks/mock_player_repository.go -------------------------------------------------------------------------------- /mocks/mock_player_service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/mocks/mock_player_service.go -------------------------------------------------------------------------------- /mocks/mock_team_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/mocks/mock_team_repository.go -------------------------------------------------------------------------------- /mocks/mock_tournament_repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/mocks/mock_tournament_repository.go -------------------------------------------------------------------------------- /pkg/domain/app_error.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/domain/app_error.go -------------------------------------------------------------------------------- /pkg/domain/app_error_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/domain/app_error_test.go -------------------------------------------------------------------------------- /pkg/domain/contact_info.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/domain/contact_info.go -------------------------------------------------------------------------------- /pkg/domain/date.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/domain/date.go -------------------------------------------------------------------------------- /pkg/domain/league.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/domain/league.go -------------------------------------------------------------------------------- /pkg/domain/player.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/domain/player.go -------------------------------------------------------------------------------- /pkg/domain/team.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/domain/team.go -------------------------------------------------------------------------------- /pkg/domain/tournament.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/domain/tournament.go -------------------------------------------------------------------------------- /pkg/domain/tournament_edition.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/domain/tournament_edition.go -------------------------------------------------------------------------------- /pkg/ports/league.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/ports/league.go -------------------------------------------------------------------------------- /pkg/ports/player.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/ports/player.go -------------------------------------------------------------------------------- /pkg/ports/team.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/ports/team.go -------------------------------------------------------------------------------- /pkg/ports/tournament.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/ports/tournament.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/connect_client.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/connect_client.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/league/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/league/delete.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/league/delete_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/league/delete_test.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/league/get.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/league/get.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/league/insert.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/league/insert.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/league/repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/league/repository.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/player/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/player/delete.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/player/get.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/player/get.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/player/get_players.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/player/get_players.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/player/get_players_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/player/get_players_test.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/player/insert.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/player/insert.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/player/repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/player/repository.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/team/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/team/delete.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/team/get.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/team/get.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/team/insert.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/team/insert.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/team/repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/team/repository.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/tournament/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/tournament/delete.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/tournament/insert.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/tournament/insert.go -------------------------------------------------------------------------------- /pkg/repositories/mongo/tournament/repository.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/repositories/mongo/tournament/repository.go -------------------------------------------------------------------------------- /pkg/services/league/create.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/league/create.go -------------------------------------------------------------------------------- /pkg/services/league/create_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/league/create_test.go -------------------------------------------------------------------------------- /pkg/services/league/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/league/delete.go -------------------------------------------------------------------------------- /pkg/services/league/delete_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/league/delete_test.go -------------------------------------------------------------------------------- /pkg/services/league/get.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/league/get.go -------------------------------------------------------------------------------- /pkg/services/league/get_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/league/get_test.go -------------------------------------------------------------------------------- /pkg/services/league/service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/league/service.go -------------------------------------------------------------------------------- /pkg/services/player/create.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/player/create.go -------------------------------------------------------------------------------- /pkg/services/player/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/player/delete.go -------------------------------------------------------------------------------- /pkg/services/player/get.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/player/get.go -------------------------------------------------------------------------------- /pkg/services/player/get_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/player/get_test.go -------------------------------------------------------------------------------- /pkg/services/player/service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/player/service.go -------------------------------------------------------------------------------- /pkg/services/team/create.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/team/create.go -------------------------------------------------------------------------------- /pkg/services/team/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/team/delete.go -------------------------------------------------------------------------------- /pkg/services/team/delete_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/team/delete_test.go -------------------------------------------------------------------------------- /pkg/services/team/get.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/team/get.go -------------------------------------------------------------------------------- /pkg/services/team/get_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/team/get_test.go -------------------------------------------------------------------------------- /pkg/services/team/service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/team/service.go -------------------------------------------------------------------------------- /pkg/services/tournament/create.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/tournament/create.go -------------------------------------------------------------------------------- /pkg/services/tournament/create_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/tournament/create_test.go -------------------------------------------------------------------------------- /pkg/services/tournament/delete.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/tournament/delete.go -------------------------------------------------------------------------------- /pkg/services/tournament/delete_test.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/tournament/delete_test.go -------------------------------------------------------------------------------- /pkg/services/tournament/service.go: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jairogloz/go-l/HEAD/pkg/services/tournament/service.go --------------------------------------------------------------------------------