using CaddyManager.Contracts.Models.Caddy;
using CaddyManager.Contracts.Configurations.Caddy;
namespace CaddyManager.Contracts.Caddy;
using CaddyManager.Contracts.Models.Caddy;
using CaddyManager.Contracts.Configurations.Caddy;
///
/// Contracts for Caddy Service to help monitor the available Caddy configurations
///
public interface ICaddyService
{
///
/// Returns the existing Caddy configurations within the configured directory
///
///
List GetExistingCaddyConfigurations();
///
/// Method to get the content of a Caddy configuration file by its name
/// The expected path to be [ConfigDir]/[configurationName].caddy
///
///
///
string GetCaddyConfigurationContent(string configurationName);
///
/// Method to get the content of the global Caddy configuration file
///
///
string GetCaddyGlobalConfigurationContent();
///
/// Method to help save a Caddy configuration file
///
///
///
CaddyOperationResponse SaveCaddyConfiguration(CaddySaveConfigurationRequest request);
///
/// Method to help save the global Caddyfile configuration
///
///
///
CaddyOperationResponse SaveCaddyGlobalConfiguration(string content);
///
/// Method to delete the given Caddy configurations by name
///
///
///
CaddyDeleteOperationResponse DeleteCaddyConfigurations(List configurationNames);
///
/// Parse the Caddy configuration file and return the information about it
///
///
///
CaddyConfigurationInfo GetCaddyConfigurationInfo(string configurationName);
}