namespace CaddyManager.Contracts.Caddy;
/// 
/// Contract for a service that parses Caddy configuration files.
/// 
public interface ICaddyConfigurationParsingService
{
    /// 
    /// Extracts outermost hostname declarations from a Caddyfile content.
    /// i.e.
    /// ```
    /// caddy.domain.name {
    ///     route {
    ///         reverse_proxy localhost:8080
    ///         encode zstd gzip
    ///     }
    /// }
    /// ```
    /// will return `["caddy.domain.name"]`.
    /// 
    /// 
    /// 
    List GetHostnamesFromCaddyfileContent(string caddyfileContent);
    
    /// 
    /// Extracts the reverse proxy target from a Caddyfile content.
    /// 
    /// 
    /// 
    string GetReverseProxyTargetFromCaddyfileContent(string caddyfileContent);
    
    /// 
    /// Extracts the ports being used with the reverse proxy host
    /// 
    /// 
    /// 
    List GetReverseProxyPortsFromCaddyfileContent(string caddyfileContent);
    /// 
    /// Extracts tags from a Caddyfile content using the format: # Tags: [tag1;tag2;tag3]
    /// 
    /// 
    /// 
    List GetTagsFromCaddyfileContent(string caddyfileContent);
}