cache

package
v4.1.0 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2025 License: Apache-2.0 Imports: 11 Imported by: 1

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 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

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

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.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CachePurgeParams

type CachePurgeParams struct {
	ZoneID param.Field[string]       `path:"zone_id,required"`
	Body   CachePurgeParamsBodyUnion `json:"body,required"`
}

func (CachePurgeParams) MarshalJSON

func (r CachePurgeParams) MarshalJSON() (data []byte, err error)

type CachePurgeParamsBody

type CachePurgeParamsBody struct {
	Files    param.Field[interface{}] `json:"files"`
	Hosts    param.Field[interface{}] `json:"hosts"`
	Prefixes param.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/).
	PurgeEverything param.Field[bool]        `json:"purge_everything"`
	Tags            param.Field[interface{}] `json:"tags"`
}

func (CachePurgeParamsBody) MarshalJSON

func (r CachePurgeParamsBody) MarshalJSON() (data []byte, err error)

type CachePurgeParamsBodyCachePurgeEverything

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

func (CachePurgeParamsBodyCachePurgeEverything) MarshalJSON

func (r CachePurgeParamsBodyCachePurgeEverything) MarshalJSON() (data []byte, err error)

type CachePurgeParamsBodyCachePurgeFlexPurgeByHostnames

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/).
	Hosts param.Field[[]string] `json:"hosts"`
}

func (CachePurgeParamsBodyCachePurgeFlexPurgeByHostnames) MarshalJSON

func (r CachePurgeParamsBodyCachePurgeFlexPurgeByHostnames) MarshalJSON() (data []byte, err error)

type CachePurgeParamsBodyCachePurgeFlexPurgeByPrefixes

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/).
	Prefixes param.Field[[]string] `json:"prefixes"`
}

func (CachePurgeParamsBodyCachePurgeFlexPurgeByPrefixes) MarshalJSON

func (r CachePurgeParamsBodyCachePurgeFlexPurgeByPrefixes) MarshalJSON() (data []byte, err error)

type CachePurgeParamsBodyCachePurgeFlexPurgeByTags

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/#purge-cache-by-cache-tags-enterprise-only).
	Tags param.Field[[]string] `json:"tags"`
}

func (CachePurgeParamsBodyCachePurgeFlexPurgeByTags) MarshalJSON

func (r CachePurgeParamsBodyCachePurgeFlexPurgeByTags) MarshalJSON() (data []byte, err error)

type CachePurgeParamsBodyCachePurgeSingleFile

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/).
	Files param.Field[[]string] `json:"files"`
}

func (CachePurgeParamsBodyCachePurgeSingleFile) MarshalJSON

func (r CachePurgeParamsBodyCachePurgeSingleFile) MarshalJSON() (data []byte, err error)

type CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeaders

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/).
	Files param.Field[[]CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeadersFile] `json:"files"`
}

func (CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeaders) MarshalJSON

type CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeadersFile

type CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeadersFile struct {
	Headers param.Field[interface{}] `json:"headers"`
	URL     param.Field[string]      `json:"url"`
}

func (CachePurgeParamsBodyCachePurgeSingleFileWithURLAndHeadersFile) MarshalJSON

type CachePurgeResponse

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

func (*CachePurgeResponse) UnmarshalJSON

func (r *CachePurgeResponse) UnmarshalJSON(data []byte) (err error)

type CachePurgeResponseEnvelope

type CachePurgeResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success CachePurgeResponseEnvelopeSuccess `json:"success,required"`
	Result  CachePurgeResponse                `json:"result,nullable"`
	JSON    cachePurgeResponseEnvelopeJSON    `json:"-"`
}

func (*CachePurgeResponseEnvelope) UnmarshalJSON

func (r *CachePurgeResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type CachePurgeResponseEnvelopeSuccess

type CachePurgeResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CachePurgeResponseEnvelopeSuccessTrue CachePurgeResponseEnvelopeSuccess = true
)

func (CachePurgeResponseEnvelopeSuccess) IsKnown

type CacheReserve

type CacheReserve string

ID of the zone setting.

const (
	CacheReserveCacheReserve CacheReserve = "cache_reserve"
)

func (CacheReserve) IsKnown

func (r CacheReserve) IsKnown() bool

type CacheReserveClear

type CacheReserveClear string

ID of the zone setting.

