1+ namespace Moonlight . App . Configuration ;
2+
3+ using System ;
4+ using Newtonsoft . Json ;
5+
6+ public class ConfigV1
7+ {
8+ [ JsonProperty ( "Moonlight" ) ] public MoonlightData Moonlight { get ; set ; } = new ( ) ;
9+
10+ public class MoonlightData
11+ {
12+ [ JsonProperty ( "AppUrl" ) ] public string AppUrl { get ; set ; } = "http://your-moonlight-url-without-slash" ;
13+
14+ [ JsonProperty ( "Database" ) ] public DatabaseData Database { get ; set ; } = new ( ) ;
15+
16+ [ JsonProperty ( "DiscordBotApi" ) ] public DiscordBotData DiscordBotApi { get ; set ; } = new ( ) ;
17+
18+ [ JsonProperty ( "DiscordBot" ) ] public DiscordBotData DiscordBot { get ; set ; } = new ( ) ;
19+
20+ [ JsonProperty ( "Domains" ) ] public DomainsData Domains { get ; set ; } = new ( ) ;
21+
22+ [ JsonProperty ( "Html" ) ] public HtmlData Html { get ; set ; } = new ( ) ;
23+
24+ [ JsonProperty ( "Marketing" ) ] public MarketingData Marketing { get ; set ; } = new ( ) ;
25+
26+ [ JsonProperty ( "OAuth2" ) ] public OAuth2Data OAuth2 { get ; set ; } = new ( ) ;
27+
28+ [ JsonProperty ( "Security" ) ] public SecurityData Security { get ; set ; } = new ( ) ;
29+
30+ [ JsonProperty ( "Mail" ) ] public MailData Mail { get ; set ; } = new ( ) ;
31+
32+ [ JsonProperty ( "Cleanup" ) ] public CleanupData Cleanup { get ; set ; } = new ( ) ;
33+
34+ [ JsonProperty ( "Subscriptions" ) ] public SubscriptionsData Subscriptions { get ; set ; } = new ( ) ;
35+
36+ [ JsonProperty ( "DiscordNotifications" ) ]
37+ public DiscordNotificationsData DiscordNotifications { get ; set ; } = new ( ) ;
38+
39+ [ JsonProperty ( "Statistics" ) ] public StatisticsData Statistics { get ; set ; } = new ( ) ;
40+
41+ [ JsonProperty ( "Rating" ) ] public RatingData Rating { get ; set ; } = new ( ) ;
42+
43+ [ JsonProperty ( "SmartDeploy" ) ] public SmartDeployData SmartDeploy { get ; set ; } = new ( ) ;
44+
45+ [ JsonProperty ( "Sentry" ) ] public SentryData Sentry { get ; set ; } = new ( ) ;
46+ }
47+
48+ public class CleanupData
49+ {
50+ [ JsonProperty ( "Cpu" ) ] public long Cpu { get ; set ; } = 90 ;
51+
52+ [ JsonProperty ( "Memory" ) ] public long Memory { get ; set ; } = 8192 ;
53+
54+ [ JsonProperty ( "Wait" ) ] public long Wait { get ; set ; } = 15 ;
55+
56+ [ JsonProperty ( "Uptime" ) ] public long Uptime { get ; set ; } = 6 ;
57+
58+ [ JsonProperty ( "Enable" ) ] public bool Enable { get ; set ; } = false ;
59+
60+ [ JsonProperty ( "MinUptime" ) ] public long MinUptime { get ; set ; } = 10 ;
61+ }
62+
63+ public class DatabaseData
64+ {
65+ [ JsonProperty ( "Database" ) ] public string Database { get ; set ; } = "moonlight_db" ;
66+
67+ [ JsonProperty ( "Host" ) ] public string Host { get ; set ; } = "your.database.host" ;
68+
69+ [ JsonProperty ( "Password" ) ] public string Password { get ; set ; } = "secret" ;
70+
71+ [ JsonProperty ( "Port" ) ] public long Port { get ; set ; } = 3306 ;
72+
73+ [ JsonProperty ( "Username" ) ] public string Username { get ; set ; } = "moonlight_user" ;
74+ }
75+
76+ public class DiscordBotData
77+ {
78+ [ JsonProperty ( "Enable" ) ] public bool Enable { get ; set ; } = false ;
79+
80+ [ JsonProperty ( "Token" ) ] public string Token { get ; set ; } = "discord token here" ;
81+
82+ [ JsonProperty ( "PowerActions" ) ] public bool PowerActions { get ; set ; } = false ;
83+ [ JsonProperty ( "SendCommands" ) ] public bool SendCommands { get ; set ; } = false ;
84+ }
85+
86+ public class DiscordNotificationsData
87+ {
88+ [ JsonProperty ( "Enable" ) ] public bool Enable { get ; set ; } = false ;
89+
90+ [ JsonProperty ( "WebHook" ) ] public string WebHook { get ; set ; } = "http://your-discord-webhook-url" ;
91+ }
92+
93+ public class DomainsData
94+ {
95+ [ JsonProperty ( "Enable" ) ] public bool Enable { get ; set ; } = false ;
96+ [ JsonProperty ( "AccountId" ) ] public string AccountId { get ; set ; } = "cloudflare acc id" ;
97+
98+ [ JsonProperty ( "Email" ) ] public string Email { get ; set ; } = "[email protected] " ; 99+
100+ [ JsonProperty ( "Key" ) ] public string Key { get ; set ; } = "secret" ;
101+ }
102+
103+ public class HtmlData
104+ {
105+ [ JsonProperty ( "Headers" ) ] public HeadersData Headers { get ; set ; } = new ( ) ;
106+ }
107+
108+ public class HeadersData
109+ {
110+ [ JsonProperty ( "Color" ) ] public string Color { get ; set ; } = "#4b27e8" ;
111+
112+ [ JsonProperty ( "Description" ) ] public string Description { get ; set ; } = "the next generation hosting panel" ;
113+
114+ [ JsonProperty ( "Keywords" ) ] public string Keywords { get ; set ; } = "moonlight" ;
115+
116+ [ JsonProperty ( "Title" ) ] public string Title { get ; set ; } = "Moonlight - endelon.link" ;
117+ }
118+
119+ public class MailData
120+ {
121+ [ JsonProperty ( "Email" ) ] public string Email { get ; set ; } = "[email protected] " ; 122+
123+ [ JsonProperty ( "Server" ) ] public string Server { get ; set ; } = "your.mail.host" ;
124+
125+ [ JsonProperty ( "Password" ) ] public string Password { get ; set ; } = "secret" ;
126+
127+ [ JsonProperty ( "Port" ) ] public int Port { get ; set ; } = 465 ;
128+
129+ [ JsonProperty ( "Ssl" ) ] public bool Ssl { get ; set ; } = true ;
130+ }
131+
132+ public class MarketingData
133+ {
134+ [ JsonProperty ( "BrandName" ) ] public string BrandName { get ; set ; } = "Endelon Hosting" ;
135+
136+ [ JsonProperty ( "Imprint" ) ] public string Imprint { get ; set ; } = "https://your-site.xyz/imprint" ;
137+
138+ [ JsonProperty ( "Privacy" ) ] public string Privacy { get ; set ; } = "https://your-site.xyz/privacy" ;
139+ [ JsonProperty ( "About" ) ] public string About { get ; set ; } = "https://your-site.xyz/about" ;
140+ [ JsonProperty ( "Website" ) ] public string Website { get ; set ; } = "https://your-site.xyz" ;
141+ }
142+
143+ public class OAuth2Data
144+ {
145+ [ JsonProperty ( "OverrideUrl" ) ] public string OverrideUrl { get ; set ; } = "https://only-for-development.cases" ;
146+
147+ [ JsonProperty ( "EnableOverrideUrl" ) ] public bool EnableOverrideUrl { get ; set ; } = false ;
148+
149+ [ JsonProperty ( "Providers" ) ]
150+ public OAuth2ProviderData [ ] Providers { get ; set ; } = Array . Empty < OAuth2ProviderData > ( ) ;
151+ }
152+
153+ public class OAuth2ProviderData
154+ {
155+ [ JsonProperty ( "Id" ) ] public string Id { get ; set ; }
156+
157+ [ JsonProperty ( "ClientId" ) ] public string ClientId { get ; set ; }
158+
159+ [ JsonProperty ( "ClientSecret" ) ] public string ClientSecret { get ; set ; }
160+ }
161+
162+ public class RatingData
163+ {
164+ [ JsonProperty ( "Enabled" ) ] public bool Enabled { get ; set ; } = false ;
165+
166+ [ JsonProperty ( "Url" ) ] public string Url { get ; set ; } = "https://link-to-google-or-smth" ;
167+
168+ [ JsonProperty ( "MinRating" ) ] public int MinRating { get ; set ; } = 4 ;
169+
170+ [ JsonProperty ( "DaysSince" ) ] public int DaysSince { get ; set ; } = 5 ;
171+ }
172+
173+ public class SecurityData
174+ {
175+ [ JsonProperty ( "Token" ) ] public string Token { get ; set ; } = Guid . NewGuid ( ) . ToString ( ) ;
176+
177+ [ JsonProperty ( "ReCaptcha" ) ] public ReCaptchaData ReCaptcha { get ; set ; }
178+ }
179+
180+ public class ReCaptchaData
181+ {
182+ [ JsonProperty ( "Enable" ) ] public bool Enable { get ; set ; } = false ;
183+
184+ [ JsonProperty ( "SiteKey" ) ] public string SiteKey { get ; set ; } = "recaptcha site key here" ;
185+
186+ [ JsonProperty ( "SecretKey" ) ] public string SecretKey { get ; set ; } = "recaptcha secret here" ;
187+ }
188+
189+ public class SentryData
190+ {
191+ [ JsonProperty ( "Enable" ) ] public bool Enable { get ; set ; } = false ;
192+
193+ [ JsonProperty ( "Dsn" ) ] public string Dsn { get ; set ; } = "http://your-sentry-url-here" ;
194+ }
195+
196+ public class SmartDeployData
197+ {
198+ [ JsonProperty ( "Server" ) ] public SmartDeployServerData Server { get ; set ; } = new ( ) ;
199+ }
200+
201+ public class SmartDeployServerData
202+ {
203+ [ JsonProperty ( "EnableOverride" ) ] public bool EnableOverride { get ; set ; } = false ;
204+
205+ [ JsonProperty ( "OverrideNode" ) ] public long OverrideNode { get ; set ; } = 1 ;
206+ }
207+
208+ public class StatisticsData
209+ {
210+ [ JsonProperty ( "Enabled" ) ] public bool Enabled { get ; set ; } = false ;
211+
212+ [ JsonProperty ( "Wait" ) ] public long Wait { get ; set ; } = 15 ;
213+ }
214+
215+ public class SubscriptionsData
216+ {
217+ [ JsonProperty ( "SellPass" ) ] public SellPassData SellPass { get ; set ; } = new ( ) ;
218+ }
219+
220+ public class SellPassData
221+ {
222+ [ JsonProperty ( "Enable" ) ] public bool Enable { get ; set ; } = false ;
223+
224+ [ JsonProperty ( "Url" ) ] public string Url { get ; set ; } = "https://not-implemented-yet" ;
225+ }
226+ }
0 commit comments