Documentation
¶
Index ¶
- Constants
- func AuthString(eprm *EdgercCredentials, request *http.Request, headersToSign []string) string
- func ShowJSONMessage(errType interface{}) string
- type APIAccountSwitchKey
- type APICredentialDetails
- type AdaptiveAccelerationService
- type AkamaiEnvironment
- type AkamaiEnvironmentVar
- type AkamaiGeneralError
- type AkamaiRequestFrom
- type AkamaiSubscription
- type AkamaiUser
- type AuthService
- type BillingRespElement
- type BillingService
- type Client
- func (cl *Client) DisableAccountSwitchKey()
- func (cl *Client) EnableAccountSwitchKey()
- func (cl *Client) NewRequest(method, path string, vreq, vresp interface{}) (*ClientResponse, error)
- func (cl *Client) SetAccountSwitchKey(accountSwitchKey string)
- func (cl *Client) SetBaseURL(urlStr string, passThrough bool) error
- type ClientOptions
- type ClientResponse
- type ContractProductsResp
- type ContractsService
- type DTCDNStatusResp
- type DTCurlReq
- type DTCurlResp
- type DTDiagLinkRequestResp
- type DTDigResp
- type DTErrorTranslationResp
- type DTGTMPropertiesResp
- type DTGTMPropertyIpsResp
- type DTGenerateDiagLinkResp
- type DTGeolocation
- type DTListDiagLinkRequestsResp
- type DTMtrResp
- type DTTranslatedErrorResp
- type DTUserLinkReq
- type DebugService
- type DiagToolsService
- func (nls *DiagToolsService) CDNStatus(ip string) (*DTCDNStatusResp, *ClientResponse, error)
- func (nls *DiagToolsService) CheckAnErrorTranslationRequest(requestID string) (*DTErrorTranslationResp, *ClientResponse, error)
- func (nls *DiagToolsService) Curl(obj string, requestFrom AkamaiRequestFrom, testURL, userAgent string) (*DTCurlResp, *ClientResponse, error)
- func (nls *DiagToolsService) Dig(obj string, requestFrom AkamaiRequestFrom, hostname, query string) (*DTDigResp, *ClientResponse, error)
- func (nls *DiagToolsService) GenerateDiagnosticLink(username, testURL string) (*DTGenerateDiagLinkResp, *ClientResponse, error)
- func (nls *DiagToolsService) GetDiagnosticLinkRequest(id string) (*DTDiagLinkRequestResp, *ClientResponse, error)
- func (nls *DiagToolsService) IPGeolocation(ip string) (*DTGeolocation, *ClientResponse, error)
- func (nls *DiagToolsService) LaunchErrorTranslationRequest(errorCode string) (*DTErrorTranslationResp, *ClientResponse, error)
- func (nls *DiagToolsService) ListDiagnosticLinkRequests() (*DTListDiagLinkRequestsResp, *ClientResponse, error)
- func (nls *DiagToolsService) ListGTMProperties() (*DTGTMPropertiesResp, *ClientResponse, error)
- func (nls *DiagToolsService) ListGTMPropertyIPs(property, domain string) (*DTGTMPropertyIpsResp, *ClientResponse, error)
- func (nls *DiagToolsService) ListGhostLocations() (*GhostLocationsResp, *ClientResponse, error)
- func (nls *DiagToolsService) Mtr(obj string, requestFrom AkamaiRequestFrom, destinationDomain string, ...) (*DTMtrResp, *ClientResponse, error)
- func (nls *DiagToolsService) TranslateAnError(requestID string) (*DTTranslatedErrorResp, *ClientResponse, error)
- type EdgegridError
- type EdgercCredentials
- type FRNCidrs
- type FRNService
- type FRNServices
- type FRNSubscription
- type FRNSubscriptions
- type FirewallRulesNotificationsService
- func (nls *FirewallRulesNotificationsService) ListCIDRBlocks(filterStr string) (*FRNCidrs, *ClientResponse, error)
- func (nls *FirewallRulesNotificationsService) ListService(id string) (*FRNService, *ClientResponse, error)
- func (nls *FirewallRulesNotificationsService) ListServices() (*FRNServices, *ClientResponse, error)
- func (nls *FirewallRulesNotificationsService) ListSubscriptions() (*FRNSubscriptions, *ClientResponse, error)
- func (nls *FirewallRulesNotificationsService) UpdateSubscriptions(services []int, email string) (*FRNSubscriptions, *ClientResponse, error)
- type GhostLocationsResp
- type IdentityManagementService
- func (nls *IdentityManagementService) GetAPIClientCreds(openIdentityID string, includeActions bool) (*[]APICredentialDetails, *ClientResponse, error)
- func (nls *IdentityManagementService) ListAPISwitchKeys(openIdentityID, searchPattern string) (*[]APIAccountSwitchKey, *ClientResponse, error)
- func (nls *IdentityManagementService) ListUsers() (*[]AkamaiUser, *ClientResponse, error)
- type ListNetworkListsOptionsv2
- type NetworkListActivationOptsv2
- type NetworkListActivationStatusv2
- type NetworkListDeleteResponse
- type NetworkListErrorv2
- type NetworkListLinkv2
- type NetworkListServicev2
- func (nls *NetworkListServicev2) ActivateNetworkList(ListID string, targetEnv AkamaiEnvironment, opts NetworkListActivationOptsv2) (*NetworkListActivationStatusv2, *ClientResponse, error)
- func (nls *NetworkListServicev2) AppendListNetworkList(ListID string, opts NetworkListsOptionsv2) (*NetworkListv2, *ClientResponse, error)
- func (nls *NetworkListServicev2) CreateNetworkList(opts NetworkListsOptionsv2) (*NetworkListv2, *ClientResponse, error)
- func (nls *NetworkListServicev2) DeleteNetworkList(ListID string) (*NetworkListDeleteResponse, *ClientResponse, error)
- func (nls *NetworkListServicev2) GetNetworkList(ListID string, opts ListNetworkListsOptionsv2) (*NetworkListv2, *ClientResponse, error)
- func (nls *NetworkListServicev2) GetNetworkListActStatus(ListID string, targetEnv AkamaiEnvironment) (*NetworkListActivationStatusv2, *ClientResponse, error)
- func (nls *NetworkListServicev2) ListNetworkLists(opts ListNetworkListsOptionsv2) (*[]NetworkListv2, *ClientResponse, error)
- func (nls *NetworkListServicev2) NetworkListNotification(action AkamaiSubscription, sub NetworkListSubscription) (*ClientResponse, error)
- func (nls *NetworkListServicev2) RemoveNetworkListElement(ListID, element string) (*NetworkListv2, *ClientResponse, error)
- type NetworkListSubscription
- type NetworkListsOptionsv2
- type NetworkListsv2
- type NetworkListv2
- type PropertyCPCode
- type PropertyCPCodeNew
- type PropertyCPCodes
- type PropertyCPEdgehost
- type PropertyCPEdgehosts
- type PropertyContract
- type PropertyContracts
- type PropertyGroup
- type PropertyGroups
- type PropertyProduct
- type PropertyProducts
- type PropertyProps
- type PropertyService
- func (pas *PropertyService) ListPropertyCPCodes(contractID, groupID string) (*PropertyCPCodes, *ClientResponse, error)
- func (pas *PropertyService) ListPropertyCPEdgehosts(contractId, groupID string) (*PropertyCPEdgehosts, *ClientResponse, error)
- func (pas *PropertyService) ListPropertyContracts() (*PropertyContracts, *ClientResponse, error)
- func (pas *PropertyService) ListPropertyGroups() (*PropertyGroups, *ClientResponse, error)
- func (pas *PropertyService) ListPropertyProducts(contractId string) (*PropertyProducts, *ClientResponse, error)
- func (pas *PropertyService) ListPropertyProperties(contractId, groupID string) (*PropertyProps, *ClientResponse, error)
- func (pas *PropertyService) NewPropertyCPcode(newCPcode *PropertyCPCodeNew, contractID, groupID string) (*ClientResponse, error)
- type QStrAPIClientCredentials
- type QStrAdaptiveAcceleration
- type QStrBillingMeasures
- type QStrContractsProducts
- type QStrDiagTools
- type QStrFRN
- type QStrNetworkList
- type QStrPropertyAPI
- type QStrReporting
- type QStrSiteShield
- type ReportOptions
- type ReportingBody
- type ReportingBodyAll
- type ReportingService
- type SiteShieldMap
- type SiteShieldMapsResp
- type SiteShieldService
Constants ¶
const ( A2PathV1 = "/adaptive-acceleration/v1/properties" NetworkListPathV1 = "/network-list/v1/network_lists" NetworkListPathV2 = "/network-list/v2/network-lists" PAPIPathV1 = "/papi/v1" ReportingPathV1 = "/reporting-api/v1/reports" IdentityManagementPathV1 = "/identity-management/v1" IdentityManagementPathV2 = "/identity-management/v2" SiteshieldPathV1 = "/siteshield/v1/maps" FRNPathV1 = "/firewall-rules-manager/v1" DTPathV2 = "/diagnostic-tools/v2" BillingPathV2 = "/billing-center-api/v2" ContractsPath = "/contract-api/v1" EnvVarEdgercPath AkamaiEnvironmentVar = "AKAMAI_EDGERC_CONFIG" EnvVarEdgercSection AkamaiEnvironmentVar = "AKAMAI_EDGERC_SECTION" EnvVarDebugLevelSection AkamaiEnvironmentVar = "AKAMAI_EDGERC_DEBUGLEVEL" Production AkamaiEnvironment = "production" Staging AkamaiEnvironment = "staging" Ghost AkamaiRequestFrom = "ghost-locations" IPAddress AkamaiRequestFrom = "ip-addresses" Subscribe AkamaiSubscription = "subscribe" Unsubscribe AkamaiSubscription = "unsubscribe" )
Akamai Services Paths
Variables ¶
This section is empty.
Functions ¶
func AuthString ¶
func AuthString(eprm *EdgercCredentials, request *http.Request, headersToSign []string) string
AuthString 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 ShowJSONMessage ¶
func ShowJSONMessage(errType interface{}) string
ShowJSONMessage returns string JSON message
Types ¶
type APIAccountSwitchKey ¶
type APICredentialDetails ¶
type APICredentialDetails struct {
CredentialID int `json:"credentialId"`
ClientToken string `json:"clientToken"`
Status string `json:"status"`
CreatedOn time.Time `json:"createdOn"`
Description string `json:"description"`
ExpiresOn time.Time `json:"expiresOn"`
Actions struct {
Deactivate bool `json:"deactivate"`
Delete bool `json:"delete"`
Activate bool `json:"activate"`
EditDescription bool `json:"editDescription"`
EditExpiration bool `json:"editExpiration"`
} `json:"actions"`
}
type AdaptiveAccelerationService ¶
type AdaptiveAccelerationService struct {
// contains filtered or unexported fields
}
func (*AdaptiveAccelerationService) ReportProperty ¶
func (nls *AdaptiveAccelerationService) ReportProperty(id string) (*ClientResponse, error)
ReportProperty reports property ID
func (*AdaptiveAccelerationService) ResetProperty ¶
func (nls *AdaptiveAccelerationService) ResetProperty(id string) (*ClientResponse, error)
ResetProperty Resets property AdaptiveAcceleration based on given ID
type AkamaiEnvironment ¶
type AkamaiEnvironment string
AkamaiEnvironment represents Akamai's target environment type.
type AkamaiEnvironmentVar ¶
type AkamaiEnvironmentVar string
AkamaiEnvironmentVar represents Akamai's env variables used
type AkamaiGeneralError ¶
type AkamaiGeneralError struct {
Type string `json:"type"`
Title string `json:"title"`
Status int `json:"status"`
Detail string `json:"detail"`
Instance string `json:"instance"`
Method string `json:"method"`
ServerIP string `json:"serverIp"`
ClientIP string `json:"clientIp"`
RequestID string `json:"requestId"`
RequestTime string `json:"requestTime"`
}
An AkamaiGeneralError reports one or more errors caused by an API request.
func (*AkamaiGeneralError) Error ¶
func (e *AkamaiGeneralError) Error() string
An AkamaiGeneralError Error() function implementation
type AkamaiRequestFrom ¶
type AkamaiRequestFrom string
AkamaiRequestFrom represents Akamai's source for request.
type AkamaiSubscription ¶
type AkamaiSubscription string
AkamaiSubscription represents Akamai's notification actions for subscriptions.
type AkamaiUser ¶
type AkamaiUser struct {
UIIdentityID string `json:"uiIdentityId"`
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
UIUserName string `json:"uiUserName"`
Email string `json:"email"`
AccountID string `json:"accountId"`
LastLoginDate string `json:"lastLoginDate"`
TfaEnabled bool `json:"tfaEnabled"`
TfaConfigured bool `json:"tfaConfigured"`
}
AkamaiUser data
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
Akamai {OPEN} EdgeGrid Authentication Service
type BillingRespElement ¶
type BillingService ¶
type BillingService struct {
// contains filtered or unexported fields
}
func (*BillingService) ListContractUsage ¶
func (nls *BillingService) ListContractUsage(contractID, productID string, qStringParams QStrBillingMeasures) (*[]BillingRespElement, *ClientResponse, error)
ListContractUsage Provides information
type Client ¶
type Client struct {
// Services used for talking to different parts of the Akamai API.
Auth *AuthService
Debug *DebugService
NetworkListsv2 *NetworkListServicev2
Property *PropertyService
Reporting *ReportingService
A2 *AdaptiveAccelerationService
IdentityManagement *IdentityManagementService
SiteShield *SiteShieldService
FRN *FirewallRulesNotificationsService
DT *DiagToolsService
Billing *BillingService
Contracts *ContractsService
// contains filtered or unexported fields
}
Client represents Akamai's API client for communicating with service
func NewClient ¶
func NewClient(httpClient *http.Client, conf *ClientOptions) (*Client, error)
NewClient returns a new edgegrid.Client for API. If a nil httpClient is provided, http.DefaultClient will be used.
func (*Client) DisableAccountSwitchKey ¶
func (cl *Client) DisableAccountSwitchKey()
DisableAccountSwitchKey instructs client to not use ASK
func (*Client) EnableAccountSwitchKey ¶
func (cl *Client) EnableAccountSwitchKey()
EnableAccountSwitchKey instructs client to use ASK
func (*Client) NewRequest ¶
func (cl *Client) NewRequest(method, path string, vreq, vresp interface{}) (*ClientResponse, error)
* DEPRECATED * newRequest creates an HTTP request that can be sent to Akamai APIs. A relative URL can be provided in path, which will be resolved to the Host specified in Config. If body is specified, it will be sent as the request body.
func (*Client) SetAccountSwitchKey ¶
SetAccountSwitchKey instructs client to not use ASK
type ClientOptions ¶
type ClientOptions struct {
ConfigPath string
ConfigSection string
DebugLevel string
AccountSwitchKey string
}
ClientOptions represents options we can pass during client creation
type ClientResponse ¶
ClientResponse represents response from our API call
type ContractProductsResp ¶
type ContractsService ¶
type ContractsService struct {
// contains filtered or unexported fields
}
func (*ContractsService) List ¶
func (nls *ContractsService) List(depth string) (*[]string, *ClientResponse, error)
List Lists contracts
func (*ContractsService) ListContractProducts ¶
func (nls *ContractsService) ListContractProducts(contractID, qFrom, qTo string) (*ContractProductsResp, *ClientResponse, error)
ListContractProducts Lists products
type DTCDNStatusResp ¶
type DTCDNStatusResp struct {
IsCdnIP bool `json:"isCdnIp"`
}
type DTCurlResp ¶
type DTCurlResp struct {
CurlResults struct {
HTTPStatusCode int `json:"httpStatusCode"`
ResponseHeaders struct {
Server string `json:"Server"`
Connection string `json:"Connection"`
Expires string `json:"Expires"`
MimeVersion string `json:"Mime-Version"`
ContentLength string `json:"Content-Length"`
Date string `json:"Date"`
ContentType string `json:"Content-Type"`
} `json:"responseHeaders"`
ResponseBody string `json:"responseBody"`
} `json:"curlResults"`
}
type DTDiagLinkRequestResp ¶
type DTDiagLinkRequestResp struct {
EndUserIPDetails struct {
Name string `json:"name"`
Email string `json:"email"`
Timestamp time.Time `json:"timestamp"`
URL string `json:"url"`
Ips []struct {
Description string `json:"description"`
Location string `json:"location"`
IP string `json:"ip"`
IPType string `json:"ipType"`
} `json:"ips"`
Browser string `json:"browser"`
} `json:"endUserIpDetails"`
}
type DTDigResp ¶
type DTDigResp struct {
DigInfo struct {
Hostname string `json:"hostname"`
QueryType string `json:"queryType"`
AnswerSection []struct {
Domain string `json:"domain"`
TTL int `json:"ttl"`
RecordClass string `json:"recordClass"`
RecordType string `json:"recordType"`
PreferenceValues interface{} `json:"preferenceValues"`
Value string `json:"value"`
} `json:"answerSection"`
AuthoritySection []struct {
Domain string `json:"domain"`
TTL int `json:"ttl"`
RecordClass string `json:"recordClass"`
RecordType string `json:"recordType"`
PreferenceValues interface{} `json:"preferenceValues"`
Value string `json:"value"`
} `json:"authoritySection"`
Result string `json:"result"`
} `json:"digInfo"`
}
type DTErrorTranslationResp ¶
type DTGTMPropertiesResp ¶
type DTGTMPropertyIpsResp ¶
type DTGenerateDiagLinkResp ¶
type DTGenerateDiagLinkResp struct {
DiagnosticURL string `json:"diagnosticUrl"`
}
type DTGeolocation ¶
type DTGeolocation struct {
GeoLocation struct {
ClientIP string `json:"clientIp"`
CountryCode string `json:"countryCode"`
RegionCode string `json:"regionCode"`
City string `json:"city"`
Dma int `json:"dma"`
Msa int `json:"msa"`
Pmsa int `json:"pmsa"`
AreaCode string `json:"areaCode"`
Latitude float64 `json:"latitude"`
Longitude float64 `json:"longitude"`
County string `json:"county"`
Continent string `json:"continent"`
Fips string `json:"fips"`
TimeZone string `json:"timeZone"`
Network string `json:"network"`
NetworkType string `json:"networkType"`
ZipCode string `json:"zipCode"`
Throughput string `json:"throughput"`
AsNum string `json:"asNum"`
Proxy string `json:"proxy"`
} `json:"geoLocation"`
}
type DTMtrResp ¶
type DTMtrResp struct {
Mtr struct {
Source string `json:"source"`
Destination string `json:"destination"`
StartTime time.Time `json:"startTime"`
Host string `json:"host"`
PacketLoss float64 `json:"packetLoss"`
AvgLatency float64 `json:"avgLatency"`
Analysis string `json:"analysis"`
Hops []struct {
Number int `json:"number"`
Host string `json:"host"`
Loss float64 `json:"loss"`
Sent int `json:"sent"`
Last float64 `json:"last"`
Avg float64 `json:"avg"`
Best float64 `json:"best"`
Worst float64 `json:"worst"`
StDev float64 `json:"stDev"`
} `json:"hops"`
Result string `json:"result"`
} `json:"mtr"`
}
type DTTranslatedErrorResp ¶
type DTTranslatedErrorResp struct {
TranslatedError struct {
URL string `json:"url"`
HTTPResponseCode int `json:"httpResponseCode"`
Timestamp string `json:"timestamp"`
EpochTime int `json:"epochTime"`
ClientIP string `json:"clientIp"`
ConnectingIP string `json:"connectingIp"`
ServerIP string `json:"serverIp"`
OriginHostname string `json:"originHostname"`
OriginIP string `json:"originIp"`
UserAgent string `json:"userAgent"`
RequestMethod string `json:"requestMethod"`
ReasonForFailure string `json:"reasonForFailure"`
WafDetails string `json:"wafDetails"`
Logs []struct {
Description string `json:"description"`
Fields struct {
GhostIP string `json:"Ghost IP"`
ForwardRequest string `json:"Forward Request"`
Timestamp string `json:"timestamp"`
ContentBytesReceived string `json:"content bytes received"`
TotalEstimatedBytesReceived string `json:"total estimated bytes received"`
ForwardIP string `json:"Forward IP"`
ClientIPPPrefresh string `json:"client IP (p-prefresh)"`
HTTPMethodGETHEADEtc string `json:"HTTP method (GET HEAD etc)"`
ARL string `json:"ARL"`
HTTPStatusCode string `json:"HTTP status code"`
ContentType string `json:"content-type"`
IMSIIms string `json:"IMS (i-ims)"`
SSL string `json:"SSL"`
RequestNumber string `json:"Request Number"`
Edgescape string `json:"Edgescape"`
ForwardHostname string `json:"Forward Hostname"`
GhostRequestHeaderSize string `json:"Ghost request header size"`
GhostRequestSize string `json:"Ghost request size"`
SSLOverheadBytes string `json:"SSL overhead bytes"`
ForwardARLIfRewrittenInMetadata string `json:"Forward ARL (if rewritten in metadata)"`
RequestID string `json:"Request id"`
ReceivedB string `json:"received_b"`
ObjectMaxAgeS string `json:"object-max-age_s"`
Sureroute2Info string `json:"Sureroute2info"`
Range string `json:"range"`
SureRouteRaceStatIndirRoute string `json:"SureRouteRaceStat-indirRoute"`
SureRouteRaceStatDirRoute string `json:"SureRouteRace-stat-dirRoute"`
ForwardSideHTTPOverhead string `json:"Forward-side-http-overhead"`
ReasonForThrottling string `json:"Reason for Throttling"`
TimeSpentDeferringForwardRead string `json:"Time spent deferring forward read"`
ObjectStatus2 string `json:"Object Status 2"`
MultiFeatureStatusField string `json:"Multi-Feature Status Field"`
MultiPurposeKeyValueField string `json:"Multi-Purpose Key/Value Field"`
RealIPOfForwardGhostESSL string `json:"Real IP of Forward Ghost (ESSL)"`
} `json:"fields"`
} `json:"logs"`
} `json:"translatedError"`
}
type DTUserLinkReq ¶
type DebugService ¶
type DebugService struct {
// contains filtered or unexported fields
}
DebugService allows to interact with client debugging options
func (*DebugService) SetDebugLevel ¶
func (dbs *DebugService) SetDebugLevel(debugLevel string)
SetDebugLevel Function used to set appropiate
Akamai API docs: https://developer.akamai.com/api/luna/papi/resources.html#getgroups
type DiagToolsService ¶
type DiagToolsService struct {
// contains filtered or unexported fields
}
func (*DiagToolsService) CDNStatus ¶
func (nls *DiagToolsService) CDNStatus(ip string) (*DTCDNStatusResp, *ClientResponse, error)
CDNStatus checks if given IP belongs to Akamai CDN TODO: migrate to async if required
func (*DiagToolsService) CheckAnErrorTranslationRequest ¶
func (nls *DiagToolsService) CheckAnErrorTranslationRequest(requestID string) (*DTErrorTranslationResp, *ClientResponse, error)
CheckAnErrorTranslationRequest makes polling requests for status of request Looks like not working properly
func (*DiagToolsService) Curl ¶
func (nls *DiagToolsService) Curl(obj string, requestFrom AkamaiRequestFrom, testURL, userAgent string) (*DTCurlResp, *ClientResponse, error)
Curl provides curl functionality
func (*DiagToolsService) Dig ¶
func (nls *DiagToolsService) Dig(obj string, requestFrom AkamaiRequestFrom, hostname, query string) (*DTDigResp, *ClientResponse, error)
Dig provides dig functionality
func (*DiagToolsService) GenerateDiagnosticLink ¶
func (nls *DiagToolsService) GenerateDiagnosticLink(username, testURL string) (*DTGenerateDiagLinkResp, *ClientResponse, error)
GenerateDiagnosticLink generates user link and request
func (*DiagToolsService) GetDiagnosticLinkRequest ¶
func (nls *DiagToolsService) GetDiagnosticLinkRequest(id string) (*DTDiagLinkRequestResp, *ClientResponse, error)
GetDiagnosticLinkRequest gets request details
func (*DiagToolsService) IPGeolocation ¶
func (nls *DiagToolsService) IPGeolocation(ip string) (*DTGeolocation, *ClientResponse, error)
IPGeolocation provides given IP geolocation details
func (*DiagToolsService) LaunchErrorTranslationRequest ¶
func (nls *DiagToolsService) LaunchErrorTranslationRequest(errorCode string) (*DTErrorTranslationResp, *ClientResponse, error)
LaunchErrorTranslationRequest async request creation for Error Translation
func (*DiagToolsService) ListDiagnosticLinkRequests ¶
func (nls *DiagToolsService) ListDiagnosticLinkRequests() (*DTListDiagLinkRequestsResp, *ClientResponse, error)
ListDiagnosticLinkRequests lists all requests
func (*DiagToolsService) ListGTMProperties ¶
func (nls *DiagToolsService) ListGTMProperties() (*DTGTMPropertiesResp, *ClientResponse, error)
ListGTMProperties provides available GTM properties
func (*DiagToolsService) ListGTMPropertyIPs ¶
func (nls *DiagToolsService) ListGTMPropertyIPs(property, domain string) (*DTGTMPropertyIpsResp, *ClientResponse, error)
ListGTMPropertyIPs provides available GTM properties
func (*DiagToolsService) ListGhostLocations ¶
func (nls *DiagToolsService) ListGhostLocations() (*GhostLocationsResp, *ClientResponse, error)
ListGhostLocations provides Ghost locations
func (*DiagToolsService) Mtr ¶
func (nls *DiagToolsService) Mtr(obj string, requestFrom AkamaiRequestFrom, destinationDomain string, resolveDNS bool) (*DTMtrResp, *ClientResponse, error)
Mtr provides mtr functionality
func (*DiagToolsService) TranslateAnError ¶
func (nls *DiagToolsService) TranslateAnError(requestID string) (*DTTranslatedErrorResp, *ClientResponse, error)
TranslateAnError gets translated error message
type EdgegridError ¶
type EdgegridError struct {
ResponseCode int `json:"response_code"`
ResponseBody string `json:"response_body"`
}
An EdgegridError is used to provide higher level clients with error which occured. Later on can be casted to specific type if needed
func (*EdgegridError) Error ¶
func (e *EdgegridError) Error() string
An EdgegridError Error() function implementation
type EdgercCredentials ¶
type EdgercCredentials struct {
// contains filtered or unexported fields
}
EdgercCredentials are items from config file
func InitEdgerc ¶
func InitEdgerc(edgercConfig, edgercSection string) (*EdgercCredentials, error)
Init initializes using a configuration file in standard INI format
type FRNCidrs ¶
type FRNCidrs []struct {
CidrID int `json:"cidrId"`
ServiceID int `json:"serviceId"`
ServiceName string `json:"serviceName"`
Description string `json:"description"`
Cidr string `json:"cidr"`
CidrMask string `json:"cidrMask"`
Port string `json:"port"`
CreationDate string `json:"creationDate"`
EffectiveDate string `json:"effectiveDate"`
ChangeDate interface{} `json:"changeDate"`
MinIP string `json:"minIp"`
MaxIP string `json:"maxIp"`
LastAction string `json:"lastAction"`
}
FRNCidrs data representation
type FRNService ¶
type FRNSubscription ¶
type FRNSubscription struct {
ServiceID int `json:"serviceId"`
ServiceName string `json:"serviceName,omitempty"`
Description string `json:"description,omitempty"`
Email string `json:"email"`
SignupDate string `json:"signupDate,omitempty"`
}
FRNSubscription data representation
type FRNSubscriptions ¶
type FRNSubscriptions struct {
Subscriptions []FRNSubscription `json:"subscriptions"`
}
FRNSubscriptions data representation
type FirewallRulesNotificationsService ¶
type FirewallRulesNotificationsService struct {
// contains filtered or unexported fields
}
func (*FirewallRulesNotificationsService) ListCIDRBlocks ¶
func (nls *FirewallRulesNotificationsService) ListCIDRBlocks(filterStr string) (*FRNCidrs, *ClientResponse, error)
ListCIDRBlocks provides information about CIDR blocks
func (*FirewallRulesNotificationsService) ListService ¶
func (nls *FirewallRulesNotificationsService) ListService(id string) (*FRNService, *ClientResponse, error)
ListService provides details of service specified by its unique ID
func (*FirewallRulesNotificationsService) ListServices ¶
func (nls *FirewallRulesNotificationsService) ListServices() (*FRNServices, *ClientResponse, error)
ListServices provides list of services to which it is possible to subscribe
func (*FirewallRulesNotificationsService) ListSubscriptions ¶
func (nls *FirewallRulesNotificationsService) ListSubscriptions() (*FRNSubscriptions, *ClientResponse, error)
ListSubscriptions provides list of services to which we are subscribed
func (*FirewallRulesNotificationsService) UpdateSubscriptions ¶
func (nls *FirewallRulesNotificationsService) UpdateSubscriptions(services []int, email string) (*FRNSubscriptions, *ClientResponse, error)
UpdateSubscriptions updates current subscription
type GhostLocationsResp ¶
type GhostLocationsResp struct {
Locations []struct {
ID string `json:"id"`
Value string `json:"value"`
} `json:"locations"`
}
GhostLocationsResp Provides location of Akamai ghost
type IdentityManagementService ¶
type IdentityManagementService struct {
// contains filtered or unexported fields
}
func (*IdentityManagementService) GetAPIClientCreds ¶
func (nls *IdentityManagementService) GetAPIClientCreds(openIdentityID string, includeActions bool) (*[]APICredentialDetails, *ClientResponse, error)
GetAPIClientCreds Lists API credentials Akamai API docs: https://developer.akamai.com/api/core_features/identity_management/v1.html#getcredentials
func (*IdentityManagementService) ListAPISwitchKeys ¶
func (nls *IdentityManagementService) ListAPISwitchKeys(openIdentityID, searchPattern string) (*[]APIAccountSwitchKey, *ClientResponse, error)
ListAPISwitchKeys Lists account switch keys
Akamai API docs: https://developer.akamai.com/api/core_features/identity_management/v1.html#getaccountswitchkeys
func (*IdentityManagementService) ListUsers ¶
func (nls *IdentityManagementService) ListUsers() (*[]AkamaiUser, *ClientResponse, error)
ListUsers provides list of Akamai users
type ListNetworkListsOptionsv2 ¶
type ListNetworkListsOptionsv2 struct {
TypeOflist string
Extended bool
IncludeElements bool
Search string
}
ListNetworkListsOptionsv2 represents the available options for listing network lists Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html
type NetworkListActivationOptsv2 ¶
type NetworkListActivationOptsv2 struct {
Comments string `json:"comments"`
NotificationRecipients []string `json:"notificationRecipients"`
Fast bool `json:"fast"`
}
NetworkListActivationOptsv2 represents object used for activating network list in Akamai Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html
type NetworkListActivationStatusv2 ¶
type NetworkListActivationStatusv2 struct {
ActivationID int `json:"activationId"`
ActivationComments string `json:"activationComments"`
ActivationStatus string `json:"activationStatus"`
SyncPoint int `json:"syncPoint"`
UniqueID string `json:"uniqueId"`
Fast bool `json:"fast"`
}
NetworkListActivationStatusv2 represents object used for status of network list activation Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html
type NetworkListDeleteResponse ¶
type NetworkListDeleteResponse struct {
Status int `json:"status"`
UniqueID string `json:"uniqueId"`
SyncPoint int `json:"syncPoint"`
}
NetworkListDeleteResponse represents response from deleting a list
type NetworkListErrorv2 ¶
type NetworkListErrorv2 struct {
Detail string `json:"detail"`
Instance string `json:"instance"`
Status int `json:"status"`
Title string `json:"title"`
Type string `json:"type"`
FieldErrors struct {
Entry []struct {
Key string `json:"key"`
Value []string `json:"value"`
} `json:"entry"`
} `json:"fieldErrors"`
}
NetworkListErrorv2 represents the error returned from Akamai Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html#errors
func (*NetworkListErrorv2) Error ¶
func (e *NetworkListErrorv2) Error() string
NetworkListErrorv2 Error() function implementation
type NetworkListLinkv2 ¶
AkamaiNetworkListLinks represents the network list `links` structure Akamai API docs: https://developer.akamai.com/api/luna/network-list
type NetworkListServicev2 ¶
type NetworkListServicev2 struct {
// contains filtered or unexported fields
}
NetworkListServicev2 represents exposed services to manage network lists Akamai API docs: https://developer.akamai.com/api/luna/network-list
func (*NetworkListServicev2) ActivateNetworkList ¶
func (nls *NetworkListServicev2) ActivateNetworkList(ListID string, targetEnv AkamaiEnvironment, opts NetworkListActivationOptsv2) (*NetworkListActivationStatusv2, *ClientResponse, error)
ActivateNetworkList Activates network list on specified network ( PRODUCTION or STAGING ) Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html
func (*NetworkListServicev2) AppendListNetworkList ¶
func (nls *NetworkListServicev2) AppendListNetworkList(ListID string, opts NetworkListsOptionsv2) (*NetworkListv2, *ClientResponse, error)
AppendListNetworkList Adds items to network list Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html#postlists
func (*NetworkListServicev2) CreateNetworkList ¶
func (nls *NetworkListServicev2) CreateNetworkList(opts NetworkListsOptionsv2) (*NetworkListv2, *ClientResponse, error)
CreateNetworkList Create a new network list Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html#postlists
func (*NetworkListServicev2) DeleteNetworkList ¶
func (nls *NetworkListServicev2) DeleteNetworkList(ListID string) (*NetworkListDeleteResponse, *ClientResponse, error)
DeleteNetworkList Remove network list element Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html
func (*NetworkListServicev2) GetNetworkList ¶
func (nls *NetworkListServicev2) GetNetworkList(ListID string, opts ListNetworkListsOptionsv2) (*NetworkListv2, *ClientResponse, error)
GetNetworkList Gets a specific network list Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html#getlist
func (*NetworkListServicev2) GetNetworkListActStatus ¶
func (nls *NetworkListServicev2) GetNetworkListActStatus(ListID string, targetEnv AkamaiEnvironment) (*NetworkListActivationStatusv2, *ClientResponse, error)
GetNetworkListActStatus Gets activation network list status on specified network ( PRODUCTION or STAGING ) Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html
func (*NetworkListServicev2) ListNetworkLists ¶
func (nls *NetworkListServicev2) ListNetworkLists(opts ListNetworkListsOptionsv2) (*[]NetworkListv2, *ClientResponse, error)
ListNetworkLists List all configured Network Lists for the authenticated user. Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html#getlists
func (*NetworkListServicev2) NetworkListNotification ¶
func (nls *NetworkListServicev2) NetworkListNotification(action AkamaiSubscription, sub NetworkListSubscription) (*ClientResponse, error)
NetworkListNotification Manage network list subscription Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html
func (*NetworkListServicev2) RemoveNetworkListElement ¶
func (nls *NetworkListServicev2) RemoveNetworkListElement(ListID, element string) (*NetworkListv2, *ClientResponse, error)
RemoveNetworkListElement Removes network list element Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html
type NetworkListSubscription ¶
type NetworkListSubscription struct {
Recipients []string `json:"recipients"`
UniqueIds []string `json:"uniqueIds"`
}
NetworkListSubscription represents object used for (un)subscribing for notifications
type NetworkListsOptionsv2 ¶
type NetworkListsOptionsv2 struct {
Name string `json:"name,omitempty"`
Type string `json:"type,omitempty"`
Description string `json:"description,omitempty"`
List []string `json:"list,omitempty"`
}
NetworkListsOptionsv2 represents struct required to create items for network list Akamai API docs: https://developer.akamai.com/api/cloud_security/network_lists/v2.html
type NetworkListsv2 ¶
type NetworkListsv2 struct {
NetworkLists []NetworkListv2 `json:"networkLists"`
Links struct {
Create NetworkListLinkv2 `json:"create"`
} `json:"links"`
}
NetworkListsv2 represents array of network lists Akamai API docs: https://developer.akamai.com/api/luna/network-list
type NetworkListv2 ¶
type NetworkListv2 struct {
NetworkListType string `json:"networkListType,omitempty`
AccessControlGroup string `json:"accessControlGroup,omitempty"`
Name string `json:"name,omitempty"`
ElementCount int `json:"elementCount,omitempty"`
Links struct {
ActivateInProduction NetworkListLinkv2 `json:"activateInProduction,omitempty"`
ActivateInStaging NetworkListLinkv2 `json:"activateInStaging,omitempty"`
AppendItems NetworkListLinkv2 `json:"appendItems,omitempty"`
Retrieve NetworkListLinkv2 `json:"retrieve,omitempty"`
StatusInProduction NetworkListLinkv2 `json:"statusInProduction,omitempty"`
StatusInStaging NetworkListLinkv2 `json:"statusInStaging,omitempty"`
Update NetworkListLinkv2 `json:"update,omitempty"`
} `json:"links"`
List []string `json:"list"`
SyncPoint int `json:"syncPoint,omitempty"`
Type string `json:"type,omitempty"`
UniqueID string `json:"uniqueId,omitempty"`
CreateDate time.Time `json:"createDate,omitempty"`
CreatedBy string `json:"createdBy,omitempty"`
ExpeditedProductionActivationStatus string `json:"expeditedProductionActivationStatus,omitempty"`
ExpeditedStagingActivationStatus string `json:"expeditedStagingActivationStatus,omitempty"`
ProductionActivationStatus string `json:"productionActivationStatus,omitempty"`
StagingActivationStatus string `json:"stagingActivationStatus,omitempty"`
UpdateDate time.Time `json:"updateDate,omitempty"`
UpdatedBy string `json:"updatedBy,omitempty"`
}
NetworkListv2 represents the network list structure Akamai API docs: https://developer.akamai.com/api/luna/network-list
type PropertyCPCode ¶
type PropertyCPCodeNew ¶
type PropertyCPCodes ¶
type PropertyCPCodes struct {
AccountID string `json:"accountId"`
ContractID string `json:"contractId"`
GroupID string `json:"groupId"`
Cpcodes struct {
Items []PropertyCPCode `json:"items"`
} `json:"cpcodes"`
}
type PropertyCPEdgehost ¶
type PropertyCPEdgehost struct {
EdgeHostnameID string `json:"edgeHostnameId"`
EdgeHostnameDomain string `json:"edgeHostnameDomain"`
ProductID string `json:"productId"`
DomainPrefix string `json:"domainPrefix"`
DomainSuffix string `json:"domainSuffix"`
Secure bool `json:"secure"`
IPVersionBehavior string `json:"ipVersionBehavior"`
MapDetailsSerialNumber int `json:"mapDetails:serialNumber"`
MapDetailsMapDomain string `json:"mapDetails:mapDomain"`
}
type PropertyCPEdgehosts ¶
type PropertyCPEdgehosts struct {
AccountID string `json:"accountId"`
ContractID string `json:"contractId"`
GroupID string `json:"groupId"`
EdgeHostnames struct {
Items []PropertyCPEdgehost `json:"items"`
} `json:"edgeHostnames"`
}
type PropertyContract ¶
type PropertyContracts ¶
type PropertyContracts struct {
AccountID string `json:"accountId"`
Contracts struct {
Items []PropertyContract `json:"items"`
} `json:"contracts"`
}
type PropertyGroup ¶
type PropertyGroups ¶
type PropertyGroups struct {
AccountID string `json:"accountId"`
AccountName string `json:"accountName"`
Groups struct {
Items []PropertyGroup `json:"items"`
} `json:"groups"`
}
type PropertyProduct ¶
type PropertyProducts ¶
type PropertyProducts struct {
AccountID string `json:"accountId"`
ContractID string `json:"contractId"`
Products struct {
Items []PropertyProduct `json:"items"`
} `json:"products"`
}
type PropertyProps ¶
type PropertyProps struct {
Properties struct {
Items []struct {
AccountID string `json:"accountId"`
ContractID string `json:"contractId"`
GroupID string `json:"groupId"`
PropertyID string `json:"propertyId"`
PropertyName string `json:"propertyName"`
LatestVersion int `json:"latestVersion"`
StagingVersion int `json:"stagingVersion"`
ProductionVersion int `json:"productionVersion"`
AssetID string `json:"assetId"`
Note string `json:"note"`
} `json:"items"`
} `json:"properties"`
}
type PropertyService ¶
type PropertyService struct {
// contains filtered or unexported fields
}
PropertyService represents exposed services to manage properties
Akamai API docs: https://developer.akamai.com/api/luna/papi
func (*PropertyService) ListPropertyCPCodes ¶
func (pas *PropertyService) ListPropertyCPCodes(contractID, groupID string) (*PropertyCPCodes, *ClientResponse, error)
ListPropertyCPCodes This operation lists CP codes available within your contract/group pairing. Akamai API docs: https://developer.akamai.com/api/luna/papi/resources.html#getcpcodes
func (*PropertyService) ListPropertyCPEdgehosts ¶
func (pas *PropertyService) ListPropertyCPEdgehosts(contractId, groupID string) (*PropertyCPEdgehosts, *ClientResponse, error)
ListPropertyCPEdgehosts This lists all edge hostnames available under a contract.. Akamai API docs: https://developer.akamai.com/api/luna/papi/resources.html#getedgehostnames
func (*PropertyService) ListPropertyContracts ¶
func (pas *PropertyService) ListPropertyContracts() (*PropertyContracts, *ClientResponse, error)
ListPropertyContracts This operation provides a read-only list of contract names and identifiers Akamai API docs: https://developer.akamai.com/api/luna/papi/resources.html#getcontracts
func (*PropertyService) ListPropertyGroups ¶
func (pas *PropertyService) ListPropertyGroups() (*PropertyGroups, *ClientResponse, error)
ListPropertyGroups This operation provides a read-only list of groups, which may contain properties. Akamai API docs: https://developer.akamai.com/api/luna/papi/resources.html#getgroups
func (*PropertyService) ListPropertyProducts ¶
func (pas *PropertyService) ListPropertyProducts(contractId string) (*PropertyProducts, *ClientResponse, error)
ListPropertyProducts ListPropertyProducts. Akamai API docs: https://developer.akamai.com/api/luna/papi/resources.html#getcpcodes
func (*PropertyService) ListPropertyProperties ¶
func (pas *PropertyService) ListPropertyProperties(contractId, groupID string) (*PropertyProps, *ClientResponse, error)
ListProperties This lists all properties available under a contract/group Akamai API docs: https://developer.akamai.com/api/core_features/property_manager/v1.html#getproperties
func (*PropertyService) NewPropertyCPcode ¶
func (pas *PropertyService) NewPropertyCPcode(newCPcode *PropertyCPCodeNew, contractID, groupID string) (*ClientResponse, error)
NewPropertyCPcode Creates new CP Code Akamai API docs: https://developer.akamai.com/api/luna/papi/resources.html#postcpcodes
type QStrAPIClientCredentials ¶
type QStrAPIClientCredentials struct {
Actions bool `url:"actions,omitempty"`
Search string `url:"search,omitempty"`
}
QStrAPIClientCredentials contains query string parameters used across calls for API part of Identity Management
type QStrAdaptiveAcceleration ¶
type QStrAdaptiveAcceleration struct{}
QStrAdaptiveAcceleration includes query params used across AdaptiveAccelerationService
type QStrBillingMeasures ¶
type QStrBillingMeasures struct {
BillingDayOnly bool `url:"billingDayOnly,omitempty"`
FromMonth int `url:"fromMonth,omitempty"`
FromYear int `url:"fromYear,omitempty"`
Month int `url:"month,omitempty"`
StatisticName string `url:"statisticName,omitempty"`
ToMonth int `url:"toMonth,omitempty"`
ToYear int `url:"toYear,omitempty"`
Year int `url:"year,omitempty"`
}
type QStrContractsProducts ¶
type QStrDiagTools ¶
type QStrDiagTools struct {
HostName string `url:"hostName,omitempty"`
QueryType string `url:"queryType,omitempty"`
ResolveDNS bool `url:"resolveDns,omitempty"`
DestinationDomain string `url:"destinationDomain,omitempty"`
}
QStrDiagTools includes query params used for diagnostic tools
type QStrFRN ¶
type QStrFRN struct{}
QStrFRN includes query params used across firewall network rules
type QStrNetworkList ¶
type QStrNetworkList struct {
IncludeElements bool `url:"includeElements,omitempty"`
Extended bool `url:"extended,omitempty"`
Search string `url:"search,omitempty"`
Element string `url:"element,omitempty"`
}
QStrNetworkList includes query params used across network lists
type QStrPropertyAPI ¶
type QStrPropertyAPI struct {
ContractID string `url:"contractId,omitempty"`
GroupID string `url:"groupId,omitempty"`
Options string `url:"options,omitempty"`
}
QStrPropertyAPI includes query params used across calls for PAPI
type QStrReporting ¶
type QStrReporting struct {
Start time.Time `url:"start,omitempty"`
End time.Time `url:"end,omitempty"`
Interval string `url:"interval,omitempty"`
}
QStrReporting includes query params used for reporting
type QStrSiteShield ¶
type ReportOptions ¶
TODO: Change TypeOfReport into string consts ? ReportOptions represents options available for report generation
type ReportingBody ¶
type ReportingBodyAll ¶
type ReportingService ¶
type ReportingService struct {
// contains filtered or unexported fields
}
func (*ReportingService) GenerateReport ¶
func (nls *ReportingService) GenerateReport(body interface{}, opts ReportOptions) (*ClientResponse, error)
GenerateReport Calls reporing API to generate given report based on provided request
type SiteShieldMap ¶
type SiteShieldMap struct {
AcknowledgeRequiredBy int64 `json:"acknowledgeRequiredBy"`
Acknowledged bool `json:"acknowledged"`
AcknowledgedBy string `json:"acknowledgedBy"`
AcknowledgedOn int64 `json:"acknowledgedOn"`
Contacts []string `json:"contacts"`
CurrentCidrs []string `json:"currentCidrs"`
ID int `json:"id"`
LatestTicketID int `json:"latestTicketId"`
MapAlias string `json:"mapAlias"`
McmMapRuleID int `json:"mcmMapRuleId"`
ProposedCidrs []string `json:"proposedCidrs"`
RuleName string `json:"ruleName"`
Service string `json:"service"`
Type string `json:"type"`
}
SiteShieldMap struct
type SiteShieldMapsResp ¶
type SiteShieldMapsResp struct {
SiteShieldMaps []SiteShieldMap `json:"siteShieldMaps"`
}
SiteShieldMapsResp response struct
type SiteShieldService ¶
type SiteShieldService struct {
// contains filtered or unexported fields
}
func (*SiteShieldService) AckMap ¶
func (nls *SiteShieldService) AckMap(id string) (*SiteShieldMap, *ClientResponse, error)
AckMap Acknowledges specific map based on ID
func (*SiteShieldService) ListMap ¶
func (nls *SiteShieldService) ListMap(id string) (*SiteShieldMap, *ClientResponse, error)
ListMap Retrieves specific map based on ID
func (*SiteShieldService) ListMaps ¶
func (nls *SiteShieldService) ListMaps() (*SiteShieldMapsResp, *ClientResponse, error)
ListMaps Lists siteshield maps