forked from TrueCloudLab/lego
Basic DNSimple implementation for DNSProvider
This commit is contained in:
parent
50031525c9
commit
3f4b078329
2 changed files with 39 additions and 0 deletions
26
acme/dns_challenge_dnsimple.go
Normal file
26
acme/dns_challenge_dnsimple.go
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
package acme
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/weppos/go-dnsimple/dnsimple"
|
||||||
|
)
|
||||||
|
|
||||||
|
// DNSProviderDNSimple is an implementation of the DNSProvider interface.
|
||||||
|
type DNSProviderDNSimple struct {
|
||||||
|
client *dnsimple.Client
|
||||||
|
}
|
||||||
|
|
||||||
|
// NewDNSProviderDNSimple returns a DNSProviderDNSimple instance with a configured dnsimple client.
|
||||||
|
// Authentication is either done using the passed credentials.
|
||||||
|
func NewDNSProviderDNSimple(dnsimpleEmail, dnsimpleApiKey string) (*DNSProviderDNSimple, error) {
|
||||||
|
return nil, nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// Present creates a TXT record to fulfil the dns-01 challenge.
|
||||||
|
func (c *DNSProviderDNSimple) Present(domain, token, keyAuth string) error {
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// CleanUp removes the TXT record matching the specified parameters.
|
||||||
|
func (c *DNSProviderDNSimple) CleanUp(domain, token, keyAuth string) error {
|
||||||
|
return nil
|
||||||
|
}
|
13
acme/dns_challenge_dnsimple_test.go
Normal file
13
acme/dns_challenge_dnsimple_test.go
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
package acme
|
||||||
|
|
||||||
|
import (
|
||||||
|
"testing"
|
||||||
|
|
||||||
|
"github.com/stretchr/testify/assert"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
func TestNewDNSProviderDNSimpleValid(t *testing.T) {
|
||||||
|
_, err := NewDNSProviderDNSimple("example@example.com", "123")
|
||||||
|
assert.NoError(t, err)
|
||||||
|
}
|
Loading…
Reference in a new issue