reportsgtm

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 11, 2021 License: Apache-2.0 Imports: 7 Imported by: 1

README

Akamai GTM Reports (Global Traffic Management)

A golang package that talks to the Akamai OPEN GTM Reporting API.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Config contains the Akamai OPEN Edgegrid API credentials
	// for automatic signing of requests
	Config edgegrid.Config
)

Functions

func Init

func Init(config edgegrid.Config)

Init sets the GTM edgegrid Config

Types

type APIWindowResponse

type APIWindowResponse struct {
	Start string `json:"start"`
	End   string `json:"end"`
}

type DCTDRow

type DCTDRow struct {
	Name     string `json:"name"`
	Requests int64  `json:"requests"`
	Status   string `json:"status"`
}

type DCTData

type DCTData struct {
	Timestamp  string     `json:"timestamp"`
	Properties []*DCTDRow `json:"properties"`
}

type DCTMeta

type DCTMeta struct {
	Uri                string `json:uri"`
	Domain             string `json:"domain"`
	Interval           string `json:"interval,omitempty"`
	DatacenterId       int    `json:"datacenterId"`
	DatacenterNickname string `json:"datacenterNickname"`
	Start              string `json:"start"`
	End                string `json:"end"`
}

Datacenter Traffic Report Structs

type DcTrafficResponse

type DcTrafficResponse struct {
	Metadata    *DCTMeta          `json:"metadata"`
	DataRows    []*DCTData        `json:"dataRows"`
	DataSummary interface{}       `json:"dataSummary"`
	Links       []*configgtm.Link `json:"links"`
}

Response structure returned by the Datacenter Traffic API

func GetTrafficPerDatacenter

func GetTrafficPerDatacenter(domainName string, datacenterID int, optArgs map[string]string) (*DcTrafficResponse, error)

GetTrafficPerDatacenter retrieves Report Traffic per datacenter. Opt args - start, end.

type IPStatusPerProperty

type IPStatusPerProperty struct {
	Metadata    *IpStatPerPropMeta   `json:"metadata"`
	DataRows    []*IpStatPerPropData `json:"dataRows"`
	DataSummary interface{}          `json:"dataSummary"`
	Links       []*configgtm.Link    `json:"links"`
}

IP Availability Status Response structure returned by the Reports API.

func GetIpStatusPerProperty

func GetIpStatusPerProperty(domainName string, propertyName string, optArgs map[string]string) (*IPStatusPerProperty, error)

GetIpStatusPerProperty retrieves current IP Availability Status for specified property in the given domainname.

type IpStatIp

type IpStatIp struct {
	Ip        string  `json:"ip"`
	HandedOut bool    `json:"handedOut"`
	Score     float32 `json:"score"`
	Alive     bool    `json:"alive"`
}

type IpStatPerPropDRow

type IpStatPerPropDRow struct {
	Nickname          string      `json:"nickname"`
	DatacenterId      int         `json:"datacenterId"`
	TrafficTargetName string      `json:"trafficTargetName"`
	IPs               []*IpStatIp `json:"IPs"`
}

type IpStatPerPropData

type IpStatPerPropData struct {
	Timestamp   string               `json:"timestamp"`
	CutOff      float64              `json:"cutOff"`
	Datacenters []*IpStatPerPropDRow `json:"datacenters"`
}

type IpStatPerPropMeta

type IpStatPerPropMeta struct {
	Uri          string `json:uri"`
	Domain       string `json:"domain"`
	Property     string `json:"property"`
	Start        string `json:"start"`
	End          string `json:"end"`
	MostRecent   bool   `json:"mostRecent"`
	Ip           string `json:"ip"`
	DatacenterId int    `json:"datacenterId"`
}

type PropertyDRow

type PropertyDRow struct {
	Nickname          string `json:"nickname"`
	DatacenterId      int    `json:"datacenterId"`
	TrafficTargetName string `json:"trafficTargetName"`
	Requests          int64  `json:"requests"`
	Status            string `json:"status"`
}

type PropertyTData

type PropertyTData struct {
	Timestamp   string          `json:"timestamp"`
	Datacenters []*PropertyDRow `json:"datacenters"`
}

type PropertyTMeta

type PropertyTMeta struct {
	Uri      string `json:uri"`
	Domain   string `json:"domain"`
	Interval string `json:"interval,omitempty"`
	Property string `json:"property"`
	Start    string `json:"start"`
	End      string `json:"end"`
}

Property Traffic Report Structs

type PropertyTrafficResponse

type PropertyTrafficResponse struct {
	Metadata    *PropertyTMeta    `json:"metadata"`
	DataRows    []*PropertyTData  `json:"dataRows"`
	DataSummary interface{}       `json:"dataSummary"`
	Links       []*configgtm.Link `json:"links"`
}

The Property Traffic Response structure returned by the Reports API

func GetTrafficPerProperty

func GetTrafficPerProperty(domainName string, propertyName string, optArgs map[string]string) (*PropertyTrafficResponse, error)

GetTrafficPerProperty retrieves report traffic for the specified property in the specified domain.

type WindowResponse

type WindowResponse struct {
	StartTime time.Time
	EndTime   time.Time
}

func GetDatacentersTrafficWindow

func GetDatacentersTrafficWindow() (*WindowResponse, error)

GetDatacentersTrafficWindow is a utility function that retrieves the data window for Traffic category of Report APIs

func GetDemandWindow

func GetDemandWindow(domainName string, propertyName string) (*WindowResponse, error)

GetDemandWindow is a utility function that retrieves the data window for Demand category of Report APIs

func GetLatencyDomainsWindow

func GetLatencyDomainsWindow(domainName string) (*WindowResponse, error)

GetLatencyDomainsWindow is a utility function that retrieves the data window for Latency category of Report APIs

func GetLivenessTestsWindow

func GetLivenessTestsWindow() (*WindowResponse, error)

GetLivenessTestsWindow is a utility function that retrieves the data window for Liveness category of Report APIs

func GetPropertiesTrafficWindow

func GetPropertiesTrafficWindow() (*WindowResponse, error)

GetPropertiesTrafficWindow is a utility function that retrieves the data window for Traffic category of Report API

Jump to

Keyboard shortcuts

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