Movatterモバイル変換


[0]ホーム

URL:


cache

package
v4.6.0Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2025 License:Apache-2.0Imports:11Imported by:2

Details

Repository

github.com/cloudflare/cloudflare-go

Links

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin =shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare =shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser =shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert =shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle =shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt =shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom =shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate =shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC =shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA =shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded =shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown =shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy =shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive =shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI =shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel =shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE =shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec =shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic =shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP =shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector =shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow =shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny =shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted =shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending =shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness =shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise =shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree =shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite =shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness =shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise =shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree =shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro =shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro =shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus =shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc =shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc =shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly =shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly =shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly =shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly =shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment =shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled =shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired =shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed =shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid =shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned =shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial =shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow =shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny =shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive =shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled =shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired =shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

typeASN

type ASN =shared.ASN

This is an alias to an internal type.

typeASNParam

type ASNParam =shared.ASNParam

This is an alias to an internal type.

typeAuditLog

type AuditLog =shared.AuditLog

This is an alias to an internal type.

typeAuditLogAction

type AuditLogAction =shared.AuditLogAction

This is an alias to an internal type.

typeAuditLogActor

type AuditLogActor =shared.AuditLogActor

This is an alias to an internal type.

typeAuditLogActorType

type AuditLogActorType =shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

typeAuditLogOwner

type AuditLogOwner =shared.AuditLogOwner

This is an alias to an internal type.

typeAuditLogResource

type AuditLogResource =shared.AuditLogResource

This is an alias to an internal type.

typeCachePurgeParams

type CachePurgeParams struct {ZoneIDparam.Field[string]       `path:"zone_id,required"`BodyCachePurgeParamsBodyUnion `json:"body,required"`}

func (CachePurgeParams)MarshalJSON

func (rCachePurgeParams) MarshalJSON() (data []byte, errerror)

typeCachePurgeParamsBody

