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 {
	MockCreateFilters func(ctx context.Context, zoneID string, firewallFilters []cloudflare.Filter) ([]cloudflare.Filter, error)
	MockUpdateFilter  func(ctx context.Context, zoneID string, firewallFilter cloudflare.Filter) (cloudflare.Filter, error)
	MockDeleteFilter  func(ctx context.Context, zoneID, firewallFilterID string) error
	MockFilter        func(ctx context.Context, zoneID, filterID string) (cloudflare.Filter, error)
}

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

func (MockClient) CreateFilters

func (m MockClient) CreateFilters(ctx context.Context, zoneID string, rr []cloudflare.Filter) ([]cloudflare.Filter, error)

CreateFilters mocks the CreateFilters method of the Cloudflare API.

func (MockClient) DeleteFilter

func (m MockClient) DeleteFilter(ctx context.Context, zoneID, filterID string) error

DeleteFilter mocks the DeleteFilter method of the Cloudflare API.

func (MockClient) Filter

func (m MockClient) Filter(ctx context.Context, zoneID, filterID string) (cloudflare.Filter, error)

Filter mocks the Filter method of the Cloudflare API.

func (MockClient) UpdateFilter

func (m MockClient) UpdateFilter(ctx context.Context, zoneID string, rr cloudflare.Filter) (cloudflare.Filter, error)

UpdateFilter mocks the UpdateFilter method of the Cloudflare API.

Jump to

Keyboard shortcuts

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