mirror of
https://github.com/go-acme/lego
synced 2026-03-14 14:35:48 +01:00
chore: minor changes
This commit is contained in:
parent
bd7a0a6c9a
commit
8997304f93
39 changed files with 137 additions and 28 deletions
|
|
@ -113,32 +113,6 @@ func NewDNSProviderConfig(config *Config) (*DNSProvider, error) {
|
|||
}, nil
|
||||
}
|
||||
|
||||
// ErrCNAMERequired is returned by Present when the Domain indicated had no
|
||||
// existing ACME-DNS account in the Storage and additional setup is required.
|
||||
// The user must create a CNAME in the DNS zone for Domain that aliases FQDN
|
||||
// to Target in order to complete setup for the ACME-DNS account that was created.
|
||||
type ErrCNAMERequired struct {
|
||||
// The Domain that is being issued for.
|
||||
Domain string
|
||||
// The alias of the CNAME (left hand DNS label).
|
||||
FQDN string
|
||||
// The RDATA of the CNAME (right hand side, canonical name).
|
||||
Target string
|
||||
}
|
||||
|
||||
// Error returns a descriptive message for the ErrCNAMERequired instance telling
|
||||
// the user that a CNAME needs to be added to the DNS zone of c.Domain before
|
||||
// the ACME-DNS hook will work.
|
||||
// The CNAME to be created should be of the form: {{ c.FQDN }} CNAME {{ c.Target }}.
|
||||
func (e ErrCNAMERequired) Error() string {
|
||||
return fmt.Sprintf("acme-dns: new account created for %q. "+
|
||||
"To complete setup for %q you must provision the following "+
|
||||
"CNAME in your DNS zone and re-run this provider when it is "+
|
||||
"in place:\n"+
|
||||
"%s CNAME %s.",
|
||||
e.Domain, e.Domain, e.FQDN, e.Target)
|
||||
}
|
||||
|
||||
// Present creates a TXT record to fulfill the DNS-01 challenge.
|
||||
// If there is an existing account for the domain in the provider's storage
|
||||
// then it will be used to set the challenge response TXT record with the ACME-DNS server and issuance will continue.
|
||||
|
|
@ -236,3 +210,29 @@ func getStorage(config *Config) (goacmedns.Storage, error) {
|
|||
|
||||
return st, nil
|
||||
}
|
||||
|
||||
// ErrCNAMERequired is returned by Present when the Domain indicated had no
|
||||
// existing ACME-DNS account in the Storage and additional setup is required.
|
||||
// The user must create a CNAME in the DNS zone for Domain that aliases FQDN
|
||||
// to Target in order to complete setup for the ACME-DNS account that was created.
|
||||
type ErrCNAMERequired struct {
|
||||
// The Domain that is being issued for.
|
||||
Domain string
|
||||
// The alias of the CNAME (left hand DNS label).
|
||||
FQDN string
|
||||
// The RDATA of the CNAME (right hand side, canonical name).
|
||||
Target string
|
||||
}
|
||||
|
||||
// Error returns a descriptive message for the ErrCNAMERequired instance telling
|
||||
// the user that a CNAME needs to be added to the DNS zone of c.Domain before
|
||||
// the ACME-DNS hook will work.
|
||||
// The CNAME to be created should be of the form: {{ c.FQDN }} CNAME {{ c.Target }}.
|
||||
func (e ErrCNAMERequired) Error() string {
|
||||
return fmt.Sprintf("acme-dns: new account created for %q. "+
|
||||
"To complete setup for %q you must provision the following "+
|
||||
"CNAME in your DNS zone and re-run this provider when it is "+
|
||||
"in place:\n"+
|
||||
"%s CNAME %s.",
|
||||
e.Domain, e.Domain, e.FQDN, e.Target)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config = active24.Config
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import (
|
|||
"github.com/alibabacloud-go/tea/dara"
|
||||
"github.com/aliyun/credentials-go/credentials"
|
||||
esa "github.com/go-acme/esa-20240910/v2/client"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
|
|
@ -35,6 +36,8 @@ const (
|
|||
|
||||
const defaultRegionID = "cn-hangzhou"
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
RAMRole string
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/alwaysdata/internal"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIKey string
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import (
|
|||
"slices"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/artfiles/internal"
|
||||
|
|
@ -28,6 +29,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
Username string
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/axelname/internal"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
Nickname string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/aziontech/azionapi-go-sdk/idns"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
PersonalToken string
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"time"
|
||||
|
||||
baidudns "github.com/baidubce/bce-sdk-go/services/dns"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
|
|
@ -28,6 +29,8 @@ const (
|
|||
// 300 is the minimum TTL for free users.
|
||||
const defaultTTL = 300
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
AccessKeyID string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/binarylane/internal"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIToken string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/bluecatv2/internal"
|
||||
|
|
@ -32,6 +33,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
ServerURL string
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/ddnss/internal"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
Key string
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/dnsexit/internal"
|
||||
|
|
@ -26,6 +27,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIKey string
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/dnshomede/internal"
|
||||
|
|
@ -26,6 +27,8 @@ const (
|
|||
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
Credentials map[string]string
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/dyndnsfree/internal"
|
||||
|
|
@ -26,6 +27,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
Username string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/internal/ptr"
|
||||
|
|
@ -34,6 +35,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
SecretID string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/cenkalti/backoff/v5"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/internal/wait"
|
||||
|
|
@ -31,6 +32,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIToken string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/gigahostno/internal"
|
||||
|
|
@ -29,6 +30,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
Username string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/gravity/internal"
|
||||
|
|
@ -30,6 +31,8 @@ const (
|
|||
EnvSequenceInterval = envNamespace + "SEQUENCE_INTERVAL"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
Username string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/hostinger/internal"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIToken string
|
||||
|
|
|
|||
|
|
@ -9,11 +9,14 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/active24/internal"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIKey string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIToken string
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -32,6 +33,8 @@ const (
|
|||
EnvInsecureSkipVerify = envNamespace + "INSECURE_SKIP_VERIFY"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
ServerURL string
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import (
|
|||
"github.com/go-acme/jdcloud-sdk-go/services/domainservice/apis"
|
||||
jdcclient "github.com/go-acme/jdcloud-sdk-go/services/domainservice/client"
|
||||
domainservice "github.com/go-acme/jdcloud-sdk-go/services/domainservice/models"
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
)
|
||||
|
|
@ -31,6 +32,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
AccessKeyID string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -28,6 +29,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
BaseURL string
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -26,6 +27,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIKey string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvPollingInterval = envNamespace + "POLLING_INTERVAL"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
ClientID string
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
)
|
||||
|
||||
|
|
@ -14,6 +15,8 @@ const (
|
|||
dnsTemplate = `%s %d IN TXT %q`
|
||||
)
|
||||
|
||||
var _ challenge.Provider = (*DNSProvider)(nil)
|
||||
|
||||
// DNSProvider is an implementation of the ChallengeProvider interface.
|
||||
type DNSProvider struct{}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"strconv"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIToken string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -28,6 +29,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
Credentials map[string]string
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -33,6 +34,8 @@ const (
|
|||
EnvInsecureSkipVerify = envNamespace + "INSECURE_SKIP_VERIFY"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
BaseURL string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/log"
|
||||
|
|
@ -29,6 +30,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIKey string
|
||||
|
|
|
|||
|
|
@ -29,11 +29,11 @@ func TestClient_AddRecord(t *testing.T) {
|
|||
client := mockBuilder().
|
||||
Route("POST /domains/1234/records",
|
||||
servermock.ResponseFromFixture("add-records.json"),
|
||||
servermock.CheckRequestJSONBody(`{"records":[{"name":"exmaple.com","type":"TXT","data":"value1","ttl":120,"id":"abc"}]}`)).
|
||||
servermock.CheckRequestJSONBody(`{"records":[{"name":"example.com","type":"TXT","data":"value1","ttl":120,"id":"abc"}]}`)).
|
||||
Build(t)
|
||||
|
||||
record := Record{
|
||||
Name: "exmaple.com",
|
||||
Name: "example.com",
|
||||
Type: "TXT",
|
||||
Data: "value1",
|
||||
TTL: 120,
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/internal/useragent"
|
||||
|
|
@ -52,6 +53,8 @@ const (
|
|||
|
||||
const tokenHeader = "X-Auth-Token"
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
var errNotFound = errors.New("rrset not found")
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIKey string
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
Credentials map[string]string
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import (
|
|||
"sync"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -29,6 +30,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
AuthUserID string
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -27,6 +28,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
APIUser string
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config = active24.Config
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/go-acme/lego/v5/challenge"
|
||||
"github.com/go-acme/lego/v5/challenge/dns01"
|
||||
"github.com/go-acme/lego/v5/internal/env"
|
||||
"github.com/go-acme/lego/v5/providers/dns/internal/clientdebug"
|
||||
|
|
@ -26,6 +27,8 @@ const (
|
|||
EnvHTTPTimeout = envNamespace + "HTTP_TIMEOUT"
|
||||
)
|
||||
|
||||
var _ challenge.ProviderTimeout = (*DNSProvider)(nil)
|
||||
|
||||
// Config is used to configure the creation of the DNSProvider.
|
||||
type Config struct {
|
||||
User string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue