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:
60
CaddyManager.Contracts/Caddy/ICaddyService.cs
Normal file
60
CaddyManager.Contracts/Caddy/ICaddyService.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using CaddyManager.Contracts.Models.Caddy;
|
||||
using CaddyManager.Contracts.Configurations.Caddy;
|
||||
|
||||
namespace CaddyManager.Contracts.Caddy;
|
||||
using CaddyManager.Contracts.Models.Caddy;
|
||||
using CaddyManager.Contracts.Configurations.Caddy;
|
||||
|
||||
/// <summary>
|
||||
/// Contracts for Caddy Service to help monitor the available Caddy configurations
|
||||
/// </summary>
|
||||
public interface ICaddyService
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the existing Caddy configurations within the configured directory
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
List<CaddyConfigurationInfo> GetExistingCaddyConfigurations();
|
||||
|
||||
/// <summary>
|
||||
/// Method to get the content of a Caddy configuration file by its name
|
||||
/// The expected path to be [ConfigDir]/[configurationName].caddy
|
||||
/// </summary>
|
||||
/// <param name="configurationName"></param>
|
||||
/// <returns></returns>
|
||||
string GetCaddyConfigurationContent(string configurationName);
|
||||
|
||||
/// <summary>
|
||||
/// Method to get the content of the global Caddy configuration file
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
string GetCaddyGlobalConfigurationContent();
|
||||
|
||||
/// <summary>
|
||||
/// Method to help save a Caddy configuration file
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
CaddyOperationResponse SaveCaddyConfiguration(CaddySaveConfigurationRequest request);
|
||||
|
||||
/// <summary>
|
||||
/// Method to help save the global Caddyfile configuration
|
||||
/// </summary>
|
||||
/// <param name="content"></param>
|
||||
/// <returns></returns>
|
||||
CaddyOperationResponse SaveCaddyGlobalConfiguration(string content);
|
||||
|
||||
/// <summary>
|
||||
/// Method to delete the given Caddy configurations by name
|
||||
/// </summary>
|
||||
/// <param name="configurationNames"></param>
|
||||
/// <returns></returns>
|
||||
CaddyDeleteOperationResponse DeleteCaddyConfigurations(List<string> configurationNames);
|
||||
|
||||
/// <summary>
|
||||
/// Parse the Caddy configuration file and return the information about it
|
||||
/// </summary>
|
||||
/// <param name="configurationName"></param>
|
||||
/// <returns></returns>
|
||||
CaddyConfigurationInfo GetCaddyConfigurationInfo(string configurationName);
|
||||
}
|
||||
Reference in New Issue
Block a user