const (
	CacheReserveClearCacheReserveClear CacheReserveClear = "cache_reserve_clear"
)

func (CacheReserveClear) IsKnown

func (r CacheReserveClear) IsKnown() bool

type CacheReserveClearParams

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

func (CacheReserveClearParams) MarshalJSON

func (r CacheReserveClearParams) MarshalJSON() (data []byte, err error)

type CacheReserveClearResponse

type CacheReserveClearResponse struct {
	// ID of the zone setting.
	ID CacheReserveClear `json:"id,required"`
	// The time that the latest Cache Reserve Clear operation started.
	StartTs time.Time `json:"start_ts,required" format:"date-time"`
	// The current state of the Cache Reserve Clear operation.
	State State `json:"state,required"`
	// The time that the latest Cache Reserve Clear operation completed.
	EndTs time.Time `json:"end_ts" format:"date-time"`
	// Last time this setting was modified.
	ModifiedOn time.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 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.

func (*CacheReserveClearResponse) UnmarshalJSON

func (r *CacheReserveClearResponse) UnmarshalJSON(data []byte) (err error)

type CacheReserveClearResponseEnvelope

type CacheReserveClearResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success CacheReserveClearResponseEnvelopeSuccess `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.
	Result CacheReserveClearResponse             `json:"result"`
	JSON   cacheReserveClearResponseEnvelopeJSON `json:"-"`
}

func (*CacheReserveClearResponseEnvelope) UnmarshalJSON

func (r *CacheReserveClearResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type CacheReserveClearResponseEnvelopeSuccess

type CacheReserveClearResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CacheReserveClearResponseEnvelopeSuccessTrue CacheReserveClearResponseEnvelopeSuccess = true
)

func (CacheReserveClearResponseEnvelopeSuccess) IsKnown

type CacheReserveEditParams

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

func (CacheReserveEditParams) MarshalJSON

func (r CacheReserveEditParams) MarshalJSON() (data []byte, err error)

type CacheReserveEditParamsValue

type CacheReserveEditParamsValue string

Value of the Cache Reserve zone setting.

const (
	CacheReserveEditParamsValueOn  CacheReserveEditParamsValue = "on"
	CacheReserveEditParamsValueOff CacheReserveEditParamsValue = "off"
)

func (CacheReserveEditParamsValue) IsKnown

func (r CacheReserveEditParamsValue) IsKnown() bool

type CacheReserveEditResponse

type CacheReserveEditResponse struct {
	// ID of the zone setting.
	ID CacheReserve `json:"id,required"`
	// Whether the setting is editable
	Editable bool `json:"editable,required"`
	// The value of the feature
	Value CacheReserveEditResponseValue `json:"value,required"`
	// Last time this setting was modified.
	ModifiedOn time.Time                    `json:"modified_on,nullable" format:"date-time"`
	JSON       cacheReserveEditResponseJSON `json:"-"`
}

func (*CacheReserveEditResponse) UnmarshalJSON

func (r *CacheReserveEditResponse) UnmarshalJSON(data []byte) (err error)

type CacheReserveEditResponseEnvelope

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

func (*CacheReserveEditResponseEnvelope) UnmarshalJSON

func (r *CacheReserveEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type CacheReserveEditResponseEnvelopeSuccess

type CacheReserveEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CacheReserveEditResponseEnvelopeSuccessTrue CacheReserveEditResponseEnvelopeSuccess = true
)

func (CacheReserveEditResponseEnvelopeSuccess) IsKnown

type CacheReserveEditResponseValue

type CacheReserveEditResponseValue string

The value of the feature

const (
	CacheReserveEditResponseValueOn  CacheReserveEditResponseValue = "on"
	CacheReserveEditResponseValueOff CacheReserveEditResponseValue = "off"
)

func (CacheReserveEditResponseValue) IsKnown

func (r CacheReserveEditResponseValue) IsKnown() bool

type CacheReserveGetParams

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

type CacheReserveGetResponse

type CacheReserveGetResponse struct {
	// ID of the zone setting.
	ID CacheReserve `json:"id,required"`
	// Whether the setting is editable
	Editable bool `json:"editable,required"`
	// The value of the feature
	Value CacheReserveGetResponseValue `json:"value,required"`
	// Last time this setting was modified.
	ModifiedOn time.Time                   `json:"modified_on,nullable" format:"date-time"`
	JSON       cacheReserveGetResponseJSON `json:"-"`
}

func (*CacheReserveGetResponse) UnmarshalJSON

func (r *CacheReserveGetResponse) UnmarshalJSON(data []byte) (err error)

type CacheReserveGetResponseEnvelope

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

func (*CacheReserveGetResponseEnvelope) UnmarshalJSON

func (r *CacheReserveGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type CacheReserveGetResponseEnvelopeSuccess

type CacheReserveGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CacheReserveGetResponseEnvelopeSuccessTrue CacheReserveGetResponseEnvelopeSuccess = true
)

func (CacheReserveGetResponseEnvelopeSuccess) IsKnown

type CacheReserveGetResponseValue

type CacheReserveGetResponseValue string

The value of the feature

const (
	CacheReserveGetResponseValueOn  CacheReserveGetResponseValue = "on"
	CacheReserveGetResponseValueOff CacheReserveGetResponseValue = "off"
)

func (CacheReserveGetResponseValue) IsKnown

func (r CacheReserveGetResponseValue) IsKnown() bool

type CacheReserveService

type CacheReserveService struct {
	Options []option.RequestOption
}

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

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCacheReserveService method instead.

func NewCacheReserveService

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

NewCacheReserveService generates a new service that applies the given options to each request. These options are applied after the parent client's options (if there 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 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.

func (*CacheReserveService) Edit

Increase cache lifetimes by automatically storing all cacheable files into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to 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 into Cloudflare's persistent object storage buckets. Requires Cache Reserve subscription. Note: using Tiered Cache with Cache Reserve is highly recommended to 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 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.

type CacheReserveStatusParams

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

type CacheReserveStatusResponse

type CacheReserveStatusResponse struct {
	// ID of the zone setting.
	ID CacheReserveClear `json:"id,required"`
	// The time that the latest Cache Reserve Clear operation started.
	StartTs time.Time `json:"start_ts,required" format:"date-time"`
	// The current state of the Cache Reserve Clear operation.
	State State `json:"state,required"`
	// The time that the latest Cache Reserve Clear operation completed.
	EndTs time.Time `json:"end_ts" format:"date-time"`
	// Last time this setting was modified.
	ModifiedOn time.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 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.

func (*CacheReserveStatusResponse) UnmarshalJSON

func (r *CacheReserveStatusResponse) UnmarshalJSON(data []byte) (err error)

type CacheReserveStatusResponseEnvelope

type CacheReserveStatusResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success CacheReserveStatusResponseEnvelopeSuccess `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.
	Result CacheReserveStatusResponse             `json:"result"`
	JSON   cacheReserveStatusResponseEnvelopeJSON `json:"-"`
}

