From a410c3e1672e86c7b3953a63012e2743fd94e1b4 Mon Sep 17 00:00:00 2001 From: Abdessamad ANSSEM Date: Sun, 8 Dec 2024 23:44:55 +0100 Subject: [PATCH] added go project structure --- README.md | 46 +++++++++++++++++++++++++++-------------- client/client.go | 0 client/client_test.go | 0 client/options.go | 0 client/rate_limiter.go | 0 endpoints/bootstrap.go | 0 endpoints/fixtures.go | 0 endpoints/leagues.go | 0 endpoints/players.go | 0 endpoints/teams.go | 0 examples/basic/main.go | 0 go.mod | 3 +++ internal/cache/cache.go | 0 models/fixture.go | 0 models/gameweek.go | 0 models/league.go | 0 models/player.go | 0 models/team.go | 0 18 files changed, 33 insertions(+), 16 deletions(-) create mode 100644 client/client.go create mode 100644 client/client_test.go create mode 100644 client/options.go create mode 100644 client/rate_limiter.go create mode 100644 endpoints/bootstrap.go create mode 100644 endpoints/fixtures.go create mode 100644 endpoints/leagues.go create mode 100644 endpoints/players.go create mode 100644 endpoints/teams.go create mode 100644 examples/basic/main.go create mode 100644 go.mod create mode 100644 internal/cache/cache.go create mode 100644 models/fixture.go create mode 100644 models/gameweek.go create mode 100644 models/league.go create mode 100644 models/player.go create mode 100644 models/team.go diff --git a/README.md b/README.md index 1889157..bb58c85 100644 --- a/README.md +++ b/README.md @@ -26,22 +26,36 @@ The project follows a monolithic package architecture, organized into logical co ``` go-fantasy-pl/ -├── client/ # Core HTTP client implementation -│ ├── client.go # Main client struct and configuration -│ └── rate.go # Rate limiting implementation -├── models/ # Data structures for API responses -│ ├── player.go # Player-related structs -│ ├── team.go # Team-related structs -│ └── gameweek.go # Gameweek-related structs -├── endpoints/ # API endpoint implementations -│ ├── bootstrap.go # General game data -│ ├── fixtures.go # Match fixtures -│ └── leagues.go # League standings -├── utils/ # Helper functions -│ ├── cache.go # Caching implementation -│ └── helpers.go # General utility functions -└── examples/ # Usage examples - └── basic.go # Basic usage patterns +├── .github/ # GitHub-specific configurations +│ └── workflows/ # GitHub Actions workflows +│ └── ci.yml # Continuous Integration workflow +├── client/ # Core HTTP client implementation +│ ├── client.go # Main client struct and configuration +│ ├── client_test.go # Tests for client functionality +│ ├── options.go # Configuration options for the client +│ └── rate_limiter.go # Rate limiting implementation +├── models/ # Data structures for API responses +│ ├── player.go # Player-related structs +│ ├── team.go # Team-related structs +│ ├── gameweek.go # Gameweek-related structs +│ ├── fixture.go # Fixture-related structs +│ └── league.go # League-related structs +├── endpoints/ # API endpoint implementations +│ ├── bootstrap.go # General game data +│ ├── players.go # Player-related endpoints +│ ├── teams.go # Team-related endpoints +│ ├── fixtures.go # Match fixtures +│ └── leagues.go # League standings +├── internal/ # Internal packages +│ └── cache/ # Caching functionality +│ └── cache.go # Implementation of caching mechanism +├── examples/ # Usage examples +│ └── basic/ +│ └── main.go # Basic usage examples +├── .gitignore # Ignored files and directories +├── LICENSE # License for the project +├── README.md # Project documentation +└── go.mod # Go module configuration ``` ## Main Components diff --git a/client/client.go b/client/client.go new file mode 100644 index 0000000..e69de29 diff --git a/client/client_test.go b/client/client_test.go new file mode 100644 index 0000000..e69de29 diff --git a/client/options.go b/client/options.go new file mode 100644 index 0000000..e69de29 diff --git a/client/rate_limiter.go b/client/rate_limiter.go new file mode 100644 index 0000000..e69de29 diff --git a/endpoints/bootstrap.go b/endpoints/bootstrap.go new file mode 100644 index 0000000..e69de29 diff --git a/endpoints/fixtures.go b/endpoints/fixtures.go new file mode 100644 index 0000000..e69de29 diff --git a/endpoints/leagues.go b/endpoints/leagues.go new file mode 100644 index 0000000..e69de29 diff --git a/endpoints/players.go b/endpoints/players.go new file mode 100644 index 0000000..e69de29 diff --git a/endpoints/teams.go b/endpoints/teams.go new file mode 100644 index 0000000..e69de29 diff --git a/examples/basic/main.go b/examples/basic/main.go new file mode 100644 index 0000000..e69de29 diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..298a7d7 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/AbdoAnss/go-fantasy-pl + +go 1.23.3 diff --git a/internal/cache/cache.go b/internal/cache/cache.go new file mode 100644 index 0000000..e69de29 diff --git a/models/fixture.go b/models/fixture.go new file mode 100644 index 0000000..e69de29 diff --git a/models/gameweek.go b/models/gameweek.go new file mode 100644 index 0000000..e69de29 diff --git a/models/league.go b/models/league.go new file mode 100644 index 0000000..e69de29 diff --git a/models/player.go b/models/player.go new file mode 100644 index 0000000..e69de29 diff --git a/models/team.go b/models/team.go new file mode 100644 index 0000000..e69de29