fake

package
v0.0.0-...-be1e11a Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

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