cloudflare

package
v0.0.0-...-2743a2c Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DNSClient

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

func NewDNSClient

func NewDNSClient(apiToken, zoneID string, proxied bool, ttl int) (*DNSClient, error)

func (*DNSClient) CreateDNSRecord

func (c *DNSClient) CreateDNSRecord(ctx context.Context, name, recordType, content string) (dns.RecordResponse, error)

func (*DNSClient) DeleteDNSRecord

func (c *DNSClient) DeleteDNSRecord(ctx context.Context, recordID string) error

func (*DNSClient) GetDNSRecords

func (c *DNSClient) GetDNSRecords(ctx context.Context, name, recordType string) ([]dns.RecordResponse, error)

func (*DNSClient) GetZoneID

func (c *DNSClient) GetZoneID() string

func (*DNSClient) ReplaceRecords

func (c *DNSClient) ReplaceRecords(ctx context.Context, name, recordType string, newContents []string) error

func (*DNSClient) UpdateDNSRecord

func (c *DNSClient) UpdateDNSRecord(ctx context.Context, recordID, name, recordType, content string) (dns.RecordResponse, error)

type DNSClientInterface

type DNSClientInterface interface {
	GetDNSRecords(ctx context.Context, name, recordType string) ([]dns.RecordResponse, error)
	DeleteDNSRecord(ctx context.Context, recordID string) error
	CreateDNSRecord(ctx context.Context, name, recordType, content string) (dns.RecordResponse, error)
	UpdateDNSRecord(ctx context.Context, recordID, name, recordType, content string) (dns.RecordResponse, error)
	ReplaceRecords(ctx context.Context, name, recordType string, newContents []string) error
	GetZoneID() string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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