Documentation ¶
Index ¶
- type MockClient
- func (m MockClient) CreateFilters(ctx context.Context, zoneID string, rr []cloudflare.Filter) ([]cloudflare.Filter, error)
- func (m MockClient) DeleteFilter(ctx context.Context, zoneID, filterID string) error
- func (m MockClient) Filter(ctx context.Context, zoneID, filterID string) (cloudflare.Filter, error)
- func (m MockClient) UpdateFilter(ctx context.Context, zoneID string, rr cloudflare.Filter) (cloudflare.Filter, error)
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.
Click to show internal directories.
Click to hide internal directories.