From 102fc2a05664a0dd7c59a45abb90fafd8f2e1663 Mon Sep 17 00:00:00 2001 From: Adora Laura Kalb Date: Thu, 11 Jul 2024 16:22:26 +0200 Subject: [PATCH] add generic Certificate model --- internal/certificates/models.go | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 internal/certificates/models.go diff --git a/internal/certificates/models.go b/internal/certificates/models.go new file mode 100644 index 0000000..41d830f --- /dev/null +++ b/internal/certificates/models.go @@ -0,0 +1,18 @@ +package certificates + +// GenericCertificate is a generic container to enable us to +// handle both certificates and keys with one function +type GenericCertificate struct { + Name string + FilePath string + Secret string + + // True if key, false if certificate + IsKey bool + + // Bytes fetched from the server + serverBytes []byte + + // Bytes fetched from disk + diskBytes []byte +}