utils

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2020 License: Apache-2.0, MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 CheckDNSPropagation added in v0.2.14

func CheckDNSPropagation(nameservers []string, fqdn string, values ...string) (bool, error)

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

func EqualStringArray(a, b []string) bool

EqualStringArray compares string arrays.

func IsInDomainRange

func IsInDomainRange(domain, domainRange string) bool

IsInDomainRange returns true if domain is in domain range.

func IsInDomainRanges

func IsInDomainRanges(domain string, domainRanges []string) bool

IsInDomainRanges returns true if domain is in domain ranges.

func NormalizeDomainRange

func NormalizeDomainRange(domainRange string) string

NormalizeDomainRange normalizes domain to lower case, drops wildcard and suffix dot.

func PreparePrecheckNameservers added in v0.2.14

func PreparePrecheckNameservers(nameservers []string) []string

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

type CertificateObject struct {
	resources.Object
}

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) SafeCommonName

func (o *CertificateObject) SafeCommonName() string

SafeCommonName return the common name or "".

func (*CertificateObject) Spec

Spec returns the certificate spec

func (*CertificateObject) Status

Status returns the certificate status

type IssuerObject

type IssuerObject struct {
	resources.Object
}

IssuerObject encapsulates the issuer resource object.

func Issuer

func Issuer(o resources.Object) *IssuerObject

Issuer returns the issuer 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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL