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 {
	MockCreateZone         func(ctx context.Context, name string, jumpstart bool, account cloudflare.Account, zoneType string) (cloudflare.Zone, error)
	MockDeleteZone         func(ctx context.Context, zoneID string) (cloudflare.ZoneID, error)
	MockEditZone           func(ctx context.Context, zoneID string, zoneOpts cloudflare.ZoneOptions) (cloudflare.Zone, error)
	MockUpdateZoneSettings func(ctx context.Context, zoneID string, cs []cloudflare.ZoneSetting) (*cloudflare.ZoneSettingResponse, error)
	MockZoneDetails        func(ctx context.Context, zoneID string) (cloudflare.Zone, error)
	MockZoneIDByName       func(zoneName string) (string, error)
	MockZoneSetPlan        func(ctx context.Context, zoneID string, planType string) error
	MockZoneSettings       func(ctx context.Context, zoneID string) (*cloudflare.ZoneSettingResponse, error)
}

A MockClient acts as a testable representation of the Cloudflare API.

func (MockClient) CreateZone

func (m MockClient) CreateZone(ctx context.Context, name string, jumpstart bool, account cloudflare.Account, zoneType string) (cloudflare.Zone, error)

CreateZone mocks the CreateZone method of the Cloudflare API.

func (MockClient) DeleteZone

func (m MockClient) DeleteZone(ctx context.Context, zoneID string) (cloudflare.ZoneID, error)

DeleteZone mocks the DeleteZone method of the Cloudflare API.

func (MockClient) EditZone

func (m MockClient) EditZone(ctx context.Context, zoneID string, zoneOpts cloudflare.ZoneOptions) (cloudflare.Zone, error)

EditZone mocks the EditZone method of the Cloudflare API.

func (MockClient) UpdateZoneSettings

func (m MockClient) UpdateZoneSettings(ctx context.Context, zoneID string, cs []cloudflare.ZoneSetting) (*cloudflare.ZoneSettingResponse, error)

UpdateZoneSettings mocks the UpdateZoneSettings method of the Cloudflare API.

func (MockClient) ZoneDetails

func (m MockClient) ZoneDetails(ctx context.Context, zoneID string) (cloudflare.Zone, error)

ZoneDetails mocks the ZoneDetails method of the Cloudflare API.

func (MockClient) ZoneIDByName

func (m MockClient) ZoneIDByName(zoneName string) (string, error)

ZoneIDByName mocks the ZoneIDByName method of the Cloudflare API.

func (MockClient) ZoneSetPlan

func (m MockClient) ZoneSetPlan(ctx context.Context, zoneID string, planType string) error

ZoneSetPlan mocks the ZoneSetPlan method of the Cloudflare API.

func (MockClient) ZoneSettings

func (m MockClient) ZoneSettings(ctx context.Context, zoneID string) (*cloudflare.ZoneSettingResponse, error)

ZoneSettings mocks the ZoneSettings method of the Cloudflare API.

Jump to

Keyboard shortcuts

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