From a9bc03fb01b5d1ac41bf5592f384d22df5425aa4 Mon Sep 17 00:00:00 2001 From: Melodi <62381002+Melodi17@users.noreply.github.com> Date: Sun, 6 Sep 2026 09:02:31 +1000 Subject: feat: vcs and secret management support --- src/marlin.web/Models/DatabaseSourceSecretStore.cs | 27 ++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 src/marlin.web/Models/DatabaseSourceSecretStore.cs (limited to 'src/marlin.web/Models') diff --git a/src/marlin.web/Models/DatabaseSourceSecretStore.cs b/src/marlin.web/Models/DatabaseSourceSecretStore.cs new file mode 100644 index 0000000..b4ca61f --- /dev/null +++ b/src/marlin.web/Models/DatabaseSourceSecretStore.cs @@ -0,0 +1,27 @@ +namespace marlin.web.Models; + +using core.models; +using Data; +using Microsoft.EntityFrameworkCore; + +public class DatabaseSourceSecretStore(ApplicationDbContext dbContext) : ISourceSecretStore +{ + public async Task GetAsync(Guid id, CancellationToken ct) + { + return await dbContext.Secrets + .FirstOrDefaultAsync(x => x.Id == id, cancellationToken: ct); + } +} + +public class VersionControlSecret : ISecret +{ + public Guid Id { get; set; } + + public Guid SourceId { get; set; } + public VersionControlSource Source { get; set; } + + public bool MayReveal { get; set; } + public string? Kind { get; set; } + public string Label { get; set; } + public Dictionary Content { get; set; } +} \ No newline at end of file -- cgit v1.3.1