cloudflare

package
v0.12.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 24, 2024 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ID        = "cloudflare"
	Token     = "token"
	ZoneID    = "zone_id"
	AccountID = "account_id"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AnalyticResponse

type AnalyticResponse struct {
	Data struct {
		Viewer struct {
			Zones []struct {
				FirewallEventsAdaptive []struct {
					Action                string     `json:"action"`
					ClientRequestHTTPHost string     `json:"clientRequestHTTPHost"`
					Datetime              *time.Time `json:"datetime"`
					RayName               string     `json:"rayName"`
					UserAgent             string     `json:"userAgent"`
				} `json:"firewallEventsAdaptive"`
			} `json:"zones"`
		} `json:"viewer"`
	} `json:"data"`
	Errors interface{} `json:"errors"`
}

type Cloudflare

type Cloudflare struct {
	// contains filtered or unexported fields
}

func NewCloudflare

func NewCloudflare(token string, zoneID string) *Cloudflare

func (*Cloudflare) GetAnalytics

func (v *Cloudflare) GetAnalytics(start, end string) (*AnalyticResponse, error)

Jump to

Keyboard shortcuts

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