Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CachePurgeParams
- type CachePurgeParamsBody
- type CachePurgeParamsBodyCachePurgeEverything
- type CachePurgeParamsBodyCachePurgeFiles
- type CachePurgeParamsBodyCachePurgeFilesFile
- type CachePurgeParamsBodyCachePurgeFilesFileUnion
- type CachePurgeParamsBodyCachePurgeFilesFilesCachePurgeURLAndHeaders
- type CachePurgeParamsBodyCachePurgeHosts
- type CachePurgeParamsBodyCachePurgePrefixes
- type CachePurgeParamsBodyCachePurgeTags
- type CachePurgeParamsBodyUnion
- type CachePurgeResponse
- type CachePurgeResponseEnvelope
- type CachePurgeResponseEnvelopeSuccess
- type CacheReserve
- type CacheReserveClear
- type CacheReserveClearParams
- type CacheReserveClearResponse
- type CacheReserveClearResponseEnvelope
- type CacheReserveClearResponseEnvelopeSuccess
- type CacheReserveClearResponseState
- type CacheReserveEditParams
- type CacheReserveEditParamsValue
- type CacheReserveEditResponse
- type CacheReserveEditResponseEnvelope
- type CacheReserveEditResponseEnvelopeSuccess
- type CacheReserveEditResponseValue
- type CacheReserveGetParams
- type CacheReserveGetResponse
- type CacheReserveGetResponseEnvelope
- type CacheReserveGetResponseEnvelopeSuccess
- type CacheReserveGetResponseValue
- type CacheReserveService
- func (r *CacheReserveService) Clear(ctx context.Context, params CacheReserveClearParams, ...) (res *CacheReserveClearResponse, err error)
- func (r *CacheReserveService) Edit(ctx context.Context, params CacheReserveEditParams, ...) (res *CacheReserveEditResponse, err error)
- func (r *CacheReserveService) Get(ctx context.Context, query CacheReserveGetParams, opts ...option.RequestOption) (res *CacheReserveGetResponse, err error)
- func (r *CacheReserveService) Status(ctx context.Context, query CacheReserveStatusParams, ...) (res *CacheReserveStatusResponse, err error)
- type CacheReserveStatusParams
- type CacheReserveStatusResponse
- type CacheReserveStatusResponseEnvelope
- type CacheReserveStatusResponseEnvelopeSuccess
- type CacheReserveStatusResponseState
- type CacheService
- type CacheVariant
- type CacheVariantIdentifier
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type Member
- type MemberParam
- type MemberRole
- type MemberRoleParam
- type MemberRolesPermissions
- type MemberRolesPermissionsParam
- type MemberUser
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RegionalTieredCache
- type RegionalTieredCacheEditParams
- type RegionalTieredCacheEditParamsValue
- type RegionalTieredCacheEditResponse
- type RegionalTieredCacheEditResponseEnvelope
- type RegionalTieredCacheEditResponseEnvelopeSuccess
- type RegionalTieredCacheEditResponseValue
- type RegionalTieredCacheGetParams
- type RegionalTieredCacheGetResponse
- type RegionalTieredCacheGetResponseEnvelope
- type RegionalTieredCacheGetResponseEnvelopeSuccess
- type RegionalTieredCacheGetResponseValue
- type RegionalTieredCacheService
- func (r *RegionalTieredCacheService) Edit(ctx context.Context, params RegionalTieredCacheEditParams, ...) (res *RegionalTieredCacheEditResponse, err error)
- func (r *RegionalTieredCacheService) Get(ctx context.Context, query RegionalTieredCacheGetParams, ...) (res *RegionalTieredCacheGetResponse, err error)
- type ResponseInfo
- type Role
- type SmartTieredCacheDeleteParams
- type SmartTieredCacheDeleteResponseEnvelope
- type SmartTieredCacheDeleteResponseEnvelopeSuccess
- type SmartTieredCacheDeleteResponseUnion
- type SmartTieredCacheEditParams
- type SmartTieredCacheEditParamsValue
- type SmartTieredCacheEditResponseEnvelope
- type SmartTieredCacheEditResponseEnvelopeSuccess
- type SmartTieredCacheEditResponseUnion
- type SmartTieredCacheGetParams
- type SmartTieredCacheGetResponseEnvelope
- type SmartTieredCacheGetResponseEnvelopeSuccess
- type SmartTieredCacheGetResponseUnion
- type SmartTieredCacheService
- func (r *SmartTieredCacheService) Delete(ctx context.Context, params SmartTieredCacheDeleteParams, ...) (res *SmartTieredCacheDeleteResponseUnion, err error)
- func (r *SmartTieredCacheService) Edit(ctx context.Context, params SmartTieredCacheEditParams, ...) (res *SmartTieredCacheEditResponseUnion, err error)
- func (r *SmartTieredCacheService) Get(ctx context.Context, query SmartTieredCacheGetParams, ...) (res *SmartTieredCacheGetResponseUnion, err error)
- type VariantDeleteParams
- type VariantDeleteResponseEnvelope
- type VariantDeleteResponseEnvelopeSuccess
- type VariantEditParams
- type VariantEditParamsValue
- type VariantEditResponse
- type VariantEditResponseEnvelope
- type VariantEditResponseEnvelopeSuccess
- type VariantEditResponseValue
- type VariantGetParams
- type VariantGetResponse
- type VariantGetResponseEnvelope
- type VariantGetResponseEnvelopeSuccess
- type VariantGetResponseValue
- type VariantService
- func (r *VariantService) Delete(ctx context.Context, params VariantDeleteParams, opts ...option.RequestOption) (res *CacheVariant, err error)
- func (r *VariantService) Edit(ctx context.Context, params VariantEditParams, opts ...option.RequestOption) (res *VariantEditResponse, err error)
- func (r *VariantService) Get(ctx context.Context, query VariantGetParams, opts ...option.RequestOption) (res *VariantGetResponse, err error)
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
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 { Tags param.Field[interface{}] `json:"tags,required"` Hosts param.Field[interface{}] `json:"hosts,required"` Prefixes param.Field[interface{}] `json:"prefixes,required"` PurgeEverything param.Field[bool] `json:"purge_everything"` Files param.Field[interface{}] `json:"files,required"` }
func (CachePurgeParamsBody) MarshalJSON ¶
func (r CachePurgeParamsBody) MarshalJSON() (data []byte, err error)
type CachePurgeParamsBodyCachePurgeEverything ¶
type CachePurgeParamsBodyCachePurgeEverything struct {
PurgeEverything param.Field[bool] `json:"purge_everything"`
}
func (CachePurgeParamsBodyCachePurgeEverything) MarshalJSON ¶
func (r CachePurgeParamsBodyCachePurgeEverything) MarshalJSON() (data []byte, err error)
type CachePurgeParamsBodyCachePurgeFiles ¶
type CachePurgeParamsBodyCachePurgeFiles struct {
Files param.Field[[]CachePurgeParamsBodyCachePurgeFilesFileUnion] `json:"files"`
}
func (CachePurgeParamsBodyCachePurgeFiles) MarshalJSON ¶
func (r CachePurgeParamsBodyCachePurgeFiles) MarshalJSON() (data []byte, err error)
type CachePurgeParamsBodyCachePurgeFilesFile ¶
type CachePurgeParamsBodyCachePurgeFilesFile struct { Headers param.Field[interface{}] `json:"headers,required"` URL param.Field[string] `json:"url"` }
func (CachePurgeParamsBodyCachePurgeFilesFile) ImplementsCacheCachePurgeParamsBodyCachePurgeFilesFileUnion ¶
func (r CachePurgeParamsBodyCachePurgeFilesFile) ImplementsCacheCachePurgeParamsBodyCachePurgeFilesFileUnion()
func (CachePurgeParamsBodyCachePurgeFilesFile) MarshalJSON ¶
func (r CachePurgeParamsBodyCachePurgeFilesFile) MarshalJSON() (data []byte, err error)
type CachePurgeParamsBodyCachePurgeFilesFileUnion ¶
type CachePurgeParamsBodyCachePurgeFilesFileUnion interface {
ImplementsCacheCachePurgeParamsBodyCachePurgeFilesFileUnion()
}
Satisfied by shared.UnionString, cache.CachePurgeParamsBodyCachePurgeFilesFilesCachePurgeURLAndHeaders, CachePurgeParamsBodyCachePurgeFilesFile.
type CachePurgeParamsBodyCachePurgeFilesFilesCachePurgeURLAndHeaders ¶
type CachePurgeParamsBodyCachePurgeFilesFilesCachePurgeURLAndHeaders struct { Headers param.Field[interface{}] `json:"headers"` URL param.Field[string] `json:"url"` }
func (CachePurgeParamsBodyCachePurgeFilesFilesCachePurgeURLAndHeaders) ImplementsCacheCachePurgeParamsBodyCachePurgeFilesFileUnion ¶
func (r CachePurgeParamsBodyCachePurgeFilesFilesCachePurgeURLAndHeaders) ImplementsCacheCachePurgeParamsBodyCachePurgeFilesFileUnion()
func (CachePurgeParamsBodyCachePurgeFilesFilesCachePurgeURLAndHeaders) MarshalJSON ¶
func (r CachePurgeParamsBodyCachePurgeFilesFilesCachePurgeURLAndHeaders) MarshalJSON() (data []byte, err error)
type CachePurgeParamsBodyCachePurgeHosts ¶
func (CachePurgeParamsBodyCachePurgeHosts) MarshalJSON ¶
func (r CachePurgeParamsBodyCachePurgeHosts) MarshalJSON() (data []byte, err error)
type CachePurgeParamsBodyCachePurgePrefixes ¶
type CachePurgeParamsBodyCachePurgePrefixes struct {
Prefixes param.Field[[]string] `json:"prefixes"`
}
func (CachePurgeParamsBodyCachePurgePrefixes) MarshalJSON ¶
func (r CachePurgeParamsBodyCachePurgePrefixes) MarshalJSON() (data []byte, err error)
type CachePurgeParamsBodyCachePurgeTags ¶
func (CachePurgeParamsBodyCachePurgeTags) MarshalJSON ¶
func (r CachePurgeParamsBodyCachePurgeTags) MarshalJSON() (data []byte, err error)
type CachePurgeParamsBodyUnion ¶
type CachePurgeParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by cache.CachePurgeParamsBodyCachePurgeTags, cache.CachePurgeParamsBodyCachePurgeHosts, cache.CachePurgeParamsBodyCachePurgePrefixes, cache.CachePurgeParamsBodyCachePurgeEverything, cache.CachePurgeParamsBodyCachePurgeFiles, CachePurgeParamsBody.
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 ¶
func (r CachePurgeResponseEnvelopeSuccess) IsKnown() bool
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"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` // 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 CacheReserveClearResponseState `json:"state,required"` // The time that the latest Cache Reserve Clear operation completed. EndTs time.Time `json:"end_ts" 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"` // 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,required"` // Whether the API call was successful Success CacheReserveClearResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r CacheReserveClearResponseEnvelopeSuccess) IsKnown() bool
type CacheReserveClearResponseState ¶
type CacheReserveClearResponseState string
The current state of the Cache Reserve Clear operation.
const ( CacheReserveClearResponseStateInProgress CacheReserveClearResponseState = "In-progress" CacheReserveClearResponseStateCompleted CacheReserveClearResponseState = "Completed" )
func (CacheReserveClearResponseState) IsKnown ¶
func (r CacheReserveClearResponseState) IsKnown() bool
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"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` // Value of the Cache Reserve zone setting. Value CacheReserveEditResponseValue `json:"value,required"` JSON cacheReserveEditResponseJSON `json:"-"` }
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 (*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"` // 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. Result CacheReserveEditResponse `json:"result,required"` // Whether the API call was successful Success CacheReserveEditResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r CacheReserveEditResponseEnvelopeSuccess) IsKnown() bool
type CacheReserveEditResponseValue ¶
type CacheReserveEditResponseValue string
Value of the Cache Reserve zone setting.
const ( CacheReserveEditResponseValueOn CacheReserveEditResponseValue = "on" CacheReserveEditResponseValueOff CacheReserveEditResponseValue = "off" )
func (CacheReserveEditResponseValue) IsKnown ¶
func (r CacheReserveEditResponseValue) IsKnown() bool
type CacheReserveGetParams ¶
type CacheReserveGetResponse ¶
type CacheReserveGetResponse struct { // ID of the zone setting. ID CacheReserve `json:"id,required"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` // Value of the Cache Reserve zone setting. Value CacheReserveGetResponseValue `json:"value,required"` JSON cacheReserveGetResponseJSON `json:"-"` }
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 (*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"` // 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. Result CacheReserveGetResponse `json:"result,required"` // Whether the API call was successful Success CacheReserveGetResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r CacheReserveGetResponseEnvelopeSuccess) IsKnown() bool
type CacheReserveGetResponseValue ¶
type CacheReserveGetResponseValue string
Value of the Cache Reserve zone setting.
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 ¶
func (r *CacheReserveService) Clear(ctx context.Context, params CacheReserveClearParams, opts ...option.RequestOption) (res *CacheReserveClearResponse, err error)
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 ¶
func (r *CacheReserveService) Edit(ctx context.Context, params CacheReserveEditParams, opts ...option.RequestOption) (res *CacheReserveEditResponse, err error)
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 ¶
func (r *CacheReserveService) Get(ctx context.Context, query CacheReserveGetParams, opts ...option.RequestOption) (res *CacheReserveGetResponse, err error)
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 ¶
func (r *CacheReserveService) Status(ctx context.Context, query CacheReserveStatusParams, opts ...option.RequestOption) (res *CacheReserveStatusResponse, err error)
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 CacheReserveStatusResponse ¶
type CacheReserveStatusResponse struct { // ID of the zone setting. ID CacheReserveClear `json:"id,required"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` // 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 CacheReserveStatusResponseState `json:"state,required"` // The time that the latest Cache Reserve Clear operation completed. EndTs time.Time `json:"end_ts" 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"` // 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,required"` // Whether the API call was successful Success CacheReserveStatusResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r CacheReserveStatusResponseEnvelopeSuccess) IsKnown() bool
type CacheReserveStatusResponseState ¶
type CacheReserveStatusResponseState string
The current state of the Cache Reserve Clear operation.
const ( CacheReserveStatusResponseStateInProgress CacheReserveStatusResponseState = "In-progress" CacheReserveStatusResponseStateCompleted CacheReserveStatusResponseState = "Completed" )
func (CacheReserveStatusResponseState) IsKnown ¶
func (r CacheReserveStatusResponseState) IsKnown() bool
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 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.
### 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.
type CacheVariant ¶
type CacheVariant struct { // ID of the zone setting. ID CacheVariantIdentifier `json:"id,required"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` JSON cacheVariantJSON `json:"-"` }
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 (*CacheVariant) UnmarshalJSON ¶
func (r *CacheVariant) UnmarshalJSON(data []byte) (err error)
type CacheVariantIdentifier ¶
type CacheVariantIdentifier string
ID of the zone setting.
const (
CacheVariantIdentifierVariants CacheVariantIdentifier = "variants"
)
func (CacheVariantIdentifier) IsKnown ¶
func (r CacheVariantIdentifier) IsKnown() bool
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 CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRole ¶ added in v2.1.0
type MemberRole = shared.MemberRole
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissions ¶ added in v2.1.0
type MemberRolesPermissions = shared.MemberRolesPermissions
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberUser ¶ added in v2.1.0
type MemberUser = shared.MemberUser
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
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 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 ¶
func (r RegionalTieredCacheEditParamsValue) IsKnown() bool
type RegionalTieredCacheEditResponse ¶
type RegionalTieredCacheEditResponse struct { // ID of the zone setting. ID RegionalTieredCache `json:"id,required"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` // 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. Value RegionalTieredCacheEditResponseValue `json:"value,required"` JSON regionalTieredCacheEditResponseJSON `json:"-"` }
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 (*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"` // 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. Result RegionalTieredCacheEditResponse `json:"result,required"` // Whether the API call was successful Success RegionalTieredCacheEditResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r RegionalTieredCacheEditResponseEnvelopeSuccess) IsKnown() bool
type RegionalTieredCacheEditResponseValue ¶
type RegionalTieredCacheEditResponseValue struct { // ID of the zone setting. ID RegionalTieredCache `json:"id,required"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` JSON regionalTieredCacheEditResponseValueJSON `json:"-"` }
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 (*RegionalTieredCacheEditResponseValue) UnmarshalJSON ¶
func (r *RegionalTieredCacheEditResponseValue) UnmarshalJSON(data []byte) (err error)
type RegionalTieredCacheGetResponse ¶
type RegionalTieredCacheGetResponse struct { // ID of the zone setting. ID RegionalTieredCache `json:"id,required"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` // 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. Value RegionalTieredCacheGetResponseValue `json:"value,required"` JSON regionalTieredCacheGetResponseJSON `json:"-"` }
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 (*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"` // 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. Result RegionalTieredCacheGetResponse `json:"result,required"` // Whether the API call was successful Success RegionalTieredCacheGetResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r RegionalTieredCacheGetResponseEnvelopeSuccess) IsKnown() bool
type RegionalTieredCacheGetResponseValue ¶
type RegionalTieredCacheGetResponseValue struct { // ID of the zone setting. ID RegionalTieredCache `json:"id,required"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` JSON regionalTieredCacheGetResponseValueJSON `json:"-"` }
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 (*RegionalTieredCacheGetResponseValue) UnmarshalJSON ¶
func (r *RegionalTieredCacheGetResponseValue) UnmarshalJSON(data []byte) (err error)
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 ¶
func (r *RegionalTieredCacheService) Edit(ctx context.Context, params RegionalTieredCacheEditParams, opts ...option.RequestOption) (res *RegionalTieredCacheEditResponse, err error)
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 ¶
func (r *RegionalTieredCacheService) Get(ctx context.Context, query RegionalTieredCacheGetParams, opts ...option.RequestOption) (res *RegionalTieredCacheGetResponse, err error)
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 SmartTieredCacheDeleteParams ¶
type SmartTieredCacheDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` Body interface{} `json:"body,required"` }
func (SmartTieredCacheDeleteParams) MarshalJSON ¶
func (r SmartTieredCacheDeleteParams) MarshalJSON() (data []byte, err error)
type SmartTieredCacheDeleteResponseEnvelope ¶
type SmartTieredCacheDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result SmartTieredCacheDeleteResponseUnion `json:"result,required"` // Whether the API call was successful Success SmartTieredCacheDeleteResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r SmartTieredCacheDeleteResponseEnvelopeSuccess) IsKnown() bool
type SmartTieredCacheDeleteResponseUnion ¶
type SmartTieredCacheDeleteResponseUnion interface {
ImplementsCacheSmartTieredCacheDeleteResponseUnion()
}
Union satisfied by cache.SmartTieredCacheDeleteResponseUnknown or shared.UnionString.
type SmartTieredCacheEditParams ¶
type SmartTieredCacheEditParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` // Enables 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
Enables Tiered Cache.
const ( SmartTieredCacheEditParamsValueOn SmartTieredCacheEditParamsValue = "on" SmartTieredCacheEditParamsValueOff SmartTieredCacheEditParamsValue = "off" )
func (SmartTieredCacheEditParamsValue) IsKnown ¶
func (r SmartTieredCacheEditParamsValue) IsKnown() bool
type SmartTieredCacheEditResponseEnvelope ¶
type SmartTieredCacheEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result SmartTieredCacheEditResponseUnion `json:"result,required"` // Whether the API call was successful Success SmartTieredCacheEditResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r SmartTieredCacheEditResponseEnvelopeSuccess) IsKnown() bool
type SmartTieredCacheEditResponseUnion ¶
type SmartTieredCacheEditResponseUnion interface {
ImplementsCacheSmartTieredCacheEditResponseUnion()
}
Union satisfied by cache.SmartTieredCacheEditResponseUnknown or shared.UnionString.
type SmartTieredCacheGetResponseEnvelope ¶
type SmartTieredCacheGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result SmartTieredCacheGetResponseUnion `json:"result,required"` // Whether the API call was successful Success SmartTieredCacheGetResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r SmartTieredCacheGetResponseEnvelopeSuccess) IsKnown() bool
type SmartTieredCacheGetResponseUnion ¶
type SmartTieredCacheGetResponseUnion interface {
ImplementsCacheSmartTieredCacheGetResponseUnion()
}
Union satisfied by cache.SmartTieredCacheGetResponseUnknown or shared.UnionString.
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 ¶
func (r *SmartTieredCacheService) Delete(ctx context.Context, params SmartTieredCacheDeleteParams, opts ...option.RequestOption) (res *SmartTieredCacheDeleteResponseUnion, err error)
Remvoves enablement of Smart Tiered Cache
func (*SmartTieredCacheService) Edit ¶
func (r *SmartTieredCacheService) Edit(ctx context.Context, params SmartTieredCacheEditParams, opts ...option.RequestOption) (res *SmartTieredCacheEditResponseUnion, err error)
Updates enablement of Tiered Cache
func (*SmartTieredCacheService) Get ¶
func (r *SmartTieredCacheService) Get(ctx context.Context, query SmartTieredCacheGetParams, opts ...option.RequestOption) (res *SmartTieredCacheGetResponseUnion, err error)
Get Smart Tiered Cache setting
type VariantDeleteParams ¶
type VariantDeleteParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` Body interface{} `json:"body,required"` }
func (VariantDeleteParams) MarshalJSON ¶
func (r VariantDeleteParams) MarshalJSON() (data []byte, err error)
type VariantDeleteResponseEnvelope ¶
type VariantDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // 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. Result CacheVariant `json:"result,required"` // Whether the API call was successful Success VariantDeleteResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r VariantDeleteResponseEnvelopeSuccess) 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 CacheVariantIdentifier `json:"id,required"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` // Value of the zone setting. Value VariantEditResponseValue `json:"value,required"` JSON variantEditResponseJSON `json:"-"` }
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 (*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"` // 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. Result VariantEditResponse `json:"result,required"` // Whether the API call was successful Success VariantEditResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r VariantEditResponseEnvelopeSuccess) IsKnown() bool
type VariantEditResponseValue ¶
type VariantEditResponseValue struct { // List of strings with the MIME types of all the variants that should be served // for avif. Avif []string `json:"avif"` // List of strings with the MIME types of all the variants that should be served // for bmp. BMP []string `json:"bmp"` // List of strings with the MIME types of all the variants that should be served // for gif. GIF []string `json:"gif"` // List of strings with the MIME types of all the variants that should be served // for jp2. JP2 []string `json:"jp2"` // List of strings with the MIME types of all the variants that should be served // for jpeg. JPEG []string `json:"jpeg"` // List of strings with the MIME types of all the variants that should be served // for jpg. Jpg []string `json:"jpg"` // List of strings with the MIME types of all the variants that should be served // for jpg2. JPG2 []string `json:"jpg2"` // List of strings with the MIME types of all the variants that should be served // for png. PNG []string `json:"png"` // List of strings with the MIME types of all the variants that should be served // for tif. TIF []string `json:"tif"` // List of strings with the MIME types of all the variants that should be served // for tiff. TIFF []string `json:"tiff"` // List of strings with the MIME types of all the variants that should be served // for webp. WebP []string `json:"webp"` JSON variantEditResponseValueJSON `json:"-"` }
Value of the zone setting.
func (*VariantEditResponseValue) UnmarshalJSON ¶
func (r *VariantEditResponseValue) UnmarshalJSON(data []byte) (err error)
type VariantGetParams ¶
type VariantGetResponse ¶
type VariantGetResponse struct { // ID of the zone setting. ID CacheVariantIdentifier `json:"id,required"` // last time this setting was modified. ModifiedOn time.Time `json:"modified_on,required,nullable" format:"date-time"` // Value of the zone setting. Value VariantGetResponseValue `json:"value,required"` JSON variantGetResponseJSON `json:"-"` }
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 (*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"` // 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. Result VariantGetResponse `json:"result,required"` // Whether the API call was successful Success VariantGetResponseEnvelopeSuccess `json:"success,required"` 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 ¶
func (r VariantGetResponseEnvelopeSuccess) IsKnown() bool
type VariantGetResponseValue ¶
type VariantGetResponseValue struct { // List of strings with the MIME types of all the variants that should be served // for avif. Avif []string `json:"avif"` // List of strings with the MIME types of all the variants that should be served // for bmp. BMP []string `json:"bmp"` // List of strings with the MIME types of all the variants that should be served // for gif. GIF []string `json:"gif"` // List of strings with the MIME types of all the variants that should be served // for jp2. JP2 []string `json:"jp2"` // List of strings with the MIME types of all the variants that should be served // for jpeg. JPEG []string `json:"jpeg"` // List of strings with the MIME types of all the variants that should be served // for jpg. Jpg []string `json:"jpg"` // List of strings with the MIME types of all the variants that should be served // for jpg2. JPG2 []string `json:"jpg2"` // List of strings with the MIME types of all the variants that should be served // for png. PNG []string `json:"png"` // List of strings with the MIME types of all the variants that should be served // for tif. TIF []string `json:"tif"` // List of strings with the MIME types of all the variants that should be served // for tiff. TIFF []string `json:"tiff"` // List of strings with the MIME types of all the variants that should be served // for webp. WebP []string `json:"webp"` JSON variantGetResponseValueJSON `json:"-"` }
Value of the zone setting.
func (*VariantGetResponseValue) UnmarshalJSON ¶
func (r *VariantGetResponseValue) UnmarshalJSON(data []byte) (err error)
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 ¶
func (r *VariantService) Delete(ctx context.Context, params VariantDeleteParams, opts ...option.RequestOption) (res *CacheVariant, err error)
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 ¶
func (r *VariantService) Edit(ctx context.Context, params VariantEditParams, opts ...option.RequestOption) (res *VariantEditResponse, err error)
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 ¶
func (r *VariantService) Get(ctx context.Context, query VariantGetParams, opts ...option.RequestOption) (res *VariantGetResponse, err error)
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.