dns

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const IPFSGateway = "cloudflare-ipfs.com"

Variables

This section is empty.

Functions

func CreateDNSLinkContent

func CreateDNSLinkContent(hash string) string

CreateDNSLinkContent converts a hash into the Content format for dnslink TXT entries.

func CreateDNSLinkName

func CreateDNSLinkName(subdomain string) string

CreateDNSLinkName converts a subdomain into the Name format for dnslink TXT entries.

Types

type Manager

type Manager struct {
	Domain string
	// contains filtered or unexported fields
}

Manager wraps a CloudflareClient client.

func NewManager

func NewManager(domain string, zoneID string, token string, debug bool) (*Manager, error)

NewManager return a cloudflare-backed dns updating client.

func (*Manager) DeleteRecord

func (m *Manager) DeleteRecord(id string) error

Delete removes a record by ID from dns.

func (*Manager) NewCNAME

func (m *Manager) NewCNAME(name string, target string) (*cf.DNSRecord, error)

NewCNAME enters a new dns record for a CNAME.

func (m *Manager) NewDNSLink(subdomain string, hash string) ([]*cf.DNSRecord, error)

NewDNSLink enters a two dns records to enable DNS link.

func (*Manager) NewTXT

func (m *Manager) NewTXT(name string, content string) (*cf.DNSRecord, error)

NewTXT enters a new dns record for a TXT.

func (*Manager) UpdateRecord

func (m *Manager) UpdateRecord(id, rtype, name, content string) error

UpdateRecord updates an existing record.

Jump to

Keyboard shortcuts

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