dnsprovidercpaneldns

package
v0.0.0-...-2d8159e Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2020 License: GPL-3.0 Imports: 10 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CpanelFactory

type CpanelFactory struct {
	// contains filtered or unexported fields
}

CpanelFactory stores the data needed to access Cpanel

func NewCpanelFactory

func NewCpanelFactory(url string, username string, password string) *CpanelFactory

NewCpanelFactory create a new thing to access Cpanel

func (*CpanelFactory) CheckZone

func (c *CpanelFactory) CheckZone(fqdn string) (bool, int, error)

CheckZone tests to see if a subdomain already exists in a domain and if it does returns it's "line" number for editing

func (*CpanelFactory) ZoneAdd

func (c *CpanelFactory) ZoneAdd(fqdn string, value string) bool

ZoneAdd creates a new subdomain in a domain

func (*CpanelFactory) ZoneDelete

func (c *CpanelFactory) ZoneDelete(fqdn string, line int) bool

ZoneDelete deletes a domain from the zone record to tidy up

func (*CpanelFactory) ZoneEdit

func (c *CpanelFactory) ZoneEdit(fqdn string, value string, line int) bool

ZoneEdit updates an exisitng subdomain in a domain using it's line number

type DNSProviderCpanelDNS

type DNSProviderCpanelDNS struct {
	// contains filtered or unexported fields
}

DNSProviderCpanelDNS uses the Cpanel Json API to add, update and delete dns entries for use with Lets Encrypt

func NewDNSProviderCpanelDNS

func NewDNSProviderCpanelDNS(factory CpanelFactory) (*DNSProviderCpanelDNS, error)

NewDNSProviderCpanelDNS instansiate new Provider

func (*DNSProviderCpanelDNS) CleanUp

func (d *DNSProviderCpanelDNS) CleanUp(domain, token, keyAuth string) error

CleanUp Removes the TXT records afterwards for security

func (*DNSProviderCpanelDNS) Present

func (d *DNSProviderCpanelDNS) Present(domain, token, keyAuth string) error

Present Updates or creates the TXT records required to request a certificate

Jump to

Keyboard shortcuts

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