From 9c1de040b36483fed1c331c438d8bce5fd8fab58 Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Mon, 11 Jul 2022 10:03:44 -0400 Subject: Vendor in containers/(storage,image, common, buildah) Signed-off-by: Daniel J Walsh --- .../letsencrypt/boulder/identifier/identifier.go | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 vendor/github.com/letsencrypt/boulder/identifier/identifier.go (limited to 'vendor/github.com/letsencrypt/boulder/identifier/identifier.go') diff --git a/vendor/github.com/letsencrypt/boulder/identifier/identifier.go b/vendor/github.com/letsencrypt/boulder/identifier/identifier.go new file mode 100644 index 000000000..cbf228f86 --- /dev/null +++ b/vendor/github.com/letsencrypt/boulder/identifier/identifier.go @@ -0,0 +1,32 @@ +// The identifier package defines types for RFC 8555 ACME identifiers. +package identifier + +// IdentifierType is a named string type for registered ACME identifier types. +// See https://tools.ietf.org/html/rfc8555#section-9.7.7 +type IdentifierType string + +const ( + // DNS is specified in RFC 8555 for DNS type identifiers. + DNS = IdentifierType("dns") +) + +// ACMEIdentifier is a struct encoding an identifier that can be validated. The +// protocol allows for different types of identifier to be supported (DNS +// names, IP addresses, etc.), but currently we only support RFC 8555 DNS type +// identifiers for domain names. +type ACMEIdentifier struct { + // Type is the registered IdentifierType of the identifier. + Type IdentifierType `json:"type"` + // Value is the value of the identifier. For a DNS type identifier it is + // a domain name. + Value string `json:"value"` +} + +// DNSIdentifier is a convenience function for creating an ACMEIdentifier with +// Type DNS for a given domain name. +func DNSIdentifier(domain string) ACMEIdentifier { + return ACMEIdentifier{ + Type: DNS, + Value: domain, + } +} -- cgit v1.2.3-54-g00ecf