init
This commit is contained in:
commit
ded4f4db26
43 changed files with 2052 additions and 0 deletions
42
Catalogger.Backend/Config.cs
Normal file
42
Catalogger.Backend/Config.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
using Serilog.Events;
|
||||
|
||||
namespace Catalogger.Backend;
|
||||
|
||||
public class Config
|
||||
{
|
||||
public LoggingConfig Logging { get; init; } = new();
|
||||
public DatabaseConfig Database { get; init; } = new();
|
||||
public DiscordConfig Discord { get; init; } = new();
|
||||
public WebConfig Web { get; init; } = new();
|
||||
|
||||
public class LoggingConfig
|
||||
{
|
||||
public LogEventLevel LogEventLevel { get; init; } = LogEventLevel.Debug;
|
||||
public bool LogQueries { get; init; } = false;
|
||||
}
|
||||
|
||||
public class DatabaseConfig
|
||||
{
|
||||
public string Url { get; init; } = string.Empty;
|
||||
public string Redis { get; init; } = string.Empty;
|
||||
public int? Timeout { get; init; }
|
||||
public int? MaxPoolSize { get; init; }
|
||||
public string EncryptionKey { get; init; } = string.Empty;
|
||||
}
|
||||
|
||||
public class DiscordConfig
|
||||
{
|
||||
public ulong ApplicationId { get; set; }
|
||||
public string Token { get; init; } = string.Empty;
|
||||
public bool SyncCommands { get; init; }
|
||||
public ulong? CommandsGuildId { get; init; }
|
||||
}
|
||||
|
||||
public class WebConfig
|
||||
{
|
||||
public string Host { get; init; } = "localhost";
|
||||
public int Port { get; init; } = 5000;
|
||||
public string BaseUrl { get; init; } = null!;
|
||||
public string Address => $"http://{Host}:{Port}";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue