# README
hwapi
This package supports all APIs of Highwinds/Striketracker All API are under hwapi
Usage
You can init api object like api := hwapi.Init(http.Transport{ MaxIdleConns: 3, IdleConnTimeout: 60, })
Note, Init function accept http.Transport as default httpClient config.
Get auth token, just use api.auth(your_username,your_password) or api.SetToken(your_token)
Always keep in mind that,
- You can use any APIs after auth/SetToken, Authinfo would automatic append to all API requests.
- All request return same struct as API doc showed.
# Packages
No description provided by the author
# Functions
GetVersion current hwapi version.
Init HWApi support several options
*http.Transport use custom transport instead of defaultTransport
*fastcache.Cache local cache, mainly used to store downloads state
int default download workers
*zerolog.Logger log handler
*hwapi.User Current userinfo
*hwapi.AuthToken set default token.
# Variables
ErrConvertStateTOByte marshall state to byte failed.
ErrGCSCredentialsMissed configure error.
ErrRemoteConfigNotFound remote configure not found.
ErrRemoteDestFormat remote dest format error.
# Structs
AccessLogger Configure settings relevant to the global settings that AccessLogger uses when storing access logs, origin pull logs, and receipt logs.
AccessLogIPObfuscation Enable/Disable IP address obfuscation in access logs for GDPR compliance.
AccessLogs Configure settings relevant to Access Logs.
AccessLogsConfig Configure settings relevant to Access Log Settings.
AccessToken current accesstoken.
AccessTokenList list of accesstoken.
Account A CDN account.
AccountInSearchResponse accountInfo in search result.
Activity Activity.
ActivityAction Activity action.
Address owned by Contact only.
Analytics list of series.
AnalyticsQuery query parameters.
APITokenRequest Request model for an API token request.
AuthACL Enable access to content based on a customizable list of IP addresses.
Authentication simple token.
AuthGeo Restrict access to content based on the geographic location of the end-user.
AuthHTTPBasic Require authentication in the form of a username and password from within an HTTP user agent, or web browser.
AuthReferer Restrict access to content based on a customizable list of websites or domains, or "referrers." AllowedScope DIR DefaultPolicy null.
AuthSignUrlsInPlaylist Automatically apply my URL Signing policy to URLs inside my HLS playlists.
AuthToken tokens contains log and API.
AuthURLAsymmetricSignTlu The ASYMMETRIC Time Limited URL (TLU) signing policy allow you to restrict access to your content by by use of an expiration time and Asymmetric Key based signed alglorithm that utilizes RSA private/public keys.
AuthURLSign Protect files from unauthorized access with an encrypted key.
AuthURLSignAKv1 The Akamai URL Signing v1 policy allows you to create a signed URL that implements the same signing method used by Akamai; therefore, published URLs from an Akamai CDN network can be transitioned to the Highwinds network without you having to change your signing methods.
AuthURLSignAKv2 The Akamai URL Signing v2 policy allows you to create a signed URL that implements the same signing method used by Akamai; therefore, published URLs from an Akamai CDN network can be transitioned to the Highwinds network without you having to change your signing methods.
AuthURLSignAliCloudA Ali Cloud Type-A URL Signing AllowedScope DIR DefaultPolicy null.
AuthURLSignAliCloudB Ali Cloud Type-B URL Signing AllowedScope PRODUCT DefaultPolicy null.
AuthURLSignAliCloudC Ali Cloud Type-C URL Signing AllowedScope PRODUCT DefaultPolicy null.
AuthURLSignHmacTlu URL Signing HMAC TLU AllowedScope DIR DefaultPolicy null.
AuthURLSignIq The IQIYI signing policy allows you to restrict access to your content using various query parameters.
AuthURLSignL3 The Level 3 URL Signing policy allows you to create a signed URL that implements the same signing method used by Level 3; therefore, published URLs from an Level 3 CDN network can be transitioned to the Highwinds network without you having to change your signing methods.
AuthURLSignLMV The Limelight Networks URL signing policy allows you to create a signed URL that implements the same signing method used by Limelight Networks; therefore, published URLs from a Limelight CDN network can be transitioned to the Highwinds network without you having to change your URLs (or the signing process).
AuthVhostLockout The Hostname Access policy allows you to restrict delivery of your content to your configured Hostnames.
AwsSignedOriginPullV4 Defines how to pre/sign requests to be made by the CDN to an AWS origin.
AwsSignedS3PostV4 Defines how to pre/sign post requests to be made by the CDN to an AWS origin.
BandWidthLimit Limit the transfer rate of files by extension.
BandwidthRateLimit Limit the transfer rate of files in general, as opposed to by extension like Pattern Based Bandwidth Rate Limiting.
BandWidthRateLimitUnits Override the default units used by the CDN when processing the bandwidth throttling policies.
BarometerList list contains multiple BarometerResponse.
BarometerResponse http barometer response.
BillingDetails Contact information for the billing contact.
BillingRegionList Billing region list.
BlockingOriginPullMode Block all responses until the full file has been downloaded in the background.
BRegion Billing region.
CacheControl Apply custom browser caching behaviors.
CacheKeyModification The Cache Key Modification policy allows for manipulation of the way the cache uniquely stores assets.
Certificate A certificate used for secure delivery.
CertificateInformation certificate details.
CertificateResponse Certificate response.
ChatToken ignore.
ClientAccess This allows you to override the default client access policy file (clientaccesspolicy.xml) delivered by the CDN caching servers.
ClientKeepAlive The clientKeepAlive policy allows you to specify how long you want the CDN caching server to keep an client connection open after serving a request.
ClientRequestModification Configure options for modifying client requests.
ClientRequestQueue The script engine client request queue provides access to requests received by the CDN, giving you the ability to alter the request before the host processes it.
ClientResponseModification Configure options for client response modification.
ClientResponseQueue The script engine client response queue policy allows you to register a PHP script to execute on the CDN caching server prior to the server returning a response to a client.
CloneHost hostname.
CloseHalfOpenConnections Instructs the CDN caching server to fully close the connection immediately after receiving a TCP FIN from the client.
Compression Speed up your websites or web apps by making certain files smaller before they're delivered to end-users.
ConfigScope Configuration scope.
ConfigScopeList ConfigScope list.
ConfigScopeObject Host configuration for given scope
*/.
ConfigStatus Configuration status.
Configuration A container for configuration on a scope.
ConfigurationHostNamesList Hostnames list.
ConfigurationScope A uniquely addressable path on the CDN to which configuration can be written.
ConsistentHashing The consistent hashing policy allows you to customize the consistent hashing algorithm used by Doppler.
Contact information for a contact on a CDN account.
ContentDispositionByHeader Control the Content-Disposition header on the responses from the Origin using a pattern matched against the value of any HTTP header present in an end-user's request for content.
ContentDispositionByURL Control the Content-Disposition header on the response from the Origin via the request URL of end-user clients.
CookieBehavior The setting controls how the CDN deal with Cookie (from client) and Set-Cookie (from origin) headers AllowedScope DIR DefaultPolicy {"allowCachingSetCookie":false}.
CrossDomain Enable and configure the crossdomain.xml file required to enable the Dynamic Files policy.
Customer settings AllowedScope ROOT DefaultPolicy {"suspended":false}.
CustomHeader Override the name of the X-Forwarded-For header the CDN sends to the Origin.
CustomMimeType Map file extensions directly to mime types.
DateContent Date Content for Activity.
DeviceBasedDynamicContent Extends dynamic content by rewriting the "DEVICE" parameter and header based on the User-Agent in the Client Request.
DNSIPv6 DNS Configuration for Ipv6 AllowedScope PRODUCT DefaultPolicy null.
DNSOverride DNS Configuration AllowedScope PRODUCT DefaultPolicy null.
DynamicCacheRule Trigger specific status codes for precise URLs or domains.
DynamicContent Specify which parts of the end-user request should be used to build additional cache keys.
DynamicOrigin Override the default Origin domain set for the Scope by passing a different Origin as a query string parameter in a URL.
FailSafeOriginPull Fail safe origin pull is when we get a negative response (4xx and 5xx) from the origin, we will try to fallback to secondary origin if available AllowedScope DIR DefaultPolicy {"enabled":true,"statusCodeMatch":"4*,5*"}.
FarAheadRangeProxy Configuring Far Ahead Range Proxy value with threshold bytes AllowedScope DIR DefaultPolicy {"enabled":true,"thresholdBytes":2097152}.
FileSegmentation Enable the CDN to download and store files in small parts rather than as whole, and potentially large assets.
Filter user under profiles.
Flv The flash initial bytes policy allows you to force the CDN to send the initial bytes of a FLV file which contains the header information that is used when jumping to different offsets in the file.
FlvPseudoStreaming Define how the CDN delivers Flash media.
GCSAccount used for access GCS.
GCSAccounts contains a list of created ServiceAccount.
GCSHMacKey describe the HMacKey.
GCSHMacKeys contains a list of GCSHMacKey.
GCSPrivateKey describe the privatekey.
GCSPrivateKeys contains a list of GCSPrivateKey.
General The zero byte file support policy enables the CDN to cache zero length files.
Graph Configuration graph.
GraphScopes contains hostnames&origins.
GzipOriginPull Enable the CDN to request and accept Gzipped content from the Origin.
H2proxyCaching This policy is used to override the memoryCacheable policy derived from other policies.
HashType The type of the hash AllowedScope ROOT DefaultPolicy {"class":"HOST"}.
HcsContainer HcsContainer.
HcsContainerList list.
HCSCredentials credential used to create HCS client.
HcsObject HcsObject.
HcsTenant HcsTenant.
HcsTenantList HcsTenant list.
Host basic host info.
HostAttributes Host attributes.
HostList list of host.
Hostname Specifiy the unique domains end-users use to access your content, and the CDN uses to identify your content.
HostName Hostname.
HostnameReporting Controls analytics and billing reporting by each unique hostname that maps to your site.
HTTP2Support Enable support of HTTP2 AllowedScope PRODUCT DefaultPolicy {"enabled":false}.
HTTPMethods Selectively enable additional HTTP methods you'd like the CDN to process.
HWApi highwinds API struct.
InternalError The CDN internal error caching policy allows you to control the TTL for internally generated errors in the caching servers.
IPs all ipv4&ipv6 address used by stackpath/highwinds.
LanguageRedirect The language code origin request rewrite policy allows you to rewrite responses from your origin to 301 response codes such that you can re-issue the request to your origin with a new request URL.
LegacyXdomain The legacy cross domain policy allows you to override the default cross domain file delivered by the CDN.
LiveStreaming Live Streaming Optimization AllowedScope DIR DefaultPolicy null.
LocalCacheConfig config localCache.
MidTierCaching Mid Tier Caching Configuration AllowedScope DIR DefaultPolicy {"enabled":false}.
Notification struct.
NotificationList list of Notification.
NrtReporting Near Real Time File Traffic Reporting AllowedScope PRODUCT DefaultPolicy null.
OcspParsing Enable OCSP Parsing AllowedScope DIR DefaultPolicy null.
Origin An origin server from which the CDN pulls content.
OriginAttributes used by Graph.
OriginInfo origin information.
OriginList List of origins.
OriginPersistentConnections Enable Origin persistent connections.
OriginPull Control the behavior of Origin pull requests.
OriginPullCacheExtension Tell the CDN how to treat stale content.
OriginPullHost doesn't included in configuration DOC Just contains primary&secondary configure ID.
OriginPullLogs Configure settings relevant to Origin Pull Logs.
OriginPullLogsConfig Configure settings relevant to Origin Pull Log Settings.
OriginPullPolicy Define how and when content stored specifically in the CDN cache expires and is replaced with new content from your Origin.
OriginPullPops You should not be using the region filter on this policy before 975-1 goes CDN-wide.
OriginPullProtocol Configure whether the CDN should use secured or non-secured connections when communicating with the Origin.
OriginPullShield Origin shielding reduces the load on your origin by routing all origin pull requests through a specific data center on the network instead of having multiple data centers across the network request the same file from origin.
OriginRequestModification Configure options for modifying Origin requests.
OriginRequestQueue The script engine origin pull request queue policy allows you to register a PHP script to execute on the CDN caching server prior to the server making an origin pull request to your origin.
OriginResponseModification Configure options for Origin response modification.
OriginResponseQueue The script engine origin pull response queue policy allows you to register a PHP script to execute on the CDN caching server prior to the server proxying or caching the response from your origin.
OriginRoundRobinDNS The CDN can use a round-robin algorithm when selecting the IP address returned by the Domain Name Server for the origin hostname specified.
PasswordReset used when reset password.
PathModification Request URL rewriting policies can be used to modify the URL path of a CDN request.
Platform A CDN platform which provides an end-user service.
PlatformList List of platforms.
POP A representation of a point of presence, also called a data center.
POPs list of POP.
Preferences user profiles.
PreserveRedirectHost Preserve Redirect Host AllowedScope DIR DefaultPolicy null.
Purge object.
Purges used by post body.
PurgeState purge response.
QueryStrParam Define special customer query string parameters the CDN will use to alter responses.
ReceiptLogs Configure settings relevant to receipt logs.
ReceiptLogsConfig Configure settings relevant to Receipt Log Settings.
RedirectExceptions Make exceptions for which web browsers or user agents see the custom redirect response URLs based on a customizable list.
RedirectMappings Redirect users to a custom response URL based on the error response code they encounter.
RepresentativeList Representative list.
Representatives Representatives.
Request used by API requests only, different from http.Request.
Requester uploader.
RequestReceipt Delivery Receipts AllowedScope DIR DefaultPolicy null.
RequestReceiptReportPercentage The delivery receipts report percentage policy allows you to configure the percentage of requests to provide delivery confirmation receipts.
Response simple response.
ResponseHeader Enable and bypass certain Origin headers that affect the delivery of content.
RobotsTxt Define how to the CDN delivers the Robots.txt file.
Role user role.
Roles user roles, contains user and it's subaccount's role.
Rti Used to set or change commodity routing versus other types of routing for files in certain file paths (2: commodity routing, 0: premium (default)) AllowedScope DIR DefaultPolicy null.
SalesRepresentative Sales representative.
Scope scope.
Scopes configurations.
ScriptNegCaching The legacy negative response code caching policy allowed the CDN to cache the body of non-200 responses.
SearchLogsOptions used to search logs.
SearchResult Full text search for entities tied to an accountPath /api/v1/accounts/{account_hash}/search.
Series tsdb data.
ServerlessScripting Serverless Script Processing AllowedScope DIR DefaultPolicy null.
Service A billable service enabled on an account or host.
Services list.
Session online sessions.
Sessions session details.
Show deprecated.
SimpleAccount simple account info.
StaticHeader Insert HTTP headers into the CDN request and response process.
StorageData A user enters a start time and end time (the timeframe) for transfer data.
StreamChunkedEncodingResponse Stream Chunked-Encoding Response in Dedup Queue AllowedScope DIR DefaultPolicy {"enabled":false}.
SubaccountList list of simpleAccount.
Task pending tasks.
TaskList a list contains tasks.
TimePseudoStreaming Enable Flash based video players to support seeking to random locations within an MP4 or FLV file without having to download the entire video.
TossbackAlways Instructs the CDN caching server to always toss a connection back to Doppler to choose the edge for next pipeline request.
TossbackBypass Instructs the CDN caching server to continue serving a pipeline request without tossing the connection back to Doppler.
TraceRoute result list.
TraceRouteResponse traceroute info.
TransferData A user enters a start time and end time (the timeframe) for transfer data.
UploadLimit Use to configure limits for client upload requests via POST or PUT.
User details.
UserList a list contains users.
VaryHeaderField Policy for configuring how the CDN handles a Vary field header delivered from an origin.
Version info.
Waf Web Application Firewall WARNING: This setting is directory scope for flexiblity.
WafClustersOverride Web Application Firewall AllowedScope PRODUCT DefaultPolicy null.
WarmUp alias Purge.
WebSocket WebSocket support (For SP 2.0 customers only) AllowedScope DIR DefaultPolicy null.
XForwardedForBehavior Use to set or change how the CDN handles the X-Forwarded-For, which may affect how or what IP address the CDN associates to the end-user.
# Type aliases
HostsForCertificate which host use this certificate.