Files
mixtape/zero.Core/Configuration.cs
T

82 lines
1.9 KiB
C#
Raw Normal View History

2020-03-24 23:09:29 +01:00
namespace zero.Core
2020-03-22 14:47:59 +01:00
{
public class ZeroConfiguration : IZeroConfiguration
2020-03-22 14:47:59 +01:00
{
/// <inheritdoc />
public string ZeroVersion { get; set; }
/// <inheritdoc />
2020-03-25 00:47:14 +01:00
public string DefaultLanguage { get; set; }
2020-04-13 12:14:19 +02:00
/// <inheritdoc />
public string[] SupportedLanguages { get; private set; } = new string[] { "en-US", "de-DE" };
2020-04-22 15:46:35 +02:00
/// <inheritdoc />
public int TokenExpiration { get; set; }
/// <inheritdoc />
2020-03-22 14:47:59 +01:00
public RavenConfig Raven { get; set; }
/// <inheritdoc />
2020-03-22 14:47:59 +01:00
public LoggingConfig Logging { get; set; }
}
public interface IZeroConfiguration
2020-03-22 14:47:59 +01:00
{
/// <summary>
/// The currently active version
/// This should not be set manually, as it is used for setup and migrations and incremented automatically
/// </summary>
string ZeroVersion { get; set; }
/// <summary>
/// Default language ISO code
/// </summary>
2020-03-25 00:47:14 +01:00
string DefaultLanguage { get; set; }
2020-04-13 12:14:19 +02:00
/// <summary>
/// Language ISO codes which are supported by the zero backoffice
/// </summary>
string[] SupportedLanguages { get; }
2020-04-22 15:46:35 +02:00
/// <summary>
/// Expiration in minutes of a generated change token for an entity
/// </summary>
int TokenExpiration { get; set; }
/// <summary>
/// RavenDB configuration data
/// </summary>
2020-03-22 14:47:59 +01:00
RavenConfig Raven { get; set; }
/// <summary>
/// Logging
/// </summary>
2020-03-22 14:47:59 +01:00
LoggingConfig Logging { get; set; }
}
public class FoldersConfig
{
public string Temp { get; set; }
}
public class LoggingConfig
{
public bool IncludeScopes { get; set; }
public LogLevel LogLevel { get; set; }
}
public class LogLevel
{
public string Default { get; set; }
public string System { get; set; }
public string Microsoft { get; set; }
}
public class RavenConfig
{
public string Url { get; set; }
public string Database { get; set; }
}
}