Documentation ¶
Index ¶
- func Auth(prm AuthParams) string
- func LogRequests() bool
- type AkamaiError
- type AuthCredentials
- type AuthParams
- type Client
- type CpCodeSummary
- type CpCodes
- type DataCenter
- type DataCenterResponse
- type DataCenters
- type DefaultLoadObject
- type Domain
- type DomainResponse
- type DomainSummary
- type Domains
- type GTMClient
- func (c *GTMClient) DataCenter(domain string, id int) (*DataCenter, error)
- func (c *GTMClient) DataCenterByName(domain string, name string) (*DataCenter, error)
- func (c *GTMClient) DataCenterCreate(domain string, dc *DataCenter) (*DataCenterResponse, error)
- func (c *GTMClient) DataCenterDelete(domain string, id int) error
- func (c *GTMClient) DataCenterUpdate(domain string, dc *DataCenter) (*DataCenterResponse, error)
- func (c *GTMClient) DataCenters(domain string) ([]DataCenter, error)
- func (c *GTMClient) Domain(name string) (*Domain, error)
- func (c *GTMClient) DomainCreate(name string, domainType string) (*DomainResponse, error)
- func (c *GTMClient) DomainStatus(name string) (*ResourceStatus, error)
- func (c *GTMClient) DomainUpdate(domain *Domain) (*DomainResponse, error)
- func (c *GTMClient) Domains() ([]DomainSummary, error)
- func (c GTMClient) GetCredentials() *AuthCredentials
- func (c GTMClient) GetHTTPClient() *http.Client
- func (c *GTMClient) Properties(domain string) (*Properties, error)
- func (c *GTMClient) PropertiesSorted(domain string) (*Properties, error)
- func (c *GTMClient) Property(domain, property string) (*Property, error)
- func (c *GTMClient) PropertyCreate(domain string, property *Property) (*PropertyResponse, error)
- func (c *GTMClient) PropertyDelete(domain string, property string) (bool, error)
- func (c *GTMClient) PropertyUpdate(domain string, property *Property) (*PropertyResponse, error)
- type GroupSummary
- type Groups
- type HostnameSummary
- type Hostnames
- type Link
- type LivenessTest
- type LoadObject
- type PAPIClient
- func (c *PAPIClient) Activations(propID, contractID, groupID string) ([]PapiActivation, error)
- func (c *PAPIClient) CpCode(cpCodeID, contractID, groupID string) (*CpCodeSummary, error)
- func (c *PAPIClient) CpCodes(contractID, groupID string) ([]CpCodeSummary, error)
- func (c PAPIClient) GetCredentials() *AuthCredentials
- func (c PAPIClient) GetHTTPClient() *http.Client
- func (c *PAPIClient) Groups() ([]GroupSummary, error)
- func (c *PAPIClient) Hostname(hostID, contractID, groupID string) (HostnameSummary, error)
- func (c *PAPIClient) Hostnames(contractID, groupID string) ([]HostnameSummary, error)
- func (c *PAPIClient) Products(contractID string) ([]ProductSummary, error)
- func (c *PAPIClient) Properties(contractID, groupID string) ([]PapiPropertySummary, error)
- func (c *PAPIClient) Property(propID, contractID, groupID string) (PapiPropertySummary, error)
- func (c *PAPIClient) PropertyLatestVersion(propID, contractID, groupID string) (PapiPropertyVersionSummary, error)
- func (c *PAPIClient) PropertyRules(propID, version, contractID, groupID string) (PapiPropertyRuleSummary, error)
- func (c *PAPIClient) PropertyVersion(version, propID, contractID, groupID string) (PapiPropertyVersionSummary, error)
- func (c *PAPIClient) PropertyVersionXML(version, propID, contractID, groupID string) (string, error)
- func (c *PAPIClient) PropertyVersions(propID, contractID, groupID string) ([]PapiPropertyVersionSummary, error)
- type PapiActivation
- type PapiActivations
- type PapiProperties
- type PapiPropertyRuleBehavior
- type PapiPropertyRuleSummary
- type PapiPropertyRules
- type PapiPropertySummary
- type PapiPropertyVersionSummary
- type PapiPropertyVersions
- type ProductSummary
- type Products
- type Properties
- type Property
- type PropertyResponse
- type ResourceStatus
- type TrafficTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Auth ¶
func Auth(prm AuthParams) string
Auth takes prm and returns a string that can be used as the `Authorization` header in making Akamai API requests.
The string returned by Auth conforms to the Akamai {OPEN} EdgeGrid Authentication scheme. https://developer.akamai.com/introduction/Client_Auth.html
func LogRequests ¶
func LogRequests() bool
LogRequests returns true if the AK_LOG environment variable is set; false if it is not.
Types ¶
type AkamaiError ¶
type AkamaiError struct { Type string `json:"type"` Title string `json:"title"` Detail string `json:"detail"` RequestBody string `json:"-"` ResponseBody string `json:"-"` }
AkamaiError represents a non-successful HTTP response from the Akamai API.
func (AkamaiError) Error ¶
func (a AkamaiError) Error() string
type AuthCredentials ¶
type AuthCredentials struct { AccessToken string ClientToken string ClientSecret string APIHost string }
AuthCredentials houses various Akamai-client-specific data necessary to authenticate the Akamai API.
func NewCredentials ¶
func NewCredentials() *AuthCredentials
NewCredentials returns an AuthCredentials using the AKAMAI_EDGEGRID_ACCESS_TOKEN, AKAMAI_EDGEGRID_CLIENT_TOKEN, AKAMAI_EDGEGRID_CLIENT_SECRET, and AKAMAI_EDGEGRID_HOST environment variables.
type AuthParams ¶
type AuthParams struct {
// contains filtered or unexported fields
}
AuthParams is used to house various request details such that the AuthParams can be passed to Auth to sign using the Akamai {OPEN} EdgeGrid Authentication scheme.
func NewAuthParams ¶
func NewAuthParams(req *http.Request, accessToken, clientToken, clientSecret string) AuthParams
NewAuthParams returns an AuthParams generated from req, accessToken, clientToken, and clientSecret.
type Client ¶
type Client interface { GetCredentials() *AuthCredentials GetHTTPClient() *http.Client }
Client is an interface for an Akamai API client.
type CpCodeSummary ¶
type CpCodeSummary struct { CPCodeID string `json:"cpcodeId"` Name string `json:"cpcodeName"` ProductIDs []string `json:"productIds"` CreatedDate string `json:"createdDate"` }
CpCodeSummary is a representation of the Akamai PAPI CP code summary associated with each CP code returned by the CP codes response at: http://apibase.com/papi/v0/cpcodes/?contractId=contractId&groupId=groupId
type CpCodes ¶
type CpCodes struct { CpCodes struct { Items []CpCodeSummary `json:"items"` } `json:"cpcodes"` }
CpCodes is a representation of the Akamai PAPI CP codes associated with the CP codes response available at: http://apibase.com/papi/v0/cpcodes/?contractId=contractId&groupId=groupId
type DataCenter ¶
type DataCenter struct { City string `json:"city"` CloneOf int `json:"cloneOf,omitempty"` CloudServerTargeting bool `json:"cloudServerTargeting"` Continent string `json:"continent"` Country string `json:"country"` DataCenterID int `json:"datacenterId,omitempty"` DefaultLoadObject *DefaultLoadObject `json:"defaultLoadObject,omitempty"` Latitude float64 `json:"latitude"` Links []Link `json:"links,omitempty"` Longitude float64 `json:"longitude"` Nickname string `json:"nickname"` StateOrProvince string `json:"stateOrProvince"` Virtual bool `json:"virtual"` }
DataCenter represents an Akamai GTM datacenter.
type DataCenterResponse ¶
type DataCenterResponse struct { DataCenter *DataCenter `json:"resource"` Status *ResourceStatus `json:"status"` }
DataCenterResponse is a representation of an Akamai GTM datacenter response returned from datacenter CREATEs and UPDATEs at: http://apibase.com/config-gtm/v1/domains/domain/datacenters/4
type DataCenters ¶
type DataCenters struct {
Items []DataCenter `json:"items"`
}
DataCenters is a representation of an Akamai GTM datacenters response returned from: http://apibase.com/config-gtm/v1/domains/domain/datacenters
type DefaultLoadObject ¶
type DefaultLoadObject struct { LoadObject interface{} `json:"loadObject"` LoadObjectPort int64 `json:"loadObjectPort"` LoadServers interface{} `json:"loadServers"` }
DefaultLoadObject represents the default load object associated with an Akamai GTM datacenter.
type Domain ¶
type Domain struct { Name string `json:"name"` Status *ResourceStatus `json:"status,omitempty"` Type string `json:"type"` LastModified string `json:"lastModified,omitempty"` LastModifiedBy string `json:"lastModifiedBy,omitempty"` ModificationComments string `json:"modificationComments,omitempty"` CIDRMaps []interface{} `json:"cidrMaps,omitempty"` Datacenters []DataCenter `json:"datacenters,omitempty"` Properties []Property `json:"properties,omitempty"` Links []Link `json:"links,omitempty"` GeographicMaps []interface{} `json:"geographicMaps,omitempty"` Resources []interface{} `json:"resources,omitempty"` }
Domain is a representation of an Akamai GTM domain.
type DomainResponse ¶
type DomainResponse struct { Domain *Domain `json:"resource"` Status *ResourceStatus `json:"status"` }
DomainResponse is a representation of the Akamai GTM response from a domain CREATEs and UPDATEs at: http://apibase.com/config-gtm/v1/domains/domain
type DomainSummary ¶
type DomainSummary struct { Name string `json:"name"` Status string `json:"status"` LastModified string `json:"lastModified"` }
DomainSummary is a representation of the Akamai GTM domain summary associated with each domain returned by the domains response at: http://apibase.com/config-gtm/v1/domains
type Domains ¶
type Domains struct {
Domains []DomainSummary `json:"items"`
}
Domains is a representation of the Akamai GTM domains response available at: http://apibase.com/config-gtm/v1/domains
type GTMClient ¶
type GTMClient struct { Credentials *AuthCredentials HTTPClient *http.Client }
GTMClient is an Akamai GTM API client. https://developer.akamai.com/api/luna/config-gtm/overview.html
func GTMClientWithCreds ¶
GTMClientWithCreds takes an accessToken, a clientToken, a clientSecret, and an apiHost string and returns a GTMClient.
func NewGTMClient ¶
func NewGTMClient() *GTMClient
NewGTMClient returns a GTMClient using the AKAMAI_EDGEGRID_ACCESS_TOKEN, AKAMAI_EDGEGRID_CLIENT_TOKEN, AKAMAI_EDGEGRID_CLIENT_SECRET, and AKAMAI_EDGEGRID_HOST environment variables.
func (*GTMClient) DataCenter ¶
func (c *GTMClient) DataCenter(domain string, id int) (*DataCenter, error)
DataCenter takes an Akamai GTM domain name and a datacenter id and returns the DataCenter for the given ID.
func (*GTMClient) DataCenterByName ¶
func (c *GTMClient) DataCenterByName(domain string, name string) (*DataCenter, error)
DataCenterByName takes an Akamai GTM domain name and a datacenter name and returns the matching DataCenter.
func (*GTMClient) DataCenterCreate ¶
func (c *GTMClient) DataCenterCreate(domain string, dc *DataCenter) (*DataCenterResponse, error)
DataCenterCreate takes an Akamai GTM domain name and a dc and issues a request to create the DataCenter via the Akamai GTM API. The result is returned as a DataCenterResponse.
func (*GTMClient) DataCenterDelete ¶
DataCenterDelete takes an Akamai GTM domain name and a datacenter id and issues a request to delete the matching datacenter via the Akamai GTM API.
func (*GTMClient) DataCenterUpdate ¶
func (c *GTMClient) DataCenterUpdate(domain string, dc *DataCenter) (*DataCenterResponse, error)
DataCenterUpdate takes an Akamai GTM domain name and a dc and issues a request to update the DataCenter details accordingly via the Akamai GTM API. The result is returned as a DataCenterResponse.
func (*GTMClient) DataCenters ¶
func (c *GTMClient) DataCenters(domain string) ([]DataCenter, error)
DataCenters takes an Akamai GTM domain name and returns a []DataCenter representing the datacenters associated with the domain.
func (*GTMClient) DomainCreate ¶
func (c *GTMClient) DomainCreate(name string, domainType string) (*DomainResponse, error)
DomainCreate issues a request to create a domain with the provided name and type. The result is returned as a DomainResponse.
func (*GTMClient) DomainStatus ¶
func (c *GTMClient) DomainStatus(name string) (*ResourceStatus, error)
DomainStatus takes an Akamai GTM domain name and returns its ResourceStatus.
func (*GTMClient) DomainUpdate ¶
func (c *GTMClient) DomainUpdate(domain *Domain) (*DomainResponse, error)
DomainUpdate takes a domain and issues a request to update it accordingly. The result is returned as a DomainResponse.
func (*GTMClient) Domains ¶
func (c *GTMClient) Domains() ([]DomainSummary, error)
Domains returns the Akamai GTM DomainSummary for each domain the GTMClient is authorized to view and modify
func (GTMClient) GetCredentials ¶
func (c GTMClient) GetCredentials() *AuthCredentials
GetCredentials takes a GTMClient and returns its Credentials.
func (GTMClient) GetHTTPClient ¶
GetHTTPClient takes a GTMClient and returns its HTTPClient.
func (*GTMClient) Properties ¶
func (c *GTMClient) Properties(domain string) (*Properties, error)
Properties takes an Akamai GTM domain name and returns the Akamai GTM properties associated with the domain.
func (*GTMClient) PropertiesSorted ¶
func (c *GTMClient) PropertiesSorted(domain string) (*Properties, error)
PropertiesSorted sorted takes an Akamai GTM domain name and returns the Akamai GTM properties associated with the domain name, sorted by their names.
func (*GTMClient) Property ¶
Property takes an Akamai GTM domain name and a property name and returns the matching Akamai GTM property.
func (*GTMClient) PropertyCreate ¶
func (c *GTMClient) PropertyCreate(domain string, property *Property) (*PropertyResponse, error)
PropertyCreate takes an Akamai GTM domain name and a property and issues a request to create the Property via the Akamai GTM API. The result is returned as a PropertyResponse.
func (*GTMClient) PropertyDelete ¶
PropertyDelete takes an Akamai GTM domain name and a property name and issues a request to delete the matching Akamai GTM property via the Akamai GTM API. It returns true if the action was successful and false if it was not successful.
func (*GTMClient) PropertyUpdate ¶
func (c *GTMClient) PropertyUpdate(domain string, property *Property) (*PropertyResponse, error)
PropertyUpdate takes an Akamai GTM domain name and a property and issues a request to update the property accordingly via the Akamai GTM API. The result is returned as a PropertyResponse.
type GroupSummary ¶
type GroupSummary struct { GroupID string `json:"groupId"` Name string `json:"groupName"` ContractIDs []string `json:"contractIds"` ParentGroupID string `json:"parentGroupId"` }
GroupSummary is a representation of the Akamai PAPI group summary associated with each group returned by the groups response at: http://apibase.com/papi/v0/groups/
type Groups ¶
type Groups struct { Groups struct { Items []GroupSummary `json:"items"` } `json:"groups"` }
Groups is a representation of the Akamai PAPI Groups response available at: http://apibase.com/papi/v0/groups/
type HostnameSummary ¶
type HostnameSummary struct { EdgeHostnameID string `json:"edgeHostnameId"` DomainPrefix string `json:"domainPrefix"` DomainSuffix string `json:"domainSuffix"` IPVersionBehavior string `json:"ipVersionBehavior"` Secure bool `json:"secure"` EdgeHostnameDomain string `json:"edgehostnameDomain"` }
HostnameSummary is a representation of the Akamai PAPI hostname summary associated with each hostname returned by the hostnames response at: http://apibase.com/papi/v0/edgehostnames?contractId=contractId&groupId=groupId
type Hostnames ¶
type Hostnames struct { Hostnames struct { Items []HostnameSummary `json:"items"` } `json:"edgehostnames"` }
Hostnames is a representation of the Akamai PAPI hostnames response available at: http://apibase.com/papi/v0/edgehostnames?contractId=contractId&groupId=groupId
type LivenessTest ¶
type LivenessTest struct { Name string `json:"name"` HTTPError3xx bool `json:"httpError3xx,omitempty"` HTTPError4xx bool `json:"httpError4xx,omitempty"` HTTPError5xx bool `json:"httpError5xx,omitempty"` TestInterval int64 `json:"testInterval,omitempty"` TestObject string `json:"testObject,omitempty"` TestObjectPort int64 `json:"testObjectPort,omitempty"` TestObjectProtocol string `json:"testObjectProtocol,omitempty"` TestObjectUsername string `json:"testObjectUsername,omitempty"` TestObjectPassword string `json:"testObjectPassword,omitempty"` TestTimeout float64 `json:"testTimeout,omitempty"` DisableNonstandardPortWarning bool `json:"disableNonstandardPortWarning,omitempty"` RequestString string `json:"requestString,omitempty"` ResponseString string `json:"responseString,omitempty"` SSLClientPrivateKey string `json:"sslClientPrivateKey,omitempty"` SSLCertificate string `json:"sslClientCertificate,omitempty"` HostHeader string `json:"hostHeader,omitempty"` }
LivenessTest represents a liveness test associated with an Akamai GTM property.
type LoadObject ¶
type LoadObject struct { LoadObject string `json:"loadObject"` LoadObjectPort string `json:"loadObjectPort"` LoadServers string `json:"loadServers"` Continent string `json:"continent"` CloudServerTargeting bool `json:"cloudServerTargeting"` }
LoadObject represents the load object associated with an Akamai GTM datacenter.
type PAPIClient ¶
type PAPIClient struct { Credentials *AuthCredentials HTTPClient *http.Client }
PAPIClient is an Akamai PAPI API client. https://developer.akamai.com/api/luna/papi/overview.html
func NewPAPIClient ¶
func NewPAPIClient() *PAPIClient
NewPAPIClient returns a PAPIClient using the AKAMAI_EDGEGRID_ACCESS_TOKEN, AKAMAI_EDGEGRID_CLIENT_TOKEN, AKAMAI_EDGEGRID_CLIENT_SECRET, and AKAMAI_EDGEGRID_HOST environment variables.
func PAPIClientWithCreds ¶
func PAPIClientWithCreds(accessToken, clientToken, clientSecret, apiHost string) *PAPIClient
PAPIClientWithCreds takes an accessToken, a clientToken, a clientSecret, and an apiHost and returns a PAPIClient.
func (*PAPIClient) Activations ¶
func (c *PAPIClient) Activations(propID, contractID, groupID string) ([]PapiActivation, error)
Activations takes a propertyID, a contractID, and a groupID and returns the associated []PapiActivation representing the property activations.
func (*PAPIClient) CpCode ¶
func (c *PAPIClient) CpCode(cpCodeID, contractID, groupID string) (*CpCodeSummary, error)
CpCode takes a cpCodeID, a contractID, and a groupID and returns the associated CpCodeSummary.
func (*PAPIClient) CpCodes ¶
func (c *PAPIClient) CpCodes(contractID, groupID string) ([]CpCodeSummary, error)
CpCodes takes a contractID and a groupID and returns the associated []CpCodeSummary representing the CP code summaries associated with the contractId and groupId.
func (PAPIClient) GetCredentials ¶
func (c PAPIClient) GetCredentials() *AuthCredentials
GetCredentials takes a PAPIClient and returns its credentials.
func (PAPIClient) GetHTTPClient ¶
func (c PAPIClient) GetHTTPClient() *http.Client
GetHTTPClient takes a PAPIClient and returns its HTTPClient.
func (*PAPIClient) Groups ¶
func (c *PAPIClient) Groups() ([]GroupSummary, error)
Groups returns a []GroupSummary representing the groups associated with the PAPIClient.
func (*PAPIClient) Hostname ¶
func (c *PAPIClient) Hostname(hostID, contractID, groupID string) (HostnameSummary, error)
Hostname takes a hostID, a contractID, and a groupID and returns the associated HostnameSummary.
func (*PAPIClient) Hostnames ¶
func (c *PAPIClient) Hostnames(contractID, groupID string) ([]HostnameSummary, error)
Hostnames takes a contractID and a groupID and returns the associated []HostnameSummary representing each HostnameSummary for the hostnames associated with the contractID and groupID.
func (*PAPIClient) Products ¶
func (c *PAPIClient) Products(contractID string) ([]ProductSummary, error)
Products takes a contractID returns the associated ProductSummary for each product associated with the contractID.
func (*PAPIClient) Properties ¶
func (c *PAPIClient) Properties(contractID, groupID string) ([]PapiPropertySummary, error)
Properties takes a contractID and a groupID and returns the associated []PapiPropertySummary for each property associated with the contractID and the groupID.
func (*PAPIClient) Property ¶
func (c *PAPIClient) Property(propID, contractID, groupID string) (PapiPropertySummary, error)
Property takes a propertyID, a contractID, and a groupID and returns the PapiPropertySummary for the associated property.
func (*PAPIClient) PropertyLatestVersion ¶
func (c *PAPIClient) PropertyLatestVersion(propID, contractID, groupID string) (PapiPropertyVersionSummary, error)
PropertyLatestVersion takes a propertyID, a contractID, and a groupID and returns the PapiPropertyVersionSummary for the most recent property version.
func (*PAPIClient) PropertyRules ¶
func (c *PAPIClient) PropertyRules(propID, version, contractID, groupID string) (PapiPropertyRuleSummary, error)
PropertyRules takes a propertyID string, a version, and a groupID and returns a the PapiPropertyRuleSummary for the associated property.
func (*PAPIClient) PropertyVersion ¶
func (c *PAPIClient) PropertyVersion(version, propID, contractID, groupID string) (PapiPropertyVersionSummary, error)
PropertyVersion takes a version, a propertyID, a contractID, and a groupID and returns the associated PapiPropertyVersionSummary.
func (*PAPIClient) PropertyVersionXML ¶
func (c *PAPIClient) PropertyVersionXML(version, propID, contractID, groupID string) (string, error)
PropertyVersionXML takes a version, a propertyID, a contractID, and a groupID and returns the the associated property version XML string.
func (*PAPIClient) PropertyVersions ¶
func (c *PAPIClient) PropertyVersions(propID, contractID, groupID string) ([]PapiPropertyVersionSummary, error)
PropertyVersions takes a propertyID, a contractID, and a groupID and returns the associated PapiPropertyVersionSummary for each property version.
type PapiActivation ¶
type PapiActivation struct { ActivationID string `json:"activationId"` PropertyName string `json:"propertyName"` PropertyID string `json:"propertyId"` PropertyVersion int `json:"propertyVersion"` Network string `json:"network"` ActivationType string `json:"activationType"` Status string `json:"status"` SubmitDate string `json:"submitDate"` UpdateDate string `json:"updateDate"` Note string `json:"note"` }
PapiActivation is a representation of each Akamai PAPI activation available at: http://apibase.com/papi/v0/properties/propId/activations?contractId=contractId&groupId=groupId
type PapiActivations ¶
type PapiActivations struct { Activations struct { Items []PapiActivation `json:"items"` } `json:"activations"` }
PapiActivations is a representation of the Akamai PAPI activations response at: http://apibase.com/papi/v0/properties/propId/activations?contractId=contractId&groupId=groupId
type PapiProperties ¶
type PapiProperties struct { Properties struct { Items []PapiPropertySummary `json:"items"` } `json:"properties"` }
PapiProperties is a representation of the Akamai PAPI properties response available at: http://apibase.com/papi/v0/properties/?contractId=contractId&groupId=groupId
type PapiPropertyRuleBehavior ¶
type PapiPropertyRuleBehavior struct {
Name string `json:"name"`
}
PapiPropertyRuleBehavior is a representation of the Akamai PAPI property rule behavior associated with each property rule.
type PapiPropertyRuleSummary ¶
type PapiPropertyRuleSummary struct { Name string `json:"name"` UUID string `json:"uuid"` Behaviors []PapiPropertyRuleBehavior `json:"behaviors"` }
PapiPropertyRuleSummary is a representation of the Akamai PAPI rule summary associated with each property rule at: http://apibase.com/papi/v0/properties/propId/versions/version/rules/?contractId=contractId&groupId=groupId
type PapiPropertyRules ¶
type PapiPropertyRules struct {
Rules PapiPropertyRuleSummary `json:"rules"`
}
PapiPropertyRules is a representation of the Akamai PAPI property rules response at: http://apibase.com/papi/v0/properties/propId/versions/version/rules/?contractId=contractId&groupId=groupId
type PapiPropertySummary ¶
type PapiPropertySummary struct { AccountID string `json:"accountId"` ContractID string `json:"contractId"` GroupID string `json:"groupId"` PropertyID string `json:"propertyId"` Name string `json:"propertyName"` LatestVersion int `json:"latestVersion"` StagingVersion int `json:"stagingVersion"` ProductionVersion int `json:"productionVersion"` Note string `json:"note"` }
PapiPropertySummary is a representation of the Akamai PAPI property summary associated with each property returned by the properties response at: http://apibase.com/papi/v0/properties/?contractId=contractId&groupId=groupId
type PapiPropertyVersionSummary ¶
type PapiPropertyVersionSummary struct { PropertyVersion int `json:"propertyVersion"` UpdatedByUser string `json:"updatedByUser"` UpdatedDate string `json:"updatedDate"` ProductionStatus string `json:"productionStatus"` StagingStatus string `json:"stagingStatus"` Etag string `json:"etag"` ProductID string `json:"productId"` Note string `json:"note"` }
PapiPropertyVersionSummary is a representation of the Akamai PAPI property version summary associated with each property version at: http://apibase.com/papi/v0/properties/propId/versions?contractId=contractId&groupId=groupId
type PapiPropertyVersions ¶
type PapiPropertyVersions struct { Versions struct { Items []PapiPropertyVersionSummary `json:"items"` } `json:"versions"` }
PapiPropertyVersions is a representation of the Akamai PAPI property versions response available at: http://apibase.com/papi/v0/properties/propId/versions?contractId=contractId&groupId=groupId
type ProductSummary ¶
ProductSummary is a representation of the Akamai PAPI product summary associated with each product returned by the products response at: http://apibase.com/papi/v0/products?contractId=someId
type Products ¶
type Products struct { Products struct { Items []ProductSummary `json:"items"` } `json:"products"` }
Products is a representation of the Akamai PAPI products response available at: http://apibase.com/papi/v0/products?contractId=someId
type Properties ¶
type Properties struct {
Properties []Property `json:"items"`
}
Properties represents the properties returned from: http://apibase.com/config-gtm/v1/domains/domain/properties/property
func (Properties) Len ¶
func (props Properties) Len() int
func (Properties) Less ¶
func (props Properties) Less(i, j int) bool
func (Properties) Swap ¶
func (props Properties) Swap(i, j int)
type Property ¶
type Property struct { BackupCname string `json:"backupCName,omitempty"` BackupIP string `json:"backupIp,omitempty"` BalanceByDownloadScore bool `json:"balanceByDownloadScore,omitempty"` Cname string `json:"cname,omitempty"` Comments string `json:"comments,omitempty"` DynamicTTL int `json:"dynamicTTL,omitempty"` FailbackDelay int `json:"failbackDelay"` FailoverDelay int `json:"failoverDelay"` HandoutMode string `json:"handoutMode,omitempty"` HealthMax float64 `json:"healthMax,omitempty"` HealthMultiplier float64 `json:"healthMultiplier,omitempty"` HealthThreshold float64 `json:"healthThreshold,omitempty"` Ipv6 bool `json:"ipv6,omitempty"` LastModified string `json:"lastModified,omitempty"` Links []Link `json:"links,omitempty"` LivenessTests []LivenessTest `json:"livenessTests,omitempty"` LoadImbalancePercentage float64 `json:"loadImbalancePercentage,omitempty"` MapName interface{} `json:"mapName,omitempty"` MaxUnreachablePenalty interface{} `json:"maxUnreachablePenalty,omitempty"` MxRecords []interface{} `json:"mxRecords,omitempty"` Name string `json:"name"` ScoreAggregationType string `json:"scoreAggregationType"` StaticTTL interface{} `json:"staticTTL,omitempty"` StickinessBonusConstant interface{} `json:"stickinessBonusConstant,omitempty"` StickinessBonusPercentage interface{} `json:"stickinessBonusPercentage,omitempty"` TrafficTargets []TrafficTarget `json:"trafficTargets"` Type string `json:"type"` UnreachableThreshold interface{} `json:"unreachableThreshold,omitempty"` UseComputedTargets bool `json:"useComputedTargets,omitempty"` }
Property represents an Akamai GTM property.
type PropertyResponse ¶
type PropertyResponse struct { Property *Property `json:"resource"` Status *ResourceStatus `json:"status"` }
PropertyResponse represents the Akamai GTM response returned by Akamai GTM API CREATEs and DELETEs against: http://apibase.com/config-gtm/v1/domains/domain/properties/property
type ResourceStatus ¶
type ResourceStatus struct { Message string `json:"message"` ChangeID string `json:"changeId"` PropagationStatus string `json:"propagationStatus"` PropagationStatusDate string `json:"propagationStatusDate"` PassingValidation bool `json:"passingValidation"` Links []Link `json:"links"` }
ResourceStatus is a representation of an Akamai GTM status for a given resource, such as a domain.
type TrafficTarget ¶
type TrafficTarget struct { DataCenterID int `json:"datacenterId"` Enabled bool `json:"enabled"` HandoutCname interface{} `json:"handoutCName"` Name interface{} `json:"name"` Servers []string `json:"servers"` Weight float64 `json:"weight"` }
TrafficTarget represents a traffic target associated with an Akamai GTM property.