cloudflare

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2021 License: Apache-2.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 DNSRecordRepository

type DNSRecordRepository interface {
	Create(obj model.CloudflareDNSRecord) (model.CloudflareDNSRecord, error)
	Delete(zoneID string, dnsRecord model.CloudflareDNSRecord) (model.CloudflareDNSRecord, error)
	FetchList(zoneID string) ([]model.CloudflareDNSRecord, error)
	Find(zoneID, id string) (model.CloudflareDNSRecord, error)
	FindSingleByNameAndType(zoneID, name, t string) (model.CloudflareDNSRecord, error)
	Update(zoneID string, dnsRecord model.CloudflareDNSRecord) (model.CloudflareDNSRecord, error)
}

DNSRecordRepository is the data interface for the Cloudflare DNS record API

type DNSRecordRepositoryObj

type DNSRecordRepositoryObj struct {
	Connector *cloudflareSDK.API
}

DNSRecordRepositoryObj implements the DNSRecordRepository interface per default

func NewDNSRecordRepository

func NewDNSRecordRepository(config *model.CloudflareConfig) (*DNSRecordRepositoryObj, error)

NewDNSRecordRepository returns a new pointer instance of DNSRecordRepositoryObj with default values

func (*DNSRecordRepositoryObj) Create

Create a new DNS record for a zone

func (*DNSRecordRepositoryObj) Delete

Delete a DNS record with given ID from a zone

func (*DNSRecordRepositoryObj) FetchList

func (repo *DNSRecordRepositoryObj) FetchList(zoneID string) ([]model.CloudflareDNSRecord, error)

FetchList fetches the list of all DNS records for a zone

func (*DNSRecordRepositoryObj) Find

func (repo *DNSRecordRepositoryObj) Find(zoneID, id string) (model.CloudflareDNSRecord, error)

Find a single DNS record for a given zone ID and record ID

func (*DNSRecordRepositoryObj) FindSingleByNameAndType

func (repo *DNSRecordRepositoryObj) FindSingleByNameAndType(zoneID, name, t string) (model.CloudflareDNSRecord, error)

FindSingleByNameAndType tries to find a single DNS record for a zone with its name and type. It will return an error in case multiple records match with the conditions

func (*DNSRecordRepositoryObj) Update

Update changes attributes of a single DNS record in a given zone

type ZoneRepository

type ZoneRepository interface {
	FetchList() ([]model.CloudflareZone, error)
	Find(id string) (model.CloudflareZone, error)
	FindByName(name string) (model.CloudflareZone, error)
}

ZoneRepository is the data interface for the Cloudflare zone API

type ZoneRepositoryObj

type ZoneRepositoryObj struct {
	Connector *cloudflareSDK.API
}

ZoneRepositoryObj implements the ZoneRepository interface per default

func NewZoneRepository

func NewZoneRepository(config *model.CloudflareConfig) (*ZoneRepositoryObj, error)

NewZoneRepository returns a new pointer instance NewZoneRepositoryObj with default values

func (*ZoneRepositoryObj) FetchList

func (repo *ZoneRepositoryObj) FetchList() ([]model.CloudflareZone, error)

FetchList fetches the list of all zones for the account

func (*ZoneRepositoryObj) Find

Find fetches the details of a Cloudflare zone via the API by a specific zone ID

func (*ZoneRepositoryObj) FindByName

func (repo *ZoneRepositoryObj) FindByName(name string) (model.CloudflareZone, error)

FindByName fetches the details of a Cloudflare zone via the API by a specific zone name

Jump to

Keyboard shortcuts

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