From 1d5e31bdd5e71da3e12567b60aa86d81bb1c629a Mon Sep 17 00:00:00 2001 From: Rory& Date: Fri, 30 Jan 2026 21:22:32 +0100 Subject: [PATCH] Basic offload configuration --- src/util/config/Config.ts | 2 ++ src/util/config/types/OffloadConfiguration.ts | 25 +++++++++++++++++++ src/util/config/types/index.ts | 1 + 3 files changed, 28 insertions(+) create mode 100644 src/util/config/types/OffloadConfiguration.ts diff --git a/src/util/config/Config.ts b/src/util/config/Config.ts index 6ada81701..05a72f6f7 100644 --- a/src/util/config/Config.ts +++ b/src/util/config/Config.ts @@ -28,6 +28,7 @@ import { GuildConfiguration, LimitsConfiguration, LoginConfiguration, + OffloadConfiguration, PasswordResetConfiguration, RabbitMQConfiguration, RegionConfiguration, @@ -57,4 +58,5 @@ export class ConfigValue { email: EmailConfiguration = new EmailConfiguration(); passwordReset: PasswordResetConfiguration = new PasswordResetConfiguration(); user: UserConfiguration = new UserConfiguration(); + offload: OffloadConfiguration = new OffloadConfiguration(); } diff --git a/src/util/config/types/OffloadConfiguration.ts b/src/util/config/types/OffloadConfiguration.ts new file mode 100644 index 000000000..a84e8db86 --- /dev/null +++ b/src/util/config/types/OffloadConfiguration.ts @@ -0,0 +1,25 @@ +/* + Spacebar: A FOSS re-implementation and extension of the Discord.com backend. + Copyright (C) 2026 Spacebar and Spacebar Contributors + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published + by the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . +*/ + +export class OffloadConfiguration { + gateway: GatewayOffloadConfiguration = new GatewayOffloadConfiguration(); +} + +export class GatewayOffloadConfiguration { + op14BaseUrl: string | null = null; +} diff --git a/src/util/config/types/index.ts b/src/util/config/types/index.ts index 9f6ac23c4..3b18cf483 100644 --- a/src/util/config/types/index.ts +++ b/src/util/config/types/index.ts @@ -26,6 +26,7 @@ export * from "./GeneralConfiguration"; export * from "./GifConfiguration"; export * from "./GuildConfiguration"; export * from "./LimitConfigurations"; +export * from "./OffloadConfiguration"; export * from "./LoginConfiguration"; export * from "./PasswordResetConfiguration"; export * from "./RabbitMQConfiguration";