diff --git a/.devcontainers/devcontainer.json b/.devcontainers/devcontainer.json
deleted file mode 100644
index 2ce16662..00000000
--- a/.devcontainers/devcontainer.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "name": "C# (.NET)",
- "image": "mcr.microsoft.com/devcontainers/dotnet:0-6.0",
-
- "customizations": {
- "vscode": {
- "settings": {},
- "extensions": [
- "streetsidesoftware.code-spell-checker"
- ]
- }
- },
-
- "portsAttributes": {
- "5118": {
- "label": "Moonlight",
- "onAutoForward": "notify"
- }
- }
-}
\ No newline at end of file
diff --git a/.dockerignore b/.dockerignore
deleted file mode 100644
index 3729ff0c..00000000
--- a/.dockerignore
+++ /dev/null
@@ -1,25 +0,0 @@
-**/.classpath
-**/.dockerignore
-**/.env
-**/.git
-**/.gitignore
-**/.project
-**/.settings
-**/.toolstarget
-**/.vs
-**/.vscode
-**/*.*proj.user
-**/*.dbmdl
-**/*.jfm
-**/azds.yaml
-**/bin
-**/charts
-**/docker-compose*
-**/Dockerfile*
-**/node_modules
-**/npm-debug.log
-**/obj
-**/secrets.dev.yaml
-**/values.dev.yaml
-LICENSE
-README.md
\ No newline at end of file
diff --git a/.github/workflows/canary-docker-build.yml b/.github/workflows/canary-docker-build.yml
deleted file mode 100644
index af18796e..00000000
--- a/.github/workflows/canary-docker-build.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-name: Canary Docker Build
-
-on:
- workflow_dispatch:
- pull_request:
- types:
- - closed
- branches: [ "main" ]
-
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- - name: Login into docker hub
- run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PW }}
- - name: Build and Push Docker image
- uses: docker/build-push-action@v2
- with:
- context: .
- file: ./Moonlight/Dockerfile
- push: true
- tags: moonlightpanel/moonlight:canary
- platforms: linux/amd64,linux/arm64
\ No newline at end of file
diff --git a/.github/workflows/release-docker-build.yml b/.github/workflows/release-docker-build.yml
deleted file mode 100644
index e57f8eb9..00000000
--- a/.github/workflows/release-docker-build.yml
+++ /dev/null
@@ -1,25 +0,0 @@
-name: Release Docker Build
-
-on:
- workflow_dispatch:
- release:
- types: [ published ]
-
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
- - name: Login into docker hub
- run: docker login -u ${{ secrets.DOCKER_USER }} -p ${{ secrets.DOCKER_PW }}
- - name: Build and Push Docker image
- uses: docker/build-push-action@v2
- with:
- context: .
- file: ./Moonlight/Dockerfile
- push: true
- tags: moonlightpanel/moonlight:beta
- platforms: linux/amd64,linux/arm64
\ No newline at end of file
diff --git a/.github/workflows/test-docker-build.yml b/.github/workflows/test-docker-build.yml
deleted file mode 100644
index 656d46c2..00000000
--- a/.github/workflows/test-docker-build.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-name: Test Build
-
-on:
- push:
- branches: [ "main" ]
- pull_request:
- types:
- - closed
- branches: [ "main" ]
-
-jobs:
- build:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout code
- uses: actions/checkout@v2
- - name: Build Docker image
- run: docker build -t moonlightpanel/moonlight:${{ github.sha }} -f Moonlight/Dockerfile .
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 7afc561b..845d31f7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -41,5 +41,3 @@ Desktop.ini
.idea/.idea.Moonlight/.idea/discord.xml
storage/
-Moonlight/publish.ps1
-Moonlight/version
diff --git a/.idea/.idea.Moonlight/.idea/.gitignore b/.idea/.idea.Moonlight/.idea/.gitignore
deleted file mode 100644
index 4a2ea511..00000000
--- a/.idea/.idea.Moonlight/.idea/.gitignore
+++ /dev/null
@@ -1,13 +0,0 @@
-# Default ignored files
-/shelf/
-/workspace.xml
-# Rider ignored files
-/contentModel.xml
-/projectSettingsUpdater.xml
-/modules.xml
-/.idea.Moonlight.iml
-# Editor-based HTTP Client requests
-/httpRequests/
-# Datasource local storage ignored files
-/dataSources/
-/dataSources.local.xml
diff --git a/.idea/.idea.Moonlight/.idea/efCoreCommonOptions.xml b/.idea/.idea.Moonlight/.idea/efCoreCommonOptions.xml
deleted file mode 100644
index fb98c234..00000000
--- a/.idea/.idea.Moonlight/.idea/efCoreCommonOptions.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.Moonlight/.idea/efCoreDialogsState.xml b/.idea/.idea.Moonlight/.idea/efCoreDialogsState.xml
deleted file mode 100644
index acb9617f..00000000
--- a/.idea/.idea.Moonlight/.idea/efCoreDialogsState.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.Moonlight/.idea/encodings.xml b/.idea/.idea.Moonlight/.idea/encodings.xml
deleted file mode 100644
index df87cf95..00000000
--- a/.idea/.idea.Moonlight/.idea/encodings.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.Moonlight/.idea/icon.svg b/.idea/.idea.Moonlight/.idea/icon.svg
deleted file mode 100644
index 193ebfae..00000000
--- a/.idea/.idea.Moonlight/.idea/icon.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
diff --git a/.idea/.idea.Moonlight/.idea/indexLayout.xml b/.idea/.idea.Moonlight/.idea/indexLayout.xml
deleted file mode 100644
index 7b08163c..00000000
--- a/.idea/.idea.Moonlight/.idea/indexLayout.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/.idea.Moonlight/.idea/vcs.xml b/.idea/.idea.Moonlight/.idea/vcs.xml
deleted file mode 100644
index 94a25f7f..00000000
--- a/.idea/.idea.Moonlight/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
deleted file mode 100644
index 35eb1ddf..00000000
--- a/.idea/vcs.xml
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/.vscode/launch.json b/.vscode/launch.json
deleted file mode 100644
index 8b2de09e..00000000
--- a/.vscode/launch.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "version": "0.2.0",
- "configurations": [
- {
- // Use IntelliSense to find out which attributes exist for C# debugging
- // Use hover for the description of the existing attributes
- // For further information visit https://github.com/dotnet/vscode-csharp/blob/main/debugger-launchjson.md.
- "name": ".NET Core Launch (web)",
- "type": "coreclr",
- "request": "launch",
- "preLaunchTask": "build",
- // If you have changed target frameworks, make sure to update the program path.
- "program": "${workspaceFolder}/Moonlight/bin/Debug/net6.0/Moonlight.dll",
- "args": [],
- "cwd": "${workspaceFolder}/Moonlight",
- "stopAtEntry": false,
- // Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
- "serverReadyAction": {
- "action": "openExternally",
- "pattern": "\\bNow listening on:\\s+(https?://\\S+)"
- },
- "env": {
- "ASPNETCORE_ENVIRONMENT": "Development"
- },
- "sourceFileMap": {
- "/Views": "${workspaceFolder}/Views"
- }
- },
- {
- "name": ".NET Core Attach",
- "type": "coreclr",
- "request": "attach"
- }
- ]
-}
\ No newline at end of file
diff --git a/.vscode/tasks.json b/.vscode/tasks.json
deleted file mode 100644
index eb9666ad..00000000
--- a/.vscode/tasks.json
+++ /dev/null
@@ -1,41 +0,0 @@
-{
- "version": "2.0.0",
- "tasks": [
- {
- "label": "build",
- "command": "dotnet",
- "type": "process",
- "args": [
- "build",
- "${workspaceFolder}/Moonlight.sln",
- "/property:GenerateFullPaths=true",
- "/consoleloggerparameters:NoSummary"
- ],
- "problemMatcher": "$msCompile"
- },
- {
- "label": "publish",
- "command": "dotnet",
- "type": "process",
- "args": [
- "publish",
- "${workspaceFolder}/Moonlight.sln",
- "/property:GenerateFullPaths=true",
- "/consoleloggerparameters:NoSummary"
- ],
- "problemMatcher": "$msCompile"
- },
- {
- "label": "watch",
- "command": "dotnet",
- "type": "process",
- "args": [
- "watch",
- "run",
- "--project",
- "${workspaceFolder}/Moonlight.sln"
- ],
- "problemMatcher": "$msCompile"
- }
- ]
-}
\ No newline at end of file
diff --git a/LICENSE.md b/LICENSE.md
deleted file mode 100644
index e261afcf..00000000
--- a/LICENSE.md
+++ /dev/null
@@ -1,128 +0,0 @@
-
Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License (modified)
-
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
-
Section 1 – Definitions.
-
-
Adapted Material means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
-
Adapter's License means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
-
BY-NC-SA Compatible License means a license listed at creativecommons.org/compatiblelicenses, approved by Creative Commons as essentially the equivalent of this Public License.
-
Copyright and Similar Rights means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
-
Effective Technological Measures means those measures that, in the absence of proper authority, may not
-be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar
-international agreements.
-
Exceptions and Limitations means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
-
License Elements means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike.
-
Licensed Material means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
-
Licensed Rights means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
-
Licensor means the individual(s) or entity(ies) granting rights under this Public License.
-
NonCommercial means not primarily intended for or directed towards commercial advantage or monetary compensation. This also includes free hosting services or simmular which have no direct permission from the moonlight panel team to use this software. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
-
Share means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
-
Sui Generis Database Rights means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
-
You means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
-
-
Section 2 – Scope.
-
-
License grant.
-
-
Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
-
-
reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
-
produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
-
-
Exceptions and Limitations. For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions.
-
Term. The term of this Public License is specified in Section 6(a).
-
Media and formats; technical modifications allowed. The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material.
-
Downstream recipients.
-
-
-
Offer from the Licensor – Licensed Material. Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
-
Additional offer from the Licensor – Adapted Material. Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
-
No downstream restrictions. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
-
-
-
No endorsement. Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i).
-
-
Other rights.
-
-
Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
-
Patent and trademark rights are not licensed under this Public License.
-
To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes.
-
-
-
-
Section 3 – License Conditions.
-
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
-
-
Attribution.
-
-
If You Share the Licensed Material (including in modified form), You must:
-
-
retain the following if it is supplied by the Licensor with the Licensed Material:
-
-
identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
-
a copyright notice;
-
a notice that refers to this Public License;
-
a notice that refers to the disclaimer of warranties;
-
a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
-
-
indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
-
indicate the Licensed Material is licensed under this Public License,
-and include the text of, or the URI or hyperlink to, this Public
-License.
-
-
-
You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
-
If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
-
-
-
ShareAlike.
-
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
-
-
The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License.
-
You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
-
You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
-
-
-
-
Section 4 – Sui Generis Database Rights.
-
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
-
-
for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
-
if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
-
You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
-
- For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
-
Section 5 – Disclaimer of Warranties and Limitation of Liability.
-
-
Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.
-
To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.
-
-
-
The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
-
-
Section 6 – Term and Termination.
-
-
This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
-
-
Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
-
-
automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
-
upon express reinstatement by the Licensor.
-
-For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
-
For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
-
Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
-
-
Section 7 – Other Terms and Conditions.
-
-
The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
-
Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
-
-
Section 8 – Interpretation.
-
-
For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
-
To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
-
No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
-
Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
-
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/Moonlight.sln b/Moonlight.sln
deleted file mode 100644
index 4d5f3224..00000000
--- a/Moonlight.sln
+++ /dev/null
@@ -1,25 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 17
-VisualStudioVersion = 17.2.32516.85
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Moonlight", "Moonlight\Moonlight.csproj", "{16141D00-A997-4BA6-B0DC-AF6F4712613A}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {16141D00-A997-4BA6-B0DC-AF6F4712613A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {16141D00-A997-4BA6-B0DC-AF6F4712613A}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {16141D00-A997-4BA6-B0DC-AF6F4712613A}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {16141D00-A997-4BA6-B0DC-AF6F4712613A}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {9C904DEA-9663-4892-B3CA-5CD6E710648C}
- EndGlobalSection
-EndGlobal
diff --git a/Moonlight/App/ApiClients/CloudPanel/CloudPanelApiHelper.cs b/Moonlight/App/ApiClients/CloudPanel/CloudPanelApiHelper.cs
deleted file mode 100644
index cfa2b51d..00000000
--- a/Moonlight/App/ApiClients/CloudPanel/CloudPanelApiHelper.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-using Newtonsoft.Json;
-using RestSharp;
-
-namespace Moonlight.App.ApiClients.CloudPanel;
-
-public class CloudPanelApiHelper
-{
- private readonly RestClient Client;
-
- public CloudPanelApiHelper()
- {
- Client = new();
- }
-
- public async Task Post(Database.Entities.CloudPanel cloudPanel, string resource, object? body)
- {
- var request = CreateRequest(cloudPanel, resource);
-
- request.Method = Method.Post;
-
- if(body != null)
- request.AddParameter("text/plain", JsonConvert.SerializeObject(body), ParameterType.RequestBody);
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new CloudPanelException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
- }
-
- public async Task Delete(Database.Entities.CloudPanel cloudPanel, string resource, object? body)
- {
- var request = CreateRequest(cloudPanel, resource);
-
- request.Method = Method.Delete;
-
- if(body != null)
- request.AddParameter("text/plain", JsonConvert.SerializeObject(body), ParameterType.RequestBody);
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new CloudPanelException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
- }
-
- private RestRequest CreateRequest(Database.Entities.CloudPanel cloudPanel, string resource)
- {
- var url = $"{cloudPanel.ApiUrl}/" + resource;
-
- var request = new RestRequest(url);
-
- request.AddHeader("Content-Type", "application/json");
- request.AddHeader("Accept", "application/json");
- request.AddHeader("Authorization", "Bearer " + cloudPanel.ApiKey);
-
- return request;
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/CloudPanel/CloudPanelException.cs b/Moonlight/App/ApiClients/CloudPanel/CloudPanelException.cs
deleted file mode 100644
index a7610348..00000000
--- a/Moonlight/App/ApiClients/CloudPanel/CloudPanelException.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Runtime.Serialization;
-
-namespace Moonlight.App.ApiClients.CloudPanel;
-
-[Serializable]
-public class CloudPanelException : Exception
-{
- public int StatusCode { get; set; }
-
- public CloudPanelException()
- {
- }
-
- public CloudPanelException(string message, int statusCode) : base(message)
- {
- StatusCode = statusCode;
- }
-
- public CloudPanelException(string message) : base(message)
- {
- }
-
- public CloudPanelException(string message, Exception inner) : base(message, inner)
- {
- }
-
- protected CloudPanelException(
- SerializationInfo info,
- StreamingContext context) : base(info, context)
- {
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/CloudPanel/Requests/AddDatabase.cs b/Moonlight/App/ApiClients/CloudPanel/Requests/AddDatabase.cs
deleted file mode 100644
index 26d8d4bb..00000000
--- a/Moonlight/App/ApiClients/CloudPanel/Requests/AddDatabase.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.CloudPanel.Requests;
-
-public class AddDatabase
-{
- [JsonProperty("domainName")]
- public string DomainName { get; set; }
-
- [JsonProperty("databaseName")]
- public string DatabaseName { get; set; }
-
- [JsonProperty("databaseUserName")]
- public string DatabaseUserName { get; set; }
-
- [JsonProperty("databaseUserPassword")]
- public string DatabaseUserPassword { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/CloudPanel/Requests/AddPhpSite.cs b/Moonlight/App/ApiClients/CloudPanel/Requests/AddPhpSite.cs
deleted file mode 100644
index 9e04eeff..00000000
--- a/Moonlight/App/ApiClients/CloudPanel/Requests/AddPhpSite.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.CloudPanel.Requests;
-
-public class AddPhpSite
-{
- [JsonProperty("domainName")] public string DomainName { get; set; } = "";
-
- [JsonProperty("siteUser")] public string SiteUser { get; set; } = "";
-
- [JsonProperty("siteUserPassword")] public string SiteUserPassword { get; set; } = "";
-
- [JsonProperty("vHostTemplate")] public string VHostTemplate { get; set; } = "";
-
- [JsonProperty("phpVersion")] public string PhpVersion { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/CloudPanel/Requests/InstallLetsEncrypt.cs b/Moonlight/App/ApiClients/CloudPanel/Requests/InstallLetsEncrypt.cs
deleted file mode 100644
index e10068fd..00000000
--- a/Moonlight/App/ApiClients/CloudPanel/Requests/InstallLetsEncrypt.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.CloudPanel.Requests;
-
-public class InstallLetsEncrypt
-{
- [JsonProperty("domainName")]
- public string DomainName { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/DaemonApiHelper.cs b/Moonlight/App/ApiClients/Daemon/DaemonApiHelper.cs
deleted file mode 100644
index c9d14065..00000000
--- a/Moonlight/App/ApiClients/Daemon/DaemonApiHelper.cs
+++ /dev/null
@@ -1,106 +0,0 @@
-using Moonlight.App.Database.Entities;
-using Newtonsoft.Json;
-using RestSharp;
-
-namespace Moonlight.App.ApiClients.Daemon;
-
-public class DaemonApiHelper
-{
- private readonly RestClient Client;
-
- public DaemonApiHelper()
- {
- Client = new();
- }
-
- public async Task Get(Node node, string resource)
- {
- var request = await CreateRequest(node, resource);
-
- request.Method = Method.Get;
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new DaemonException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
-
- return JsonConvert.DeserializeObject(response.Content!)!;
- }
-
- public async Task Post(Node node, string resource, object body)
- {
- var request = await CreateRequest(node, resource);
-
- request.Method = Method.Post;
-
- request.AddParameter("text/plain", JsonConvert.SerializeObject(body), ParameterType.RequestBody);
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new DaemonException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
- }
-
- public async Task Delete(Node node, string resource, object body)
- {
- var request = await CreateRequest(node, resource);
-
- request.Method = Method.Delete;
-
- request.AddParameter("text/plain", JsonConvert.SerializeObject(body), ParameterType.RequestBody);
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new DaemonException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
- }
-
- private Task CreateRequest(Node node, string resource)
- {
- var url = $"http://{node.Fqdn}:{node.MoonlightDaemonPort}/";
-
- RestRequest request = new(url + resource);
-
- request.AddHeader("Content-Type", "application/json");
- request.AddHeader("Accept", "application/json");
- request.AddHeader("Authorization", node.Token);
-
- return Task.FromResult(request);
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/DaemonException.cs b/Moonlight/App/ApiClients/Daemon/DaemonException.cs
deleted file mode 100644
index 58ca2e9e..00000000
--- a/Moonlight/App/ApiClients/Daemon/DaemonException.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Runtime.Serialization;
-
-namespace Moonlight.App.ApiClients.Daemon;
-
-[Serializable]
-public class DaemonException : Exception
-{
- public int StatusCode { get; set; }
-
- public DaemonException()
- {
- }
-
- public DaemonException(string message, int statusCode) : base(message)
- {
- StatusCode = statusCode;
- }
-
- public DaemonException(string message) : base(message)
- {
- }
-
- public DaemonException(string message, Exception inner) : base(message, inner)
- {
- }
-
- protected DaemonException(
- SerializationInfo info,
- StreamingContext context) : base(info, context)
- {
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/Requests/Mount.cs b/Moonlight/App/ApiClients/Daemon/Requests/Mount.cs
deleted file mode 100644
index fb69f557..00000000
--- a/Moonlight/App/ApiClients/Daemon/Requests/Mount.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Moonlight.App.ApiClients.Daemon.Requests;
-
-public class Mount
-{
- public string Server { get; set; } = "";
- public string ServerPath { get; set; } = "";
- public string Path { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/Requests/Unmount.cs b/Moonlight/App/ApiClients/Daemon/Requests/Unmount.cs
deleted file mode 100644
index c18fe8e1..00000000
--- a/Moonlight/App/ApiClients/Daemon/Requests/Unmount.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace Moonlight.App.ApiClients.Daemon.Requests;
-
-public class Unmount
-{
- public string Path { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/Resources/Container.cs b/Moonlight/App/ApiClients/Daemon/Resources/Container.cs
deleted file mode 100644
index 25741299..00000000
--- a/Moonlight/App/ApiClients/Daemon/Resources/Container.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace Moonlight.App.ApiClients.Daemon.Resources;
-
-public class Container
-{
- public string Name { get; set; } = "";
- public long Memory { get; set; }
- public double Cpu { get; set; }
- public long NetworkIn { get; set; }
- public long NetworkOut { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/Resources/CpuMetrics.cs b/Moonlight/App/ApiClients/Daemon/Resources/CpuMetrics.cs
deleted file mode 100644
index d954b945..00000000
--- a/Moonlight/App/ApiClients/Daemon/Resources/CpuMetrics.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Moonlight.App.ApiClients.Daemon.Resources;
-
-public class CpuMetrics
-{
- public string CpuModel { get; set; } = "";
- public double CpuUsage { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/Resources/DiskMetrics.cs b/Moonlight/App/ApiClients/Daemon/Resources/DiskMetrics.cs
deleted file mode 100644
index b301f20f..00000000
--- a/Moonlight/App/ApiClients/Daemon/Resources/DiskMetrics.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Moonlight.App.ApiClients.Daemon.Resources;
-
-public class DiskMetrics
-{
- public long Used { get; set; }
- public long Total { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/Resources/DockerMetrics.cs b/Moonlight/App/ApiClients/Daemon/Resources/DockerMetrics.cs
deleted file mode 100644
index 80d44ed2..00000000
--- a/Moonlight/App/ApiClients/Daemon/Resources/DockerMetrics.cs
+++ /dev/null
@@ -1,6 +0,0 @@
-namespace Moonlight.App.ApiClients.Daemon.Resources;
-
-public class DockerMetrics
-{
- public Container[] Containers { get; set; } = Array.Empty();
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/Resources/MemoryMetrics.cs b/Moonlight/App/ApiClients/Daemon/Resources/MemoryMetrics.cs
deleted file mode 100644
index cb3fd8d4..00000000
--- a/Moonlight/App/ApiClients/Daemon/Resources/MemoryMetrics.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Moonlight.App.ApiClients.Daemon.Resources;
-
-public class MemoryMetrics
-{
- public long Used { get; set; }
- public long Total { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Daemon/Resources/SystemMetrics.cs b/Moonlight/App/ApiClients/Daemon/Resources/SystemMetrics.cs
deleted file mode 100644
index 28c6bb72..00000000
--- a/Moonlight/App/ApiClients/Daemon/Resources/SystemMetrics.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Moonlight.App.ApiClients.Daemon.Resources;
-
-public class SystemMetrics
-{
- public string OsName { get; set; } = "";
- public long Uptime { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Google/Requests/GoogleOAuth2CodePayload.cs b/Moonlight/App/ApiClients/Google/Requests/GoogleOAuth2CodePayload.cs
deleted file mode 100644
index a4ef4bb1..00000000
--- a/Moonlight/App/ApiClients/Google/Requests/GoogleOAuth2CodePayload.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Google.Requests;
-
-public class GoogleOAuth2CodePayload
-{
- [JsonProperty("grant_type")]
- public string GrantType { get; set; } = "authorization_code";
-
- [JsonProperty("code")]
- public string Code { get; set; }
-
- [JsonProperty("client_id")]
- public string ClientId { get; set; }
-
- [JsonProperty("client_secret")]
- public string ClientSecret { get; set; }
-
- [JsonProperty("redirect_uri")]
- public string RedirectUri { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/IpLocate/Resources/IpLocate.cs b/Moonlight/App/ApiClients/IpLocate/Resources/IpLocate.cs
deleted file mode 100644
index d75717cf..00000000
--- a/Moonlight/App/ApiClients/IpLocate/Resources/IpLocate.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.IpLocate.Resources;
-
-public class IpLocate
-{
- [JsonProperty("query")]
- public string Query { get; set; }
-
- [JsonProperty("status")]
- public string Status { get; set; }
-
- [JsonProperty("country")]
- public string Country { get; set; }
-
- [JsonProperty("countryCode")]
- public string CountryCode { get; set; }
-
- [JsonProperty("region")]
- public string Region { get; set; }
-
- [JsonProperty("regionName")]
- public string RegionName { get; set; }
-
- [JsonProperty("city")]
- public string City { get; set; }
-
- [JsonProperty("zip")]
- public string Zip { get; set; }
-
- [JsonProperty("lat")]
- public double Lat { get; set; }
-
- [JsonProperty("lon")]
- public double Lon { get; set; }
-
- [JsonProperty("timezone")]
- public string Timezone { get; set; }
-
- [JsonProperty("isp")]
- public string Isp { get; set; }
-
- [JsonProperty("org")]
- public string Org { get; set; }
-
- [JsonProperty("as")]
- public string As { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Modrinth/ModrinthApiHelper.cs b/Moonlight/App/ApiClients/Modrinth/ModrinthApiHelper.cs
deleted file mode 100644
index 489ae5d6..00000000
--- a/Moonlight/App/ApiClients/Modrinth/ModrinthApiHelper.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-using Newtonsoft.Json;
-using RestSharp;
-
-namespace Moonlight.App.ApiClients.Modrinth;
-
-public class ModrinthApiHelper
-{
- private readonly RestClient Client;
-
- public ModrinthApiHelper()
- {
- Client = new();
- Client.AddDefaultParameter(
- new HeaderParameter("User-Agent", "Moonlight-Panel/Moonlight (admin@endelon-hosting.de)")
- );
- }
-
- public async Task Get(string resource)
- {
- var request = CreateRequest(resource);
-
- request.Method = Method.Get;
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new ModrinthException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
-
- return JsonConvert.DeserializeObject(response.Content!)!;
- }
-
- private RestRequest CreateRequest(string resource)
- {
- var url = "https://api.modrinth.com/v2/" + resource;
-
- var request = new RestRequest(url)
- {
- Timeout = 300000
- };
-
- request.AddHeader("Content-Type", "application/json");
- request.AddHeader("Accept", "application/json");
-
- return request;
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Modrinth/ModrinthException.cs b/Moonlight/App/ApiClients/Modrinth/ModrinthException.cs
deleted file mode 100644
index c6959359..00000000
--- a/Moonlight/App/ApiClients/Modrinth/ModrinthException.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-namespace Moonlight.App.ApiClients.Modrinth;
-
-public class ModrinthException : Exception
-{
- public int StatusCode { get; set; }
-
- public ModrinthException()
- {
- }
-
- public ModrinthException(string message, int statusCode) : base(message)
- {
- StatusCode = statusCode;
- }
-
- public ModrinthException(string message, Exception inner) : base(message, inner)
- {
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Modrinth/Resources/Pagination.cs b/Moonlight/App/ApiClients/Modrinth/Resources/Pagination.cs
deleted file mode 100644
index b462e5a3..00000000
--- a/Moonlight/App/ApiClients/Modrinth/Resources/Pagination.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Modrinth.Resources;
-
-public class Pagination
-{
- [JsonProperty("hits")] public Project[] Hits { get; set; }
-
- [JsonProperty("offset")] public long Offset { get; set; }
-
- [JsonProperty("limit")] public long Limit { get; set; }
-
- [JsonProperty("total_hits")] public long TotalHits { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Modrinth/Resources/Project.cs b/Moonlight/App/ApiClients/Modrinth/Resources/Project.cs
deleted file mode 100644
index 6ae7a670..00000000
--- a/Moonlight/App/ApiClients/Modrinth/Resources/Project.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Modrinth.Resources;
-
-public class Project
-{
- [JsonProperty("project_id")] public string ProjectId { get; set; }
-
- [JsonProperty("project_type")] public string ProjectType { get; set; }
-
- [JsonProperty("slug")] public string Slug { get; set; }
-
- [JsonProperty("author")] public string Author { get; set; }
-
- [JsonProperty("title")] public string Title { get; set; }
-
- [JsonProperty("description")] public string Description { get; set; }
-
- [JsonProperty("categories")] public string[] Categories { get; set; }
-
- [JsonProperty("display_categories")] public string[] DisplayCategories { get; set; }
-
- [JsonProperty("versions")] public string[] Versions { get; set; }
-
- [JsonProperty("downloads")] public long Downloads { get; set; }
-
- [JsonProperty("follows")] public long Follows { get; set; }
-
- [JsonProperty("icon_url")] public string IconUrl { get; set; }
-
- [JsonProperty("date_created")] public DateTimeOffset DateCreated { get; set; }
-
- [JsonProperty("date_modified")] public DateTimeOffset DateModified { get; set; }
-
- [JsonProperty("latest_version")] public string LatestVersion { get; set; }
-
- [JsonProperty("license")] public string License { get; set; }
-
- [JsonProperty("client_side")] public string ClientSide { get; set; }
-
- [JsonProperty("server_side")] public string ServerSide { get; set; }
-
- [JsonProperty("gallery")] public Uri[] Gallery { get; set; }
-
- [JsonProperty("featured_gallery")] public Uri FeaturedGallery { get; set; }
-
- [JsonProperty("color")] public long? Color { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Modrinth/Resources/Version.cs b/Moonlight/App/ApiClients/Modrinth/Resources/Version.cs
deleted file mode 100644
index 69c13326..00000000
--- a/Moonlight/App/ApiClients/Modrinth/Resources/Version.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Modrinth.Resources;
-
-public class Version
-{
- [JsonProperty("name")]
- public string Name { get; set; }
-
- [JsonProperty("version_number")]
- public string VersionNumber { get; set; }
-
- [JsonProperty("changelog")]
- public string Changelog { get; set; }
-
- [JsonProperty("dependencies")]
- public object[] Dependencies { get; set; }
-
- [JsonProperty("game_versions")]
- public object[] GameVersions { get; set; }
-
- [JsonProperty("version_type")]
- public string VersionType { get; set; }
-
- [JsonProperty("loaders")]
- public object[] Loaders { get; set; }
-
- [JsonProperty("featured")]
- public bool Featured { get; set; }
-
- [JsonProperty("status")]
- public string Status { get; set; }
-
- [JsonProperty("requested_status")]
- public string RequestedStatus { get; set; }
-
- [JsonProperty("id")]
- public string Id { get; set; }
-
- [JsonProperty("project_id")]
- public string ProjectId { get; set; }
-
- [JsonProperty("author_id")]
- public string AuthorId { get; set; }
-
- [JsonProperty("date_published")]
- public DateTime DatePublished { get; set; }
-
- [JsonProperty("downloads")]
- public long Downloads { get; set; }
-
- [JsonProperty("changelog_url")]
- public object ChangelogUrl { get; set; }
-
- [JsonProperty("files")]
- public VersionFile[] Files { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Modrinth/Resources/VersionFile.cs b/Moonlight/App/ApiClients/Modrinth/Resources/VersionFile.cs
deleted file mode 100644
index 07ccfa63..00000000
--- a/Moonlight/App/ApiClients/Modrinth/Resources/VersionFile.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Modrinth.Resources;
-
-public class VersionFile
-{
- [JsonProperty("url")]
- public Uri Url { get; set; }
-
- [JsonProperty("filename")]
- public string Filename { get; set; }
-
- [JsonProperty("primary")]
- public bool Primary { get; set; }
-
- [JsonProperty("size")]
- public long Size { get; set; }
-
- [JsonProperty("file_type")]
- public string FileType { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Paper/PaperApiHelper.cs b/Moonlight/App/ApiClients/Paper/PaperApiHelper.cs
deleted file mode 100644
index 601e1ac2..00000000
--- a/Moonlight/App/ApiClients/Paper/PaperApiHelper.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-using Moonlight.App.Exceptions;
-using Newtonsoft.Json;
-using RestSharp;
-
-namespace Moonlight.App.ApiClients.Paper;
-
-public class PaperApiHelper
-{
- private string ApiUrl { get; set; }
-
- public PaperApiHelper()
- {
- ApiUrl = "https://api.papermc.io/v2/projects/";
- }
-
- public async Task Get(string url)
- {
- RestClient client = new();
-
- string requrl = "NONSET";
-
- if (ApiUrl.EndsWith("/"))
- requrl = ApiUrl + url;
- else
- requrl = ApiUrl + "/" + url;
-
- RestRequest request = new(requrl, Method.Get);
-
- request.AddHeader("Content-Type", "application/json");
-
- var response = await client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new PaperException(
- $"An error occured: ({response.StatusCode}) {response.Content}"
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
-
- return JsonConvert.DeserializeObject(response.Content!)!;
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Paper/PaperException.cs b/Moonlight/App/ApiClients/Paper/PaperException.cs
deleted file mode 100644
index da62fcd2..00000000
--- a/Moonlight/App/ApiClients/Paper/PaperException.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-namespace Moonlight.App.ApiClients.Paper;
-
-public class PaperException : Exception
-{
- public PaperException()
- {
- }
-
- public PaperException(string message) : base(message)
- {
- }
-
- public PaperException(string message, Exception inner) : base(message, inner)
- {
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Paper/Resources/PaperBuilds.cs b/Moonlight/App/ApiClients/Paper/Resources/PaperBuilds.cs
deleted file mode 100644
index 393b506d..00000000
--- a/Moonlight/App/ApiClients/Paper/Resources/PaperBuilds.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Paper.Resources;
-
-public class PaperBuilds
-{
- [JsonProperty("project_id")]
- public string ProjectId { get; set; }
-
- [JsonProperty("project_name")]
- public string ProjectName { get; set; }
-
- [JsonProperty("version")]
- public string Version { get; set; }
-
- [JsonProperty("builds")]
- public List Builds { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Paper/Resources/PaperVersions.cs b/Moonlight/App/ApiClients/Paper/Resources/PaperVersions.cs
deleted file mode 100644
index 573b5786..00000000
--- a/Moonlight/App/ApiClients/Paper/Resources/PaperVersions.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Paper.Resources;
-
-public class PaperVersions
-{
- [JsonProperty("project_id")]
- public string ProjectId { get; set; }
-
- [JsonProperty("project_name")]
- public string ProjectName { get; set; }
-
- [JsonProperty("version_groups")]
- public List VersionGroups { get; set; }
-
- [JsonProperty("versions")]
- public List Versions { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Telemetry/Requests/TelemetryData.cs b/Moonlight/App/ApiClients/Telemetry/Requests/TelemetryData.cs
deleted file mode 100644
index c8fafe75..00000000
--- a/Moonlight/App/ApiClients/Telemetry/Requests/TelemetryData.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Moonlight.App.ApiClients.Telemetry.Requests;
-
-public class TelemetryData
-{
- public string AppUrl { get; set; } = "";
- public int Servers { get; set; }
- public int Nodes { get; set; }
- public int Users { get; set; }
- public int Databases { get; set; }
- public int Webspaces { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Telemetry/TelemetryApiHelper.cs b/Moonlight/App/ApiClients/Telemetry/TelemetryApiHelper.cs
deleted file mode 100644
index d9b07450..00000000
--- a/Moonlight/App/ApiClients/Telemetry/TelemetryApiHelper.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-using Newtonsoft.Json;
-using RestSharp;
-
-namespace Moonlight.App.ApiClients.Telemetry;
-
-public class TelemetryApiHelper
-{
- private readonly RestClient Client;
-
- public TelemetryApiHelper()
- {
- Client = new();
- }
-
- public async Task Post(string resource, object? body)
- {
- var request = CreateRequest(resource);
-
- request.Method = Method.Post;
-
- request.AddParameter("application/json", JsonConvert.SerializeObject(body), ParameterType.RequestBody);
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new TelemetryException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
- }
-
- private RestRequest CreateRequest(string resource)
- {
- var url = "https://telemetry.moonlightpanel.xyz/" + resource;
-
- var request = new RestRequest(url)
- {
- Timeout = 3000000
- };
-
- return request;
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Telemetry/TelemetryException.cs b/Moonlight/App/ApiClients/Telemetry/TelemetryException.cs
deleted file mode 100644
index 7b66b710..00000000
--- a/Moonlight/App/ApiClients/Telemetry/TelemetryException.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Runtime.Serialization;
-
-namespace Moonlight.App.ApiClients.Telemetry;
-
-[Serializable]
-public class TelemetryException : Exception
-{
- public int StatusCode { get; set; }
-
- public TelemetryException()
- {
- }
-
- public TelemetryException(string message, int statusCode) : base(message)
- {
- StatusCode = statusCode;
- }
-
- public TelemetryException(string message) : base(message)
- {
- }
-
- public TelemetryException(string message, Exception inner) : base(message, inner)
- {
- }
-
- protected TelemetryException(
- SerializationInfo info,
- StreamingContext context) : base(info, context)
- {
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/PowerSignal.cs b/Moonlight/App/ApiClients/Wings/PowerSignal.cs
deleted file mode 100644
index b036b9d5..00000000
--- a/Moonlight/App/ApiClients/Wings/PowerSignal.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Moonlight.App.ApiClients.Wings;
-
-public enum PowerSignal
-{
- Start,
- Stop,
- Kill,
- Restart
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Requests/CompressFiles.cs b/Moonlight/App/ApiClients/Wings/Requests/CompressFiles.cs
deleted file mode 100644
index 4a90c9dd..00000000
--- a/Moonlight/App/ApiClients/Wings/Requests/CompressFiles.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Requests;
-
-public class CompressFiles
-{
- [JsonProperty("root")]
- public string Root { get; set; }
-
- [JsonProperty("files")]
- public string[] Files { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Requests/CreateBackup.cs b/Moonlight/App/ApiClients/Wings/Requests/CreateBackup.cs
deleted file mode 100644
index 0d9aaae9..00000000
--- a/Moonlight/App/ApiClients/Wings/Requests/CreateBackup.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Requests;
-
-public class CreateBackup
-{
- [JsonProperty("adapter")]
- public string Adapter { get; set; }
-
- [JsonProperty("uuid")]
- public Guid Uuid { get; set; }
-
- [JsonProperty("ignore")]
- public string Ignore { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Requests/CreateDirectory.cs b/Moonlight/App/ApiClients/Wings/Requests/CreateDirectory.cs
deleted file mode 100644
index 424fc962..00000000
--- a/Moonlight/App/ApiClients/Wings/Requests/CreateDirectory.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Requests;
-
-public class CreateDirectory
-{
- [JsonProperty("name")]
- public string Name { get; set; }
-
- [JsonProperty("path")]
- public string Path { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Requests/CreateServer.cs b/Moonlight/App/ApiClients/Wings/Requests/CreateServer.cs
deleted file mode 100644
index 2cf980aa..00000000
--- a/Moonlight/App/ApiClients/Wings/Requests/CreateServer.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Requests;
-
-public class CreateServer
-{
- [JsonProperty("uuid")]
- public Guid Uuid { get; set; }
-
- [JsonProperty("start_on_completion")]
- public bool StartOnCompletion { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Requests/DecompressFile.cs b/Moonlight/App/ApiClients/Wings/Requests/DecompressFile.cs
deleted file mode 100644
index 298ec83a..00000000
--- a/Moonlight/App/ApiClients/Wings/Requests/DecompressFile.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Requests;
-
-public class DecompressFile
-{
- [JsonProperty("root")]
- public string Root { get; set; }
-
- [JsonProperty("file")]
- public string File { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Requests/DeleteFiles.cs b/Moonlight/App/ApiClients/Wings/Requests/DeleteFiles.cs
deleted file mode 100644
index 82d0d389..00000000
--- a/Moonlight/App/ApiClients/Wings/Requests/DeleteFiles.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Requests;
-
-public class DeleteFiles
-{
- [JsonProperty("root")]
- public string Root { get; set; }
-
- [JsonProperty("files")] public List Files { get; set; } = new();
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Requests/RenameFiles.cs b/Moonlight/App/ApiClients/Wings/Requests/RenameFiles.cs
deleted file mode 100644
index 57c37bb7..00000000
--- a/Moonlight/App/ApiClients/Wings/Requests/RenameFiles.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Requests;
-
-public class RenameFiles
-{
- [JsonProperty("root")]
- public string Root { get; set; }
-
- [JsonProperty("files")] public RenameFilesData[] Files { get; set; }
-}
-
-public class RenameFilesData
-{
- [JsonProperty("from")]
- public string From { get; set; }
-
- [JsonProperty("to")]
- public string To { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Requests/RestoreBackup.cs b/Moonlight/App/ApiClients/Wings/Requests/RestoreBackup.cs
deleted file mode 100644
index 18f0f51c..00000000
--- a/Moonlight/App/ApiClients/Wings/Requests/RestoreBackup.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Requests;
-
-public class RestoreBackup
-{
- [JsonProperty("adapter")]
- public string Adapter { get; set; }
-
- [JsonProperty("truncate_directory")] public bool TruncateDirectory { get; set; } = false;
- [JsonProperty("download_url")] public string DownloadUrl { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Requests/ServerPower.cs b/Moonlight/App/ApiClients/Wings/Requests/ServerPower.cs
deleted file mode 100644
index 75ee64ce..00000000
--- a/Moonlight/App/ApiClients/Wings/Requests/ServerPower.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Requests;
-
-public class ServerPower
-{
- [JsonProperty("action")]
- public string Action { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Resources/ListDirectory.cs b/Moonlight/App/ApiClients/Wings/Resources/ListDirectory.cs
deleted file mode 100644
index 304c7656..00000000
--- a/Moonlight/App/ApiClients/Wings/Resources/ListDirectory.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Resources;
-
-public class ListDirectory
-{
- [JsonProperty("name")]
- public string Name { get; set; }
-
- [JsonProperty("created")]
- public DateTimeOffset Created { get; set; }
-
- [JsonProperty("modified")]
- public DateTimeOffset Modified { get; set; }
-
- [JsonProperty("size")]
- public long Size { get; set; }
-
- [JsonProperty("directory")]
- public bool Directory { get; set; }
-
- [JsonProperty("file")]
- public bool File { get; set; }
-
- [JsonProperty("symlink")]
- public bool Symlink { get; set; }
-
- [JsonProperty("mime")]
- public string Mime { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Resources/ServerDetails.cs b/Moonlight/App/ApiClients/Wings/Resources/ServerDetails.cs
deleted file mode 100644
index 6756128a..00000000
--- a/Moonlight/App/ApiClients/Wings/Resources/ServerDetails.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Resources;
-
-public class ServerDetails
-{
- [JsonProperty("state")]
- public string State { get; set; }
-
- [JsonProperty("is_suspended")]
- public bool IsSuspended { get; set; }
-
- [JsonProperty("utilization")]
- public ServerDetailsUtilization Utilization { get; set; }
-
- public class ServerDetailsUtilization
- {
- [JsonProperty("memory_bytes")]
- public long MemoryBytes { get; set; }
-
- [JsonProperty("memory_limit_bytes")]
- public long MemoryLimitBytes { get; set; }
-
- [JsonProperty("cpu_absolute")]
- public double CpuAbsolute { get; set; }
-
- [JsonProperty("network")]
- public ServerDetailsNetwork Network { get; set; }
-
- [JsonProperty("uptime")]
- public long Uptime { get; set; }
-
- [JsonProperty("state")]
- public string State { get; set; }
-
- [JsonProperty("disk_bytes")]
- public long DiskBytes { get; set; }
- }
-
- public class ServerDetailsNetwork
- {
- [JsonProperty("rx_bytes")]
- public long RxBytes { get; set; }
-
- [JsonProperty("tx_bytes")]
- public long TxBytes { get; set; }
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/Resources/SystemStatus.cs b/Moonlight/App/ApiClients/Wings/Resources/SystemStatus.cs
deleted file mode 100644
index 66b4d4cc..00000000
--- a/Moonlight/App/ApiClients/Wings/Resources/SystemStatus.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.ApiClients.Wings.Resources;
-
-public class SystemStatus
-{
- [JsonProperty("architecture")]
- public string Architecture { get; set; }
-
- [JsonProperty("cpu_count")]
- public long CpuCount { get; set; }
-
- [JsonProperty("kernel_version")]
- public string KernelVersion { get; set; }
-
- [JsonProperty("os")]
- public string Os { get; set; }
-
- [JsonProperty("version")]
- public string Version { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/WingsApiHelper.cs b/Moonlight/App/ApiClients/Wings/WingsApiHelper.cs
deleted file mode 100644
index cd63e93a..00000000
--- a/Moonlight/App/ApiClients/Wings/WingsApiHelper.cs
+++ /dev/null
@@ -1,221 +0,0 @@
-using Moonlight.App.Database.Entities;
-using Moonlight.App.Exceptions;
-using Newtonsoft.Json;
-using RestSharp;
-
-namespace Moonlight.App.ApiClients.Wings;
-
-public class WingsApiHelper
-{
- private readonly RestClient Client;
-
- public WingsApiHelper()
- {
- Client = new();
- }
-
- public async Task Get(Node node, string resource)
- {
- var request = CreateRequest(node, resource);
-
- request.Method = Method.Get;
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new WingsException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
-
- return JsonConvert.DeserializeObject(response.Content!)!;
- }
-
- public async Task GetRaw(Node node, string resource)
- {
- var request = CreateRequest(node, resource);
-
- request.Method = Method.Get;
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new WingsException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
-
- return response.Content!;
- }
-
- public async Task Post(Node node, string resource, object? body)
- {
- var request = CreateRequest(node, resource);
-
- request.Method = Method.Post;
-
- request.AddParameter("text/plain",
- JsonConvert.SerializeObject(body),
- ParameterType.RequestBody
- );
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new WingsException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
-
- return JsonConvert.DeserializeObject(response.Content!)!;
- }
-
- public async Task Post(Node node, string resource, object? body)
- {
- var request = CreateRequest(node, resource);
-
- request.Method = Method.Post;
-
- if(body != null)
- request.AddParameter("text/plain", JsonConvert.SerializeObject(body), ParameterType.RequestBody);
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new WingsException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
- }
-
- public async Task PostRaw(Node node, string resource, object body)
- {
- var request = CreateRequest(node, resource);
-
- request.Method = Method.Post;
-
- request.AddParameter("text/plain", body, ParameterType.RequestBody);
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new WingsException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
- }
-
- public async Task Delete(Node node, string resource, object? body)
- {
- var request = CreateRequest(node, resource);
-
- request.Method = Method.Delete;
-
- if(body != null)
- request.AddParameter("text/plain", JsonConvert.SerializeObject(body), ParameterType.RequestBody);
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new WingsException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
- }
-
- public async Task Put(Node node, string resource, object? body)
- {
- var request = CreateRequest(node, resource);
-
- request.Method = Method.Put;
-
- request.AddParameter("text/plain", JsonConvert.SerializeObject(body), ParameterType.RequestBody);
-
- var response = await Client.ExecuteAsync(request);
-
- if (!response.IsSuccessful)
- {
- if (response.StatusCode != 0)
- {
- throw new WingsException(
- $"An error occured: ({response.StatusCode}) {response.Content}",
- (int)response.StatusCode
- );
- }
- else
- {
- throw new Exception($"An internal error occured: {response.ErrorMessage}");
- }
- }
- }
-
- private RestRequest CreateRequest(Node node, string resource)
- {
- var url = (node.Ssl ? "https" : "http") + $"://{node.Fqdn}:{node.HttpPort}/" + resource;
-
- var request = new RestRequest(url)
- {
- Timeout = 300000
- };
-
- request.AddHeader("Content-Type", "application/json");
- request.AddHeader("Accept", "application/json");
- request.AddHeader("Authorization", "Bearer " + node.Token);
-
- return request;
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/ApiClients/Wings/WingsException.cs b/Moonlight/App/ApiClients/Wings/WingsException.cs
deleted file mode 100644
index 5cb1d789..00000000
--- a/Moonlight/App/ApiClients/Wings/WingsException.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-using System.Runtime.Serialization;
-
-namespace Moonlight.App.ApiClients.Wings;
-
-[Serializable]
-public class WingsException : Exception
-{
- public int StatusCode { get; set; }
-
- public WingsException()
- {
- }
-
- public WingsException(string message, int statusCode) : base(message)
- {
- StatusCode = statusCode;
- }
-
- public WingsException(string message) : base(message)
- {
- }
-
- public WingsException(string message, Exception inner) : base(message, inner)
- {
- }
-
- protected WingsException(
- SerializationInfo info,
- StreamingContext context) : base(info, context)
- {
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Configuration/ConfigV1.cs b/Moonlight/App/Configuration/ConfigV1.cs
deleted file mode 100644
index bae80c85..00000000
--- a/Moonlight/App/Configuration/ConfigV1.cs
+++ /dev/null
@@ -1,410 +0,0 @@
-using System.ComponentModel;
-using Moonlight.App.Helpers;
-
-namespace Moonlight.App.Configuration;
-
-using System;
-using Newtonsoft.Json;
-
-public class ConfigV1
-{
- [JsonProperty("Moonlight")] public MoonlightData Moonlight { get; set; } = new();
-
- public class MoonlightData
- {
- [JsonProperty("AppUrl")]
- [Description("The url moonlight is accesible with from the internet")]
- public string AppUrl { get; set; } = "http://your-moonlight-url-without-slash";
-
- [JsonProperty("EnableLatencyCheck")]
- [Description(
- "This will enable a latency check for connections to moonlight. Users with an too high latency will be warned that moonlight might be buggy for them")]
- public bool EnableLatencyCheck { get; set; } = true;
-
- [JsonProperty("LatencyCheckThreshold")]
- [Description("Specify the latency threshold which has to be reached in order to trigger the warning message")]
- public int LatencyCheckThreshold { get; set; } = 1000;
-
- [JsonProperty("LetsEncrypt")] public LetsEncrypt LetsEncrypt { get; set; } = new();
-
- [JsonProperty("Auth")] public AuthData Auth { get; set; } = new();
-
- [JsonProperty("Database")] public DatabaseData Database { get; set; } = new();
-
- [JsonProperty("DiscordBotApi")] public DiscordBotApiData DiscordBotApi { get; set; } = new();
-
- [JsonProperty("DiscordBot")] public DiscordBotData DiscordBot { get; set; } = new();
-
- [JsonProperty("Domains")] public DomainsData Domains { get; set; } = new();
-
- [JsonProperty("Html")] public HtmlData Html { get; set; } = new();
-
- [JsonProperty("Marketing")] public MarketingData Marketing { get; set; } = new();
-
- [JsonProperty("OAuth2")] public OAuth2Data OAuth2 { get; set; } = new();
-
- [JsonProperty("Security")] public SecurityData Security { get; set; } = new();
-
- [JsonProperty("Mail")] public MailData Mail { get; set; } = new();
-
- [JsonProperty("Cleanup")] public CleanupData Cleanup { get; set; } = new();
-
- [JsonProperty("DiscordNotifications")]
- public DiscordNotificationsData DiscordNotifications { get; set; } = new();
-
- [JsonProperty("Statistics")] public StatisticsData Statistics { get; set; } = new();
-
- [JsonProperty("Rating")] public RatingData Rating { get; set; } = new();
-
- [JsonProperty("SmartDeploy")] public SmartDeployData SmartDeploy { get; set; } = new();
-
- [JsonProperty("Sentry")] public SentryData Sentry { get; set; } = new();
-
- [JsonProperty("Stripe")] public StripeData Stripe { get; set; } = new();
-
- [JsonProperty("Tickets")] public TicketsData Tickets { get; set; } = new();
- }
-
- public class LetsEncrypt
- {
- [JsonProperty("Enable")]
- [Description("Enable automatic lets encrypt certificate issuing. This is a beta feature")]
- public bool Enable { get; set; } = false;
-
- [JsonProperty("ExpireEmail")]
- [Description("Lets encrypt will send you an email upon certificate expiration to this address")]
- public string ExpireEmail { get; set; } = "your@email.test";
-
- [JsonProperty("CountryCode")]
- [Description("Country code to use for generating the certificate")]
- public string CountryCode { get; set; } = "DE";
-
- [JsonProperty("State")]
- [Description("State to use for generating the certificate")]
- public string State { get; set; } = "Germany";
-
- [JsonProperty("Locality")]
- [Description("Locality to use for generating the certificate")]
- public string Locality { get; set; } = "Bavaria";
-
- [JsonProperty("Organization")]
- [Description("Organization to use for generating the certificate")]
- public string Organization { get; set; } = "Moonlight Panel";
- }
-
- public class TicketsData
- {
- [JsonProperty("WelcomeMessage")]
- [Description("The message that will be sent when a user created a ticket")]
- public string WelcomeMessage { get; set; } = "Welcome to the support";
- }
-
- public class StripeData
- {
- [JsonProperty("ApiKey")]
- [Description(
- "Put here your stripe api key if you add subscriptions. Currently the only billing option is stripe which is enabled by default and cannot be turned off. This feature is still experimental")]
- public string ApiKey { get; set; } = "";
- }
-
- public class AuthData
- {
- [JsonProperty("DenyLogin")]
- [Description("Prevent every new login")]
- public bool DenyLogin { get; set; } = false;
-
- [JsonProperty("DenyRegister")]
- [Description("Prevent every new user to register")]
- public bool DenyRegister { get; set; } = false;
-
- [JsonProperty("CheckForBots")]
- [Description("Check for bots when a user has been registered")]
- public bool CheckForBots { get; set; } = true;
-
- [JsonProperty("BlockLinuxUsers")]
- [Description("Blocks linux users from registering")]
- public bool BlockLinuxUsers { get; set; } = false;
- }
-
- public class CleanupData
- {
- [JsonProperty("Cpu")]
- [Description("The maximum amount of cpu usage in percent a node is allowed to use before the cleanup starts")]
- public long Cpu { get; set; } = 90;
-
- [JsonProperty("Memory")]
- [Description("The minumum amount of memory in megabytes avaliable before the cleanup starts")]
- public long Memory { get; set; } = 8192;
-
- [JsonProperty("Wait")]
- [Description("The delay between every cleanup check in minutes")]
- public long Wait { get; set; } = 15;
-
- [JsonProperty("Uptime")]
- [Description("The maximum uptime of any server in hours before it the server restarted by the cleanup system")]
- public long Uptime { get; set; } = 6;
-
- [JsonProperty("Enable")]
- [Description(
- "The cleanup system provides a fair way for stopping unused servers and staying stable even with overallocation. A detailed explanation: docs.endelon-hosting.de/erklaerungen/cleanup")]
- public bool Enable { get; set; } = false;
-
- [JsonProperty("MinUptime")]
- [Description("The minumum uptime of a server in minutes to prevent stopping servers which just started")]
- public long MinUptime { get; set; } = 10;
- }
-
- public class DatabaseData
- {
- [JsonProperty("Database")] public string Database { get; set; } = "moonlight_db";
-
- [JsonProperty("Host")] public string Host { get; set; } = "your.database.host";
-
- [JsonProperty("Password")] [Blur] public string Password { get; set; } = "secret";
-
- [JsonProperty("Port")] public long Port { get; set; } = 3306;
-
- [JsonProperty("Username")] public string Username { get; set; } = "moonlight_user";
- }
-
- public class DiscordBotApiData
- {
- [JsonProperty("Enable")]
- [Description("Enable the discord bot api. Currently only DatBot is using this api")]
- public bool Enable { get; set; } = false;
-
- [JsonProperty("Token")]
- [Description("Specify the token the api client needs to provide")]
- [Blur]
- public string Token { get; set; } = Guid.NewGuid().ToString();
- }
-
- public class DiscordBotData
- {
- [JsonProperty("Enable")]
- [Description("The discord bot can be used to allow customers to manage their servers via discord")]
- public bool Enable { get; set; } = false;
-
- [JsonProperty("Token")]
- [Description("Your discord bot token goes here")]
- [Blur]
- public string Token { get; set; } = "discord token here";
-
- [JsonProperty("PowerActions")]
- [Description("Enable actions like starting and stopping servers")]
- public bool PowerActions { get; set; } = false;
-
- [JsonProperty("SendCommands")]
- [Description("Allow users to send commands to their servers")]
- public bool SendCommands { get; set; } = false;
- }
-
- public class DiscordNotificationsData
- {
- [JsonProperty("Enable")]
- [Description(
- "The discord notification system sends you a message everytime a event like a new support chat message is triggered with usefull data describing the event")]
- public bool Enable { get; set; } = false;
-
- [JsonProperty("WebHook")]
- [Description("The discord webhook the notifications are being sent to")]
- [Blur]
- public string WebHook { get; set; } = "http://your-discord-webhook-url";
- }
-
- public class DomainsData
- {
- [JsonProperty("Enable")]
- [Description("This enables the domain system")]
- public bool Enable { get; set; } = false;
-
- [JsonProperty("AccountId")]
- [Description("This option specifies the cloudflare account id")]
- public string AccountId { get; set; } = "cloudflare acc id";
-
- [JsonProperty("Email")]
- [Description("This specifies the cloudflare email to use for communicating with the cloudflare api")]
- public string Email { get; set; } = "cloudflare@acc.email";
-
- [JsonProperty("Key")]
- [Description("Your cloudflare api key goes here")]
- [Blur]
- public string Key { get; set; } = "secret";
- }
-
- public class HtmlData
- {
- [JsonProperty("Headers")] public HeadersData Headers { get; set; } = new();
- }
-
- public class HeadersData
- {
- [JsonProperty("Color")]
- [Description(
- "This specifies the color of the embed generated by platforms like discord when someone posts a link to your moonlight instance")]
- public string Color { get; set; } = "#4b27e8";
-
- [JsonProperty("Description")]
- [Description(
- "This specifies the description text of the embed generated by platforms like discord when someone posts a link to your moonlight instance and can also help google to index your moonlight instance correctly")]
- public string Description { get; set; } = "the next generation hosting panel";
-
- [JsonProperty("Keywords")]
- [Description(
- "To help search engines like google to index your moonlight instance correctly you can specify keywords seperated by a comma here")]
- public string Keywords { get; set; } = "moonlight";
-
- [JsonProperty("Title")]
- [Description(
- "This specifies the title of the embed generated by platforms like discord when someone posts a link to your moonlight instance")]
- public string Title { get; set; } = "Moonlight - endelon.link";
- }
-
- public class MailData
- {
- [JsonProperty("Email")] public string Email { get; set; } = "username@your.mail.host";
-
- [JsonProperty("Server")] public string Server { get; set; } = "your.mail.host";
-
- [JsonProperty("Password")] [Blur] public string Password { get; set; } = "secret";
-
- [JsonProperty("Port")] public int Port { get; set; } = 465;
-
- [JsonProperty("Ssl")] public bool Ssl { get; set; } = true;
- }
-
- public class MarketingData
- {
- [JsonProperty("BrandName")] public string BrandName { get; set; } = "Endelon Hosting";
-
- [JsonProperty("Imprint")] public string Imprint { get; set; } = "https://your-site.xyz/imprint";
-
- [JsonProperty("Privacy")] public string Privacy { get; set; } = "https://your-site.xyz/privacy";
- [JsonProperty("About")] public string About { get; set; } = "https://your-site.xyz/about";
- [JsonProperty("Website")] public string Website { get; set; } = "https://your-site.xyz";
- }
-
- public class OAuth2Data
- {
- [JsonProperty("OverrideUrl")]
- [Description("This overrides the redirect url which would be typicaly the app url")]
- public string OverrideUrl { get; set; } = "https://only-for-development.cases";
-
- [JsonProperty("EnableOverrideUrl")]
- [Description("This enables the url override")]
- public bool EnableOverrideUrl { get; set; } = false;
-
- [JsonProperty("Providers")]
- public OAuth2ProviderData[] Providers { get; set; } = Array.Empty();
- }
-
- public class OAuth2ProviderData
- {
- [JsonProperty("Id")] public string Id { get; set; }
-
- [JsonProperty("ClientId")] public string ClientId { get; set; }
-
- [JsonProperty("ClientSecret")] [Blur] public string ClientSecret { get; set; }
- }
-
- public class RatingData
- {
- [JsonProperty("Enabled")]
- [Description(
- "The rating systems shows a user who is registered longer than the set amout of days a popup to rate this platform if he hasnt rated it before")]
- public bool Enabled { get; set; } = false;
-
- [JsonProperty("Url")]
- [Description(
- "This is the url a user who rated above a set limit is shown to rate you again. Its recommended to put your google or trustpilot rate link here")]
- public string Url { get; set; } = "https://link-to-google-or-smth";
-
- [JsonProperty("MinRating")]
- [Description("The minimum star count on the rating ranging from 1 to 5")]
- public int MinRating { get; set; } = 4;
-
- [JsonProperty("DaysSince")]
- [Description("The days a user has to be registered to even be able to get this popup")]
- public int DaysSince { get; set; } = 5;
- }
-
- public class SecurityData
- {
- [JsonProperty("Token")]
- [Description(
- "This is the moonlight app token. It is used to encrypt and decrypt data and validate tokens and sessions")]
- [Blur]
- public string Token { get; set; } = Guid.NewGuid().ToString();
-
- [JsonProperty("MalwareCheckOnStart")]
- [Description(
- "This option will enable the scanning for malware on every server before it has been started and if something has been found, the power action will be canceled")]
- public bool MalwareCheckOnStart { get; set; } = true;
-
- [JsonProperty("BlockIpDuration")]
- [Description("The duration in minutes a ip will be blocked by the anti ddos system")]
- public int BlockIpDuration { get; set; } = 15;
-
- [JsonProperty("ReCaptcha")] public ReCaptchaData ReCaptcha { get; set; } = new();
-
- [JsonProperty("BlockDatacenterIps")]
- [Description(
- "If this option is enabled, users with an ip from datacenters will not be able to access the panel")]
- public bool BlockDatacenterIps { get; set; } = true;
-
- [JsonProperty("AllowCloudflareIps")]
- [Description("Allow cloudflare ips to bypass the datacenter ip check")]
- public bool AllowCloudflareIps { get; set; } = false;
- }
-
- public class ReCaptchaData
- {
- [JsonProperty("Enable")]
- [Description(
- "Enables repatcha at places like the register page. For information how to get your recaptcha credentails go to google.com/recaptcha/about/")]
- public bool Enable { get; set; } = false;
-
- [JsonProperty("SiteKey")] [Blur] public string SiteKey { get; set; } = "recaptcha site key here";
-
- [JsonProperty("SecretKey")] [Blur] public string SecretKey { get; set; } = "recaptcha secret here";
- }
-
- public class SentryData
- {
- [JsonProperty("Enable")]
- [Description(
- "Sentry is a way to monitor application crashes and performance issues in real time. Enable this option only if you set a sentry dsn")]
- public bool Enable { get; set; } = false;
-
- [JsonProperty("Dsn")]
- [Description("The dsn is the key moonlight needs to communicate with your sentry instance")]
- [Blur]
- public string Dsn { get; set; } = "http://your-sentry-url-here";
- }
-
- public class SmartDeployData
- {
- [JsonProperty("Server")] public SmartDeployServerData Server { get; set; } = new();
- }
-
- public class SmartDeployServerData
- {
- [JsonProperty("EnableOverride")] public bool EnableOverride { get; set; } = false;
-
- [JsonProperty("OverrideNode")] public long OverrideNode { get; set; } = 1;
- }
-
- public class StatisticsData
- {
- [JsonProperty("Enabled")] public bool Enabled { get; set; } = false;
-
- [JsonProperty("Wait")] public long Wait { get; set; } = 15;
- }
-
- public class SellPassData
- {
- [JsonProperty("Enable")] public bool Enable { get; set; } = false;
-
- [JsonProperty("Url")] public string Url { get; set; } = "https://not-implemented-yet";
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/DataContext.cs b/Moonlight/App/Database/DataContext.cs
deleted file mode 100644
index d872f3e5..00000000
--- a/Moonlight/App/Database/DataContext.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-using Microsoft.EntityFrameworkCore;
-using Moonlight.App.Database.Entities;
-using Moonlight.App.Database.Entities.Notification;
-using Moonlight.App.Database.Interceptors;
-using Moonlight.App.Services;
-
-namespace Moonlight.App.Database;
-
-public class DataContext : DbContext
-{
- private readonly ConfigService ConfigService;
-
- public DataContext(ConfigService configService)
- {
- ConfigService = configService;
- }
-
- public DbSet DockerImages { get; set; }
- public DbSet Images { get; set; }
- public DbSet ImageVariables { get; set; }
- public DbSet Nodes { get; set; }
- public DbSet NodeAllocations { get; set; }
- public DbSet Servers { get; set; }
- public DbSet ServerBackups { get; set; }
- public DbSet ServerVariables { get; set; }
- public DbSet Users { get; set; }
- public DbSet LoadingMessages { get; set; }
- public DbSet SharedDomains { get; set; }
- public DbSet Domains { get; set; }
- public DbSet Revokes { get; set; }
- public DbSet NotificationClients { get; set; }
- public DbSet NotificationActions { get; set; }
- public DbSet DdosAttacks { get; set; }
- public DbSet Subscriptions { get; set; }
- public DbSet Statistics { get; set; }
- public DbSet NewsEntries { get; set; }
-
- public DbSet CloudPanels { get; set; }
- public DbSet Databases { get; set; }
- public DbSet WebSpaces { get; set; }
- public DbSet SupportChatMessages { get; set; }
- public DbSet IpBans { get; set; }
- public DbSet PermissionGroups { get; set; }
- public DbSet SecurityLogs { get; set; }
- public DbSet BlocklistIps { get; set; }
- public DbSet WhitelistIps { get; set; }
-
- public DbSet Tickets { get; set; }
- public DbSet TicketMessages { get; set; }
-
- protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
- {
- if (!optionsBuilder.IsConfigured)
- {
- var config = ConfigService
- .Get()
- .Moonlight.Database;
-
- var connectionString = $"host={config.Host};" +
- $"port={config.Port};" +
- $"database={config.Database};" +
- $"uid={config.Username};" +
- $"pwd={config.Password}";
-
- optionsBuilder.UseMySql(
- connectionString,
- ServerVersion.Parse("5.7.37-mysql"),
- builder =>
- {
- builder.EnableRetryOnFailure(5);
- }
- );
-
- if(ConfigService.SqlDebugMode)
- optionsBuilder.AddInterceptors(new SqlLoggingInterceptor());
- }
- }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/BlocklistIp.cs b/Moonlight/App/Database/Entities/BlocklistIp.cs
deleted file mode 100644
index 5e80daf2..00000000
--- a/Moonlight/App/Database/Entities/BlocklistIp.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class BlocklistIp
-{
- public int Id { get; set; }
- public string Ip { get; set; } = "";
- public DateTime ExpiresAt { get; set; }
- public long Packets { get; set; }
- public DateTime CreatedAt { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/CloudPanel.cs b/Moonlight/App/Database/Entities/CloudPanel.cs
deleted file mode 100644
index de872b0f..00000000
--- a/Moonlight/App/Database/Entities/CloudPanel.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class CloudPanel
-{
- public int Id { get; set; }
- public string Name { get; set; } = "";
- public string ApiUrl { get; set; } = "";
- public string ApiKey { get; set; } = "";
- public string Host { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/DdosAttack.cs b/Moonlight/App/Database/Entities/DdosAttack.cs
deleted file mode 100644
index 1b792e29..00000000
--- a/Moonlight/App/Database/Entities/DdosAttack.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class DdosAttack
-{
- public int Id { get; set; }
- public bool Ongoing { get; set; }
- public long Data { get; set; }
- public string Ip { get; set; } = "";
- public Node Node { get; set; } = null!;
- public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/DockerImage.cs b/Moonlight/App/Database/Entities/DockerImage.cs
deleted file mode 100644
index 047d1faa..00000000
--- a/Moonlight/App/Database/Entities/DockerImage.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.Database.Entities;
-
-public class DockerImage
-{
- [JsonIgnore]
- public int Id { get; set; }
- public bool Default { get; set; } = false;
- public string Name { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/Domain.cs b/Moonlight/App/Database/Entities/Domain.cs
deleted file mode 100644
index 2f7645a6..00000000
--- a/Moonlight/App/Database/Entities/Domain.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-
-namespace Moonlight.App.Database.Entities;
-
-public class Domain
-{
- public int Id { get; set; }
-
- [Required]
- public string Name { get; set; }
- public SharedDomain SharedDomain { get; set; }
- public User Owner { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/Image.cs b/Moonlight/App/Database/Entities/Image.cs
deleted file mode 100644
index 70660f0d..00000000
--- a/Moonlight/App/Database/Entities/Image.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.Database.Entities;
-
-public class Image
-{
- [JsonIgnore]
- public int Id { get; set; }
- public Guid Uuid { get; set; }
- public string Name { get; set; } = "";
- public string Description { get; set; } = "";
- public string ConfigFiles { get; set; } = "{}";
- public string StopCommand { get; set; } = "";
- public string StartupDetection { get; set; } = "";
- public string InstallScript { get; set; } = "";
- public string InstallDockerImage { get; set; } = "";
- public string InstallEntrypoint { get; set; } = "";
- public string Startup { get; set; } = "";
- public int Allocations { get; set; } = 1;
- public List DockerImages { get; set; } = new();
- public List Variables { get; set; } = new();
- public string TagsJson { get; set; } = "";
- public string BackgroundImageUrl { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/ImageVariable.cs b/Moonlight/App/Database/Entities/ImageVariable.cs
deleted file mode 100644
index 8a394a70..00000000
--- a/Moonlight/App/Database/Entities/ImageVariable.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-using Newtonsoft.Json;
-
-namespace Moonlight.App.Database.Entities;
-
-public class ImageVariable
-{
- [JsonIgnore]
- public int Id { get; set; }
- public string Key { get; set; } = "";
- public string DefaultValue { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/IpBan.cs b/Moonlight/App/Database/Entities/IpBan.cs
deleted file mode 100644
index 7ace5eef..00000000
--- a/Moonlight/App/Database/Entities/IpBan.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class IpBan
-{
- public int Id { get; set; }
- public string Ip { get; set; } = "";
- public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/LoadingMessage.cs b/Moonlight/App/Database/Entities/LoadingMessage.cs
deleted file mode 100644
index 668590d0..00000000
--- a/Moonlight/App/Database/Entities/LoadingMessage.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class LoadingMessage
-{
- public int Id { get; set; }
- public string Message { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/MySqlDatabase.cs b/Moonlight/App/Database/Entities/MySqlDatabase.cs
deleted file mode 100644
index c9cdc6ef..00000000
--- a/Moonlight/App/Database/Entities/MySqlDatabase.cs
+++ /dev/null
@@ -1,9 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class MySqlDatabase
-{
- public int Id { get; set; }
- public WebSpace WebSpace { get; set; }
- public string UserName { get; set; } = "";
- public string Password { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/NewsEntry.cs b/Moonlight/App/Database/Entities/NewsEntry.cs
deleted file mode 100644
index d40fb26c..00000000
--- a/Moonlight/App/Database/Entities/NewsEntry.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class NewsEntry
-{
- public int Id { get; set; }
-
- public DateTime Date { get; set; }
- public string Title { get; set; }
- public string Markdown { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/Node.cs b/Moonlight/App/Database/Entities/Node.cs
deleted file mode 100644
index 1eb293c5..00000000
--- a/Moonlight/App/Database/Entities/Node.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class Node
-{
- public int Id { get; set; }
- public string Name { get; set; } = "";
- public string Fqdn { get; set; } = "";
- public string TokenId { get; set; } = "";
- public string Token { get; set; } = "";
- public int SftpPort { get; set; }
- public int HttpPort { get; set; }
- public int MoonlightDaemonPort { get; set; }
- public List Allocations { get; set; } = new();
- public bool Ssl { get; set; } = false;
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/NodeAllocation.cs b/Moonlight/App/Database/Entities/NodeAllocation.cs
deleted file mode 100644
index d726f7f6..00000000
--- a/Moonlight/App/Database/Entities/NodeAllocation.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class NodeAllocation
-{
- public int Id { get; set; }
- public int Port { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/Notification/NotificationAction.cs b/Moonlight/App/Database/Entities/Notification/NotificationAction.cs
deleted file mode 100644
index 3d7d052c..00000000
--- a/Moonlight/App/Database/Entities/Notification/NotificationAction.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Moonlight.App.Database.Entities.Notification;
-
-public class NotificationAction
-{
- public int Id { get; set; }
- public NotificationClient NotificationClient { get; set; }
- public string Action { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/Notification/NotificationClient.cs b/Moonlight/App/Database/Entities/Notification/NotificationClient.cs
deleted file mode 100644
index 133a1dcb..00000000
--- a/Moonlight/App/Database/Entities/Notification/NotificationClient.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Moonlight.App.Database.Entities.Notification;
-
-public class NotificationClient
-{
- public int Id { get; set; }
- public User User { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/PermissionGroup.cs b/Moonlight/App/Database/Entities/PermissionGroup.cs
deleted file mode 100644
index f6b44bab..00000000
--- a/Moonlight/App/Database/Entities/PermissionGroup.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class PermissionGroup
-{
- public int Id { get; set; }
- public string Name { get; set; } = "";
- public byte[] Permissions { get; set; } = Array.Empty();
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/Revoke.cs b/Moonlight/App/Database/Entities/Revoke.cs
deleted file mode 100644
index 142d86a6..00000000
--- a/Moonlight/App/Database/Entities/Revoke.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class Revoke
-{
- public int Id { get; set; }
- public string Identifier { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/SecurityLog.cs b/Moonlight/App/Database/Entities/SecurityLog.cs
deleted file mode 100644
index 4d83890b..00000000
--- a/Moonlight/App/Database/Entities/SecurityLog.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class SecurityLog
-{
- public int Id { get; set; }
- public string Text { get; set; } = "";
- public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/Server.cs b/Moonlight/App/Database/Entities/Server.cs
deleted file mode 100644
index bea519d1..00000000
--- a/Moonlight/App/Database/Entities/Server.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class Server
-{
- public int Id { get; set; }
- public Guid Uuid { get; set; }
- public string Name { get; set; } = "";
- public int Cpu { get; set; }
- public long Memory { get; set; }
- public long Disk { get; set; }
- public Image Image { get; set; } = null!;
- public int DockerImageIndex { get; set; } = 0;
- public string OverrideStartup { get; set; } = "";
- public bool Installing { get; set; } = false;
- public bool Suspended { get; set; } = false;
- public bool IsArchived { get; set; } = false;
- public ServerBackup? Archive { get; set; } = null;
-
- public List Variables { get; set; } = new();
- public List Backups { get; set; } = new();
- public List Allocations { get; set; } = new();
- public NodeAllocation? MainAllocation { get; set; } = null;
- public Node Node { get; set; } = null!;
- public User Owner { get; set; } = null!;
- public bool IsCleanupException { get; set; } = false;
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/ServerBackup.cs b/Moonlight/App/Database/Entities/ServerBackup.cs
deleted file mode 100644
index 185e59ae..00000000
--- a/Moonlight/App/Database/Entities/ServerBackup.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class ServerBackup
-{
- public int Id { get; set; }
- public string Name { get; set; } = "";
- public Guid Uuid { get; set; }
- public DateTime CreatedAt { get; set; }
- public bool Created { get; set; } = false;
- public long Bytes { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/ServerVariable.cs b/Moonlight/App/Database/Entities/ServerVariable.cs
deleted file mode 100644
index 0feecbb4..00000000
--- a/Moonlight/App/Database/Entities/ServerVariable.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class ServerVariable
-{
- public int Id { get; set; }
- public string Key { get; set; } = "";
- public string Value { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/SharedDomain.cs b/Moonlight/App/Database/Entities/SharedDomain.cs
deleted file mode 100644
index cf9f27ae..00000000
--- a/Moonlight/App/Database/Entities/SharedDomain.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class SharedDomain
-{
- public int Id { get; set; }
- public string Name { get; set; }
- public string CloudflareId { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/StatisticsData.cs b/Moonlight/App/Database/Entities/StatisticsData.cs
deleted file mode 100644
index 64f8ea7d..00000000
--- a/Moonlight/App/Database/Entities/StatisticsData.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class StatisticsData
-{
- public int Id { get; set; }
-
- public string Chart { get; set; }
-
- public double Value { get; set; }
-
- public DateTime Date { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/Subscription.cs b/Moonlight/App/Database/Entities/Subscription.cs
deleted file mode 100644
index 5e1fd059..00000000
--- a/Moonlight/App/Database/Entities/Subscription.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-using Moonlight.App.Models.Misc;
-
-namespace Moonlight.App.Database.Entities;
-
-public class Subscription
-{
- public int Id { get; set; }
- public string Name { get; set; } = "";
- public string Description { get; set; } = "";
- public Currency Currency { get; set; } = Currency.USD;
- public double Price { get; set; }
- public string StripeProductId { get; set; } = "";
- public string StripePriceId { get; set; } = "";
- public string LimitsJson { get; set; } = "";
- public int Duration { get; set; } = 30;
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/SupportChatMessage.cs b/Moonlight/App/Database/Entities/SupportChatMessage.cs
deleted file mode 100644
index 47ad3e6b..00000000
--- a/Moonlight/App/Database/Entities/SupportChatMessage.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-using Moonlight.App.Models.Misc;
-
-namespace Moonlight.App.Database.Entities;
-
-public class SupportChatMessage
-{
- public int Id { get; set; }
-
- public string Content { get; set; } = "";
- public string Attachment { get; set; } = "";
-
- public User? Sender { get; set; }
- public User Recipient { get; set; }
-
- public bool IsQuestion { get; set; } = false;
- public QuestionType QuestionType { get; set; }
- public string Answer { get; set; } = "";
-
- public DateTime CreatedAt { get; set; }
- public DateTime UpdatedAt { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/SupportChatSnippets.cs b/Moonlight/App/Database/Entities/SupportChatSnippets.cs
deleted file mode 100644
index b4021ae2..00000000
--- a/Moonlight/App/Database/Entities/SupportChatSnippets.cs
+++ /dev/null
@@ -1,8 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class SupportChatSnippets
-{
- public int Id { get; set; }
- public string Name { get; set; } = "";
- public string Description { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/Ticket.cs b/Moonlight/App/Database/Entities/Ticket.cs
deleted file mode 100644
index 2a90d917..00000000
--- a/Moonlight/App/Database/Entities/Ticket.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-using Moonlight.App.Models.Misc;
-
-namespace Moonlight.App.Database.Entities;
-
-public class Ticket
-{
- public int Id { get; set; }
- public string IssueTopic { get; set; } = "";
- public string IssueDescription { get; set; } = "";
- public string IssueTries { get; set; } = "";
- public User CreatedBy { get; set; }
- public User? AssignedTo { get; set; }
- public TicketPriority Priority { get; set; }
- public TicketStatus Status { get; set; }
- public TicketSubject Subject { get; set; }
- public int SubjectId { get; set; }
- public List Messages { get; set; } = new();
- public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/TicketMessage.cs b/Moonlight/App/Database/Entities/TicketMessage.cs
deleted file mode 100644
index 940631bc..00000000
--- a/Moonlight/App/Database/Entities/TicketMessage.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class TicketMessage
-{
- public int Id { get; set; }
- public string Content { get; set; } = "";
- public string? AttachmentUrl { get; set; }
- public User? Sender { get; set; }
- public bool IsSystemMessage { get; set; }
- public bool IsEdited { get; set; }
- public bool IsSupportMessage { get; set; }
- public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
- public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/User.cs b/Moonlight/App/Database/Entities/User.cs
deleted file mode 100644
index be6036f4..00000000
--- a/Moonlight/App/Database/Entities/User.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-using System.ComponentModel.DataAnnotations;
-using Moonlight.App.Models.Misc;
-
-namespace Moonlight.App.Database.Entities;
-
-public class User
-{
- public int Id { get; set; }
-
- // Personal data
-
- public string FirstName { get; set; } = "";
-
- public string LastName { get; set; } = "";
-
- public string Email { get; set; } = "";
-
- public string Password { get; set; } = "";
-
- public string Address { get; set; } = "";
-
- public string City { get; set; } = "";
-
- public string State { get; set; } = "";
-
- public string Country { get; set; } = "";
-
- public string ServerListLayoutJson { get; set; } = "";
-
- // States
-
- public UserStatus Status { get; set; } = UserStatus.Unverified;
- public bool Admin { get; set; } = false;
- public bool SupportPending { get; set; } = false;
- public bool HasRated { get; set; } = false;
- public int Rating { get; set; } = 0;
- public bool StreamerMode { get; set; } = false;
-
- // Security
- public bool TotpEnabled { get; set; } = false;
- public string TotpSecret { get; set; } = "";
- public DateTime TokenValidTime { get; set; } = DateTime.UtcNow;
- public byte[] Permissions { get; set; } = Array.Empty();
- public PermissionGroup? PermissionGroup { get; set; }
-
- // Discord
- public ulong DiscordId { get; set; }
-
- // Date stuff
- public DateTime CreatedAt { get; set; } = DateTime.UtcNow;
- public DateTime UpdatedAt { get; set; } = DateTime.UtcNow;
- public DateTime LastVisitedAt { get; set; } = DateTime.UtcNow;
-
- // Subscriptions
-
- public Subscription? CurrentSubscription { get; set; } = null;
- public DateTime SubscriptionSince { get; set; } = DateTime.UtcNow;
- public DateTime SubscriptionExpires { get; set; } = DateTime.UtcNow;
-
- // Ip logs
- public string RegisterIp { get; set; } = "";
- public string LastIp { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/WebSpace.cs b/Moonlight/App/Database/Entities/WebSpace.cs
deleted file mode 100644
index 1112fdf6..00000000
--- a/Moonlight/App/Database/Entities/WebSpace.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class WebSpace
-{
- public int Id { get; set; }
- public string Domain { get; set; } = "";
- public string UserName { get; set; } = "";
- public string Password { get; set; } = "";
- public string VHostTemplate { get; set; } = "";
- public User Owner { get; set; }
- public List Databases { get; set; } = new();
- public CloudPanel CloudPanel { get; set; }
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Entities/WhitelistIp.cs b/Moonlight/App/Database/Entities/WhitelistIp.cs
deleted file mode 100644
index 571263a1..00000000
--- a/Moonlight/App/Database/Entities/WhitelistIp.cs
+++ /dev/null
@@ -1,7 +0,0 @@
-namespace Moonlight.App.Database.Entities;
-
-public class WhitelistIp
-{
- public int Id { get; set; }
- public string Ip { get; set; } = "";
-}
\ No newline at end of file
diff --git a/Moonlight/App/Database/Interceptors/SqlLoggingInterceptor.cs b/Moonlight/App/Database/Interceptors/SqlLoggingInterceptor.cs
deleted file mode 100644
index 7b19fb1a..00000000
--- a/Moonlight/App/Database/Interceptors/SqlLoggingInterceptor.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-using System.Data.Common;
-using Microsoft.EntityFrameworkCore.Diagnostics;
-using Moonlight.App.Helpers;
-
-namespace Moonlight.App.Database.Interceptors;
-
-public class SqlLoggingInterceptor : DbCommandInterceptor
-{
- public override InterceptionResult ReaderExecuting(
- DbCommand command,
- CommandEventData eventData,
- InterceptionResult result)
- {
- LogSql(command.CommandText);
- return base.ReaderExecuting(command, eventData, result);
- }
-
- public override InterceptionResult