summaryrefslogtreecommitdiff
path: root/src/marlin.web/Models/DatabaseSourceSecretStore.cs
diff options
context:
space:
mode:
authorMelodi <62381002+Melodi17@users.noreply.github.com>2026-09-06 09:02:31 +1000
committerMelodi <62381002+Melodi17@users.noreply.github.com>2026-09-06 09:02:31 +1000
commita9bc03fb01b5d1ac41bf5592f384d22df5425aa4 (patch)
tree16ae13e19d2a3cd7488202c30790d09557559d70 /src/marlin.web/Models/DatabaseSourceSecretStore.cs
parentc00992ffad24212c4398736efd6d707d4cb0cc0d (diff)
feat: vcs and secret management support
Diffstat (limited to 'src/marlin.web/Models/DatabaseSourceSecretStore.cs')
-rw-r--r--src/marlin.web/Models/DatabaseSourceSecretStore.cs27
1 files changed, 27 insertions, 0 deletions
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<ISecret?> 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<string, string> Content { get; set; }
+} \ No newline at end of file