Documentation ¶
Index ¶
- type MockClient
- func (m MockClient) CreateDNSRecord(ctx context.Context, zoneID string, rr cloudflare.DNSRecord) (*cloudflare.DNSRecordResponse, error)
- func (m MockClient) DNSRecord(ctx context.Context, zoneID, recordID string) (cloudflare.DNSRecord, error)
- func (m MockClient) DeleteDNSRecord(ctx context.Context, zoneID, recordID string) error
- func (m MockClient) UpdateDNSRecord(ctx context.Context, zoneID, recordID string, rr cloudflare.DNSRecord) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClient ¶
type MockClient struct { MockCreateDNSRecord func(ctx context.Context, zoneID string, rr cloudflare.DNSRecord) (*cloudflare.DNSRecordResponse, error) MockUpdateDNSRecord func(ctx context.Context, zoneID, recordID string, rr cloudflare.DNSRecord) error MockDNSRecord func(ctx context.Context, zoneID, recordID string) (cloudflare.DNSRecord, error) MockDeleteDNSRecord func(ctx context.Context, zoneID, recordID string) error }
A MockClient acts as a testable representation of the Cloudflare API.
func (MockClient) CreateDNSRecord ¶
func (m MockClient) CreateDNSRecord(ctx context.Context, zoneID string, rr cloudflare.DNSRecord) (*cloudflare.DNSRecordResponse, error)
CreateDNSRecord mocks the CreateDNSRecord method of the Cloudflare API.
func (MockClient) DNSRecord ¶
func (m MockClient) DNSRecord(ctx context.Context, zoneID, recordID string) (cloudflare.DNSRecord, error)
DNSRecord mocks the DNSRecord method of the Cloudflare API.
func (MockClient) DeleteDNSRecord ¶
func (m MockClient) DeleteDNSRecord(ctx context.Context, zoneID, recordID string) error
DeleteDNSRecord mocks the DeleteDNSRecord method of the Cloudflare API.
func (MockClient) UpdateDNSRecord ¶
func (m MockClient) UpdateDNSRecord(ctx context.Context, zoneID, recordID string, rr cloudflare.DNSRecord) error
UpdateDNSRecord mocks the UpdateDNSRecord method of the Cloudflare API.
Click to show internal directories.
Click to hide internal directories.