func (*CacheReserveStatusResponseEnvelope) UnmarshalJSON

func (r *CacheReserveStatusResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type CacheReserveStatusResponseEnvelopeSuccess

type CacheReserveStatusResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	CacheReserveStatusResponseEnvelopeSuccessTrue CacheReserveStatusResponseEnvelopeSuccess = true
)

func (CacheReserveStatusResponseEnvelopeSuccess) IsKnown

type CacheService

type CacheService struct {
	Options             []option.RequestOption
	CacheReserve        *CacheReserveService
	SmartTieredCache    *SmartTieredCacheService
	Variants            *VariantService
	RegionalTieredCache *RegionalTieredCacheService
}

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

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewCacheService method instead.

func NewCacheService

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

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

func (*CacheService) Purge

func (r *CacheService) Purge(ctx context.Context, params CachePurgeParams, opts ...option.RequestOption) (res *CachePurgeResponse, err error)

### 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 the cache 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 have lang 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 for http, 443 for https), but must be included otherwise.

**NB:** For Zones on Free/Pro/Business plan, you may purge up to 30 URLs in one API call. For Zones on Enterprise plan, you may purge up to 500 URLs in one API call.

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 by specifying the host, the associated Cache-Tag, or a Prefix. Only Enterprise customers are permitted to purge by Tag, Host or Prefix.

**NB:** Cache-Tag, host, and prefix purging each have a rate limit of 30,000 purge API calls in every 24 hour period. You may purge up to 30 tags, hosts, or prefixes in one API call. This rate limit can be raised for customers who need to purge at higher volume.

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"]} ```

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

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.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

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

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `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.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type Member

type Member = shared.Member

This is an alias to an internal type.

type MemberPoliciesAccess

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

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

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

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

This is an alias to an internal type.

type MemberPolicy

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanID added in v4.1.0

type RatePlanID = shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type RegionalTieredCache

type RegionalTieredCache string

ID of the zone setting.

const (
	RegionalTieredCacheTcRegional RegionalTieredCache = "tc_regional"
)

func (RegionalTieredCache) IsKnown

func (r RegionalTieredCache) IsKnown() bool

type RegionalTieredCacheEditParams

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

func (RegionalTieredCacheEditParams) MarshalJSON

func (r RegionalTieredCacheEditParams) MarshalJSON() (data []byte, err error)

type RegionalTieredCacheEditParamsValue

type RegionalTieredCacheEditParamsValue string

Value of the Regional Tiered Cache zone setting.

const (
	RegionalTieredCacheEditParamsValueOn  RegionalTieredCacheEditParamsValue = "on"
	RegionalTieredCacheEditParamsValueOff RegionalTieredCacheEditParamsValue = "off"
)

func (RegionalTieredCacheEditParamsValue) IsKnown

type RegionalTieredCacheEditResponse

type RegionalTieredCacheEditResponse struct {
	// ID of the zone setting.
	ID RegionalTieredCache `json:"id,required"`
	// Whether the setting is editable
	Editable bool `json:"editable,required"`
	// The value of the feature
	Value RegionalTieredCacheEditResponseValue `json:"value,required"`
	// Last time this setting was modified.
	ModifiedOn time.Time                           `json:"modified_on,nullable" format:"date-time"`
	JSON       regionalTieredCacheEditResponseJSON `json:"-"`
}

func (*RegionalTieredCacheEditResponse) UnmarshalJSON

func (r *RegionalTieredCacheEditResponse) UnmarshalJSON(data []byte) (err error)

type RegionalTieredCacheEditResponseEnvelope

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

func (*RegionalTieredCacheEditResponseEnvelope) UnmarshalJSON

func (r *RegionalTieredCacheEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RegionalTieredCacheEditResponseEnvelopeSuccess

type RegionalTieredCacheEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RegionalTieredCacheEditResponseEnvelopeSuccessTrue RegionalTieredCacheEditResponseEnvelopeSuccess = true
)

func (RegionalTieredCacheEditResponseEnvelopeSuccess) IsKnown

type RegionalTieredCacheEditResponseValue

type RegionalTieredCacheEditResponseValue string

The value of the feature

const (
	RegionalTieredCacheEditResponseValueOn  RegionalTieredCacheEditResponseValue = "on"
	RegionalTieredCacheEditResponseValueOff RegionalTieredCacheEditResponseValue = "off"
)

func (RegionalTieredCacheEditResponseValue) IsKnown

type RegionalTieredCacheGetParams

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

type RegionalTieredCacheGetResponse

type RegionalTieredCacheGetResponse struct {
	// ID of the zone setting.
	ID RegionalTieredCache `json:"id,required"`
	// Whether the setting is editable
	Editable bool `json:"editable,required"`
	// The value of the feature
	Value RegionalTieredCacheGetResponseValue `json:"value,required"`
	// Last time this setting was modified.
	ModifiedOn time.Time                          `json:"modified_on,nullable" format:"date-time"`
	JSON       regionalTieredCacheGetResponseJSON `json:"-"`
}

func (*RegionalTieredCacheGetResponse) UnmarshalJSON

func (r *RegionalTieredCacheGetResponse) UnmarshalJSON(data []byte) (err error)

type RegionalTieredCacheGetResponseEnvelope

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

func (*RegionalTieredCacheGetResponseEnvelope) UnmarshalJSON

func (r *RegionalTieredCacheGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type RegionalTieredCacheGetResponseEnvelopeSuccess

type RegionalTieredCacheGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	RegionalTieredCacheGetResponseEnvelopeSuccessTrue RegionalTieredCacheGetResponseEnvelopeSuccess = true
)

func (RegionalTieredCacheGetResponseEnvelopeSuccess) IsKnown

type RegionalTieredCacheGetResponseValue

type RegionalTieredCacheGetResponseValue string

The value of the feature

const (
	RegionalTieredCacheGetResponseValueOn  RegionalTieredCacheGetResponseValue = "on"
	RegionalTieredCacheGetResponseValueOff RegionalTieredCacheGetResponseValue = "off"
)

func (RegionalTieredCacheGetResponseValue) IsKnown

type RegionalTieredCacheService

type RegionalTieredCacheService struct {
	Options []option.RequestOption
}

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

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewRegionalTieredCacheService method instead.

func NewRegionalTieredCacheService

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

NewRegionalTieredCacheService generates a new service that applies the given options to each request. These options are applied after the parent client's options (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 your upper tier. This can help improve performance for smart and custom tiered cache topologies.

func (*RegionalTieredCacheService) Get

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

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type SmartTieredCacheDeleteParams

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

type SmartTieredCacheDeleteResponse

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

func (*SmartTieredCacheDeleteResponse) UnmarshalJSON

func (r *SmartTieredCacheDeleteResponse) UnmarshalJSON(data []byte) (err error)

type SmartTieredCacheDeleteResponseEnvelope

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

func (*SmartTieredCacheDeleteResponseEnvelope) UnmarshalJSON

func (r *SmartTieredCacheDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type SmartTieredCacheDeleteResponseEnvelopeSuccess

type SmartTieredCacheDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SmartTieredCacheDeleteResponseEnvelopeSuccessTrue SmartTieredCacheDeleteResponseEnvelopeSuccess = true
)

func (SmartTieredCacheDeleteResponseEnvelopeSuccess) IsKnown

type SmartTieredCacheDeleteResponseID

type SmartTieredCacheDeleteResponseID string

ID of the zone setting.

const (
	SmartTieredCacheDeleteResponseIDTieredCacheSmartTopologyEnable SmartTieredCacheDeleteResponseID = "tiered_cache_smart_topology_enable"
)

func (SmartTieredCacheDeleteResponseID) IsKnown

type SmartTieredCacheEditParams

type SmartTieredCacheEditParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Enable or disable the Smart Tiered Cache
	Value param.Field[SmartTieredCacheEditParamsValue] `json:"value,required"`
}

func (SmartTieredCacheEditParams) MarshalJSON

func (r SmartTieredCacheEditParams) MarshalJSON() (data []byte, err error)

type SmartTieredCacheEditParamsValue

type SmartTieredCacheEditParamsValue string

Enable or disable the Smart Tiered Cache

const (
	SmartTieredCacheEditParamsValueOn  SmartTieredCacheEditParamsValue = "on"
	SmartTieredCacheEditParamsValueOff SmartTieredCacheEditParamsValue = "off"
)

func (SmartTieredCacheEditParamsValue) IsKnown

type SmartTieredCacheEditResponse

type SmartTieredCacheEditResponse struct {
	// ID of the zone setting.
	ID SmartTieredCacheEditResponseID `json:"id,required"`
	// Whether the setting is editable
	Editable bool `json:"editable,required"`
	// The value of the feature
	Value SmartTieredCacheEditResponseValue `json:"value,required"`
	// Last time this setting was modified.
	ModifiedOn time.Time                        `json:"modified_on,nullable" format:"date-time"`
	JSON       smartTieredCacheEditResponseJSON `json:"-"`
}

func (*SmartTieredCacheEditResponse) UnmarshalJSON

func (r *SmartTieredCacheEditResponse) UnmarshalJSON(data []byte) (err error)

type SmartTieredCacheEditResponseEnvelope

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

func (*SmartTieredCacheEditResponseEnvelope) UnmarshalJSON

func (r *SmartTieredCacheEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type SmartTieredCacheEditResponseEnvelopeSuccess

type SmartTieredCacheEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SmartTieredCacheEditResponseEnvelopeSuccessTrue SmartTieredCacheEditResponseEnvelopeSuccess = true
)

func (SmartTieredCacheEditResponseEnvelopeSuccess) IsKnown

type SmartTieredCacheEditResponseID

type SmartTieredCacheEditResponseID string

ID of the zone setting.

const (
	SmartTieredCacheEditResponseIDTieredCacheSmartTopologyEnable SmartTieredCacheEditResponseID = "tiered_cache_smart_topology_enable"
)

func (SmartTieredCacheEditResponseID) IsKnown

type SmartTieredCacheEditResponseValue

type SmartTieredCacheEditResponseValue string

The value of the feature

const (
	SmartTieredCacheEditResponseValueOn  SmartTieredCacheEditResponseValue = "on"
	SmartTieredCacheEditResponseValueOff SmartTieredCacheEditResponseValue = "off"
)

func (SmartTieredCacheEditResponseValue) IsKnown

type SmartTieredCacheGetParams

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

type SmartTieredCacheGetResponse

type SmartTieredCacheGetResponse struct {
	// ID of the zone setting.
	ID SmartTieredCacheGetResponseID `json:"id,required"`
	// Whether the setting is editable
	Editable bool `json:"editable,required"`
	// The value of the feature
	Value SmartTieredCacheGetResponseValue `json:"value,required"`
	// Last time this setting was modified.
	ModifiedOn time.Time                       `json:"modified_on,nullable" format:"date-time"`
	JSON       smartTieredCacheGetResponseJSON `json:"-"`
}

func (*SmartTieredCacheGetResponse) UnmarshalJSON

func (r *SmartTieredCacheGetResponse) UnmarshalJSON(data []byte) (err error)

type SmartTieredCacheGetResponseEnvelope

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

func (*SmartTieredCacheGetResponseEnvelope) UnmarshalJSON

func (r *SmartTieredCacheGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type SmartTieredCacheGetResponseEnvelopeSuccess

type SmartTieredCacheGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SmartTieredCacheGetResponseEnvelopeSuccessTrue SmartTieredCacheGetResponseEnvelopeSuccess = true
)

func (SmartTieredCacheGetResponseEnvelopeSuccess) IsKnown

type SmartTieredCacheGetResponseID

type SmartTieredCacheGetResponseID string

ID of the zone setting.

const (
	SmartTieredCacheGetResponseIDTieredCacheSmartTopologyEnable SmartTieredCacheGetResponseID = "tiered_cache_smart_topology_enable"
)

func (SmartTieredCacheGetResponseID) IsKnown

func (r SmartTieredCacheGetResponseID) IsKnown() bool

type SmartTieredCacheGetResponseValue

type SmartTieredCacheGetResponseValue string

The value of the feature

const (
	SmartTieredCacheGetResponseValueOn  SmartTieredCacheGetResponseValue = "on"
	SmartTieredCacheGetResponseValueOff SmartTieredCacheGetResponseValue = "off"
)

func (SmartTieredCacheGetResponseValue) IsKnown

type SmartTieredCacheService

type SmartTieredCacheService struct {
	Options []option.RequestOption
}

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

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewSmartTieredCacheService method instead.

func NewSmartTieredCacheService

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

NewSmartTieredCacheService generates a new service that applies the given options to each request. These options are applied after the parent client's options (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 of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data 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 of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data 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 of your website’s origins with no configuration required, using our in-house performance and routing data. Cloudflare collects latency data for each request to an origin, and uses the latency data to determine how well any upper-tier data center is connected with an origin. As a result, Cloudflare can select the data center with the lowest latency to be the upper-tier for an origin.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type State

type State string

The current state of the Cache Reserve Clear operation.

const (
	StateInProgress State = "In-progress"
	StateCompleted  State = "Completed"
)

func (State) IsKnown

func (r State) IsKnown() bool

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

type VariantDeleteParams

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

type VariantDeleteResponse

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

func (*VariantDeleteResponse) UnmarshalJSON

func (r *VariantDeleteResponse) UnmarshalJSON(data []byte) (err error)

type VariantDeleteResponseEnvelope

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

func (*VariantDeleteResponseEnvelope) UnmarshalJSON

func (r *VariantDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type VariantDeleteResponseEnvelopeSuccess

type VariantDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	VariantDeleteResponseEnvelopeSuccessTrue VariantDeleteResponseEnvelopeSuccess = true
)

func (VariantDeleteResponseEnvelopeSuccess) IsKnown

type VariantDeleteResponseID

type VariantDeleteResponseID string

ID of the zone setting.

const (
	VariantDeleteResponseIDVariants VariantDeleteResponseID = "variants"
)

func (VariantDeleteResponseID) IsKnown

func (r VariantDeleteResponseID) IsKnown() bool

type VariantEditParams

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

func (VariantEditParams) MarshalJSON

func (r VariantEditParams) MarshalJSON() (data []byte, err error)

type VariantEditParamsValue

type VariantEditParamsValue struct {
	// List of strings with the MIME types of all the variants that should be served
	// for avif.
	AVIF param.Field[[]string] `json:"avif"`
	// List of strings with the MIME types of all the variants that should be served
	// for bmp.
	BMP param.Field[[]string] `json:"bmp"`
	// List of strings with the MIME types of all the variants that should be served
	// for gif.
	GIF param.Field[[]string] `json:"gif"`
	// List of strings with the MIME types of all the variants that should be served
	// for jp2.
	JP2 param.Field[[]string] `json:"jp2"`
	// List of strings with the MIME types of all the variants that should be served
	// for jpeg.
	JPEG param.Field[[]string] `json:"jpeg"`
	// List of strings with the MIME types of all the variants that should be served
	// for jpg.
	JPG param.Field[[]string] `json:"jpg"`
	// List of strings with the MIME types of all the variants that should be served
	// for jpg2.
	JPG2 param.Field[[]string] `json:"jpg2"`
	// List of strings with the MIME types of all the variants that should be served
	// for png.
	PNG param.Field[[]string] `json:"png"`
	// List of strings with the MIME types of all the variants that should be served
	// for tif.
	TIF param.Field[[]string] `json:"tif"`
	// List of strings with the MIME types of all the variants that should be served
	// for tiff.
	TIFF param.Field[[]string] `json:"tiff"`
	// List of strings with the MIME types of all the variants that should be served
	// for webp.
	WebP param.Field[[]string] `json:"webp"`
}

Value of the zone setting.

func (VariantEditParamsValue) MarshalJSON

func (r VariantEditParamsValue) MarshalJSON() (data []byte, err error)

type VariantEditResponse

type VariantEditResponse struct {
	// ID of the zone setting.
	ID VariantEditResponseID `json:"id,required"`
	// Whether the setting is editable
	Editable bool `json:"editable,required"`
	// The value of the feature
	Value string `json:"value,required"`
	// Last time this setting was modified.
	ModifiedOn time.Time               `json:"modified_on,nullable" format:"date-time"`
	JSON       variantEditResponseJSON `json:"-"`
}

func (*VariantEditResponse) UnmarshalJSON

func (r *VariantEditResponse) UnmarshalJSON(data []byte) (err error)

type VariantEditResponseEnvelope

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

func (*VariantEditResponseEnvelope) UnmarshalJSON

func (r *VariantEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type VariantEditResponseEnvelopeSuccess

type VariantEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	VariantEditResponseEnvelopeSuccessTrue VariantEditResponseEnvelopeSuccess = true
)

func (VariantEditResponseEnvelopeSuccess) IsKnown

type VariantEditResponseID

type VariantEditResponseID string

ID of the zone setting.

const (
	VariantEditResponseIDVariants VariantEditResponseID = "variants"
)

func (VariantEditResponseID) IsKnown

func (r VariantEditResponseID) IsKnown() bool

type VariantGetParams

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

type VariantGetResponse

type VariantGetResponse struct {
	// ID of the zone setting.
	ID VariantGetResponseID `json:"id,required"`
	// Whether the setting is editable
	Editable bool `json:"editable,required"`
	// The value of the feature
	Value string `json:"value,required"`
	// Last time this setting was modified.
	ModifiedOn time.Time              `json:"modified_on,nullable" format:"date-time"`
	JSON       variantGetResponseJSON `json:"-"`
}

func (*VariantGetResponse) UnmarshalJSON

func (r *VariantGetResponse) UnmarshalJSON(data []byte) (err error)

type VariantGetResponseEnvelope

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

func (*VariantGetResponseEnvelope) UnmarshalJSON

func (r *VariantGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)

type VariantGetResponseEnvelopeSuccess

type VariantGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	VariantGetResponseEnvelopeSuccessTrue VariantGetResponseEnvelopeSuccess = true
)

func (VariantGetResponseEnvelopeSuccess) IsKnown

type VariantGetResponseID

type VariantGetResponseID string

ID of the zone setting.

const (
	VariantGetResponseIDVariants VariantGetResponseID = "variants"
)

func (VariantGetResponseID) IsKnown

func (r VariantGetResponseID) IsKnown() bool

type VariantService

type VariantService struct {
	Options []option.RequestOption
}

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

Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewVariantService method instead.

func NewVariantService

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

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

func (*VariantService) Delete

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

func (*VariantService) Edit

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

func (*VariantService) Get

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL