From 483f65175e014d2861e6c888551bb0a663d8a27d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Wei=C3=9Fe?= Date: Thu, 28 Apr 2022 14:31:01 +0200 Subject: [PATCH] Add OID doc comments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Weiße --- coordinator/oid/oid.go | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/coordinator/oid/oid.go b/coordinator/oid/oid.go index 681cb205f..fd617bfcb 100644 --- a/coordinator/oid/oid.go +++ b/coordinator/oid/oid.go @@ -4,6 +4,7 @@ import ( "encoding/asn1" ) +// Getter returns an ASN.1 Object Identifier. type Getter interface { OID() asn1.ObjectIdentifier } @@ -11,39 +12,51 @@ type Getter interface { // Here we define OIDs for different CSPs. Currently this is used in attested TLS to distinguish the attestation documents. // OIDs beginning with 1.3.9900 are reserved and can be used without registration. +// Dummy OID for testing. type Dummy struct{} +// OID returns the struct's object identifier. func (Dummy) OID() asn1.ObjectIdentifier { return asn1.ObjectIdentifier{1, 3, 9900, 1} } +// AWS holds the AWS OID. type AWS struct{} +// OID returns the struct's object identifier. func (AWS) OID() asn1.ObjectIdentifier { return asn1.ObjectIdentifier{1, 3, 9900, 2} } +// GCP holds the GCP OID. type GCP struct{} +// OID returns the struct's object identifier. func (GCP) OID() asn1.ObjectIdentifier { return asn1.ObjectIdentifier{1, 3, 9900, 3} } +// Azure holds the Azure OID. type Azure struct{} +// OID returns the struct's object identifier. func (Azure) OID() asn1.ObjectIdentifier { return asn1.ObjectIdentifier{1, 3, 9900, 4} } +// QEMU holds the QEMU OID. type QEMU struct{} +// OID returns the struct's object identifier. func (QEMU) OID() asn1.ObjectIdentifier { return asn1.ObjectIdentifier{1, 3, 9900, 5} } +// GCPNonCVM returns the GCP OID for non CVMs. // TODO: Remove once we no longer use non cvms. type GCPNonCVM struct{} +// OID returns the struct's object identifier. func (GCPNonCVM) OID() asn1.ObjectIdentifier { return asn1.ObjectIdentifier{1, 3, 9900, 99} }