cloudflare

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cloudflare

type Cloudflare struct {
	API      *cf.API
	ZoneID   string
	RecordID string
	PublicIP string
}

Cloudflare represents the Cloudflare API and zoneID

func NewCloudflare

func NewCloudflare(token, zone, record string) (*Cloudflare, error)

NewCloudflare retuns a Cloudflare struct

func (*Cloudflare) GetRecordDetails

func (c *Cloudflare) GetRecordDetails() (cf.DNSRecord, error)

GetRecordDetails returns the Cloudflare DNS zone details

func (*Cloudflare) UpdateDNSRecord

func (c *Cloudflare) UpdateDNSRecord(proxy bool) error

UpdateDNSRecord updates the provided DNS record with the provided IP address

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient interface

Jump to

Keyboard shortcuts

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