chore: update project structure with contracts and services for CaddyManager, including configuration and Docker integration
All checks were successful
Caddy Manager CI build / docker (push) Successful in 1m16s
All checks were successful
Caddy Manager CI build / docker (push) Successful in 1m16s
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
namespace CaddyManager.Contracts.Models.Caddy;
|
||||
|
||||
/// <summary>
|
||||
/// Wraps the information parsed from the Caddy configuration file.
|
||||
/// </summary>
|
||||
public class CaddyConfigurationInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Hostnames that are configured in the Caddyfile.
|
||||
/// </summary>
|
||||
public List<string> Hostnames { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// The hostname of the reverse proxy server.
|
||||
/// </summary>
|
||||
public string ReverseProxyHostname { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Ports being used with the reverse proxy hostname
|
||||
/// </summary>
|
||||
public List<int> ReverseProxyPorts { get; set; } = [];
|
||||
|
||||
/// <summary>
|
||||
/// The name of the configuration file.
|
||||
/// </summary>
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// Aggregated ports for the reverse proxy hostname from all configurations.
|
||||
/// </summary>
|
||||
public List<int> AggregatedReverseProxyPorts { get; set; } = [];
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj is not CaddyConfigurationInfo other)
|
||||
return false;
|
||||
return FileName == other.FileName;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return FileName.GetHashCode();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user