Documentation ¶
Index ¶
- Constants
- func AssureStringArray(mod *abstract.ModificationState, dst *[]string, value []string)
- func BestDomainRange(domain string, domainRanges []string) string
- func CheckDNSPropagation(nameservers []string, fqdn string, values ...string) (bool, error)
- func CreateWrapPreCheckOption(nameservers []string) dns01.ChallengeOption
- func EqualStringArray(a, b []string) bool
- func ExtractCommonNameAnDNSNames(csr []byte) (cn *string, san []string, err error)
- func ExtractDomains(spec *api.CertificateSpec) ([]string, error)
- func FollowCNAMEs(fqdn string, nameservers []string, fqdnChain ...string) (string, error)
- func IsInDomainRange(domain, domainRange string) bool
- func IsInDomainRanges(domain string, domainRanges []string) bool
- func NoPropagationCheckOption() dns01.ChallengeOption
- func NormalizeDomainRange(domainRange string) string
- func PreparePrecheckNameservers(nameservers []string) []string
- type CertificateObject
- type Cluster
- type IssuerInfo
- type IssuerKey
- func (k IssuerKey) Cluster() Cluster
- func (k IssuerKey) ClusterName() string
- func (k IssuerKey) Name() string
- func (k IssuerKey) Namespace() string
- func (k IssuerKey) NamespaceOrDefault(def string) string
- func (k IssuerKey) ObjectName(def string) resources.ObjectName
- func (k IssuerKey) String() string
- type IssuerKeySet
- type IssuerObject
- type IssuerSecretKey
Constants ¶
const ( // IssuerTypeACME is the issuer type ACME IssuerTypeACME = "acme" // IssuerTypeCA is the issuer type CA IssuerTypeCA = "ca" )
Variables ¶
This section is empty.
Functions ¶
func AssureStringArray ¶
func AssureStringArray(mod *abstract.ModificationState, dst *[]string, value []string)
AssureStringArray handles modification of a string array.
func BestDomainRange ¶ added in v0.12.0
BestDomainRange returns best fitting domain range value or "".
func CheckDNSPropagation ¶ added in v0.2.14
CheckDNSPropagation checks if the expected TXT record has been propagated to all authoritative nameservers.
func CreateWrapPreCheckOption ¶ added in v0.2.14
func CreateWrapPreCheckOption(nameservers []string) dns01.ChallengeOption
CreateWrapPreCheckOption creates lego DNS ChallengeOption for custom Precheck function, checking the DNS propagation of the DNS challenge TXT record.
func EqualStringArray ¶
EqualStringArray compares string arrays.
func ExtractCommonNameAnDNSNames ¶ added in v0.12.0
ExtractCommonNameAnDNSNames extracts values from a CSR (Certificate Signing Request).
func ExtractDomains ¶ added in v0.12.0
func ExtractDomains(spec *api.CertificateSpec) ([]string, error)
ExtractDomains collects CommonName and DNSNames directly from spec or from CSR. The first item is the common name if provided.
func FollowCNAMEs ¶ added in v0.12.0
FollowCNAMEs follows the CNAME records and returns the last non-CNAME fully qualified domain name that it finds. Returns an error when a loop is found in the CNAME chain. The argument fqdnChain is used by the function itself to keep track of which fqdns it already encountered and detect loops. Method copied from https://github.com/cert-manager/cert-manager/pkg/issuer/acme/dns/util/wait.go
func IsInDomainRange ¶
IsInDomainRange returns true if domain is in domain range.
func IsInDomainRanges ¶
IsInDomainRanges returns true if domain is in domain ranges.
func NoPropagationCheckOption ¶ added in v0.12.0
func NoPropagationCheckOption() dns01.ChallengeOption
NoPropagationCheckOption creates lego DNS ChallengeOption for custom Precheck function, performing no DNS propagation check of the DNS challenge TXT record at all.
func NormalizeDomainRange ¶
NormalizeDomainRange normalizes domain to lower case, drops wildcard and suffix dot.
func PreparePrecheckNameservers ¶ added in v0.2.14
PreparePrecheckNameservers collects the nameservers for checking DNS propagation. If no nameservers are provided, it tries to read them from `/etc/resolv.conf`, and last resort is to use Google public DNS servers (8.8.8.8 and 8.8.4.4)
Types ¶
type CertificateObject ¶
CertificateObject encapsulates the certificate resource object.
func Certificate ¶
func Certificate(o resources.Object) *CertificateObject
Certificate returns the certificate object
func (*CertificateObject) Certificate ¶
func (o *CertificateObject) Certificate() *api.Certificate
Certificate casts the object to certificate.
func (*CertificateObject) SafeFirstDNSName ¶ added in v0.12.0
func (o *CertificateObject) SafeFirstDNSName() string
SafeFirstDNSName returns the first DNS name (common name if set) or "".
func (*CertificateObject) Spec ¶
func (o *CertificateObject) Spec() *api.CertificateSpec
Spec returns the certificate spec
func (*CertificateObject) Status ¶
func (o *CertificateObject) Status() *api.CertificateStatus
Status returns the certificate status
type IssuerInfo ¶ added in v0.12.0
type IssuerInfo struct {
// contains filtered or unexported fields
}
IssuerInfo provides name and type of an issuer
func NewACMEIssuerInfo ¶ added in v0.12.0
func NewACMEIssuerInfo(key IssuerKey) IssuerInfo
NewACMEIssuerInfo creates info for an ACME issuer
func NewCAIssuerInfo ¶ added in v0.12.0
func NewCAIssuerInfo(key IssuerKey) IssuerInfo
NewCAIssuerInfo creates info for an CA issuer
func (*IssuerInfo) IssuerType ¶ added in v0.12.0
func (i *IssuerInfo) IssuerType() string
IssuerType returns the issuer type
func (*IssuerInfo) Key ¶ added in v0.12.0
func (i *IssuerInfo) Key() IssuerKey
Key returns the issuer key
type IssuerKey ¶ added in v0.12.0
type IssuerKey struct {
// contains filtered or unexported fields
}
IssuerKey provides cluster, name and namespace of an issuer
func NewDefaultClusterIssuerKey ¶ added in v0.12.0
NewDefaultClusterIssuerKey creates key for an issuer on the default cluster
func NewIssuerKey ¶ added in v0.12.0
NewIssuerKey creates key for an issuer. namespace is ignored for default cluster
func (IssuerKey) ClusterName ¶ added in v0.12.0
ClusterName returns the cluster name
func (IssuerKey) Namespace ¶ added in v0.12.0
Namespace returns the issuer namespace (namespace is empty if it is on default cluster)
func (IssuerKey) NamespaceOrDefault ¶ added in v0.12.0
NamespaceOrDefault returns the issuer namespace or the given default if it is on default cluster
func (IssuerKey) ObjectName ¶ added in v0.12.0
func (k IssuerKey) ObjectName(def string) resources.ObjectName
ObjectName returns the object name for the issuer key. If it is on the default cluster, the given namespace is used.
type IssuerKeySet ¶ added in v0.12.0
type IssuerKeySet map[IssuerKey]struct{}
IssuerKeySet is a set of IssuerKeys
func NewIssuerKeySet ¶ added in v0.12.0
func NewIssuerKeySet(keys ...IssuerKey) IssuerKeySet
NewIssuerKeySet creates a new set
func (IssuerKeySet) Add ¶ added in v0.12.0
func (s IssuerKeySet) Add(keys ...IssuerKey)
Add adds keys to the set
func (IssuerKeySet) Contains ¶ added in v0.12.0
func (s IssuerKeySet) Contains(key IssuerKey) bool
Contains checks if set contains the key
func (IssuerKeySet) Copy ¶ added in v0.12.0
func (s IssuerKeySet) Copy() IssuerKeySet
Copy creates a copy of the set
func (IssuerKeySet) Remove ¶ added in v0.12.0
func (s IssuerKeySet) Remove(key IssuerKey)
Remove removes a key from the set
type IssuerObject ¶
IssuerObject encapsulates the issuer resource object.
func (*IssuerObject) Issuer ¶
func (o *IssuerObject) Issuer() *api.Issuer
Issuer returns the issuer.
func (*IssuerObject) Spec ¶
func (o *IssuerObject) Spec() *api.IssuerSpec
Spec returns the issuer resource object spec.
func (*IssuerObject) Status ¶
func (o *IssuerObject) Status() *api.IssuerStatus
Status returns the issuer resource object status.
type IssuerSecretKey ¶ added in v0.12.0
type IssuerSecretKey struct {
IssuerKey
}
IssuerSecretKey is the key for an issuer secret
func NewIssuerSecretKey ¶ added in v0.12.0
func NewIssuerSecretKey(cluster Cluster, namespace, name string) IssuerSecretKey
NewIssuerSecretKey creates key for an issuer secret. namespace is ignored for default cluster