Documentation ¶
Overview ¶
Package gtm provides access to the Akamai GTM V1_4 APIs
Index ¶
- Variables
- type ASMaps
- type AsAssignment
- type AsMap
- type AsMapList
- type AsMapResponse
- type CidrAssignment
- type CidrMap
- type CidrMapList
- type CidrMapResponse
- type CidrMaps
- type ClientFunc
- type Datacenter
- type DatacenterBase
- type DatacenterList
- type DatacenterResponse
- type Datacenters
- type Domain
- type DomainItem
- type DomainResponse
- type Domains
- type DomainsList
- type Error
- type GTM
- type GeoAssignment
- type GeoMap
- type GeoMapList
- type GeoMapResponse
- type GeoMaps
- type HttpHeader
- type Link
- type LivenessTest
- type LoadObject
- type NullFieldMapStruct
- type NullPerObjectAttributeStruct
- type ObjectMap
- type Option
- type Properties
- type Property
- type PropertyList
- type PropertyResponse
- type Resource
- type ResourceInstance
- type ResourceList
- type ResourceResponse
- type Resources
- type ResponseBody
- type ResponseStatus
- type StaticRRSet
- type TrafficTarget
Constants ¶
This section is empty.
Variables ¶
var ( // MapDefaultDC is a default Datacenter ID for Maps MapDefaultDC = 5400 // Ipv4DefaultDC is a default Datacenter ID for IPv4 Ipv4DefaultDC = 5401 // Ipv6DefaultDC is a default Datacenter ID for IPv6 Ipv6DefaultDC = 5402 )
var ( // ErrBadRequest is returned when a required parameter is missing ErrBadRequest = errors.New("missing argument") )
var ( // ErrStructValidation is returned returned when given struct validation failed ErrStructValidation = errors.New("struct validation") )
Functions ¶
This section is empty.
Types ¶
type ASMaps ¶
type ASMaps interface { // NewAsMap creates a new AsMap object. NewAsMap(context.Context, string) *AsMap // Instantiate new Assignment struct NewASAssignment(context.Context, *AsMap, int, string) *AsAssignment // ListAsMaps retreieves all AsMaps // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getasmaps ListAsMaps(context.Context, string) ([]*AsMap, error) // GetAsMap retrieves a AsMap with the given name. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getasmap GetAsMap(context.Context, string, string) (*AsMap, error) // Create the datacenter identified by the receiver argument in the specified domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putasmap CreateAsMap(context.Context, *AsMap, string) (*AsMapResponse, error) // Delete the datacenter identified by the receiver argument from the domain specified. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#deleteasmap DeleteAsMap(context.Context, *AsMap, string) (*ResponseStatus, error) // Update the datacenter identified in the receiver argument in the provided domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putasmap UpdateAsMap(context.Context, *AsMap, string) (*ResponseStatus, error) }
ASMaps contains operations available on a ASmap resource See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html
type AsAssignment ¶
type AsAssignment struct { DatacenterBase AsNumbers []int64 `json:"asNumbers"` }
AsAssignment represents a GTM asmap assignment structure
type AsMap ¶
type AsMap struct { DefaultDatacenter *DatacenterBase `json:"defaultDatacenter"` Assignments []*AsAssignment `json:"assignments,omitempty"` Name string `json:"name"` Links []*Link `json:"links,omitempty"` }
AsMap represents a GTM AsMap
type AsMapList ¶
type AsMapList struct {
AsMapItems []*AsMap `json:"items"`
}
AsMapList represents the returned GTM AsMap List body
type AsMapResponse ¶
type AsMapResponse struct { Resource *AsMap `json:"resource"` Status *ResponseStatus `json:"status"` }
AsMapResponse contains a response after creating or updating AsMap
type CidrAssignment ¶
type CidrAssignment struct { DatacenterBase Blocks []string `json:"blocks"` }
CidrAssignment represents a GTM cidr assignment element
type CidrMap ¶
type CidrMap struct { DefaultDatacenter *DatacenterBase `json:"defaultDatacenter"` Assignments []*CidrAssignment `json:"assignments,omitempty"` Name string `json:"name"` Links []*Link `json:"links,omitempty"` }
CidrMap represents a GTM cidrMap element
type CidrMapList ¶
type CidrMapList struct {
CidrMapItems []*CidrMap `json:"items"`
}
CidrMapList represents a GTM returned cidrmap list body
type CidrMapResponse ¶
type CidrMapResponse struct { Resource *CidrMap `json:"resource"` Status *ResponseStatus `json:"status"` }
CidrMapResponse contains a response after creating or updating CidrMap
type CidrMaps ¶
type CidrMaps interface { // NewCidrMap creates a new CidrMap object. NewCidrMap(context.Context, string) *CidrMap // Instantiate new Assignment struct NewCidrAssignment(context.Context, *CidrMap, int, string) *CidrAssignment // ListCidrMaps retreieves all CidrMaps // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getcidrmaps ListCidrMaps(context.Context, string) ([]*CidrMap, error) // GetCidrMap retrieves a CidrMap with the given name. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getcidrmap GetCidrMap(context.Context, string, string) (*CidrMap, error) // Create the datacenter identified by the receiver argument in the specified domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putcidrmap CreateCidrMap(context.Context, *CidrMap, string) (*CidrMapResponse, error) // Delete the datacenter identified by the receiver argument from the domain specified. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#deletecidrmap DeleteCidrMap(context.Context, *CidrMap, string) (*ResponseStatus, error) // Update the datacenter identified in the receiver argument in the provided domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putcidrmap UpdateCidrMap(context.Context, *CidrMap, string) (*ResponseStatus, error) }
CidrMaps contains operations available on a Cidrmap resource See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html
type ClientFunc ¶
ClientFunc is a gtm client new method, this can used for mocking
type Datacenter ¶
type Datacenter struct { City string `json:"city,omitempty"` CloneOf int `json:"cloneOf,omitempty"` CloudServerHostHeaderOverride bool `json:"cloudServerHostHeaderOverride"` CloudServerTargeting bool `json:"cloudServerTargeting"` Continent string `json:"continent,omitempty"` Country string `json:"country,omitempty"` DefaultLoadObject *LoadObject `json:"defaultLoadObject,omitempty"` Latitude float64 `json:"latitude,omitempty"` Links []*Link `json:"links,omitempty"` Longitude float64 `json:"longitude,omitempty"` Nickname string `json:"nickname,omitempty"` PingInterval int `json:"pingInterval,omitempty"` PingPacketSize int `json:"pingPacketSize,omitempty"` DatacenterId int `json:"datacenterId,omitempty"` ScorePenalty int `json:"scorePenalty,omitempty"` ServermonitorLivenessCount int `json:"servermonitorLivenessCount,omitempty"` ServermonitorLoadCount int `json:"servermonitorLoadCount,omitempty"` ServermonitorPool string `json:"servermonitorPool,omitempty"` StateOrProvince string `json:"stateOrProvince,omitempty"` Virtual bool `json:"virtual"` }
Datacenter represents a GTM datacenter
type DatacenterBase ¶
type DatacenterBase struct { Nickname string `json:"nickname,omitempty"` DatacenterId int `json:"datacenterId"` }
DatacenterBase is a placeholder for default Datacenter
func NewDatacenterBase ¶
func NewDatacenterBase() *DatacenterBase
NewDatacenterBase returns a new DatacenterBase structure
type DatacenterList ¶
type DatacenterList struct {
DatacenterItems []*Datacenter `json:"items"`
}
DatacenterList contains a list of Datacenters
type DatacenterResponse ¶
type DatacenterResponse struct { Status *ResponseStatus `json:"status"` Resource *Datacenter `json:"resource"` }
DatacenterResponse contains a response after creating or updating Datacenter
type Datacenters ¶
type Datacenters interface { // NewDatacenterResponse instantiates a new DatacenterResponse structure NewDatacenterResponse(context.Context) *DatacenterResponse // NewDatacenter creates a new Datacenter object. NewDatacenter(context.Context) *Datacenter // ListDatacenters retreieves all Datacenters // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getdatacenters ListDatacenters(context.Context, string) ([]*Datacenter, error) // GetDatacenter retrieves a Datacenter with the given name. NOTE: Id arg is int! // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getdatacenter GetDatacenter(context.Context, int, string) (*Datacenter, error) // Create the datacenter identified by the receiver argument in the specified domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#postdatacenters CreateDatacenter(context.Context, *Datacenter, string) (*DatacenterResponse, error) // Delete the datacenter identified by the receiver argument from the domain specified. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#deletedatacenter DeleteDatacenter(context.Context, *Datacenter, string) (*ResponseStatus, error) // Update the datacenter identified in the receiver argument in the provided domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putdatacenter UpdateDatacenter(context.Context, *Datacenter, string) (*ResponseStatus, error) // Create Default Datacenter for Maps CreateMapsDefaultDatacenter(context.Context, string) (*Datacenter, error) // Create Default Datacenter for IPv4 Selector CreateIPv4DefaultDatacenter(context.Context, string) (*Datacenter, error) // Create Default Datacenter for IPv6 Selector CreateIPv6DefaultDatacenter(context.Context, string) (*Datacenter, error) }
Datacenters contains operations available on a Datacenter resource See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html
type Domain ¶
type Domain struct { Name string `json:"name"` Type string `json:"type"` AsMaps []*AsMap `json:"asMaps,omitempty"` Resources []*Resource `json:"resources,omitempty"` DefaultUnreachableThreshold float32 `json:"defaultUnreachableThreshold,omitempty"` EmailNotificationList []string `json:"emailNotificationList,omitempty"` MinPingableRegionFraction float32 `json:"minPingableRegionFraction,omitempty"` DefaultTimeoutPenalty int `json:"defaultTimeoutPenalty,omitempty"` Datacenters []*Datacenter `json:"datacenters,omitempty"` ServermonitorLivenessCount int `json:"servermonitorLivenessCount,omitempty"` RoundRobinPrefix string `json:"roundRobinPrefix,omitempty"` ServermonitorLoadCount int `json:"servermonitorLoadCount,omitempty"` PingInterval int `json:"pingInterval,omitempty"` MaxTTL int64 `json:"maxTTL,omitempty"` LoadImbalancePercentage float64 `json:"loadImbalancePercentage,omitempty"` DefaultHealthMax float64 `json:"defaultHealthMax,omitempty"` LastModified string `json:"lastModified,omitempty"` Status *ResponseStatus `json:"status,omitempty"` MapUpdateInterval int `json:"mapUpdateInterval,omitempty"` MaxProperties int `json:"maxProperties,omitempty"` MaxResources int `json:"maxResources,omitempty"` DefaultSslClientPrivateKey string `json:"defaultSslClientPrivateKey,omitempty"` DefaultErrorPenalty int `json:"defaultErrorPenalty,omitempty"` Links []*Link `json:"links,omitempty"` Properties []*Property `json:"properties,omitempty"` MaxTestTimeout float64 `json:"maxTestTimeout,omitempty"` CnameCoalescingEnabled bool `json:"cnameCoalescingEnabled"` DefaultHealthMultiplier float64 `json:"defaultHealthMultiplier,omitempty"` ServermonitorPool string `json:"servermonitorPool,omitempty"` LoadFeedback bool `json:"loadFeedback"` MinTTL int64 `json:"minTTL,omitempty"` GeographicMaps []*GeoMap `json:"geographicMaps,omitempty"` CidrMaps []*CidrMap `json:"cidrMaps,omitempty"` DefaultMaxUnreachablePenalty int `json:"defaultMaxUnreachablePenalty"` DefaultHealthThreshold float64 `json:"defaultHealthThreshold,omitempty"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` ModificationComments string `json:"modificationComments,omitempty"` MinTestInterval int `json:"minTestInterval,omitempty"` PingPacketSize int `json:"pingPacketSize,omitempty"` DefaultSslClientCertificate string `json:"defaultSslClientCertificate,omitempty"` EndUserMappingEnabled bool `json:"endUserMappingEnabled"` }
The Domain data structure represents a GTM domain
type DomainItem ¶
type DomainItem struct { AcgId string `json:"acgId"` LastModified string `json:"lastModified"` Links []*Link `json:"links"` Name string `json:"name"` Status string `json:"status"` }
DomainItem is a DomainsList item
type DomainResponse ¶
type DomainResponse struct { Resource *Domain `json:"resource"` Status *ResponseStatus `json:"status"` }
DomainResponse contains a response after creating or updating Domain
type Domains ¶
type Domains interface { // Retrieve map of null fields NullFieldMap(context.Context, *Domain) (*NullFieldMapStruct, error) // NewDomain is a utility function that creates a new Domain object. NewDomain(context.Context, string, string) *Domain // GetStatus retrieves current status for the given domainname. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getcurrentstatus GetDomainStatus(context.Context, string) (*ResponseStatus, error) // ListDomains retrieves all Domains. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getdomains ListDomains(context.Context) ([]*DomainItem, error) // GetDomain retrieves a Domain with the given domainname. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getdomain GetDomain(context.Context, string) (*Domain, error) // CreateDomain creates domain // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#postdomains CreateDomain(context.Context, *Domain, map[string]string) (*DomainResponse, error) // Delete is a method applied to a domain object resulting in removal. // See: ** Not Supported by API ** DeleteDomain(context.Context, *Domain) (*ResponseStatus, error) // Update is a method applied to a domain object resulting in an update. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#postdomains UpdateDomain(context.Context, *Domain, map[string]string) (*ResponseStatus, error) }
Domains contains operations available on a Domain resource See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html
type DomainsList ¶
type DomainsList struct {
DomainItems []*DomainItem `json:"items"`
}
DomainsList contains a list of domain items
type Error ¶
type Error struct { Type string `json:"type"` Title string `json:"title"` Detail string `json:"detail"` Instance string `json:"instance,omitempty"` BehaviorName string `json:"behaviorName,omitempty"` ErrorLocation string `json:"errorLocation,omitempty"` StatusCode int `json:"-"` }
Error is a gtm error interface
type GTM ¶
type GTM interface { Domains Properties Datacenters Resources ASMaps GeoMaps CidrMaps }
GTM is the gtm api interface
type GeoAssignment ¶
type GeoAssignment struct { DatacenterBase Countries []string `json:"countries"` }
GeoAssignment represents a GTM geo assignment element
type GeoMap ¶
type GeoMap struct { DefaultDatacenter *DatacenterBase `json:"defaultDatacenter"` Assignments []*GeoAssignment `json:"assignments,omitempty"` Name string `json:"name"` Links []*Link `json:"links,omitempty"` }
GeoMap represents a GTM GeoMap
type GeoMapList ¶
type GeoMapList struct {
GeoMapItems []*GeoMap `json:"items"`
}
GeoMapList represents the returned GTM GeoMap List body
type GeoMapResponse ¶
type GeoMapResponse struct { Resource *GeoMap `json:"resource"` Status *ResponseStatus `json:"status"` }
GeoMapResponse contains a response after creating or updating GeoMap
type GeoMaps ¶
type GeoMaps interface { // NewGeoMap creates a new GeoMap object. NewGeoMap(context.Context, string) *GeoMap // Instantiate new Assignment struct NewGeoAssignment(context.Context, *GeoMap, int, string) *GeoAssignment // ListGeoMap retreieves all GeoMaps // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getgeomaps ListGeoMaps(context.Context, string) ([]*GeoMap, error) // GetGeoMap retrieves a GeoMap with the given name. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getgeomap GetGeoMap(context.Context, string, string) (*GeoMap, error) // Create the datacenter identified by the receiver argument in the specified domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putgeomap CreateGeoMap(context.Context, *GeoMap, string) (*GeoMapResponse, error) // Delete the datacenter identified by the receiver argument from the domain specified. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#deletegeomap DeleteGeoMap(context.Context, *GeoMap, string) (*ResponseStatus, error) // Update the datacenter identified in the receiver argument in the provided domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putgeomap UpdateGeoMap(context.Context, *GeoMap, string) (*ResponseStatus, error) }
GeoMaps contains operations available on a GeoMap resource See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html
type HttpHeader ¶
HttpHeader struct contains HTTP headers to send if the testObjectProtocol is http or https
type LivenessTest ¶
type LivenessTest struct { Name string `json:"name"` ErrorPenalty float64 `json:"errorPenalty,omitempty"` PeerCertificateVerification bool `json:"peerCertificateVerification"` TestInterval int `json:"testInterval,omitempty"` TestObject string `json:"testObject,omitempty"` Links []*Link `json:"links,omitempty"` RequestString string `json:"requestString,omitempty"` ResponseString string `json:"responseString,omitempty"` HttpError3xx bool `json:"httpError3xx"` HttpError4xx bool `json:"httpError4xx"` HttpError5xx bool `json:"httpError5xx"` Disabled bool `json:"disabled"` TestObjectProtocol string `json:"testObjectProtocol,omitempty"` TestObjectPassword string `json:"testObjectPassword,omitempty"` TestObjectPort int `json:"testObjectPort,omitempty"` SslClientPrivateKey string `json:"sslClientPrivateKey,omitempty"` SslClientCertificate string `json:"sslClientCertificate,omitempty"` DisableNonstandardPortWarning bool `json:"disableNonstandardPortWarning"` HttpHeaders []*HttpHeader `json:"httpHeaders,omitempty"` TestObjectUsername string `json:"testObjectUsername,omitempty"` TestTimeout float32 `json:"testTimeout,omitempty"` TimeoutPenalty float64 `json:"timeoutPenalty,omitempty"` AnswersRequired bool `json:"answersRequired"` ResourceType string `json:"resourceType,omitempty"` RecursionRequested bool `json:"recursionRequested"` }
LivenessTest contains configuration of liveness tests to determine whether your servers respond to requests
func (*LivenessTest) NewHttpHeader ¶
func (lt *LivenessTest) NewHttpHeader() *HttpHeader
NewHttpHeader is a method applied to a livenesstest object that instantiates an HttpHeader object.
type LoadObject ¶
type LoadObject struct { LoadObject string `json:"loadObject,omitempty"` LoadObjectPort int `json:"loadObjectPort,omitempty"` LoadServers []string `json:"loadServers,omitempty"` }
LoadObject contains information about the load reporting interface
func NewLoadObject ¶
func NewLoadObject() *LoadObject
NewLoadObject returns a new LoadObject structure
type NullFieldMapStruct ¶
type NullFieldMapStruct struct { Domain NullPerObjectAttributeStruct // entry is domain Properties map[string]NullPerObjectAttributeStruct // entries are properties Datacenters map[string]NullPerObjectAttributeStruct // entries are datacenters Resources map[string]NullPerObjectAttributeStruct // entries are resources CidrMaps map[string]NullPerObjectAttributeStruct // entries are cidrmaps GeoMaps map[string]NullPerObjectAttributeStruct // entries are geomaps AsMaps map[string]NullPerObjectAttributeStruct // entries are asmaps }
NullFieldMapStruct returned null Objects structure
type NullPerObjectAttributeStruct ¶
type NullPerObjectAttributeStruct struct { CoreObjectFields map[string]string ChildObjectFields map[string]interface{} // NullObjectAttributeStruct }
NullPerObjectAttributeStruct represents core and child null object attributes
type Properties ¶
type Properties interface { // NewTrafficTarget is a method applied to a property object that instantiates a TrafficTarget object. NewTrafficTarget(context.Context) *TrafficTarget // NewStaticRRSet is a method applied to a property object that instantiates a StaticRRSet object. NewStaticRRSet(context.Context) *StaticRRSet // NewLivenessTest is a method applied to a property object that instantiates a LivenessTest object. NewLivenessTest(context.Context, string, string, int, float32) *LivenessTest // NewProperty creates a new Property object. NewProperty(context.Context, string) *Property // ListProperties retreieves all Properties for the provided domainName. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getproperties ListProperties(context.Context, string) ([]*Property, error) // GetProperty retrieves a Property with the given domain and property names. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getproperty GetProperty(context.Context, string, string) (*Property, error) // CreateProperty creates property // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putproperty CreateProperty(context.Context, *Property, string) (*PropertyResponse, error) // DeleteProperty is a method applied to a property object resulting in removal. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#deleteproperty DeleteProperty(context.Context, *Property, string) (*ResponseStatus, error) // UpdateProperty is a method applied to a property object resulting in an update. // https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putproperty UpdateProperty(context.Context, *Property, string) (*ResponseStatus, error) }
Properties contains operations available on a Property resource See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html
type Property ¶
type Property struct { Name string `json:"name"` Type string `json:"type"` Ipv6 bool `json:"ipv6"` ScoreAggregationType string `json:"scoreAggregationType"` StickinessBonusPercentage int `json:"stickinessBonusPercentage,omitempty"` StickinessBonusConstant int `json:"stickinessBonusConstant,omitempty"` HealthThreshold float64 `json:"healthThreshold,omitempty"` UseComputedTargets bool `json:"useComputedTargets"` BackupIp string `json:"backupIp,omitempty"` BalanceByDownloadScore bool `json:"balanceByDownloadScore"` StaticTTL int `json:"staticTTL,omitempty"` StaticRRSets []*StaticRRSet `json:"staticRRSets,omitempty"` LastModified string `json:"lastModified"` UnreachableThreshold float64 `json:"unreachableThreshold,omitempty"` MinLiveFraction float64 `json:"minLiveFraction,omitempty"` HealthMultiplier float64 `json:"healthMultiplier,omitempty"` DynamicTTL int `json:"dynamicTTL,omitempty"` MaxUnreachablePenalty int `json:"maxUnreachablePenalty,omitempty"` MapName string `json:"mapName,omitempty"` HandoutLimit int `json:"handoutLimit"` HandoutMode string `json:"handoutMode"` FailoverDelay int `json:"failoverDelay,omitempty"` BackupCName string `json:"backupCName,omitempty"` FailbackDelay int `json:"failbackDelay,omitempty"` LoadImbalancePercentage float64 `json:"loadImbalancePercentage,omitempty"` HealthMax float64 `json:"healthMax,omitempty"` GhostDemandReporting bool `json:"ghostDemandReporting"` Comments string `json:"comments,omitempty"` CName string `json:"cname,omitempty"` WeightedHashBitsForIPv4 int `json:"weightedHashBitsForIPv4,omitempty"` WeightedHashBitsForIPv6 int `json:"weightedHashBitsForIPv6,omitempty"` TrafficTargets []*TrafficTarget `json:"trafficTargets,omitempty"` Links []*Link `json:"links,omitempty"` LivenessTests []*LivenessTest `json:"livenessTests,omitempty"` }
Property represents a GTM property
type PropertyList ¶
type PropertyList struct {
PropertyItems []*Property `json:"items"`
}
PropertyList contains a list of property items
type PropertyResponse ¶
type PropertyResponse struct { Resource *Property `json:"resource"` Status *ResponseStatus `json:"status"` }
PropertyResponse contains a response after creating or updating Property
type Resource ¶
type Resource struct { Type string `json:"type"` HostHeader string `json:"hostHeader,omitempty"` LeastSquaresDecay float64 `json:"leastSquaresDecay,omitempty"` Description string `json:"description,omitempty"` LeaderString string `json:"leaderString,omitempty"` ConstrainedProperty string `json:"constrainedProperty,omitempty"` ResourceInstances []*ResourceInstance `json:"resourceInstances,omitempty"` AggregationType string `json:"aggregationType,omitempty"` Links []*Link `json:"links,omitempty"` LoadImbalancePercentage float64 `json:"loadImbalancePercentage,omitempty"` UpperBound int `json:"upperBound,omitempty"` Name string `json:"name"` MaxUMultiplicativeIncrement float64 `json:"maxUMultiplicativeIncrement,omitempty"` DecayRate float64 `json:"decayRate,omitempty"` }
Resource represents a GTM resource
type ResourceInstance ¶
type ResourceInstance struct { DatacenterId int `json:"datacenterId"` UseDefaultLoadObject bool `json:"useDefaultLoadObject"` LoadObject }
ResourceInstance contains information about the resources that constrain the properties within the data center
type ResourceList ¶
type ResourceList struct {
ResourceItems []*Resource `json:"items"`
}
ResourceList is the structure returned by List Resources
type ResourceResponse ¶
type ResourceResponse struct { Resource *Resource `json:"resource"` Status *ResponseStatus `json:"status"` }
ResourceResponse contains a response after creating or updating Resource
type Resources ¶
type Resources interface { // NewResourceInstance instantiates a new ResourceInstance. NewResourceInstance(context.Context, *Resource, int) *ResourceInstance // NewResource creates a new Resource object. NewResource(context.Context, string) *Resource // ListResources retreieves all Resources // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getresources ListResources(context.Context, string) ([]*Resource, error) // GetResource retrieves a Resource with the given name. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#getresource GetResource(context.Context, string, string) (*Resource, error) // Create the datacenter identified by the receiver argument in the specified domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putresource CreateResource(context.Context, *Resource, string) (*ResourceResponse, error) // Delete the datacenter identified by the receiver argument from the domain specified. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#deleteresource DeleteResource(context.Context, *Resource, string) (*ResponseStatus, error) // Update the datacenter identified in the receiver argument in the provided domain. // See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html#putresource UpdateResource(context.Context, *Resource, string) (*ResponseStatus, error) }
Resources contains operations available on a Resource resource See: https://developer.akamai.com/api/web_performance/global_traffic_management/v1.html
type ResponseBody ¶
type ResponseBody struct { Resource interface{} `json:"resource"` Status *ResponseStatus `json:"status"` }
ResponseBody is a generic response struct
type ResponseStatus ¶
type ResponseStatus struct { ChangeId string `json:"changeId,omitempty"` Links *[]Link `json:"links,omitempty"` Message string `json:"message,omitempty"` PassingValidation bool `json:"passingValidation,omitempty"` PropagationStatus string `json:"propagationStatus,omitempty"` PropagationStatusDate string `json:"propagationStatusDate,omitempty"` }
ResponseStatus is returned on Create, Update or Delete operations for all entity types
func NewResponseStatus ¶
func NewResponseStatus() *ResponseStatus
NewResponseStatus returns a new ResponseStatus struct
type StaticRRSet ¶
type StaticRRSet struct { Type string `json:"type"` TTL int `json:"ttl"` Rdata []string `json:"rdata"` }
StaticRRSet contains static recordset
type TrafficTarget ¶
type TrafficTarget struct { DatacenterId int `json:"datacenterId"` Enabled bool `json:"enabled"` Weight float64 `json:"weight,omitempty"` Servers []string `json:"servers,omitempty"` Name string `json:"name,omitempty"` HandoutCName string `json:"handoutCName,omitempty"` }
TrafficTarget struct contains information about where to direct data center traffic