type CachePurgeParamsBody struct {Filesparam.Field[interface{}] `json:"files"`Hostsparam.Field[interface{}] `json:"hosts"`Prefixesparam.Field[interface{}] `json:"prefixes"`// For more information, please refer to// [purge everything documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-everything/).PurgeEverythingparam.Field[bool]        `json:"purge_everything"`Tagsparam.Field[interface{}] `json:"tags"`}

func (CachePurgeParamsBody)MarshalJSON

func (rCachePurgeParamsBody) MarshalJSON() (data []byte, errerror)

typeCachePurgeParamsBodyCachePurgeEverything

type CachePurgeParamsBodyCachePurgeEverything struct {// For more information, please refer to// [purge everything documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-everything/).PurgeEverythingparam.Field[bool] `json:"purge_everything"`}

func (CachePurgeParamsBodyCachePurgeEverything)MarshalJSON

func (rCachePurgeParamsBodyCachePurgeEverything) MarshalJSON() (data []byte, errerror)

typeCachePurgeParamsBodyCachePurgeFlexPurgeByHostnames

type CachePurgeParamsBodyCachePurgeFlexPurgeByHostnames struct {// For more information purging by hostnames, please refer to// [purge by hostname documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-hostname/).Hostsparam.Field[[]string] `json:"hosts"`}

func (CachePurgeParamsBodyCachePurgeFlexPurgeByHostnames)MarshalJSON

typeCachePurgeParamsBodyCachePurgeFlexPurgeByPrefixes

type CachePurgeParamsBodyCachePurgeFlexPurgeByPrefixes struct {// For more information on purging by prefixes, please refer to// [purge by prefix documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge_by_prefix/).Prefixesparam.Field[[]string] `json:"prefixes"`}

func (CachePurgeParamsBodyCachePurgeFlexPurgeByPrefixes)MarshalJSON

typeCachePurgeParamsBodyCachePurgeFlexPurgeByTags

type CachePurgeParamsBodyCachePurgeFlexPurgeByTags struct {// For more information on cache tags and purging by tags, please refer to// [purge by cache-tags documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-tags/).Tagsparam.Field[[]string] `json:"tags"`}

func (CachePurgeParamsBodyCachePurgeFlexPurgeByTags)MarshalJSON

func (rCachePurgeParamsBodyCachePurgeFlexPurgeByTags) MarshalJSON() (data []byte, errerror)

typeCachePurgeParamsBodyCachePurgeSingleFile

type CachePurgeParamsBodyCachePurgeSingleFile struct {// For more information on purging files, please refer to// [purge by single-file documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-single-file/).Filesparam.Field[[]string] `json:"files"`}

func (CachePurgeParamsBodyCachePurgeSingleFile)MarshalJSON

func (rCachePurgeParamsBodyCachePurgeSingleFile) MarshalJSON() (data []byte, errerror)

typeCachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeaders

type CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeaders struct {// For more information on purging files with URL and headers, please refer to// [purge by single-file documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/purge-by-single-file/).Filesparam.Field[[]CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeadersFile] `json:"files"`}

func (CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeaders)MarshalJSON

typeCachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeadersFile

type CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeadersFile struct {Headersparam.Field[map[string]string] `json:"headers"`URLparam.Field[string]            `json:"url"`}

func (CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeadersFile)MarshalJSON

typeCachePurgeResponse

type CachePurgeResponse struct {// Identifier.IDstring                 `json:"id,required"`JSON cachePurgeResponseJSON `json:"-"`}

func (*CachePurgeResponse)UnmarshalJSON

func (r *CachePurgeResponse) UnmarshalJSON(data []byte) (errerror)

typeCachePurgeResponseEnvelope

type CachePurgeResponseEnvelope struct {Errors   []CachePurgeResponseEnvelopeErrors   `json:"errors,required"`Messages []CachePurgeResponseEnvelopeMessages `json:"messages,required"`// Whether the API call was successful.SuccessCachePurgeResponseEnvelopeSuccess `json:"success,required"`ResultCachePurgeResponse                `json:"result,nullable"`JSON    cachePurgeResponseEnvelopeJSON    `json:"-"`}

func (*CachePurgeResponseEnvelope)UnmarshalJSON

func (r *CachePurgeResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeCachePurgeResponseEnvelopeErrorsadded inv4.3.0

type CachePurgeResponseEnvelopeErrors struct {Codeint64                                  `json:"code,required"`Messagestring                                 `json:"message,required"`DocumentationURLstring                                 `json:"documentation_url"`SourceCachePurgeResponseEnvelopeErrorsSource `json:"source"`JSON             cachePurgeResponseEnvelopeErrorsJSON   `json:"-"`}

func (*CachePurgeResponseEnvelopeErrors)UnmarshalJSONadded inv4.3.0

func (r *CachePurgeResponseEnvelopeErrors) UnmarshalJSON(data []byte) (errerror)

typeCachePurgeResponseEnvelopeErrorsSourceadded inv4.3.0

type CachePurgeResponseEnvelopeErrorsSource struct {Pointerstring                                     `json:"pointer"`JSON    cachePurgeResponseEnvelopeErrorsSourceJSON `json:"-"`}

func (*CachePurgeResponseEnvelopeErrorsSource)UnmarshalJSONadded inv4.3.0

func (r *CachePurgeResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (errerror)

typeCachePurgeResponseEnvelopeMessagesadded inv4.3.0

type CachePurgeResponseEnvelopeMessages struct {Codeint64                                    `json:"code,required"`Messagestring                                   `json:"message,required"`DocumentationURLstring                                   `json:"documentation_url"`SourceCachePurgeResponseEnvelopeMessagesSource `json:"source"`JSON             cachePurgeResponseEnvelopeMessagesJSON   `json:"-"`}

func (*CachePurgeResponseEnvelopeMessages)UnmarshalJSONadded inv4.3.0

func (r *CachePurgeResponseEnvelopeMessages) UnmarshalJSON(data []byte) (errerror)

typeCachePurgeResponseEnvelopeMessagesSourceadded inv4.3.0

type CachePurgeResponseEnvelopeMessagesSource struct {Pointerstring                                       `json:"pointer"`JSON    cachePurgeResponseEnvelopeMessagesSourceJSON `json:"-"`}

func (*CachePurgeResponseEnvelopeMessagesSource)UnmarshalJSONadded inv4.3.0

func (r *CachePurgeResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (errerror)

typeCachePurgeResponseEnvelopeSuccess

type CachePurgeResponseEnvelopeSuccessbool

Whether the API call was successful.

const (CachePurgeResponseEnvelopeSuccessTrueCachePurgeResponseEnvelopeSuccess =true)

func (CachePurgeResponseEnvelopeSuccess)IsKnown

typeCacheReserve

type CacheReservestring

ID of the zone setting.

const (CacheReserveCacheReserveCacheReserve = "cache_reserve")

func (CacheReserve)IsKnown

func (rCacheReserve) IsKnown()bool

typeCacheReserveClear

type CacheReserveClearstring

ID of the zone setting.

const (CacheReserveClearCacheReserveClearCacheReserveClear = "cache_reserve_clear")

func (CacheReserveClear)IsKnown

func (rCacheReserveClear) IsKnown()bool

typeCacheReserveClearParams

type CacheReserveClearParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`Body   interface{}         `json:"body,required"`}

func (CacheReserveClearParams)MarshalJSON

func (rCacheReserveClearParams) MarshalJSON() (data []byte, errerror)

typeCacheReserveClearResponse

type CacheReserveClearResponse struct {// ID of the zone setting.IDCacheReserveClear `json:"id,required"`// The time that the latest Cache Reserve Clear operation started.StartTstime.Time `json:"start_ts,required" format:"date-time"`// The current state of the Cache Reserve Clear operation.StateState `json:"state,required"`// The time that the latest Cache Reserve Clear operation completed.EndTstime.Time `json:"end_ts" format:"date-time"`// Last time this setting was modified.ModifiedOntime.Time                     `json:"modified_on,nullable" format:"date-time"`JSON       cacheReserveClearResponseJSON `json:"-"`}

You can use Cache Reserve Clear to clear your Cache Reserve, but you must firstdisable Cache Reserve. In most cases, this will be accomplished within 24 hours.You cannot re-enable Cache Reserve while this process is ongoing. Keep in mindthat you cannot undo or cancel this operation.

func (*CacheReserveClearResponse)UnmarshalJSON

func (r *CacheReserveClearResponse) UnmarshalJSON(data []byte) (errerror)

typeCacheReserveClearResponseEnvelope

type CacheReserveClearResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessCacheReserveClearResponseEnvelopeSuccess `json:"success,required"`// You can use Cache Reserve Clear to clear your Cache Reserve, but you must first// disable Cache Reserve. In most cases, this will be accomplished within 24 hours.// You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind// that you cannot undo or cancel this operation.ResultCacheReserveClearResponse             `json:"result"`JSON   cacheReserveClearResponseEnvelopeJSON `json:"-"`}

func (*CacheReserveClearResponseEnvelope)UnmarshalJSON

func (r *CacheReserveClearResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeCacheReserveClearResponseEnvelopeSuccess

type CacheReserveClearResponseEnvelopeSuccessbool

Whether the API call was successful

const (CacheReserveClearResponseEnvelopeSuccessTrueCacheReserveClearResponseEnvelopeSuccess =true)

func (CacheReserveClearResponseEnvelopeSuccess)IsKnown

typeCacheReserveEditParams

type CacheReserveEditParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`// Value of the Cache Reserve zone setting.Valueparam.Field[CacheReserveEditParamsValue] `json:"value,required"`}

func (CacheReserveEditParams)MarshalJSON

func (rCacheReserveEditParams) MarshalJSON() (data []byte, errerror)

typeCacheReserveEditParamsValue

type CacheReserveEditParamsValuestring

Value of the Cache Reserve zone setting.

const (CacheReserveEditParamsValueOnCacheReserveEditParamsValue = "on"CacheReserveEditParamsValueOffCacheReserveEditParamsValue = "off")

func (CacheReserveEditParamsValue)IsKnown

typeCacheReserveEditResponse

type CacheReserveEditResponse struct {// ID of the zone setting.IDCacheReserve `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// The value of the featureValueCacheReserveEditResponseValue `json:"value,required"`// Last time this setting was modified.ModifiedOntime.Time                    `json:"modified_on,nullable" format:"date-time"`JSON       cacheReserveEditResponseJSON `json:"-"`}

func (*CacheReserveEditResponse)UnmarshalJSON

func (r *CacheReserveEditResponse) UnmarshalJSON(data []byte) (errerror)

typeCacheReserveEditResponseEnvelope

type CacheReserveEditResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessCacheReserveEditResponseEnvelopeSuccess `json:"success,required"`ResultCacheReserveEditResponse                `json:"result"`JSON    cacheReserveEditResponseEnvelopeJSON    `json:"-"`}

func (*CacheReserveEditResponseEnvelope)UnmarshalJSON

func (r *CacheReserveEditResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeCacheReserveEditResponseEnvelopeSuccess

type CacheReserveEditResponseEnvelopeSuccessbool

Whether the API call was successful

const (CacheReserveEditResponseEnvelopeSuccessTrueCacheReserveEditResponseEnvelopeSuccess =true)

func (CacheReserveEditResponseEnvelopeSuccess)IsKnown

typeCacheReserveEditResponseValue

type CacheReserveEditResponseValuestring

The value of the feature

const (CacheReserveEditResponseValueOnCacheReserveEditResponseValue = "on"CacheReserveEditResponseValueOffCacheReserveEditResponseValue = "off")

func (CacheReserveEditResponseValue)IsKnown

typeCacheReserveGetParams

type CacheReserveGetParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`}

typeCacheReserveGetResponse

type CacheReserveGetResponse struct {// ID of the zone setting.IDCacheReserve `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// The value of the featureValueCacheReserveGetResponseValue `json:"value,required"`// Last time this setting was modified.ModifiedOntime.Time                   `json:"modified_on,nullable" format:"date-time"`JSON       cacheReserveGetResponseJSON `json:"-"`}

func (*CacheReserveGetResponse)UnmarshalJSON

func (r *CacheReserveGetResponse) UnmarshalJSON(data []byte) (errerror)

typeCacheReserveGetResponseEnvelope

type CacheReserveGetResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessCacheReserveGetResponseEnvelopeSuccess `json:"success,required"`ResultCacheReserveGetResponse                `json:"result"`JSON    cacheReserveGetResponseEnvelopeJSON    `json:"-"`}

func (*CacheReserveGetResponseEnvelope)UnmarshalJSON

func (r *CacheReserveGetResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeCacheReserveGetResponseEnvelopeSuccess

type CacheReserveGetResponseEnvelopeSuccessbool

Whether the API call was successful

const (CacheReserveGetResponseEnvelopeSuccessTrueCacheReserveGetResponseEnvelopeSuccess =true)

func (CacheReserveGetResponseEnvelopeSuccess)IsKnown

typeCacheReserveGetResponseValue

type CacheReserveGetResponseValuestring

The value of the feature

const (CacheReserveGetResponseValueOnCacheReserveGetResponseValue = "on"CacheReserveGetResponseValueOffCacheReserveGetResponseValue = "off")

func (CacheReserveGetResponseValue)IsKnown

typeCacheReserveService

type CacheReserveService struct {Options []option.RequestOption}

CacheReserveService contains methods and other services that help withinteracting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environmentautomatically. You should not instantiate this service directly, and instead usetheNewCacheReserveService method instead.

funcNewCacheReserveService

func NewCacheReserveService(opts ...option.RequestOption) (r *CacheReserveService)

NewCacheReserveService generates a new service that applies the given options toeach request. These options are applied after the parent client's options (ifthere is one), and before any request-specific options.

func (*CacheReserveService)Clear

You can use Cache Reserve Clear to clear your Cache Reserve, but you must firstdisable Cache Reserve. In most cases, this will be accomplished within 24 hours.You cannot re-enable Cache Reserve while this process is ongoing. Keep in mindthat you cannot undo or cancel this operation.

func (*CacheReserveService)Edit

Increase cache lifetimes by automatically storing all cacheable files intoCloudflare's persistent object storage buckets. Requires Cache Reservesubscription. Note: using Tiered Cache with Cache Reserve is highly recommendedto reduce Reserve operations costs. See the[developer docs](https://developers.cloudflare.com/cache/about/cache-reserve)for more information.

func (*CacheReserveService)Get

Increase cache lifetimes by automatically storing all cacheable files intoCloudflare's persistent object storage buckets. Requires Cache Reservesubscription. Note: using Tiered Cache with Cache Reserve is highly recommendedto reduce Reserve operations costs. See the[developer docs](https://developers.cloudflare.com/cache/about/cache-reserve)for more information.

func (*CacheReserveService)Status

You can use Cache Reserve Clear to clear your Cache Reserve, but you must firstdisable Cache Reserve. In most cases, this will be accomplished within 24 hours.You cannot re-enable Cache Reserve while this process is ongoing. Keep in mindthat you cannot undo or cancel this operation.

typeCacheReserveStatusParams

type CacheReserveStatusParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`}

typeCacheReserveStatusResponse

type CacheReserveStatusResponse struct {// ID of the zone setting.IDCacheReserveClear `json:"id,required"`// The time that the latest Cache Reserve Clear operation started.StartTstime.Time `json:"start_ts,required" format:"date-time"`// The current state of the Cache Reserve Clear operation.StateState `json:"state,required"`// The time that the latest Cache Reserve Clear operation completed.EndTstime.Time `json:"end_ts" format:"date-time"`// Last time this setting was modified.ModifiedOntime.Time                      `json:"modified_on,nullable" format:"date-time"`JSON       cacheReserveStatusResponseJSON `json:"-"`}

You can use Cache Reserve Clear to clear your Cache Reserve, but you must firstdisable Cache Reserve. In most cases, this will be accomplished within 24 hours.You cannot re-enable Cache Reserve while this process is ongoing. Keep in mindthat you cannot undo or cancel this operation.

func (*CacheReserveStatusResponse)UnmarshalJSON

func (r *CacheReserveStatusResponse) UnmarshalJSON(data []byte) (errerror)

typeCacheReserveStatusResponseEnvelope

type CacheReserveStatusResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessCacheReserveStatusResponseEnvelopeSuccess `json:"success,required"`// You can use Cache Reserve Clear to clear your Cache Reserve, but you must first// disable Cache Reserve. In most cases, this will be accomplished within 24 hours.// You cannot re-enable Cache Reserve while this process is ongoing. Keep in mind// that you cannot undo or cancel this operation.ResultCacheReserveStatusResponse             `json:"result"`JSON   cacheReserveStatusResponseEnvelopeJSON `json:"-"`}

func (*CacheReserveStatusResponseEnvelope)UnmarshalJSON

func (r *CacheReserveStatusResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeCacheReserveStatusResponseEnvelopeSuccess

type CacheReserveStatusResponseEnvelopeSuccessbool

Whether the API call was successful

const (CacheReserveStatusResponseEnvelopeSuccessTrueCacheReserveStatusResponseEnvelopeSuccess =true)

func (CacheReserveStatusResponseEnvelopeSuccess)IsKnown

typeCacheService

type CacheService struct {Options             []option.RequestOptionCacheReserve        *CacheReserveServiceSmartTieredCache    *SmartTieredCacheServiceVariants            *VariantServiceRegionalTieredCache *RegionalTieredCacheService}

CacheService contains methods and other services that help with interacting withthe cloudflare API.

Note, unlike clients, this service does not read variables from the environmentautomatically. You should not instantiate this service directly, and instead usetheNewCacheService method instead.

funcNewCacheService

func NewCacheService(opts ...option.RequestOption) (r *CacheService)

NewCacheService generates a new service that applies the given options to eachrequest. These options are applied after the parent client's options (if thereis one), and before any request-specific options.

func (*CacheService)Purge

### Purge All Cached Content

Removes ALL files from Cloudflare's cache. All tiers can purge everything.

```{"purge_everything": true}```

### Purge Cached Content by URL

Granularly removes one or more files from Cloudflare's cache by specifying URLs.All tiers can purge by URL.

To purge files with custom cache keys, include the headers used to compute thecache key as in the example. If you have a device type or geo in your cache key,you will need to include the CF-Device-Type or CF-IPCountry headers. If you havelang in your cache key, you will need to include the Accept-Language header.

**NB:** When including the Origin header, be sure to include the **scheme** and**hostname**. The port number can be omitted if it is the default port (80 forhttp, 443 for https), but must be included otherwise.

Single file purge example with files:

```{"files": ["http://www.example.com/css/styles.css", "http://www.example.com/js/index.js"]}```

Single file purge example with url and header pairs:

```{"files": [{url: "http://www.example.com/cat_picture.jpg", headers: { "CF-IPCountry": "US", "CF-Device-Type": "desktop", "Accept-Language": "zh-CN" }}, {url: "http://www.example.com/dog_picture.jpg", headers: { "CF-IPCountry": "EU", "CF-Device-Type": "mobile", "Accept-Language": "en-US" }}]}```

### Purge Cached Content by Tag, Host or Prefix

Granularly removes one or more files from Cloudflare's cache either byspecifying the host, the associated Cache-Tag, or a Prefix.

Flex purge with tags:

```{"tags": ["a-cache-tag", "another-cache-tag"]}```

Flex purge with hosts:

```{"hosts": ["www.example.com", "images.example.com"]}```

Flex purge with prefixes:

```{"prefixes": ["www.example.com/foo", "images.example.com/bar/baz"]}```

### Availability and limits

please refer to[purge cache availability and limits documentation page](https://developers.cloudflare.com/cache/how-to/purge-cache/#availability-and-limits).

typeCertificateCA

type CertificateCA =shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

typeCertificateRequestType

type CertificateRequestType =shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa),or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

typeCloudflareTunnel

type CloudflareTunnel =shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

typeCloudflareTunnelConnection

type CloudflareTunnelConnection =shared.CloudflareTunnelConnection

This is an alias to an internal type.

typeCloudflareTunnelStatus

type CloudflareTunnelStatus =shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never beenrun), `degraded` (tunnel is active and able to serve traffic but in an unhealthystate), `healthy` (tunnel is active and able to serve traffic), or `down`(tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

typeCloudflareTunnelTunType

type CloudflareTunnelTunType =shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

typeError

type Error =apierror.Error

typeErrorData

type ErrorData =shared.ErrorData

This is an alias to an internal type.

typeErrorDataSourceadded inv4.2.0

type ErrorDataSource =shared.ErrorDataSource

This is an alias to an internal type.

typeMember

type Member =shared.Member

This is an alias to an internal type.

typeMemberPoliciesAccess

type MemberPoliciesAccess =shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

typeMemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup =shared.MemberPoliciesPermissionGroup

A named group of permissions that map to a group of operations againstresources.

This is an alias to an internal type.

typeMemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta =shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

typeMemberPoliciesResourceGroup

type MemberPoliciesResourceGroup =shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

typeMemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta =shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

typeMemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope =shared.MemberPoliciesResourceGroupsScope

A scope is a combination of scope objects which provides additional context.

This is an alias to an internal type.

typeMemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject =shared.MemberPoliciesResourceGroupsScopeObject

A scope object represents any resource that can have actions applied againstinvite.

This is an alias to an internal type.

typeMemberPolicy

type MemberPolicy =shared.MemberPolicy

This is an alias to an internal type.

typeMemberStatus

type MemberStatus =shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

typeMemberUser

type MemberUser =shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

typePermission

type Permission =shared.Permission

This is an alias to an internal type.

typePermissionGrant

type PermissionGrant =shared.PermissionGrant

This is an alias to an internal type.

typePermissionGrantParam

type PermissionGrantParam =shared.PermissionGrantParam

This is an alias to an internal type.

typeRatePlan

type RatePlan =shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

typeRatePlanIDadded inv4.1.0

type RatePlanID =shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

typeRatePlanParam

type RatePlanParam =shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

typeRegionalTieredCache

type RegionalTieredCachestring

ID of the zone setting.

const (RegionalTieredCacheTcRegionalRegionalTieredCache = "tc_regional")

func (RegionalTieredCache)IsKnown

func (rRegionalTieredCache) IsKnown()bool

typeRegionalTieredCacheEditParams

type RegionalTieredCacheEditParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`// Value of the Regional Tiered Cache zone setting.Valueparam.Field[RegionalTieredCacheEditParamsValue] `json:"value,required"`}

func (RegionalTieredCacheEditParams)MarshalJSON

func (rRegionalTieredCacheEditParams) MarshalJSON() (data []byte, errerror)

typeRegionalTieredCacheEditParamsValue

type RegionalTieredCacheEditParamsValuestring

Value of the Regional Tiered Cache zone setting.

const (RegionalTieredCacheEditParamsValueOnRegionalTieredCacheEditParamsValue = "on"RegionalTieredCacheEditParamsValueOffRegionalTieredCacheEditParamsValue = "off")

func (RegionalTieredCacheEditParamsValue)IsKnown

typeRegionalTieredCacheEditResponse

type RegionalTieredCacheEditResponse struct {// ID of the zone setting.IDRegionalTieredCache `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// The value of the featureValueRegionalTieredCacheEditResponseValue `json:"value,required"`// Last time this setting was modified.ModifiedOntime.Time                           `json:"modified_on,nullable" format:"date-time"`JSON       regionalTieredCacheEditResponseJSON `json:"-"`}

func (*RegionalTieredCacheEditResponse)UnmarshalJSON

func (r *RegionalTieredCacheEditResponse) UnmarshalJSON(data []byte) (errerror)

typeRegionalTieredCacheEditResponseEnvelope

type RegionalTieredCacheEditResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessRegionalTieredCacheEditResponseEnvelopeSuccess `json:"success,required"`ResultRegionalTieredCacheEditResponse                `json:"result"`JSON    regionalTieredCacheEditResponseEnvelopeJSON    `json:"-"`}

func (*RegionalTieredCacheEditResponseEnvelope)UnmarshalJSON

func (r *RegionalTieredCacheEditResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeRegionalTieredCacheEditResponseEnvelopeSuccess

type RegionalTieredCacheEditResponseEnvelopeSuccessbool

Whether the API call was successful

const (RegionalTieredCacheEditResponseEnvelopeSuccessTrueRegionalTieredCacheEditResponseEnvelopeSuccess =true)

func (RegionalTieredCacheEditResponseEnvelopeSuccess)IsKnown

typeRegionalTieredCacheEditResponseValue

type RegionalTieredCacheEditResponseValuestring

The value of the feature

const (RegionalTieredCacheEditResponseValueOnRegionalTieredCacheEditResponseValue = "on"RegionalTieredCacheEditResponseValueOffRegionalTieredCacheEditResponseValue = "off")

func (RegionalTieredCacheEditResponseValue)IsKnown

typeRegionalTieredCacheGetParams

type RegionalTieredCacheGetParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`}

typeRegionalTieredCacheGetResponse

type RegionalTieredCacheGetResponse struct {// ID of the zone setting.IDRegionalTieredCache `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// The value of the featureValueRegionalTieredCacheGetResponseValue `json:"value,required"`// Last time this setting was modified.ModifiedOntime.Time                          `json:"modified_on,nullable" format:"date-time"`JSON       regionalTieredCacheGetResponseJSON `json:"-"`}

func (*RegionalTieredCacheGetResponse)UnmarshalJSON

func (r *RegionalTieredCacheGetResponse) UnmarshalJSON(data []byte) (errerror)

typeRegionalTieredCacheGetResponseEnvelope

type RegionalTieredCacheGetResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessRegionalTieredCacheGetResponseEnvelopeSuccess `json:"success,required"`ResultRegionalTieredCacheGetResponse                `json:"result"`JSON    regionalTieredCacheGetResponseEnvelopeJSON    `json:"-"`}

func (*RegionalTieredCacheGetResponseEnvelope)UnmarshalJSON

func (r *RegionalTieredCacheGetResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeRegionalTieredCacheGetResponseEnvelopeSuccess

type RegionalTieredCacheGetResponseEnvelopeSuccessbool

Whether the API call was successful

const (RegionalTieredCacheGetResponseEnvelopeSuccessTrueRegionalTieredCacheGetResponseEnvelopeSuccess =true)

func (RegionalTieredCacheGetResponseEnvelopeSuccess)IsKnown

typeRegionalTieredCacheGetResponseValue

type RegionalTieredCacheGetResponseValuestring

The value of the feature

const (RegionalTieredCacheGetResponseValueOnRegionalTieredCacheGetResponseValue = "on"RegionalTieredCacheGetResponseValueOffRegionalTieredCacheGetResponseValue = "off")

func (RegionalTieredCacheGetResponseValue)IsKnown

typeRegionalTieredCacheService

type RegionalTieredCacheService struct {Options []option.RequestOption}

RegionalTieredCacheService contains methods and other services that help withinteracting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environmentautomatically. You should not instantiate this service directly, and instead usetheNewRegionalTieredCacheService method instead.

funcNewRegionalTieredCacheService

func NewRegionalTieredCacheService(opts ...option.RequestOption) (r *RegionalTieredCacheService)

NewRegionalTieredCacheService generates a new service that applies the givenoptions to each request. These options are applied after the parent client'soptions (if there is one), and before any request-specific options.

func (*RegionalTieredCacheService)Edit

Instructs Cloudflare to check a regional hub data center on the way to yourupper tier. This can help improve performance for smart and custom tiered cachetopologies.

func (*RegionalTieredCacheService)Get

Instructs Cloudflare to check a regional hub data center on the way to yourupper tier. This can help improve performance for smart and custom tiered cachetopologies.

typeResponseInfo

type ResponseInfo =shared.ResponseInfo

This is an alias to an internal type.

typeResponseInfoSourceadded inv4.3.0

type ResponseInfoSource =shared.ResponseInfoSource

This is an alias to an internal type.

typeRole

type Role =shared.Role

This is an alias to an internal type.

typeRoleParam

type RoleParam =shared.RoleParam

This is an alias to an internal type.

typeRolePermissions

type RolePermissions =shared.RolePermissions

This is an alias to an internal type.

typeRolePermissionsParam

type RolePermissionsParam =shared.RolePermissionsParam

This is an alias to an internal type.

typeSmartTieredCacheDeleteParams

type SmartTieredCacheDeleteParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`}

typeSmartTieredCacheDeleteResponse

type SmartTieredCacheDeleteResponse struct {// ID of the zone setting.IDSmartTieredCacheDeleteResponseID `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// Last time this setting was modified.ModifiedOntime.Time                          `json:"modified_on,nullable" format:"date-time"`JSON       smartTieredCacheDeleteResponseJSON `json:"-"`}

func (*SmartTieredCacheDeleteResponse)UnmarshalJSON

func (r *SmartTieredCacheDeleteResponse) UnmarshalJSON(data []byte) (errerror)

typeSmartTieredCacheDeleteResponseEnvelope

type SmartTieredCacheDeleteResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessSmartTieredCacheDeleteResponseEnvelopeSuccess `json:"success,required"`ResultSmartTieredCacheDeleteResponse                `json:"result"`JSON    smartTieredCacheDeleteResponseEnvelopeJSON    `json:"-"`}

func (*SmartTieredCacheDeleteResponseEnvelope)UnmarshalJSON

func (r *SmartTieredCacheDeleteResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeSmartTieredCacheDeleteResponseEnvelopeSuccess

type SmartTieredCacheDeleteResponseEnvelopeSuccessbool

Whether the API call was successful

const (SmartTieredCacheDeleteResponseEnvelopeSuccessTrueSmartTieredCacheDeleteResponseEnvelopeSuccess =true)

func (SmartTieredCacheDeleteResponseEnvelopeSuccess)IsKnown

typeSmartTieredCacheDeleteResponseID

type SmartTieredCacheDeleteResponseIDstring

ID of the zone setting.

const (SmartTieredCacheDeleteResponseIDTieredCacheSmartTopologyEnableSmartTieredCacheDeleteResponseID = "tiered_cache_smart_topology_enable")

func (SmartTieredCacheDeleteResponseID)IsKnown

typeSmartTieredCacheEditParams

type SmartTieredCacheEditParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`// Enable or disable the Smart Tiered CacheValueparam.Field[SmartTieredCacheEditParamsValue] `json:"value,required"`}

func (SmartTieredCacheEditParams)MarshalJSON

func (rSmartTieredCacheEditParams) MarshalJSON() (data []byte, errerror)

typeSmartTieredCacheEditParamsValue

type SmartTieredCacheEditParamsValuestring

Enable or disable the Smart Tiered Cache

const (SmartTieredCacheEditParamsValueOnSmartTieredCacheEditParamsValue = "on"SmartTieredCacheEditParamsValueOffSmartTieredCacheEditParamsValue = "off")

func (SmartTieredCacheEditParamsValue)IsKnown

typeSmartTieredCacheEditResponse

type SmartTieredCacheEditResponse struct {// ID of the zone setting.IDSmartTieredCacheEditResponseID `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// The value of the featureValueSmartTieredCacheEditResponseValue `json:"value,required"`// Last time this setting was modified.ModifiedOntime.Time                        `json:"modified_on,nullable" format:"date-time"`JSON       smartTieredCacheEditResponseJSON `json:"-"`}

func (*SmartTieredCacheEditResponse)UnmarshalJSON

func (r *SmartTieredCacheEditResponse) UnmarshalJSON(data []byte) (errerror)

typeSmartTieredCacheEditResponseEnvelope

type SmartTieredCacheEditResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessSmartTieredCacheEditResponseEnvelopeSuccess `json:"success,required"`ResultSmartTieredCacheEditResponse                `json:"result"`JSON    smartTieredCacheEditResponseEnvelopeJSON    `json:"-"`}

func (*SmartTieredCacheEditResponseEnvelope)UnmarshalJSON

func (r *SmartTieredCacheEditResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeSmartTieredCacheEditResponseEnvelopeSuccess

type SmartTieredCacheEditResponseEnvelopeSuccessbool

Whether the API call was successful

const (SmartTieredCacheEditResponseEnvelopeSuccessTrueSmartTieredCacheEditResponseEnvelopeSuccess =true)

func (SmartTieredCacheEditResponseEnvelopeSuccess)IsKnown

typeSmartTieredCacheEditResponseID

type SmartTieredCacheEditResponseIDstring

ID of the zone setting.

const (SmartTieredCacheEditResponseIDTieredCacheSmartTopologyEnableSmartTieredCacheEditResponseID = "tiered_cache_smart_topology_enable")

func (SmartTieredCacheEditResponseID)IsKnown

typeSmartTieredCacheEditResponseValue

type SmartTieredCacheEditResponseValuestring

The value of the feature

const (SmartTieredCacheEditResponseValueOnSmartTieredCacheEditResponseValue = "on"SmartTieredCacheEditResponseValueOffSmartTieredCacheEditResponseValue = "off")

func (SmartTieredCacheEditResponseValue)IsKnown

typeSmartTieredCacheGetParams

type SmartTieredCacheGetParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`}

typeSmartTieredCacheGetResponse

type SmartTieredCacheGetResponse struct {// ID of the zone setting.IDSmartTieredCacheGetResponseID `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// The value of the featureValueSmartTieredCacheGetResponseValue `json:"value,required"`// Last time this setting was modified.ModifiedOntime.Time                       `json:"modified_on,nullable" format:"date-time"`JSON       smartTieredCacheGetResponseJSON `json:"-"`}

func (*SmartTieredCacheGetResponse)UnmarshalJSON

func (r *SmartTieredCacheGetResponse) UnmarshalJSON(data []byte) (errerror)

typeSmartTieredCacheGetResponseEnvelope

type SmartTieredCacheGetResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessSmartTieredCacheGetResponseEnvelopeSuccess `json:"success,required"`ResultSmartTieredCacheGetResponse                `json:"result"`JSON    smartTieredCacheGetResponseEnvelopeJSON    `json:"-"`}

func (*SmartTieredCacheGetResponseEnvelope)UnmarshalJSON

func (r *SmartTieredCacheGetResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeSmartTieredCacheGetResponseEnvelopeSuccess

type SmartTieredCacheGetResponseEnvelopeSuccessbool

Whether the API call was successful

const (SmartTieredCacheGetResponseEnvelopeSuccessTrueSmartTieredCacheGetResponseEnvelopeSuccess =true)

func (SmartTieredCacheGetResponseEnvelopeSuccess)IsKnown

typeSmartTieredCacheGetResponseID

type SmartTieredCacheGetResponseIDstring

ID of the zone setting.

const (SmartTieredCacheGetResponseIDTieredCacheSmartTopologyEnableSmartTieredCacheGetResponseID = "tiered_cache_smart_topology_enable")

func (SmartTieredCacheGetResponseID)IsKnown

typeSmartTieredCacheGetResponseValue

type SmartTieredCacheGetResponseValuestring

The value of the feature

const (SmartTieredCacheGetResponseValueOnSmartTieredCacheGetResponseValue = "on"SmartTieredCacheGetResponseValueOffSmartTieredCacheGetResponseValue = "off")

func (SmartTieredCacheGetResponseValue)IsKnown

typeSmartTieredCacheService

type SmartTieredCacheService struct {Options []option.RequestOption}

SmartTieredCacheService contains methods and other services that help withinteracting with the cloudflare API.

Note, unlike clients, this service does not read variables from the environmentautomatically. You should not instantiate this service directly, and instead usetheNewSmartTieredCacheService method instead.

funcNewSmartTieredCacheService

func NewSmartTieredCacheService(opts ...option.RequestOption) (r *SmartTieredCacheService)

NewSmartTieredCacheService generates a new service that applies the givenoptions to each request. These options are applied after the parent client'soptions (if there is one), and before any request-specific options.

func (*SmartTieredCacheService)Delete

Smart Tiered Cache dynamically selects the single closest upper tier for each ofyour website’s origins with no configuration required, using our in-houseperformance and routing data. Cloudflare collects latency data for each requestto an origin, and uses the latency data to determine how well any upper-tierdata center is connected with an origin. As a result, Cloudflare can select thedata center with the lowest latency to be the upper-tier for an origin.

func (*SmartTieredCacheService)Edit

Smart Tiered Cache dynamically selects the single closest upper tier for each ofyour website’s origins with no configuration required, using our in-houseperformance and routing data. Cloudflare collects latency data for each requestto an origin, and uses the latency data to determine how well any upper-tierdata center is connected with an origin. As a result, Cloudflare can select thedata center with the lowest latency to be the upper-tier for an origin.

func (*SmartTieredCacheService)Get

Smart Tiered Cache dynamically selects the single closest upper tier for each ofyour website’s origins with no configuration required, using our in-houseperformance and routing data. Cloudflare collects latency data for each requestto an origin, and uses the latency data to determine how well any upper-tierdata center is connected with an origin. As a result, Cloudflare can select thedata center with the lowest latency to be the upper-tier for an origin.

typeSortDirection

type SortDirection =shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

typeState

type Statestring

The current state of the Cache Reserve Clear operation.

const (StateInProgressState = "In-progress"StateCompletedState = "Completed")

func (State)IsKnown

func (rState) IsKnown()bool

typeSubscription

type Subscription =shared.Subscription

This is an alias to an internal type.

typeSubscriptionFrequency

type SubscriptionFrequency =shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

typeSubscriptionParam

type SubscriptionParam =shared.SubscriptionParam

This is an alias to an internal type.

typeSubscriptionState

type SubscriptionState =shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

typeToken

type Token =shared.Token

This is an alias to an internal type.

typeTokenCondition

type TokenCondition =shared.TokenCondition

This is an alias to an internal type.

typeTokenConditionCIDRList

type TokenConditionCIDRList =shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

typeTokenConditionCIDRListParam

type TokenConditionCIDRListParam =shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

typeTokenConditionParam

type TokenConditionParam =shared.TokenConditionParam

This is an alias to an internal type.

typeTokenConditionRequestIP

type TokenConditionRequestIP =shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

typeTokenConditionRequestIPParam

type TokenConditionRequestIPParam =shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

typeTokenParam

type TokenParam =shared.TokenParam

This is an alias to an internal type.

typeTokenPolicy

type TokenPolicy =shared.TokenPolicy

This is an alias to an internal type.

typeTokenPolicyEffect

type TokenPolicyEffect =shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

typeTokenPolicyParam

type TokenPolicyParam =shared.TokenPolicyParam

This is an alias to an internal type.

typeTokenPolicyPermissionGroup

type TokenPolicyPermissionGroup =shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations againstresources.

This is an alias to an internal type.

typeTokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam =shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations againstresources.

This is an alias to an internal type.

typeTokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta =shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

typeTokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam =shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

typeTokenPolicyResourcesMapadded inv4.6.0

type TokenPolicyResourcesMap =shared.TokenPolicyResourcesMap

A nested permission grant for further scoping.

This is an alias to an internal type.

typeTokenPolicyResourcesMapParamadded inv4.6.0

type TokenPolicyResourcesMapParam =shared.TokenPolicyResourcesMapParam

A nested permission grant for further scoping.

This is an alias to an internal type.

typeTokenPolicyResourcesUnionadded inv4.6.0

type TokenPolicyResourcesUnion =shared.TokenPolicyResourcesUnion

A simple wildcard permission, e.g., "\*".

This is an alias to an internal type.

typeTokenPolicyResourcesUnionParamadded inv4.6.0

type TokenPolicyResourcesUnionParam =shared.TokenPolicyResourcesUnionParam

A simple wildcard permission, e.g., "\*".

This is an alias to an internal type.

typeTokenStatus

type TokenStatus =shared.TokenStatus

Status of the token.

This is an alias to an internal type.

typeTokenValue

type TokenValue =shared.TokenValue

The token value.

This is an alias to an internal type.

typeVariantDeleteParams

type VariantDeleteParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`}

typeVariantDeleteResponse

type VariantDeleteResponse struct {// ID of the zone setting.IDVariantDeleteResponseID `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// Last time this setting was modified.ModifiedOntime.Time                 `json:"modified_on,nullable" format:"date-time"`JSON       variantDeleteResponseJSON `json:"-"`}

func (*VariantDeleteResponse)UnmarshalJSON

func (r *VariantDeleteResponse) UnmarshalJSON(data []byte) (errerror)

typeVariantDeleteResponseEnvelope

type VariantDeleteResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessVariantDeleteResponseEnvelopeSuccess `json:"success,required"`ResultVariantDeleteResponse                `json:"result"`JSON    variantDeleteResponseEnvelopeJSON    `json:"-"`}

func (*VariantDeleteResponseEnvelope)UnmarshalJSON

func (r *VariantDeleteResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeVariantDeleteResponseEnvelopeSuccess

type VariantDeleteResponseEnvelopeSuccessbool

Whether the API call was successful

const (VariantDeleteResponseEnvelopeSuccessTrueVariantDeleteResponseEnvelopeSuccess =true)

func (VariantDeleteResponseEnvelopeSuccess)IsKnown

typeVariantDeleteResponseID

type VariantDeleteResponseIDstring

ID of the zone setting.

const (VariantDeleteResponseIDVariantsVariantDeleteResponseID = "variants")

func (VariantDeleteResponseID)IsKnown

func (rVariantDeleteResponseID) IsKnown()bool

typeVariantEditParams

type VariantEditParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`// Value of the zone setting.Valueparam.Field[VariantEditParamsValue] `json:"value,required"`}

func (VariantEditParams)MarshalJSON

func (rVariantEditParams) MarshalJSON() (data []byte, errerror)

typeVariantEditParamsValue

type VariantEditParamsValue struct {// List of strings with the MIME types of all the variants that should be served// for avif.AVIFparam.Field[[]string] `json:"avif"`// List of strings with the MIME types of all the variants that should be served// for bmp.BMPparam.Field[[]string] `json:"bmp"`// List of strings with the MIME types of all the variants that should be served// for gif.GIFparam.Field[[]string] `json:"gif"`// List of strings with the MIME types of all the variants that should be served// for jp2.JP2param.Field[[]string] `json:"jp2"`// List of strings with the MIME types of all the variants that should be served// for jpeg.JPEGparam.Field[[]string] `json:"jpeg"`// List of strings with the MIME types of all the variants that should be served// for jpg.JPGparam.Field[[]string] `json:"jpg"`// List of strings with the MIME types of all the variants that should be served// for jpg2.JPG2param.Field[[]string] `json:"jpg2"`// List of strings with the MIME types of all the variants that should be served// for png.PNGparam.Field[[]string] `json:"png"`// List of strings with the MIME types of all the variants that should be served// for tif.TIFparam.Field[[]string] `json:"tif"`// List of strings with the MIME types of all the variants that should be served// for tiff.TIFFparam.Field[[]string] `json:"tiff"`// List of strings with the MIME types of all the variants that should be served// for webp.WebPparam.Field[[]string] `json:"webp"`}

Value of the zone setting.

func (VariantEditParamsValue)MarshalJSON

func (rVariantEditParamsValue) MarshalJSON() (data []byte, errerror)

typeVariantEditResponse

type VariantEditResponse struct {// ID of the zone setting.IDVariantEditResponseID `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// The value of the featureValuestring `json:"value,required"`// Last time this setting was modified.ModifiedOntime.Time               `json:"modified_on,nullable" format:"date-time"`JSON       variantEditResponseJSON `json:"-"`}

func (*VariantEditResponse)UnmarshalJSON

func (r *VariantEditResponse) UnmarshalJSON(data []byte) (errerror)

typeVariantEditResponseEnvelope

type VariantEditResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessVariantEditResponseEnvelopeSuccess `json:"success,required"`ResultVariantEditResponse                `json:"result"`JSON    variantEditResponseEnvelopeJSON    `json:"-"`}

func (*VariantEditResponseEnvelope)UnmarshalJSON

func (r *VariantEditResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeVariantEditResponseEnvelopeSuccess

type VariantEditResponseEnvelopeSuccessbool

Whether the API call was successful

const (VariantEditResponseEnvelopeSuccessTrueVariantEditResponseEnvelopeSuccess =true)

func (VariantEditResponseEnvelopeSuccess)IsKnown

typeVariantEditResponseID

type VariantEditResponseIDstring

ID of the zone setting.

const (VariantEditResponseIDVariantsVariantEditResponseID = "variants")

func (VariantEditResponseID)IsKnown

func (rVariantEditResponseID) IsKnown()bool

typeVariantGetParams

type VariantGetParams struct {// IdentifierZoneIDparam.Field[string] `path:"zone_id,required"`}

typeVariantGetResponse

type VariantGetResponse struct {// ID of the zone setting.IDVariantGetResponseID `json:"id,required"`// Whether the setting is editableEditablebool `json:"editable,required"`// The value of the featureValuestring `json:"value,required"`// Last time this setting was modified.ModifiedOntime.Time              `json:"modified_on,nullable" format:"date-time"`JSON       variantGetResponseJSON `json:"-"`}

func (*VariantGetResponse)UnmarshalJSON

func (r *VariantGetResponse) UnmarshalJSON(data []byte) (errerror)

typeVariantGetResponseEnvelope

type VariantGetResponseEnvelope struct {Errors   []shared.ResponseInfo `json:"errors,required"`Messages []shared.ResponseInfo `json:"messages,required"`// Whether the API call was successfulSuccessVariantGetResponseEnvelopeSuccess `json:"success,required"`ResultVariantGetResponse                `json:"result"`JSON    variantGetResponseEnvelopeJSON    `json:"-"`}

func (*VariantGetResponseEnvelope)UnmarshalJSON

func (r *VariantGetResponseEnvelope) UnmarshalJSON(data []byte) (errerror)

typeVariantGetResponseEnvelopeSuccess

type VariantGetResponseEnvelopeSuccessbool

Whether the API call was successful

const (VariantGetResponseEnvelopeSuccessTrueVariantGetResponseEnvelopeSuccess =true)

func (VariantGetResponseEnvelopeSuccess)IsKnown

typeVariantGetResponseID

type VariantGetResponseIDstring

ID of the zone setting.

const (VariantGetResponseIDVariantsVariantGetResponseID = "variants")

func (VariantGetResponseID)IsKnown

func (rVariantGetResponseID) IsKnown()bool

typeVariantService

type VariantService struct {Options []option.RequestOption}

VariantService contains methods and other services that help with interactingwith the cloudflare API.

Note, unlike clients, this service does not read variables from the environmentautomatically. You should not instantiate this service directly, and instead usetheNewVariantService method instead.

funcNewVariantService

func NewVariantService(opts ...option.RequestOption) (r *VariantService)

NewVariantService generates a new service that applies the given options to eachrequest. These options are applied after the parent client's options (if thereis one), and before any request-specific options.

func (*VariantService)Delete

Variant support enables caching variants of images with certain file extensionsin addition to the original. This only applies when the origin server sends the'Vary: Accept' response header. If the origin server sends 'Vary: Accept' butdoes not serve the variant requested, the response will not be cached. This willbe indicated with BYPASS cache status in the response headers.

func (*VariantService)Edit

Variant support enables caching variants of images with certain file extensionsin addition to the original. This only applies when the origin server sends the'Vary: Accept' response header. If the origin server sends 'Vary: Accept' butdoes not serve the variant requested, the response will not be cached. This willbe indicated with BYPASS cache status in the response headers.

func (*VariantService)Get

Variant support enables caching variants of images with certain file extensionsin addition to the original. This only applies when the origin server sends the'Vary: Accept' response header. If the origin server sends 'Vary: Accept' butdoes not serve the variant requested, the response will not be cached. This willbe indicated with BYPASS cache status in the response headers.

Source Files

View all Source files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f orF : Jump to
y orY : Canonical URL
go.dev uses cookies from Google to deliver and enhance the quality of its services and to analyze traffic.Learn more.

[8]ページ先頭

©2009-2025 Movatter.jp