2026-02-18 10:43:27 -05:00
|
|
|
namespace OTSSignsOrchestrator.Core.Configuration;
|
2026-02-12 15:24:25 -05:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Shared constants for the application.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public static class AppConstants
|
|
|
|
|
{
|
|
|
|
|
public const string AdminRole = "Admin";
|
|
|
|
|
public const string ViewerRole = "Viewer";
|
|
|
|
|
|
|
|
|
|
/// <summary>Docker secret name for the global SMTP password.</summary>
|
|
|
|
|
public const string GlobalSmtpSecretName = "global_smtp_password";
|
|
|
|
|
|
|
|
|
|
/// <summary>Build a per-customer MySQL password secret name.</summary>
|
|
|
|
|
public static string CustomerMysqlSecretName(string customerName)
|
|
|
|
|
=> $"{SanitizeName(customerName)}_mysql_password";
|
|
|
|
|
|
|
|
|
|
/// <summary>Sanitize a customer name for use in Docker/secret names.</summary>
|
|
|
|
|
public static string SanitizeName(string name)
|
|
|
|
|
=> new string(name.Where(c => char.IsLetterOrDigit(c) || c == '-' || c == '_').ToArray()).ToLowerInvariant();
|
|
|
|
|
}
|