20 lines
644 B
C#
20 lines
644 B
C#
|
|
namespace OTSSignsOrchestrator.Core.Services;
|
||
|
|
|
||
|
|
/// <summary>
|
||
|
|
/// Abstraction for Docker Swarm secret operations.
|
||
|
|
/// Implementations may use Docker.DotNet, local CLI, or SSH-based remote execution.
|
||
|
|
/// </summary>
|
||
|
|
public interface IDockerSecretsService
|
||
|
|
{
|
||
|
|
Task<(bool Created, string SecretId)> EnsureSecretAsync(string name, string value, bool rotate = false);
|
||
|
|
Task<List<SecretListItem>> ListSecretsAsync();
|
||
|
|
Task<bool> DeleteSecretAsync(string name);
|
||
|
|
}
|
||
|
|
|
||
|
|
public class SecretListItem
|
||
|
|
{
|
||
|
|
public string Id { get; set; } = string.Empty;
|
||
|
|
public string Name { get; set; } = string.Empty;
|
||
|
|
public DateTime CreatedAt { get; set; }
|
||
|
|
}
|