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 {
	MockCreateFirewallRules func(ctx context.Context, zoneID string, rr []cloudflare.FirewallRule) ([]cloudflare.FirewallRule, error)
	MockUpdateFirewallRule  func(ctx context.Context, zoneID string, rr cloudflare.FirewallRule) (cloudflare.FirewallRule, error)
	MockFirewallRule        func(ctx context.Context, zoneID, ruleID string) (cloudflare.FirewallRule, error)
	MockDeleteFirewallRule  func(ctx context.Context, zoneID, ruleID string) error
}

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

func (MockClient) CreateFirewallRules

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

CreateFirewallRules mocks the CreateFirewallRules method of the Cloudflare API.

func (MockClient) DeleteFirewallRule

func (m MockClient) DeleteFirewallRule(ctx context.Context, zoneID, ruleID string) error

DeleteFirewallRule mocks the DeleteFirewallRule method of the Cloudflare API.

func (MockClient) FirewallRule

func (m MockClient) FirewallRule(ctx context.Context, zoneID, ruleID string) (cloudflare.FirewallRule, error)

FirewallRule mocks the FirewallRule method of the Cloudflare API.

func (MockClient) UpdateFirewallRule

func (m MockClient) UpdateFirewallRule(ctx context.Context, zoneID string, rr cloudflare.FirewallRule) (cloudflare.FirewallRule, error)

UpdateFirewallRule mocks the UpdateFirewallRule method of the Cloudflare API.

Jump to

Keyboard shortcuts

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