Versions in this module Expand all Collapse all v1 v1.0.0 Mar 13, 2024 Changes in this version + const AccessKeyHeaderKey + const BaseURL + const DNSRecordTypeA + const DNSRecordTypeAAAA + const DNSRecordTypeCAA + const DNSRecordTypeCNAME + const DNSRecordTypeMX + const DNSRecordTypeNS + const DNSRecordTypePTR + const DNSRecordTypePZ + const DNSRecordTypeRDR + const DNSRecordTypeSCR + const DNSRecordTypeSRV + const DNSRecordTypeTXT + const DefaultPaginationPage + const DefaultPaginationPerPage + const DefaultUserAgent + const EdgeRuleActionTypeBlockRequest + const EdgeRuleActionTypeBypassPermaCache + const EdgeRuleActionTypeDisableOptimizer + const EdgeRuleActionTypeDisableTokenAuthentication + const EdgeRuleActionTypeEnableTokenAuthentication + const EdgeRuleActionTypeForceCompression + const EdgeRuleActionTypeForceDownload + const EdgeRuleActionTypeForceSSL + const EdgeRuleActionTypeIgnoreQueryString + const EdgeRuleActionTypeOriginURL + const EdgeRuleActionTypeOverrideCacheTime + const EdgeRuleActionTypeOverrideCacheTimePublic + const EdgeRuleActionTypeRedirect + const EdgeRuleActionTypeSetRequestHeader + const EdgeRuleActionTypeSetResponseHeader + const EdgeRuleActionTypeSetStatusCode + const EdgeRuleTriggerTypeCountryCode + const EdgeRuleTriggerTypeRandomChance + const EdgeRuleTriggerTypeRemoteIP + const EdgeRuleTriggerTypeRequestHeader + const EdgeRuleTriggerTypeRequestMethod + const EdgeRuleTriggerTypeResponseHeader + const EdgeRuleTriggerTypeStatusCode + const EdgeRuleTriggerTypeURL + const EdgeRuleTriggerTypeURLExtension + const EdgeRuleTriggerTypeURLQueryString + const MatchingTypeAll + const MatchingTypeAny + const MatchingTypeNone + const PullZoneTypeStandard + const PullZoneTypeVolume + type APIError struct + ErrorKey string + Field string + Message string + func (e *APIError) Error() string + type AddCustomHostnameOptions struct + Hostname *string + type AddOrUpdateDNSRecordOptions struct + Accelerated *bool + Disabled *bool + EnvironmentalVariables []EnvironmentalVariable + Flags *int + GeolocationLatitude *float64 + GeolocationLongitude *float64 + ID *int64 + LatencyZone *string + MonitorType *int + Name *string + Port *int32 + Priority *int32 + PullZoneID *int64 + ScriptID *int64 + SmartRoutingType *int + TTL *int32 + Tag *string + Type *int + Value *string + Weight *int32 + type AddOrUpdateEdgeRuleOptions struct + ActionParameter1 *string + ActionParameter2 *string + ActionType *int + Description *string + Enabled *bool + GUID *string + TriggerMatchingType *int + Triggers []*EdgeRuleTrigger + type AuthenticationError struct + Message string + func (e *AuthenticationError) Error() string + type Client struct + DNSZone *DNSZoneService + PullZone *PullZoneService + StorageZone *StorageZoneService + VideoLibrary *VideoLibraryService + func NewClient(APIKey string, opts ...Option) *Client + type DNSRecord struct + Accelerated *bool + AcceleratedPullZoneID *int64 + Disabled *bool + EnvironmentalVariables []EnvironmentalVariable + Flags *int + GeolocationLatitude *float64 + GeolocationLongitude *float64 + ID *int64 + IPGeoLocationInfo *IPGeoLocationInfo + LatencyZone *string + LinkName *string + MonitorStatus *int + MonitorType *int + Name *string + Port *int32 + Priority *int32 + SmartRoutingType *int + TTL *int32 + Tag *string + Type *int + Value *string + Weight *int32 + type DNSZone struct + CustomNameserversEnabled *bool + DateCreated *string + DateModified *string + Domain *string + ID *int64 + LogAnonymizationType *int + LoggingEnabled *bool + LoggingIPAnonymizationEnabled *bool + Nameserver1 *string + Nameserver2 *string + NameserversDetected *bool + NameserversNextCheck *string + Records []DNSRecord + SoaEmail *string + type DNSZoneService struct + func (s *DNSZoneService) Add(ctx context.Context, opts *DNSZone) (*DNSZone, error) + func (s *DNSZoneService) AddDNSRecord(ctx context.Context, dnsZoneID int64, opts *AddOrUpdateDNSRecordOptions) (*DNSRecord, error) + func (s *DNSZoneService) Delete(ctx context.Context, id int64) error + func (s *DNSZoneService) DeleteDNSRecord(ctx context.Context, dnsZoneID int64, dnsRecordID int64) error + func (s *DNSZoneService) Get(ctx context.Context, id int64) (*DNSZone, error) + func (s *DNSZoneService) List(ctx context.Context, opts *PaginationOptions) (*DNSZones, error) + func (s *DNSZoneService) Update(ctx context.Context, id int64, opts *DNSZoneUpdateOptions) (*DNSZone, error) + func (s *DNSZoneService) UpdateDNSRecord(ctx context.Context, dnsZoneID int64, dnsRecordID int64, ...) error + type DNSZoneUpdateOptions struct + CustomNameserversEnabled *bool + LogAnonymizationType *int + LoggingEnabled *bool + LoggingIPAnonymizationEnabled *bool + Nameserver1 *string + Nameserver2 *string + SoaEmail *string + type DNSZones PaginationReply[DNSZone] + type EdgeRule struct + ActionParameter1 *string + ActionParameter2 *string + ActionType *int + Description *string + Enabled *bool + GUID *string + TriggerMatchingType *int + Triggers []*EdgeRuleTrigger + type EdgeRuleTrigger struct + Parameter1 *string + PatternMatches []string + PatternMatchingType *int + Type *int + type EnvironmentalVariable struct + Name *string + Value *string + type HTTPError struct + Errors []error + RequestURL string + RespBody []byte + StatusCode int + func (e *HTTPError) Error() string + type Hostname struct + ForceSSL *bool + HasCertificate *bool + ID *int64 + IsSystemHostname *bool + Value *string + type IPGeoLocationInfo struct + ASN *int64 + City *string + Country *string + CountryCode *string + OrganizationName *string + type Logf func(format string, v ...interface{}) + type Option func(*Client) + func WithHTTPRequestLogger(logger Logf) Option + func WithHTTPResponseLogger(logger Logf) Option + func WithLogger(logger Logf) Option + func WithUserAgent(userAgent string) Option + type PaginationOptions struct + Page int32 + PerPage int32 + type PaginationReply struct + CurrentPage *int32 + HasMoreItems *bool + Items []*Item + TotalItems *int32 + type PullZone struct + AWSSigningEnabled *bool + AWSSigningKey *string + AWSSigningRegionName *string + AWSSigningSecret *string + AccessControlOriginHeaderExtensions []string + AddCanonicalHeader *bool + AddHostHeader *bool + AllowedReferrers []string + BlockPostRequests *bool + BlockRootPathAccess *bool + BlockedCountries []string + BlockedIPs []string + BlockedReferrers []string + BudgetRedirectedCountries []string + BurstSize *int32 + CacheControlBrowserMaxAgeOverride *int64 + CacheControlMaxAgeOverride *int64 + CacheErrorResponses *bool + CnameDomain *string + ConnectionLimitPerIPCount *int32 + CookieVaryParameters []string + DNSRecordID *int64 + DNSRecordValue *string + DNSZoneID *int64 + DisableCookies *bool + EdgeRules []*EdgeRule + EnableAccessControlOriginHeader *bool + EnableAutoSSL *bool + EnableAvifVary *bool + EnableCacheSlice *bool + EnableCookieVary *bool + EnableCountryCodeVary *bool + EnableGeoZoneAF *bool + EnableGeoZoneAsia *bool + EnableGeoZoneEU *bool + EnableGeoZoneSA *bool + EnableGeoZoneUS *bool + EnableHostnameVary *bool + EnableLogging *bool + EnableMobileVary *bool + EnableOriginShield *bool + EnableSafeHop *bool + EnableSmartCache *bool + EnableTLS1 *bool + EnableTLS11 *bool + EnableWebPVary *bool + Enabled *bool + ErrorPageCustomCode *string + ErrorPageEnableCustomCode *bool + ErrorPageEnableStatuspageWidget *bool + ErrorPageStatuspageCode *string + ErrorPageWhitelabel *bool + FollowRedirects *bool + Hostnames []*Hostname + ID *int64 + IgnoreQueryStrings *bool + LimitRateAfter *float64 + LimitRatePerSecond *float64 + LogAnonymizationType *int + LogFormat *int32 + LogForwardingEnabled *bool + LogForwardingFormat *int + LogForwardingHostname *string + LogForwardingPort *int32 + LogForwardingProtocol *int + LogForwardingToken *string + LoggingIPAnonymizationEnabled *bool + LoggingSaveToStorage *bool + LoggingStorageZoneID *int64 + MonthlyBandwidthLimit *int64 + MonthlyBandwidthUsed *int64 + MonthlyCharges *float64 + Name *string + OptimizerAutomaticOptimizationEnabled *bool + OptimizerDesktopMaxWidth *int32 + OptimizerEnableManipulationEngine *bool + OptimizerEnableWebP *bool + OptimizerEnabled *bool + OptimizerForceClasses *bool + OptimizerImageQuality *int32 + OptimizerMinifyCSS *bool + OptimizerMinifyJavaScript *bool + OptimizerMobileImageQuality *int32 + OptimizerMobileMaxWidth *int32 + OptimizerWatermarkEnabled *bool + OptimizerWatermarkMinImageSize *int32 + OptimizerWatermarkOffset *float64 + OptimizerWatermarkPosition *int + OptimizerWatermarkURL *string + OriginConnectTimeout *int32 + OriginHostHeader *string + OriginResponseTimeout *int32 + OriginRetries *int32 + OriginRetry5xxResponses *bool + OriginRetryConnectionTimeout *bool + OriginRetryDelay *int32 + OriginRetryResponseTimeout *bool + OriginShieldEnableConcurrencyLimit *bool + OriginShieldMaxConcurrentRequests *int32 + OriginShieldMaxQueuedRequests *int32 + OriginShieldQueueMaxWaitTime *int32 + OriginShieldZoneCode *string + OriginType *int32 + OriginURL *string + PermaCacheStorageZoneID *int64 + PriceOverride *float64 + QueryStringVaryParameters []string + RequestLimit *int32 + ShieldDDosProtectionEnabled *bool + ShieldDDosProtectionType *int + StorageZoneID *int64 + Type *int + UseBackgroundUpdate *bool + UseStaleWhileOffline *bool + UseStaleWhileUpdating *bool + VerifyOriginSSL *bool + VideoLibraryID *int64 + ZoneSecurityEnabled *bool + ZoneSecurityIncludeHashRemoteIP *bool + ZoneSecurityKey *string + type PullZoneAddCustomCertificateOptions struct + Certificate []byte + CertificateKey []byte + Hostname string + type PullZoneAddOptions struct + Name string + OriginURL string + StorageZoneID *int64 + Type int + type PullZoneService struct + func (s *PullZoneService) Add(ctx context.Context, opts *PullZoneAddOptions) (*PullZone, error) + func (s *PullZoneService) AddCustomCertificate(ctx context.Context, pullZoneID int64, ...) error + func (s *PullZoneService) AddCustomHostname(ctx context.Context, pullZoneID int64, opts *AddCustomHostnameOptions) error + func (s *PullZoneService) AddOrUpdateEdgeRule(ctx context.Context, pullZoneID int64, opts *AddOrUpdateEdgeRuleOptions) error + func (s *PullZoneService) Delete(ctx context.Context, id int64) error + func (s *PullZoneService) DeleteEdgeRule(ctx context.Context, pullZoneID int64, edgeRuleGUID string) error + func (s *PullZoneService) Get(ctx context.Context, id int64) (*PullZone, error) + func (s *PullZoneService) List(ctx context.Context, opts *PaginationOptions) (*PullZones, error) + func (s *PullZoneService) LoadFreeCertificate(ctx context.Context, hostname string) error + func (s *PullZoneService) RemoveCertificate(ctx context.Context, pullZoneID int64, opts *RemoveCertificateOptions) error + func (s *PullZoneService) RemoveCustomHostname(ctx context.Context, pullZoneID int64, opts *RemoveCustomHostnameOptions) error + func (s *PullZoneService) SetEdgeRuleEnabled(ctx context.Context, pullZoneID int64, edgeRuleGUID string, ...) error + func (s *PullZoneService) SetForceSSL(ctx context.Context, pullzoneID int64, opts *SetForceSSLOptions) error + func (s *PullZoneService) Update(ctx context.Context, id int64, opts *PullZoneUpdateOptions) (*PullZone, error) + type PullZoneUpdateOptions struct + AWSSigningEnabled *bool + AWSSigningKey *string + AWSSigningRegionName *string + AWSSigningSecret *string + AccessControlOriginHeaderExtensions []string + AddCanonicalHeader *bool + AddHostHeader *bool + AllowedReferrers []string + BlockPostRequests *bool + BlockRootPathAccess *bool + BlockedCountries []string + BlockedIPs []string + BudgetRedirectedCountries []string + CacheControlBrowserMaxAgeOverride *int64 + CacheControlMaxAgeOverride *int64 + CacheErrorResponses *bool + ConnectionLimitPerIPCount *int32 + CookieVaryParameters []string + DisableCookies *bool + EnableAccessControlOriginHeader *bool + EnableAvifVary *bool + EnableCacheSlice *bool + EnableCookieVary *bool + EnableCountryCodeVary *bool + EnableGeoZoneAF *bool + EnableGeoZoneAsia *bool + EnableGeoZoneEU *bool + EnableGeoZoneSA *bool + EnableGeoZoneUS *bool + EnableHostnameVary *bool + EnableLogging *bool + EnableMobileVary *bool + EnableOriginShield *bool + EnableQueryStringOrdering *bool + EnableSafeHop *bool + EnableTLS1 *bool + EnableTLS11 *bool + EnableWebPVary *bool + ErrorPageCustomCode *string + ErrorPageEnableCustomCode *bool + ErrorPageEnableStatuspageWidget *bool + ErrorPageStatuspageCode *string + ErrorPageWhitelabel *bool + FollowRedirects *bool + IgnoreQueryStrings *bool + LogForwardingEnabled *bool + LogForwardingHostname *string + LogForwardingPort *int32 + LogForwardingToken *string + LoggingIPAnonymizationEnabled *bool + LoggingSaveToStorage *bool + LoggingStorageZoneID *int64 + MonthlyBandwidthLimit *int64 + OptimizerAutomaticOptimizationEnabled *bool + OptimizerDesktopMaxWidth *int32 + OptimizerEnableManipulationEngine *bool + OptimizerEnableWebP *bool + OptimizerEnabled *bool + OptimizerImageQuality *int32 + OptimizerMinifyCSS *bool + OptimizerMinifyJavaScript *bool + OptimizerMobileImageQuality *int32 + OptimizerMobileMaxWidth *int32 + OptimizerWatermarkEnabled *bool + OptimizerWatermarkMinImageSize *int32 + OptimizerWatermarkOffset *float64 + OptimizerWatermarkPosition *int + OptimizerWatermarkURL *string + OriginConnectTimeout *int32 + OriginResponseTimeout *int32 + OriginRetries *int32 + OriginRetry5xxResponses *bool + OriginRetryConnectionTimeout *bool + OriginRetryDelay *int32 + OriginRetryResponseTimeout *bool + OriginShieldEnableConcurrencyLimit *bool + OriginShieldMaxConcurrentRequests *int32 + OriginShieldMaxQueuedRequests *int32 + OriginShieldQueueMaxWaitTime *int32 + OriginShieldZoneCode *string + OriginURL *string + PermaCacheStorageZoneID *int64 + QueryStringVaryParameters []string + RequestLimit *int32 + Type *int + UseStaleWhileOffline *bool + UseStaleWhileUpdating *bool + VerifyOriginSSL *bool + WAFEnabled *bool + WAFEnabledRules []int32 + ZoneSecurityEnabled *bool + ZoneSecurityIncludeHashRemoteIP *bool + type PullZones PaginationReply[PullZone] + type RemoveCertificateOptions struct + Hostname *string + type RemoveCustomHostnameOptions struct + Hostname *string + type SetEdgeRuleEnabledOptions struct + ID *int64 + Value *bool + type SetForceSSLOptions struct + ForceSSL *bool + Hostname *string + type StorageZone struct + DateModified *string + Deleted *bool + FilesStored *int64 + ID *int64 + Name *string + Password *string + PullZones []*PullZone + ReadOnlyPassword *string + Region *string + ReplicationRegions []string + StorageUsed *int64 + UserID *string + type StorageZoneAddOptions struct + Name *string + OriginURL *string + Region *string + ReplicationRegions []string + type StorageZoneService struct + func (s *StorageZoneService) Add(ctx context.Context, opts *StorageZoneAddOptions) (*StorageZone, error) + func (s *StorageZoneService) Delete(ctx context.Context, id int64) error + func (s *StorageZoneService) Get(ctx context.Context, id int64) (*StorageZone, error) + func (s *StorageZoneService) List(ctx context.Context, opts *PaginationOptions) (*StorageZones, error) + func (s *StorageZoneService) Update(ctx context.Context, id int64, opts *StorageZoneUpdateOptions) error + type StorageZoneUpdateOptions struct + Custom404FilePath *string + OriginURL *string + ReplicationRegions []string + Rewrite404To200 *bool + type StorageZones PaginationReply[StorageZone] + type VideoLibraries PaginationReply[VideoLibrary] + type VideoLibrary struct + APIAccessKey *string + APIKey *string + AllowDirectPlay *bool + AllowEarlyPlay *bool + AllowedReferrers []string + Bitrate1080p *int32 + Bitrate1440p *int32 + Bitrate2160p *int32 + Bitrate240p *int32 + Bitrate360p *int32 + Bitrate480p *int32 + Bitrate720p *int32 + BlockNoneReferrer *bool + BlockedReferrers []string + CaptionsBackground *string + CaptionsFontColor *string + CaptionsFontSize *int32 + Controls *string + CustomHTML *string + DateCreated *string + EnableContentTagging *bool + EnableDRM *bool + EnableMP4Fallback *bool + EnabledResolutions *string + FontFamily *string + HasWatermark *bool + ID *int64 + KeepOriginalFiles *bool + Name *string + PlayerKeyColor *string + PlayerTokenAuthenticationEnabled *bool + PullZoneID *int64 + PullZoneType *int32 + ReadOnlyAPIKey *string + ReplicationRegions []string + ShowHeatmap *bool + StorageUsage *int64 + StorageZoneID *int64 + TrafficUsage *int64 + UILanguage *string + VastTagURL *string + ViAiPublisherID *string + VideoCount *int64 + WatermarkHeight *int32 + WatermarkPositionLeft *int32 + WatermarkPositionTop *int32 + WatermarkWidth *int32 + WebhookURL *string + type VideoLibraryAddOptions struct + Name *string + ReplicationRegions []string + type VideoLibraryGetOpts struct + IncludeAccessKey bool + type VideoLibraryListOpts struct + type VideoLibraryService struct + func (s *VideoLibraryService) Add(ctx context.Context, opts *VideoLibraryAddOptions) (*VideoLibrary, error) + func (s *VideoLibraryService) Delete(ctx context.Context, id int64) error + func (s *VideoLibraryService) Get(ctx context.Context, id int64, opts *VideoLibraryGetOpts) (*VideoLibrary, error) + func (s *VideoLibraryService) List(ctx context.Context, opts *VideoLibraryListOpts) (*VideoLibraries, error) + func (s *VideoLibraryService) Update(ctx context.Context, id int64, opts *VideoLibraryUpdateOptions) (*VideoLibrary, error) + type VideoLibraryUpdateOptions struct + AllowDirectPlay *bool + AllowEarlyPlay *bool + Bitrate1080p *int32 + Bitrate1440p *int32 + Bitrate2160p *int32 + Bitrate240p *int32 + Bitrate360p *int32 + Bitrate480p *int32 + Bitrate720p *int32 + BlockNoneReferrer *bool + CaptionsBackground *string + CaptionsFontColor *string + CaptionsFontSize *int32 + Controls *string + CustomHTML *string + EnableContentTagging *bool + EnableDRM *bool + EnableMP4Fallback *bool + EnableTokenAuthentication *bool + EnableTokenIPVerification *bool + EnabledResolutions *string + FontFamily *string + KeepOriginalFiles *bool + Name *string + PlayerKeyColor *string + PlayerTokenAuthenticationEnabled *bool + ResetToken *bool + ShowHeatmap *bool + UILanguage *string + VastTagURL *string + ViAiPublisherID *string + WatermarkHeight *int32 + WatermarkPositionLeft *int32 + WatermarkPositionTop *int32 + WatermarkWidth *int32 + WebhookURL *string