Documentation ¶
Index ¶
- type DNSRecordRepository
- type DNSRecordRepositoryObj
- func (repo *DNSRecordRepositoryObj) Create(obj model.CloudflareDNSRecord) (model.CloudflareDNSRecord, error)
- func (repo *DNSRecordRepositoryObj) Delete(zoneID string, dnsRecord model.CloudflareDNSRecord) (model.CloudflareDNSRecord, error)
- func (repo *DNSRecordRepositoryObj) FetchList(zoneID string) ([]model.CloudflareDNSRecord, error)
- func (repo *DNSRecordRepositoryObj) Find(zoneID, id string) (model.CloudflareDNSRecord, error)
- func (repo *DNSRecordRepositoryObj) FindSingleByNameAndType(zoneID, name, t string) (model.CloudflareDNSRecord, error)
- func (repo *DNSRecordRepositoryObj) Update(zoneID string, dnsRecord model.CloudflareDNSRecord) (model.CloudflareDNSRecord, error)
- type ZoneRepository
- type ZoneRepositoryObj
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 ¶
func (repo *DNSRecordRepositoryObj) Create(obj model.CloudflareDNSRecord) (model.CloudflareDNSRecord, error)
Create a new DNS record for a zone
func (*DNSRecordRepositoryObj) Delete ¶
func (repo *DNSRecordRepositoryObj) Delete(zoneID string, dnsRecord model.CloudflareDNSRecord) (model.CloudflareDNSRecord, error)
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 ¶
func (repo *DNSRecordRepositoryObj) Update(zoneID string, dnsRecord model.CloudflareDNSRecord) (model.CloudflareDNSRecord, error)
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 ¶
func (repo *ZoneRepositoryObj) Find(id string) (model.CloudflareZone, error)
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