model

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRateLimitResult

func NewRateLimitResult() map[string]*RateLimitCounters

Types

type Aggregate

type Aggregate struct {
	ZoneName string
	ZoneID   string

	Totals map[time.Time]*Counters
}

func NewAggregate

func NewAggregate(zone cloudflare.Zone) *Aggregate

type Config

type Config struct {
	GraphiteConfig      GraphiteConfig `json:"graphite_config"`
	CollectEveryMinutes string         `json:"collect_every_minutes"`
	KubeConfig          *KubeConfig    `json:"kubernetes,omitempty"`
}

func ParseConfig

func ParseConfig(r io.Reader) (*Config, error)

type Counter

type Counter struct {
	Key   string
	Value int
}

type Counters

type Counters struct {
	RequestAll        Counter
	RequestCached     Counter
	RequestUncached   Counter
	BandwidthAll      Counter
	BandwidthCached   Counter
	BandwidthUncached Counter
	HTTPStatus        map[string]Counter
	WafTrigger        map[string]*WafActionCounters
	RateLimit         map[string]map[string]*RateLimitCounters
}

func NewCounters

func NewCounters() *Counters

type GraphiteConfig

type GraphiteConfig struct {
	Host string
	Port int
}

type KubeConfig

type KubeConfig struct {
	MgmtPort string `json:"management_port"`
}

type RateLimit

type RateLimit struct {
	Host       string    `json:"host"`
	Action     string    `json:"action"`
	Method     string    `json:"method"`
	OccurredAt time.Time `json:"occurred_at"`
}

type RateLimitCounters

type RateLimitCounters struct {
	Simulate        Counter
	Drop            Counter
	Challenge       Counter
	JSChallenge     Counter
	ConnectionClose Counter
}

func NewSecurityEventCounters

func NewSecurityEventCounters(method string) *RateLimitCounters

type RateLimitResponse

type RateLimitResponse struct {
	cloudflare.Response
	ResultInfo struct {
		Cursors struct {
			After  string `json:"after"`
			Before string `json:"before"`
		}
	}
	Result []RateLimit `json:"result"`
}

type ResultInfo

type ResultInfo struct {
	NextPageId string `json:"next_page_id"`
}

type WAFResponse

type WAFResponse struct {
	cloudflare.Response
	ResultInfo  ResultInfo   `json:"result_info"`
	WafTriggers []WafTrigger `json:"result"`
}

type WafActionCounters

type WafActionCounters struct {
	Simulate    Counter
	Block       Counter
	Challenge   Counter
	JSChallenge Counter
}

func NewWafTriggerResult

func NewWafTriggerResult() *WafActionCounters

type WafTrigger

type WafTrigger struct {
	Host       string    `json:"host"`
	Action     string    `json:"action"`
	OccurredAt time.Time `json:"occurred_at"`
}

type ZoneAnalyticsColocationResponse

type ZoneAnalyticsColocationResponse struct {
	cloudflare.Response
	Query struct {
		Since time.Time `json:"since"`
		Until time.Time `json:"until"`
		// contains filtered or unexported fields
	}
	Result []cloudflare.ZoneAnalyticsColocation
}

Jump to

Keyboard shortcuts

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