From f8c77ef264e2cb0e326c832c6cb109c2e2889868 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 17 Jul 2024 14:01:53 +0200 Subject: [PATCH] Massive amount of changes --- .idea/runConfigurations/Clippy.xml | 2 +- .idea/runConfigurations/Run__debug_.xml | 21 - Cargo.lock | 28 +- Cargo.toml | 112 +- src/database/config.rs | 5 - src/database/mod.rs | 9 - src/instance/config.rs | 60 + src/instance/mod.rs | 102 ++ src/interfaces/database/mod.rs | 8 + src/{ => interfaces}/database/models.rs | 1 + src/{ => interfaces}/database/schema.rs | 1 + src/interfaces/mod.rs | 5 + src/interfaces/stratz/graphql.config.yml | 2 + src/interfaces/stratz/guild_matches.rs | 54 + src/interfaces/stratz/mod.rs | 15 + .../stratz/query_guild_matches.gql | 4 +- src/{ => interfaces}/stratz/schema.json | 0 src/main.rs | 39 +- src/services/brooch/config.rs | 7 - src/services/brooch/mod.rs | 1045 +++++++++++------ src/services/mod.rs | 43 +- src/services/telegram/commands/mod.rs | 5 +- src/services/telegram/commands/reminder.rs | 2 +- src/services/telegram/commands/roll.rs | 89 +- src/services/telegram/commands/whoami.rs | 16 +- src/services/telegram/config.rs | 7 - .../telegram/deps/interface_database.rs | 19 + src/services/telegram/deps/mod.rs | 2 + src/services/telegram/mod.rs | 219 ++-- src/stratz/config.rs | 5 - src/stratz/mod.rs | 86 -- src/{services/telegram => utils}/escape.rs | 0 src/utils/hacks.rs | 27 - src/utils/mod.rs | 3 +- src/utils/result.rs | 2 + 35 files changed, 1276 insertions(+), 769 deletions(-) delete mode 100644 .idea/runConfigurations/Run__debug_.xml delete mode 100644 src/database/config.rs delete mode 100644 src/database/mod.rs create mode 100644 src/instance/config.rs create mode 100644 src/instance/mod.rs create mode 100644 src/interfaces/database/mod.rs rename src/{ => interfaces}/database/models.rs (97%) rename src/{ => interfaces}/database/schema.rs (95%) create mode 100644 src/interfaces/mod.rs create mode 100644 src/interfaces/stratz/graphql.config.yml create mode 100644 src/interfaces/stratz/guild_matches.rs create mode 100644 src/interfaces/stratz/mod.rs rename src/{ => interfaces}/stratz/query_guild_matches.gql (89%) rename src/{ => interfaces}/stratz/schema.json (100%) delete mode 100644 src/services/brooch/config.rs delete mode 100644 src/services/telegram/config.rs create mode 100644 src/services/telegram/deps/interface_database.rs create mode 100644 src/services/telegram/deps/mod.rs delete mode 100644 src/stratz/config.rs delete mode 100644 src/stratz/mod.rs rename src/{services/telegram => utils}/escape.rs (100%) delete mode 100644 src/utils/hacks.rs create mode 100644 src/utils/result.rs diff --git a/.idea/runConfigurations/Clippy.xml b/.idea/runConfigurations/Clippy.xml index 706202c1..f4af1cd7 100644 --- a/.idea/runConfigurations/Clippy.xml +++ b/.idea/runConfigurations/Clippy.xml @@ -5,7 +5,7 @@