Documentation ¶
Overview ¶
* GoWinds API Client * * Copyright 2023 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2023 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2020 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2020 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2020 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2020 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2020 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2020 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2023 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2023 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2023 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2020 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2020 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
* GoWinds API Client * * Copyright 2020 Christopher O'Connell * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.
Index ¶
- Constants
- type Account
- type AnalyticsEntry
- type AnalyticsList
- type BillingContact
- type Client
- func (c *Client) FetchAccount(hash string) (Account, error)
- func (c *Client) FetchCurrentAccount() (Account, error)
- func (c *Client) FetchHosts() ([]Host, error)
- func (c *Client) FetchHostsOf(hash string) ([]Host, error)
- func (c *Client) FetchOrigins() ([]Origin, error)
- func (c *Client) FetchOriginsOf(hash string) ([]Origin, error)
- func (c *Client) FetchPlatforms() ([]PlatformsResponse, error)
- func (c *Client) FetchRawConfiguration(acct, host string, scope int) (map[string]any, error)
- func (c *Client) FetchSubAccounts() ([]Account, error)
- func (c *Client) FetchSubAccountsOf(hash string) ([]Account, error)
- func (c *Client) FetchUsageByAccount(from, to time.Time, gran Granularity, plat Platform) ([]AnalyticsList, error)
- type Contact
- type Granularity
- type Host
- type ListHostsResponse
- type ListOriginsResponse
- type Origin
- type Platform
- type PlatformsResponse
- type Scope
- type Service
- type StatusCodeError
Constants ¶
const ( Monthly Granularity = "P1M" Weekly = "P1W" Daily = "P1D" Hourly = "PT1D" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Account ¶ added in v0.0.2
type Account struct { Name string `json:"accountName"` Status string `json:"accountStatus"` BillingAccountID string `json:"billingAccountId"` BillingAccountNumber string `json:"billingAccountNumber"` BillingContact BillingContact `json:"billingContact"` GCSLogsBucket string `json:"gcsLogsBucket"` HashCode string `json:"accountHash"` // Default account identifier ParentHash string `json:"parentHash"` ID int `json:"id"` MaxHCSTenants int `json:"maxHcsTenants"` MaxDirectSubAccounts int `json:"maximumDirectSubAccounts"` MaxHosts int `json:"maximumHosts"` NOCContact Contact `json:"nocContact"` Parent int `json:"parent"` PrimaryContact Contact `json:"primaryContact"` Services []Service `json:"services"` SubAccountCreationEnabled bool `json:"subAccountCreationEnabled"` SubAccounts []Account `json:"subAccounts"` SupportEmail string `json:"supportEmailAddress"` TechnicalContact Contact `json:"technicalContact"` }
type AnalyticsEntry ¶
type AnalyticsList ¶
type AnalyticsList struct { Type string Key string Data []AnalyticsEntry }
type BillingContact ¶ added in v0.0.2
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func DefaultClient ¶
func (*Client) FetchAccount ¶ added in v0.0.2
func (*Client) FetchCurrentAccount ¶ added in v0.0.2
func (*Client) FetchHosts ¶ added in v0.0.2
func (*Client) FetchHostsOf ¶ added in v0.0.2
func (*Client) FetchOrigins ¶ added in v0.0.2
func (*Client) FetchOriginsOf ¶ added in v0.0.2
func (*Client) FetchPlatforms ¶
func (c *Client) FetchPlatforms() ([]PlatformsResponse, error)
func (*Client) FetchRawConfiguration ¶ added in v0.0.2
func (*Client) FetchSubAccounts ¶ added in v0.0.2
func (*Client) FetchSubAccountsOf ¶ added in v0.0.2
func (*Client) FetchUsageByAccount ¶
func (c *Client) FetchUsageByAccount(from, to time.Time, gran Granularity, plat Platform) ([]AnalyticsList, error)
type Granularity ¶
type Granularity string
func (Granularity) String ¶
func (g Granularity) String() string
type ListHostsResponse ¶ added in v0.0.2
type ListHostsResponse struct {
Hosts []Host `json:"list"`
}
type ListOriginsResponse ¶ added in v0.0.2
type ListOriginsResponse struct {
Origins []Origin `json:"list"`
}
type Origin ¶ added in v0.0.2
type Origin struct { ID int `json:"id"` Name string `json:"name"` Type string `json:"type"` Path string `json:"path"` CreatedDate string `json:"createdDate"` UpdatedDate string `json:"updatedDate"` RequestTimeout int `json:"requestTimeoutSeconds"` ErrorCacheTTL int `json:"errorCacheTTLSeconds"` MaxRetryCount int `json:"maxRetryCount"` AuthenticationType string `json:"authenticationType"` Hostname string `json:"hostname"` Port int `json:"port"` SecurePort int `json:"securePort"` OriginPullHeaders string `json:"originPullHeaders"` OriginCacheHeaders string `json:"originCacheHeaders"` VerifyCertificate bool `json:"verifyCertificate"` CertificateCN string `json:"certificateCN"` }
type Platform ¶
type Platform int
const ( PlatformFLS Platform = 1 FlashLiveStreaming Platform = 1 PlatformOLS Platform = 2 OctoshapeLiveStreaming Platform = 2 PlatformCDS Platform = 3 HTTPCaching Platform = 3 PlatformMPS Platform = 5 HTTPStreaming Platform = 5 PlatformAIS Platform = 6 AppleiPhoneiPadStreaming Platform = 6 PlatformADS Platform = 7 AdobeDynamicStreaming Platform = 7 PlatformMSS Platform = 8 MicrosoftSmoothStreaming Platform = 8 PlatformMPI Platform = 12 MultiProtocolIngest Platform = 12 PlatformMTC Platform = 13 MidTierCache Platform = 13 PlatformIOS Platform = 23 InternalOriginService Platform = 23 PlatformDSS Platform = 33 DistributedStorageService Platform = 33 PlatformSDS Platform = 34 HTTPSCachingSDS Platform = 34 PlatformSIS Platform = 35 SecureAppleiPhoneiPadStreaming Platform = 35 PlatformSMS Platform = 36 SecureMicrosoftSmoothStreaming Platform = 36 PlatformSAS Platform = 37 SecureAdobeDynamicStreaming Platform = 37 PlatformFMS Platform = 38 FlashMediaStreaming Platform = 38 PlatformWMS Platform = 39 WindowsMediaStreaming Platform = 39 PlatformCDD Platform = 40 CDSOriginShielding Platform = 40 PlatformCDI Platform = 41 CDSIngest Platform = 41 PlatformCDR Platform = 43 ContentDeliveryReceipts Platform = 43 PlatformSDI Platform = 44 SecureIngest Platform = 44 PlatformSDD Platform = 45 SecureOriginShielding Platform = 45 PlatformCDP Platform = 52 HTTPProxy Platform = 52 PlatformCDE Platform = 53 CDNDeliveryEnduser Platform = 53 PlatformCDO Platform = 54 CDNDeliveryOrigin Platform = 54 PlatformWSD Platform = 55 EdgetoWAFSecure Platform = 55 PlatformWDD Platform = 56 EdgetoWAF Platform = 56 PlatformWDS Platform = 57 WAFHTTPDelivery Platform = 57 PlatformWSS Platform = 58 WAFSSLDelivery Platform = 58 PlatformWDI Platform = 59 WAFIngest Platform = 59 PlatformWSI Platform = 60 WAFSecureIngest Platform = 60 PlatformSLC Platform = 61 ServerlessCompute Platform = 61 PlatformSLS Platform = 62 ServerlessComputeSecure Platform = 62 PlatformCWS Platform = 63 CleartextWebSocket Platform = 63 PlatformSWS Platform = 64 SecureWebSocket Platform = 64 PlatformCWI Platform = 65 CleartextWebSocketIngest Platform = 65 PlatformSWI Platform = 66 SecureWebSocketIngest Platform = 66 PlatformEEC Platform = 67 EdgeEngineCacheAPI Platform = 67 PlatformEEI Platform = 68 EdgeEngineIngest Platform = 68 PlatformCLE Platform = 69 CDNEnduserLogStreaming Platform = 69 )
func PlatformFromCode ¶
func (Platform) IsAnalyzable ¶
func (Platform) IsArchivable ¶
func (Platform) IsConfigurable ¶
func (Platform) IsReportable ¶
type PlatformsResponse ¶
type StatusCodeError ¶
type StatusCodeError int
func (StatusCodeError) Error ¶
func (s StatusCodeError) Error() string
func (StatusCodeError) StatusCode ¶
func (s StatusCodeError) StatusCode() int