
cloudflare
Index
- type Client
- func NewClient(apiToken string) *Client
- func NewTestClient(endpoint, apiToken string) *Client
- func (c *Client) QueryFirewallEvents(ctx context.Context, zoneID string, since, until time.Time) ([]FirewallEvent, error)
- func (c *Client) QueryHTTPRequests(ctx context.Context, zoneID string, since, until time.Time) ([]HTTPRequestGroup, error)
- type FirewallEvent
- type HTTPRequestDimensions
- type HTTPRequestGroup
- type HTTPRequestSum
type Client
Client talks to the Cloudflare GraphQL Analytics API.
func NewClient
NewClient creates a Cloudflare GraphQL client.
func NewTestClient
NewTestClient creates a client pointing at a custom endpoint for testing.
func (*Client) QueryFirewallEvents
QueryFirewallEvents fetches firewall events for the given zone and time range.
func (*Client) QueryHTTPRequests
QueryHTTPRequests fetches aggregated HTTP traffic stats for the given zone and time range.
type FirewallEvent
FirewallEvent represents a single firewall/WAF event from Cloudflare.
type HTTPRequestDimensions
HTTPRequestDimensions holds the grouping dimensions for HTTP traffic.
type HTTPRequestGroup
HTTPRequestGroup represents an aggregated HTTP traffic data point.
type HTTPRequestSum
HTTPRequestSum holds the aggregated byte counts for HTTP traffic.
Generated by gomarkdoc