Documentation ¶
Index ¶
- type MockClient
- func (m MockClient) CreateFirewallRules(ctx context.Context, zoneID string, rr []cloudflare.FirewallRule) ([]cloudflare.FirewallRule, error)
- func (m MockClient) DeleteFirewallRule(ctx context.Context, zoneID, ruleID string) error
- func (m MockClient) FirewallRule(ctx context.Context, zoneID, ruleID string) (cloudflare.FirewallRule, error)
- func (m MockClient) UpdateFirewallRule(ctx context.Context, zoneID string, rr cloudflare.FirewallRule) (cloudflare.FirewallRule, error)
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.
Click to show internal directories.
Click to hide internal directories.