using System.ComponentModel.DataAnnotations;
namespace DysonNetwork.Gateway.Configuration;
public class GatewayEndpointsOptions
{
public const string SectionName = "Endpoints";
///
/// List of all services that the gateway should manage.
/// If not specified, defaults to the built-in service list.
///
public List? ServiceNames { get; set; }
///
/// List of core services that are essential for the application to function.
/// If not specified, defaults to the built-in core service list.
///
public List? CoreServiceNames { get; set; }
///
/// Default service names used when no configuration is provided.
///
public static readonly string[] DefaultServiceNames =
[
"ring",
"pass",
"drive",
"sphere",
"develop",
"insight",
"zone",
"messager"
];
///
/// Default core service names used when no configuration is provided.
///
public static readonly string[] DefaultCoreServiceNames =
[
"ring",
"pass",
"drive",
"sphere"
];
///
/// Gets the effective service names, using configuration if available, otherwise defaults.
///
public string[] GetServiceNames() => ServiceNames?.ToArray() ?? DefaultServiceNames;
///
/// Gets the effective core service names, using configuration if available, otherwise defaults.
///
public string[] GetCoreServiceNames() => CoreServiceNames?.ToArray() ?? DefaultCoreServiceNames;
}