Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type Bucket
- type BucketDeleteParams
- type BucketDeleteResponse
- type BucketDeleteResponseEnvelope
- type BucketDeleteResponseEnvelopeSuccess
- type BucketGetParams
- type BucketGetResponseEnvelope
- type BucketGetResponseEnvelopeSuccess
- type BucketListParams
- type BucketListParamsDirection
- type BucketListParamsOrder
- type BucketListResponse
- type BucketListResponseEnvelope
- type BucketListResponseEnvelopeResultInfo
- type BucketListResponseEnvelopeSuccess
- type BucketLocation
- type BucketNewParams
- type BucketNewParamsLocationHint
- type BucketNewParamsStorageClass
- type BucketNewResponseEnvelope
- type BucketNewResponseEnvelopeSuccess
- type BucketService
- func (r *BucketService) Delete(ctx context.Context, bucketName string, body BucketDeleteParams, ...) (res *BucketDeleteResponse, err error)
- func (r *BucketService) Get(ctx context.Context, bucketName string, query BucketGetParams, ...) (res *Bucket, err error)
- func (r *BucketService) List(ctx context.Context, params BucketListParams, opts ...option.RequestOption) (res *BucketListResponse, err error)
- func (r *BucketService) New(ctx context.Context, params BucketNewParams, opts ...option.RequestOption) (res *Bucket, err error)
- type BucketStorageClass
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type DomainCustomDeleteParams
- type DomainCustomDeleteResponse
- type DomainCustomDeleteResponseEnvelope
- type DomainCustomDeleteResponseEnvelopeSuccess
- type DomainCustomListParams
- type DomainCustomListResponse
- type DomainCustomListResponseDomain
- type DomainCustomListResponseDomainsMinTLS
- type DomainCustomListResponseDomainsStatus
- type DomainCustomListResponseDomainsStatusOwnership
- type DomainCustomListResponseDomainsStatusSSL
- type DomainCustomListResponseEnvelope
- type DomainCustomListResponseEnvelopeSuccess
- type DomainCustomNewParams
- type DomainCustomNewParamsMinTLS
- type DomainCustomNewResponse
- type DomainCustomNewResponseEnvelope
- type DomainCustomNewResponseEnvelopeSuccess
- type DomainCustomNewResponseMinTLS
- type DomainCustomService
- func (r *DomainCustomService) Delete(ctx context.Context, bucketName string, domainName string, ...) (res *DomainCustomDeleteResponse, err error)
- func (r *DomainCustomService) List(ctx context.Context, bucketName string, query DomainCustomListParams, ...) (res *DomainCustomListResponse, err error)
- func (r *DomainCustomService) New(ctx context.Context, bucketName string, params DomainCustomNewParams, ...) (res *DomainCustomNewResponse, err error)
- func (r *DomainCustomService) Update(ctx context.Context, bucketName string, domainName string, ...) (res *DomainCustomUpdateResponse, err error)
- type DomainCustomUpdateParams
- type DomainCustomUpdateParamsMinTLS
- type DomainCustomUpdateResponse
- type DomainCustomUpdateResponseEnvelope
- type DomainCustomUpdateResponseEnvelopeSuccess
- type DomainCustomUpdateResponseMinTLS
- type DomainManagedListParams
- type DomainManagedListResponse
- type DomainManagedListResponseEnvelope
- type DomainManagedListResponseEnvelopeSuccess
- type DomainManagedService
- func (r *DomainManagedService) List(ctx context.Context, bucketName string, query DomainManagedListParams, ...) (res *DomainManagedListResponse, err error)
- func (r *DomainManagedService) Update(ctx context.Context, bucketName string, params DomainManagedUpdateParams, ...) (res *DomainManagedUpdateResponse, err error)
- type DomainManagedUpdateParams
- type DomainManagedUpdateResponse
- type DomainManagedUpdateResponseEnvelope
- type DomainManagedUpdateResponseEnvelopeSuccess
- type DomainService
- type Error
- type ErrorData
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type Provider
- type R2Service
- type RatePlan
- type RatePlanParam
- type ResponseInfo
- type Role
- type Sippy
- type SippyDeleteParams
- type SippyDeleteResponse
- type SippyDeleteResponseEnabled
- type SippyDeleteResponseEnvelope
- type SippyDeleteResponseEnvelopeSuccess
- type SippyDestination
- type SippyGetParams
- type SippyGetResponseEnvelope
- type SippyGetResponseEnvelopeSuccess
- type SippyService
- func (r *SippyService) Delete(ctx context.Context, bucketName string, body SippyDeleteParams, ...) (res *SippyDeleteResponse, err error)
- func (r *SippyService) Get(ctx context.Context, bucketName string, query SippyGetParams, ...) (res *Sippy, err error)
- func (r *SippyService) Update(ctx context.Context, bucketName string, params SippyUpdateParams, ...) (res *Sippy, err error)
- type SippySource
- type SippySourceProvider
- type SippyUpdateParams
- type SippyUpdateParamsBody
- type SippyUpdateParamsBodyR2EnableSippyAws
- type SippyUpdateParamsBodyR2EnableSippyAwsDestination
- type SippyUpdateParamsBodyR2EnableSippyAwsSource
- type SippyUpdateParamsBodyR2EnableSippyAwsSourceProvider
- type SippyUpdateParamsBodyR2EnableSippyGcs
- type SippyUpdateParamsBodyR2EnableSippyGcsDestination
- type SippyUpdateParamsBodyR2EnableSippyGcsSource
- type SippyUpdateParamsBodyR2EnableSippyGcsSourceProvider
- type SippyUpdateParamsBodyUnion
- type SippyUpdateResponseEnvelope
- type SippyUpdateResponseEnvelopeSuccess
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type TemporaryCredentialNewParams
- type TemporaryCredentialNewResponse
- type TemporaryCredentialNewResponseEnvelope
- type TemporaryCredentialNewResponseEnvelopeSuccess
- type TemporaryCredentialParam
- type TemporaryCredentialPermission
- type TemporaryCredentialService
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 CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
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.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
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 Bucket ¶
type Bucket struct { // Creation timestamp CreationDate string `json:"creation_date"` // Location of the bucket Location BucketLocation `json:"location"` // Name of the bucket Name string `json:"name"` // Storage class for newly uploaded objects, unless specified otherwise. StorageClass BucketStorageClass `json:"storage_class"` JSON bucketJSON `json:"-"` }
A single R2 bucket
func (*Bucket) UnmarshalJSON ¶
type BucketDeleteParams ¶
type BucketDeleteResponse ¶
type BucketDeleteResponse = interface{}
type BucketDeleteResponseEnvelope ¶
type BucketDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result BucketDeleteResponse `json:"result,required"` // Whether the API call was successful Success BucketDeleteResponseEnvelopeSuccess `json:"success,required"` JSON bucketDeleteResponseEnvelopeJSON `json:"-"` }
func (*BucketDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *BucketDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketDeleteResponseEnvelopeSuccess ¶
type BucketDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketDeleteResponseEnvelopeSuccessTrue BucketDeleteResponseEnvelopeSuccess = true
)
func (BucketDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r BucketDeleteResponseEnvelopeSuccess) IsKnown() bool
type BucketGetParams ¶
type BucketGetResponseEnvelope ¶
type BucketGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` // A single R2 bucket Result Bucket `json:"result,required"` // Whether the API call was successful Success BucketGetResponseEnvelopeSuccess `json:"success,required"` JSON bucketGetResponseEnvelopeJSON `json:"-"` }
func (*BucketGetResponseEnvelope) UnmarshalJSON ¶
func (r *BucketGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketGetResponseEnvelopeSuccess ¶
type BucketGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketGetResponseEnvelopeSuccessTrue BucketGetResponseEnvelopeSuccess = true
)
func (BucketGetResponseEnvelopeSuccess) IsKnown ¶
func (r BucketGetResponseEnvelopeSuccess) IsKnown() bool
type BucketListParams ¶
type BucketListParams struct { // Account ID AccountID param.Field[string] `path:"account_id,required"` // Pagination cursor received during the last List Buckets call. R2 buckets are // paginated using cursors instead of page numbers. Cursor param.Field[string] `query:"cursor"` // Direction to order buckets Direction param.Field[BucketListParamsDirection] `query:"direction"` // Bucket names to filter by. Only buckets with this phrase in their name will be // returned. NameContains param.Field[string] `query:"name_contains"` // Field to order buckets by Order param.Field[BucketListParamsOrder] `query:"order"` // Maximum number of buckets to return in a single call PerPage param.Field[float64] `query:"per_page"` // Bucket name to start searching after. Buckets are ordered lexicographically. StartAfter param.Field[string] `query:"start_after"` }
func (BucketListParams) URLQuery ¶
func (r BucketListParams) URLQuery() (v url.Values)
URLQuery serializes BucketListParams's query parameters as `url.Values`.
type BucketListParamsDirection ¶
type BucketListParamsDirection string
Direction to order buckets
const ( BucketListParamsDirectionAsc BucketListParamsDirection = "asc" BucketListParamsDirectionDesc BucketListParamsDirection = "desc" )
func (BucketListParamsDirection) IsKnown ¶
func (r BucketListParamsDirection) IsKnown() bool
type BucketListParamsOrder ¶
type BucketListParamsOrder string
Field to order buckets by
const (
BucketListParamsOrderName BucketListParamsOrder = "name"
)
func (BucketListParamsOrder) IsKnown ¶
func (r BucketListParamsOrder) IsKnown() bool
type BucketListResponse ¶
type BucketListResponse struct { Buckets []Bucket `json:"buckets"` JSON bucketListResponseJSON `json:"-"` }
func (*BucketListResponse) UnmarshalJSON ¶
func (r *BucketListResponse) UnmarshalJSON(data []byte) (err error)
type BucketListResponseEnvelope ¶
type BucketListResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result BucketListResponse `json:"result,required"` // Whether the API call was successful Success BucketListResponseEnvelopeSuccess `json:"success,required"` ResultInfo BucketListResponseEnvelopeResultInfo `json:"result_info"` JSON bucketListResponseEnvelopeJSON `json:"-"` }
func (*BucketListResponseEnvelope) UnmarshalJSON ¶
func (r *BucketListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketListResponseEnvelopeResultInfo ¶
type BucketListResponseEnvelopeResultInfo struct { // A continuation token that should be used to fetch the next page of results Cursor string `json:"cursor"` // Maximum number of results on this page PerPage float64 `json:"per_page"` JSON bucketListResponseEnvelopeResultInfoJSON `json:"-"` }
func (*BucketListResponseEnvelopeResultInfo) UnmarshalJSON ¶
func (r *BucketListResponseEnvelopeResultInfo) UnmarshalJSON(data []byte) (err error)
type BucketListResponseEnvelopeSuccess ¶
type BucketListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketListResponseEnvelopeSuccessTrue BucketListResponseEnvelopeSuccess = true
)
func (BucketListResponseEnvelopeSuccess) IsKnown ¶
func (r BucketListResponseEnvelopeSuccess) IsKnown() bool
type BucketLocation ¶
type BucketLocation string
Location of the bucket
const ( BucketLocationApac BucketLocation = "apac" BucketLocationEeur BucketLocation = "eeur" BucketLocationEnam BucketLocation = "enam" BucketLocationWeur BucketLocation = "weur" BucketLocationWnam BucketLocation = "wnam" )
func (BucketLocation) IsKnown ¶
func (r BucketLocation) IsKnown() bool
type BucketNewParams ¶
type BucketNewParams struct { // Account ID AccountID param.Field[string] `path:"account_id,required"` // Name of the bucket Name param.Field[string] `json:"name,required"` // Location of the bucket LocationHint param.Field[BucketNewParamsLocationHint] `json:"locationHint"` // Storage class for newly uploaded objects, unless specified otherwise. StorageClass param.Field[BucketNewParamsStorageClass] `json:"storageClass"` }
func (BucketNewParams) MarshalJSON ¶
func (r BucketNewParams) MarshalJSON() (data []byte, err error)
type BucketNewParamsLocationHint ¶
type BucketNewParamsLocationHint string
Location of the bucket
const ( BucketNewParamsLocationHintApac BucketNewParamsLocationHint = "apac" BucketNewParamsLocationHintEeur BucketNewParamsLocationHint = "eeur" BucketNewParamsLocationHintEnam BucketNewParamsLocationHint = "enam" BucketNewParamsLocationHintWeur BucketNewParamsLocationHint = "weur" BucketNewParamsLocationHintWnam BucketNewParamsLocationHint = "wnam" )
func (BucketNewParamsLocationHint) IsKnown ¶
func (r BucketNewParamsLocationHint) IsKnown() bool
type BucketNewParamsStorageClass ¶
type BucketNewParamsStorageClass string
Storage class for newly uploaded objects, unless specified otherwise.
const ( BucketNewParamsStorageClassStandard BucketNewParamsStorageClass = "Standard" BucketNewParamsStorageClassInfrequentAccess BucketNewParamsStorageClass = "InfrequentAccess" )
func (BucketNewParamsStorageClass) IsKnown ¶
func (r BucketNewParamsStorageClass) IsKnown() bool
type BucketNewResponseEnvelope ¶
type BucketNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` // A single R2 bucket Result Bucket `json:"result,required"` // Whether the API call was successful Success BucketNewResponseEnvelopeSuccess `json:"success,required"` JSON bucketNewResponseEnvelopeJSON `json:"-"` }
func (*BucketNewResponseEnvelope) UnmarshalJSON ¶
func (r *BucketNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type BucketNewResponseEnvelopeSuccess ¶
type BucketNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
BucketNewResponseEnvelopeSuccessTrue BucketNewResponseEnvelopeSuccess = true
)
func (BucketNewResponseEnvelopeSuccess) IsKnown ¶
func (r BucketNewResponseEnvelopeSuccess) IsKnown() bool
type BucketService ¶
type BucketService struct {
Options []option.RequestOption
}
BucketService 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 NewBucketService method instead.
func NewBucketService ¶
func NewBucketService(opts ...option.RequestOption) (r *BucketService)
NewBucketService 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 (*BucketService) Delete ¶
func (r *BucketService) Delete(ctx context.Context, bucketName string, body BucketDeleteParams, opts ...option.RequestOption) (res *BucketDeleteResponse, err error)
Deletes an existing R2 bucket.
func (*BucketService) Get ¶
func (r *BucketService) Get(ctx context.Context, bucketName string, query BucketGetParams, opts ...option.RequestOption) (res *Bucket, err error)
Gets metadata for an existing R2 bucket.
func (*BucketService) List ¶
func (r *BucketService) List(ctx context.Context, params BucketListParams, opts ...option.RequestOption) (res *BucketListResponse, err error)
Lists all R2 buckets on your account
func (*BucketService) New ¶
func (r *BucketService) New(ctx context.Context, params BucketNewParams, opts ...option.RequestOption) (res *Bucket, err error)
Creates a new R2 bucket.
type BucketStorageClass ¶
type BucketStorageClass string
Storage class for newly uploaded objects, unless specified otherwise.
const ( BucketStorageClassStandard BucketStorageClass = "Standard" BucketStorageClassInfrequentAccess BucketStorageClass = "InfrequentAccess" )
func (BucketStorageClass) IsKnown ¶
func (r BucketStorageClass) IsKnown() bool
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 DomainCustomDeleteResponse ¶
type DomainCustomDeleteResponse struct { // Name of the removed custom domain Domain string `json:"domain,required"` JSON domainCustomDeleteResponseJSON `json:"-"` }
func (*DomainCustomDeleteResponse) UnmarshalJSON ¶
func (r *DomainCustomDeleteResponse) UnmarshalJSON(data []byte) (err error)
type DomainCustomDeleteResponseEnvelope ¶
type DomainCustomDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result DomainCustomDeleteResponse `json:"result,required"` // Whether the API call was successful Success DomainCustomDeleteResponseEnvelopeSuccess `json:"success,required"` JSON domainCustomDeleteResponseEnvelopeJSON `json:"-"` }
func (*DomainCustomDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *DomainCustomDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DomainCustomDeleteResponseEnvelopeSuccess ¶
type DomainCustomDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DomainCustomDeleteResponseEnvelopeSuccessTrue DomainCustomDeleteResponseEnvelopeSuccess = true
)
func (DomainCustomDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r DomainCustomDeleteResponseEnvelopeSuccess) IsKnown() bool
type DomainCustomListParams ¶
type DomainCustomListResponse ¶
type DomainCustomListResponse struct { Domains []DomainCustomListResponseDomain `json:"domains,required"` JSON domainCustomListResponseJSON `json:"-"` }
func (*DomainCustomListResponse) UnmarshalJSON ¶
func (r *DomainCustomListResponse) UnmarshalJSON(data []byte) (err error)
type DomainCustomListResponseDomain ¶
type DomainCustomListResponseDomain struct { // Domain name of the custom domain to be added Domain string `json:"domain,required"` // Whether this bucket is publicly accessible at the specified custom domain Enabled bool `json:"enabled,required"` Status DomainCustomListResponseDomainsStatus `json:"status,required"` // Minimum TLS Version the custom domain will accept for incoming connections. If // not set, defaults to 1.0. MinTLS DomainCustomListResponseDomainsMinTLS `json:"minTLS"` // Zone ID of the custom domain resides in ZoneID string `json:"zoneId"` // Zone that the custom domain resides in ZoneName string `json:"zoneName"` JSON domainCustomListResponseDomainJSON `json:"-"` }
func (*DomainCustomListResponseDomain) UnmarshalJSON ¶
func (r *DomainCustomListResponseDomain) UnmarshalJSON(data []byte) (err error)
type DomainCustomListResponseDomainsMinTLS ¶
type DomainCustomListResponseDomainsMinTLS string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.
const ( DomainCustomListResponseDomainsMinTLS1_0 DomainCustomListResponseDomainsMinTLS = "1.0" DomainCustomListResponseDomainsMinTLS1_1 DomainCustomListResponseDomainsMinTLS = "1.1" DomainCustomListResponseDomainsMinTLS1_2 DomainCustomListResponseDomainsMinTLS = "1.2" DomainCustomListResponseDomainsMinTLS1_3 DomainCustomListResponseDomainsMinTLS = "1.3" )
func (DomainCustomListResponseDomainsMinTLS) IsKnown ¶
func (r DomainCustomListResponseDomainsMinTLS) IsKnown() bool
type DomainCustomListResponseDomainsStatus ¶
type DomainCustomListResponseDomainsStatus struct { // Ownership status of the domain Ownership DomainCustomListResponseDomainsStatusOwnership `json:"ownership,required"` // SSL certificate status SSL DomainCustomListResponseDomainsStatusSSL `json:"ssl,required"` JSON domainCustomListResponseDomainsStatusJSON `json:"-"` }
func (*DomainCustomListResponseDomainsStatus) UnmarshalJSON ¶
func (r *DomainCustomListResponseDomainsStatus) UnmarshalJSON(data []byte) (err error)
type DomainCustomListResponseDomainsStatusOwnership ¶
type DomainCustomListResponseDomainsStatusOwnership string
Ownership status of the domain
const ( DomainCustomListResponseDomainsStatusOwnershipPending DomainCustomListResponseDomainsStatusOwnership = "pending" DomainCustomListResponseDomainsStatusOwnershipActive DomainCustomListResponseDomainsStatusOwnership = "active" DomainCustomListResponseDomainsStatusOwnershipDeactivated DomainCustomListResponseDomainsStatusOwnership = "deactivated" DomainCustomListResponseDomainsStatusOwnershipBlocked DomainCustomListResponseDomainsStatusOwnership = "blocked" DomainCustomListResponseDomainsStatusOwnershipError DomainCustomListResponseDomainsStatusOwnership = "error" DomainCustomListResponseDomainsStatusOwnershipUnknown DomainCustomListResponseDomainsStatusOwnership = "unknown" )
func (DomainCustomListResponseDomainsStatusOwnership) IsKnown ¶
func (r DomainCustomListResponseDomainsStatusOwnership) IsKnown() bool
type DomainCustomListResponseDomainsStatusSSL ¶
type DomainCustomListResponseDomainsStatusSSL string
SSL certificate status
const ( DomainCustomListResponseDomainsStatusSSLInitializing DomainCustomListResponseDomainsStatusSSL = "initializing" DomainCustomListResponseDomainsStatusSSLPending DomainCustomListResponseDomainsStatusSSL = "pending" DomainCustomListResponseDomainsStatusSSLActive DomainCustomListResponseDomainsStatusSSL = "active" DomainCustomListResponseDomainsStatusSSLDeactivated DomainCustomListResponseDomainsStatusSSL = "deactivated" DomainCustomListResponseDomainsStatusSSLError DomainCustomListResponseDomainsStatusSSL = "error" DomainCustomListResponseDomainsStatusSSLUnknown DomainCustomListResponseDomainsStatusSSL = "unknown" )
func (DomainCustomListResponseDomainsStatusSSL) IsKnown ¶
func (r DomainCustomListResponseDomainsStatusSSL) IsKnown() bool
type DomainCustomListResponseEnvelope ¶
type DomainCustomListResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result DomainCustomListResponse `json:"result,required"` // Whether the API call was successful Success DomainCustomListResponseEnvelopeSuccess `json:"success,required"` JSON domainCustomListResponseEnvelopeJSON `json:"-"` }
func (*DomainCustomListResponseEnvelope) UnmarshalJSON ¶
func (r *DomainCustomListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DomainCustomListResponseEnvelopeSuccess ¶
type DomainCustomListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DomainCustomListResponseEnvelopeSuccessTrue DomainCustomListResponseEnvelopeSuccess = true
)
func (DomainCustomListResponseEnvelopeSuccess) IsKnown ¶
func (r DomainCustomListResponseEnvelopeSuccess) IsKnown() bool
type DomainCustomNewParams ¶
type DomainCustomNewParams struct { // Account ID AccountID param.Field[string] `path:"account_id,required"` // Name of the custom domain to be added Domain param.Field[string] `json:"domain,required"` // Zone ID of the custom domain ZoneID param.Field[string] `json:"zoneId,required"` // Whether to enable public bucket access at the custom domain. If undefined, the // domain will be enabled. Enabled param.Field[bool] `json:"enabled"` // Minimum TLS Version the custom domain will accept for incoming connections. If // not set, defaults to 1.0. MinTLS param.Field[DomainCustomNewParamsMinTLS] `json:"minTLS"` }
func (DomainCustomNewParams) MarshalJSON ¶
func (r DomainCustomNewParams) MarshalJSON() (data []byte, err error)
type DomainCustomNewParamsMinTLS ¶
type DomainCustomNewParamsMinTLS string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.
const ( DomainCustomNewParamsMinTLS1_0 DomainCustomNewParamsMinTLS = "1.0" DomainCustomNewParamsMinTLS1_1 DomainCustomNewParamsMinTLS = "1.1" DomainCustomNewParamsMinTLS1_2 DomainCustomNewParamsMinTLS = "1.2" DomainCustomNewParamsMinTLS1_3 DomainCustomNewParamsMinTLS = "1.3" )
func (DomainCustomNewParamsMinTLS) IsKnown ¶
func (r DomainCustomNewParamsMinTLS) IsKnown() bool
type DomainCustomNewResponse ¶
type DomainCustomNewResponse struct { // Domain name of the affected custom domain Domain string `json:"domain,required"` // Whether this bucket is publicly accessible at the specified custom domain Enabled bool `json:"enabled,required"` // Minimum TLS Version the custom domain will accept for incoming connections. If // not set, defaults to 1.0. MinTLS DomainCustomNewResponseMinTLS `json:"minTLS"` JSON domainCustomNewResponseJSON `json:"-"` }
func (*DomainCustomNewResponse) UnmarshalJSON ¶
func (r *DomainCustomNewResponse) UnmarshalJSON(data []byte) (err error)
type DomainCustomNewResponseEnvelope ¶
type DomainCustomNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result DomainCustomNewResponse `json:"result,required"` // Whether the API call was successful Success DomainCustomNewResponseEnvelopeSuccess `json:"success,required"` JSON domainCustomNewResponseEnvelopeJSON `json:"-"` }
func (*DomainCustomNewResponseEnvelope) UnmarshalJSON ¶
func (r *DomainCustomNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DomainCustomNewResponseEnvelopeSuccess ¶
type DomainCustomNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DomainCustomNewResponseEnvelopeSuccessTrue DomainCustomNewResponseEnvelopeSuccess = true
)
func (DomainCustomNewResponseEnvelopeSuccess) IsKnown ¶
func (r DomainCustomNewResponseEnvelopeSuccess) IsKnown() bool
type DomainCustomNewResponseMinTLS ¶
type DomainCustomNewResponseMinTLS string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.
const ( DomainCustomNewResponseMinTLS1_0 DomainCustomNewResponseMinTLS = "1.0" DomainCustomNewResponseMinTLS1_1 DomainCustomNewResponseMinTLS = "1.1" DomainCustomNewResponseMinTLS1_2 DomainCustomNewResponseMinTLS = "1.2" DomainCustomNewResponseMinTLS1_3 DomainCustomNewResponseMinTLS = "1.3" )
func (DomainCustomNewResponseMinTLS) IsKnown ¶
func (r DomainCustomNewResponseMinTLS) IsKnown() bool
type DomainCustomService ¶
type DomainCustomService struct {
Options []option.RequestOption
}
DomainCustomService 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 NewDomainCustomService method instead.
func NewDomainCustomService ¶
func NewDomainCustomService(opts ...option.RequestOption) (r *DomainCustomService)
NewDomainCustomService 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 (*DomainCustomService) Delete ¶
func (r *DomainCustomService) Delete(ctx context.Context, bucketName string, domainName string, body DomainCustomDeleteParams, opts ...option.RequestOption) (res *DomainCustomDeleteResponse, err error)
Remove custom domain registration from an existing R2 bucket
func (*DomainCustomService) List ¶
func (r *DomainCustomService) List(ctx context.Context, bucketName string, query DomainCustomListParams, opts ...option.RequestOption) (res *DomainCustomListResponse, err error)
Gets a list of all custom domains registered with an existing R2 bucket.
func (*DomainCustomService) New ¶
func (r *DomainCustomService) New(ctx context.Context, bucketName string, params DomainCustomNewParams, opts ...option.RequestOption) (res *DomainCustomNewResponse, err error)
Register a new custom domain for an existing R2 bucket.
func (*DomainCustomService) Update ¶
func (r *DomainCustomService) Update(ctx context.Context, bucketName string, domainName string, params DomainCustomUpdateParams, opts ...option.RequestOption) (res *DomainCustomUpdateResponse, err error)
Edit the configuration for a custom domain on an existing R2 bucket.
type DomainCustomUpdateParams ¶
type DomainCustomUpdateParams struct { // Account ID AccountID param.Field[string] `path:"account_id,required"` // Whether to enable public bucket access at the specified custom domain Enabled param.Field[bool] `json:"enabled"` // Minimum TLS Version the custom domain will accept for incoming connections. If // not set, defaults to previous value. MinTLS param.Field[DomainCustomUpdateParamsMinTLS] `json:"minTLS"` }
func (DomainCustomUpdateParams) MarshalJSON ¶
func (r DomainCustomUpdateParams) MarshalJSON() (data []byte, err error)
type DomainCustomUpdateParamsMinTLS ¶
type DomainCustomUpdateParamsMinTLS string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to previous value.
const ( DomainCustomUpdateParamsMinTLS1_0 DomainCustomUpdateParamsMinTLS = "1.0" DomainCustomUpdateParamsMinTLS1_1 DomainCustomUpdateParamsMinTLS = "1.1" DomainCustomUpdateParamsMinTLS1_2 DomainCustomUpdateParamsMinTLS = "1.2" DomainCustomUpdateParamsMinTLS1_3 DomainCustomUpdateParamsMinTLS = "1.3" )
func (DomainCustomUpdateParamsMinTLS) IsKnown ¶
func (r DomainCustomUpdateParamsMinTLS) IsKnown() bool
type DomainCustomUpdateResponse ¶
type DomainCustomUpdateResponse struct { // Domain name of the affected custom domain Domain string `json:"domain,required"` // Whether this bucket is publicly accessible at the specified custom domain Enabled bool `json:"enabled"` // Minimum TLS Version the custom domain will accept for incoming connections. If // not set, defaults to 1.0. MinTLS DomainCustomUpdateResponseMinTLS `json:"minTLS"` JSON domainCustomUpdateResponseJSON `json:"-"` }
func (*DomainCustomUpdateResponse) UnmarshalJSON ¶
func (r *DomainCustomUpdateResponse) UnmarshalJSON(data []byte) (err error)
type DomainCustomUpdateResponseEnvelope ¶
type DomainCustomUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result DomainCustomUpdateResponse `json:"result,required"` // Whether the API call was successful Success DomainCustomUpdateResponseEnvelopeSuccess `json:"success,required"` JSON domainCustomUpdateResponseEnvelopeJSON `json:"-"` }
func (*DomainCustomUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *DomainCustomUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DomainCustomUpdateResponseEnvelopeSuccess ¶
type DomainCustomUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DomainCustomUpdateResponseEnvelopeSuccessTrue DomainCustomUpdateResponseEnvelopeSuccess = true
)
func (DomainCustomUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r DomainCustomUpdateResponseEnvelopeSuccess) IsKnown() bool
type DomainCustomUpdateResponseMinTLS ¶
type DomainCustomUpdateResponseMinTLS string
Minimum TLS Version the custom domain will accept for incoming connections. If not set, defaults to 1.0.
const ( DomainCustomUpdateResponseMinTLS1_0 DomainCustomUpdateResponseMinTLS = "1.0" DomainCustomUpdateResponseMinTLS1_1 DomainCustomUpdateResponseMinTLS = "1.1" DomainCustomUpdateResponseMinTLS1_2 DomainCustomUpdateResponseMinTLS = "1.2" DomainCustomUpdateResponseMinTLS1_3 DomainCustomUpdateResponseMinTLS = "1.3" )
func (DomainCustomUpdateResponseMinTLS) IsKnown ¶
func (r DomainCustomUpdateResponseMinTLS) IsKnown() bool
type DomainManagedListParams ¶
type DomainManagedListResponse ¶
type DomainManagedListResponse struct { // Bucket ID BucketID string `json:"bucketId,required"` // Domain name of the bucket's r2.dev domain Domain string `json:"domain,required"` // Whether this bucket is publicly accessible at the r2.dev domain Enabled bool `json:"enabled,required"` JSON domainManagedListResponseJSON `json:"-"` }
func (*DomainManagedListResponse) UnmarshalJSON ¶
func (r *DomainManagedListResponse) UnmarshalJSON(data []byte) (err error)
type DomainManagedListResponseEnvelope ¶
type DomainManagedListResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result DomainManagedListResponse `json:"result,required"` // Whether the API call was successful Success DomainManagedListResponseEnvelopeSuccess `json:"success,required"` JSON domainManagedListResponseEnvelopeJSON `json:"-"` }
func (*DomainManagedListResponseEnvelope) UnmarshalJSON ¶
func (r *DomainManagedListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DomainManagedListResponseEnvelopeSuccess ¶
type DomainManagedListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DomainManagedListResponseEnvelopeSuccessTrue DomainManagedListResponseEnvelopeSuccess = true
)
func (DomainManagedListResponseEnvelopeSuccess) IsKnown ¶
func (r DomainManagedListResponseEnvelopeSuccess) IsKnown() bool
type DomainManagedService ¶
type DomainManagedService struct {
Options []option.RequestOption
}
DomainManagedService 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 NewDomainManagedService method instead.
func NewDomainManagedService ¶
func NewDomainManagedService(opts ...option.RequestOption) (r *DomainManagedService)
NewDomainManagedService 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 (*DomainManagedService) List ¶
func (r *DomainManagedService) List(ctx context.Context, bucketName string, query DomainManagedListParams, opts ...option.RequestOption) (res *DomainManagedListResponse, err error)
Gets state of public access over the bucket's R2-managed (r2.dev) domain.
func (*DomainManagedService) Update ¶
func (r *DomainManagedService) Update(ctx context.Context, bucketName string, params DomainManagedUpdateParams, opts ...option.RequestOption) (res *DomainManagedUpdateResponse, err error)
Updates state of public access over the bucket's R2-managed (r2.dev) domain.
type DomainManagedUpdateParams ¶
type DomainManagedUpdateParams struct { // Account ID AccountID param.Field[string] `path:"account_id,required"` // Whether to enable public bucket access at the r2.dev domain Enabled param.Field[bool] `json:"enabled,required"` }
func (DomainManagedUpdateParams) MarshalJSON ¶
func (r DomainManagedUpdateParams) MarshalJSON() (data []byte, err error)
type DomainManagedUpdateResponse ¶
type DomainManagedUpdateResponse struct { // Bucket ID BucketID string `json:"bucketId,required"` // Domain name of the bucket's r2.dev domain Domain string `json:"domain,required"` // Whether this bucket is publicly accessible at the r2.dev domain Enabled bool `json:"enabled,required"` JSON domainManagedUpdateResponseJSON `json:"-"` }
func (*DomainManagedUpdateResponse) UnmarshalJSON ¶
func (r *DomainManagedUpdateResponse) UnmarshalJSON(data []byte) (err error)
type DomainManagedUpdateResponseEnvelope ¶
type DomainManagedUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result DomainManagedUpdateResponse `json:"result,required"` // Whether the API call was successful Success DomainManagedUpdateResponseEnvelopeSuccess `json:"success,required"` JSON domainManagedUpdateResponseEnvelopeJSON `json:"-"` }
func (*DomainManagedUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *DomainManagedUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type DomainManagedUpdateResponseEnvelopeSuccess ¶
type DomainManagedUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
DomainManagedUpdateResponseEnvelopeSuccessTrue DomainManagedUpdateResponseEnvelopeSuccess = true
)
func (DomainManagedUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r DomainManagedUpdateResponseEnvelopeSuccess) IsKnown() bool
type DomainService ¶
type DomainService struct { Options []option.RequestOption Custom *DomainCustomService Managed *DomainManagedService }
DomainService 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 NewDomainService method instead.
func NewDomainService ¶
func NewDomainService(opts ...option.RequestOption) (r *DomainService)
NewDomainService 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.
type MemberRoleParam ¶
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
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 MemberUserParam ¶
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
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 R2Service ¶
type R2Service struct { Options []option.RequestOption Buckets *BucketService Sippy *SippyService TemporaryCredentials *TemporaryCredentialService Domains *DomainService }
R2Service 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 NewR2Service method instead.
func NewR2Service ¶
func NewR2Service(opts ...option.RequestOption) (r *R2Service)
NewR2Service 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.
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type Sippy ¶
type Sippy struct { // Details about the configured destination bucket Destination SippyDestination `json:"destination"` // State of Sippy for this bucket Enabled bool `json:"enabled"` // Details about the configured source bucket Source SippySource `json:"source"` JSON sippyJSON `json:"-"` }
func (*Sippy) UnmarshalJSON ¶
type SippyDeleteParams ¶
type SippyDeleteResponse ¶
type SippyDeleteResponse struct { Enabled SippyDeleteResponseEnabled `json:"enabled"` JSON sippyDeleteResponseJSON `json:"-"` }
func (*SippyDeleteResponse) UnmarshalJSON ¶
func (r *SippyDeleteResponse) UnmarshalJSON(data []byte) (err error)
type SippyDeleteResponseEnabled ¶
type SippyDeleteResponseEnabled bool
const (
SippyDeleteResponseEnabledFalse SippyDeleteResponseEnabled = false
)
func (SippyDeleteResponseEnabled) IsKnown ¶
func (r SippyDeleteResponseEnabled) IsKnown() bool
type SippyDeleteResponseEnvelope ¶
type SippyDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result SippyDeleteResponse `json:"result,required"` // Whether the API call was successful Success SippyDeleteResponseEnvelopeSuccess `json:"success,required"` JSON sippyDeleteResponseEnvelopeJSON `json:"-"` }
func (*SippyDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *SippyDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SippyDeleteResponseEnvelopeSuccess ¶
type SippyDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SippyDeleteResponseEnvelopeSuccessTrue SippyDeleteResponseEnvelopeSuccess = true
)
func (SippyDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r SippyDeleteResponseEnvelopeSuccess) IsKnown() bool
type SippyDestination ¶
type SippyDestination struct { // ID of the Cloudflare API token used when writing objects to this bucket AccessKeyID string `json:"accessKeyId"` Account string `json:"account"` // Name of the bucket on the provider Bucket string `json:"bucket"` Provider Provider `json:"provider"` JSON sippyDestinationJSON `json:"-"` }
Details about the configured destination bucket
func (*SippyDestination) UnmarshalJSON ¶
func (r *SippyDestination) UnmarshalJSON(data []byte) (err error)
type SippyGetParams ¶
type SippyGetResponseEnvelope ¶
type SippyGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result Sippy `json:"result,required"` // Whether the API call was successful Success SippyGetResponseEnvelopeSuccess `json:"success,required"` JSON sippyGetResponseEnvelopeJSON `json:"-"` }
func (*SippyGetResponseEnvelope) UnmarshalJSON ¶
func (r *SippyGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SippyGetResponseEnvelopeSuccess ¶
type SippyGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SippyGetResponseEnvelopeSuccessTrue SippyGetResponseEnvelopeSuccess = true
)
func (SippyGetResponseEnvelopeSuccess) IsKnown ¶
func (r SippyGetResponseEnvelopeSuccess) IsKnown() bool
type SippyService ¶
type SippyService struct {
Options []option.RequestOption
}
SippyService 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 NewSippyService method instead.
func NewSippyService ¶
func NewSippyService(opts ...option.RequestOption) (r *SippyService)
NewSippyService 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 (*SippyService) Delete ¶
func (r *SippyService) Delete(ctx context.Context, bucketName string, body SippyDeleteParams, opts ...option.RequestOption) (res *SippyDeleteResponse, err error)
Disables Sippy on this bucket
func (*SippyService) Get ¶
func (r *SippyService) Get(ctx context.Context, bucketName string, query SippyGetParams, opts ...option.RequestOption) (res *Sippy, err error)
Gets configuration for Sippy for an existing R2 bucket.
func (*SippyService) Update ¶
func (r *SippyService) Update(ctx context.Context, bucketName string, params SippyUpdateParams, opts ...option.RequestOption) (res *Sippy, err error)
Sets configuration for Sippy for an existing R2 bucket.
type SippySource ¶
type SippySource struct { // Name of the bucket on the provider Bucket string `json:"bucket"` Provider SippySourceProvider `json:"provider"` // Region where the bucket resides (AWS only) Region string `json:"region,nullable"` JSON sippySourceJSON `json:"-"` }
Details about the configured source bucket
func (*SippySource) UnmarshalJSON ¶
func (r *SippySource) UnmarshalJSON(data []byte) (err error)
type SippySourceProvider ¶
type SippySourceProvider string
const ( SippySourceProviderAws SippySourceProvider = "aws" SippySourceProviderGcs SippySourceProvider = "gcs" )
func (SippySourceProvider) IsKnown ¶
func (r SippySourceProvider) IsKnown() bool
type SippyUpdateParams ¶
type SippyUpdateParams struct { // Account ID AccountID param.Field[string] `path:"account_id,required"` Body SippyUpdateParamsBodyUnion `json:"body,required"` }
func (SippyUpdateParams) MarshalJSON ¶
func (r SippyUpdateParams) MarshalJSON() (data []byte, err error)
type SippyUpdateParamsBody ¶
type SippyUpdateParamsBody struct { Destination param.Field[interface{}] `json:"destination,required"` Source param.Field[interface{}] `json:"source,required"` }
func (SippyUpdateParamsBody) MarshalJSON ¶
func (r SippyUpdateParamsBody) MarshalJSON() (data []byte, err error)
type SippyUpdateParamsBodyR2EnableSippyAws ¶
type SippyUpdateParamsBodyR2EnableSippyAws struct { // R2 bucket to copy objects to Destination param.Field[SippyUpdateParamsBodyR2EnableSippyAwsDestination] `json:"destination"` // AWS S3 bucket to copy objects from Source param.Field[SippyUpdateParamsBodyR2EnableSippyAwsSource] `json:"source"` }
func (SippyUpdateParamsBodyR2EnableSippyAws) MarshalJSON ¶
func (r SippyUpdateParamsBodyR2EnableSippyAws) MarshalJSON() (data []byte, err error)
type SippyUpdateParamsBodyR2EnableSippyAwsDestination ¶
type SippyUpdateParamsBodyR2EnableSippyAwsDestination struct { // ID of a Cloudflare API token. This is the value labelled "Access Key ID" when // creating an API token from the // [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). // // Sippy will use this token when writing objects to R2, so it is best to scope // this token to the bucket you're enabling Sippy for. AccessKeyID param.Field[string] `json:"accessKeyId"` Provider param.Field[Provider] `json:"provider"` // Value of a Cloudflare API token. This is the value labelled "Secret Access Key" // when creating an API token from the // [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). // // Sippy will use this token when writing objects to R2, so it is best to scope // this token to the bucket you're enabling Sippy for. SecretAccessKey param.Field[string] `json:"secretAccessKey"` }
R2 bucket to copy objects to
func (SippyUpdateParamsBodyR2EnableSippyAwsDestination) MarshalJSON ¶
func (r SippyUpdateParamsBodyR2EnableSippyAwsDestination) MarshalJSON() (data []byte, err error)
type SippyUpdateParamsBodyR2EnableSippyAwsSource ¶
type SippyUpdateParamsBodyR2EnableSippyAwsSource struct { // Access Key ID of an IAM credential (ideally scoped to a single S3 bucket) AccessKeyID param.Field[string] `json:"accessKeyId"` // Name of the AWS S3 bucket Bucket param.Field[string] `json:"bucket"` Provider param.Field[SippyUpdateParamsBodyR2EnableSippyAwsSourceProvider] `json:"provider"` // Name of the AWS availability zone Region param.Field[string] `json:"region"` // Secret Access Key of an IAM credential (ideally scoped to a single S3 bucket) SecretAccessKey param.Field[string] `json:"secretAccessKey"` }
AWS S3 bucket to copy objects from
func (SippyUpdateParamsBodyR2EnableSippyAwsSource) MarshalJSON ¶
func (r SippyUpdateParamsBodyR2EnableSippyAwsSource) MarshalJSON() (data []byte, err error)
type SippyUpdateParamsBodyR2EnableSippyAwsSourceProvider ¶
type SippyUpdateParamsBodyR2EnableSippyAwsSourceProvider string
const (
SippyUpdateParamsBodyR2EnableSippyAwsSourceProviderAws SippyUpdateParamsBodyR2EnableSippyAwsSourceProvider = "aws"
)
func (SippyUpdateParamsBodyR2EnableSippyAwsSourceProvider) IsKnown ¶
func (r SippyUpdateParamsBodyR2EnableSippyAwsSourceProvider) IsKnown() bool
type SippyUpdateParamsBodyR2EnableSippyGcs ¶
type SippyUpdateParamsBodyR2EnableSippyGcs struct { // R2 bucket to copy objects to Destination param.Field[SippyUpdateParamsBodyR2EnableSippyGcsDestination] `json:"destination"` // GCS bucket to copy objects from Source param.Field[SippyUpdateParamsBodyR2EnableSippyGcsSource] `json:"source"` }
func (SippyUpdateParamsBodyR2EnableSippyGcs) MarshalJSON ¶
func (r SippyUpdateParamsBodyR2EnableSippyGcs) MarshalJSON() (data []byte, err error)
type SippyUpdateParamsBodyR2EnableSippyGcsDestination ¶
type SippyUpdateParamsBodyR2EnableSippyGcsDestination struct { // ID of a Cloudflare API token. This is the value labelled "Access Key ID" when // creating an API token from the // [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). // // Sippy will use this token when writing objects to R2, so it is best to scope // this token to the bucket you're enabling Sippy for. AccessKeyID param.Field[string] `json:"accessKeyId"` Provider param.Field[Provider] `json:"provider"` // Value of a Cloudflare API token. This is the value labelled "Secret Access Key" // when creating an API token from the // [R2 dashboard](https://dash.cloudflare.com/?to=/:account/r2/api-tokens). // // Sippy will use this token when writing objects to R2, so it is best to scope // this token to the bucket you're enabling Sippy for. SecretAccessKey param.Field[string] `json:"secretAccessKey"` }
R2 bucket to copy objects to
func (SippyUpdateParamsBodyR2EnableSippyGcsDestination) MarshalJSON ¶
func (r SippyUpdateParamsBodyR2EnableSippyGcsDestination) MarshalJSON() (data []byte, err error)
type SippyUpdateParamsBodyR2EnableSippyGcsSource ¶
type SippyUpdateParamsBodyR2EnableSippyGcsSource struct { // Name of the GCS bucket Bucket param.Field[string] `json:"bucket"` // Client email of an IAM credential (ideally scoped to a single GCS bucket) ClientEmail param.Field[string] `json:"clientEmail"` // Private Key of an IAM credential (ideally scoped to a single GCS bucket) PrivateKey param.Field[string] `json:"privateKey"` Provider param.Field[SippyUpdateParamsBodyR2EnableSippyGcsSourceProvider] `json:"provider"` }
GCS bucket to copy objects from
func (SippyUpdateParamsBodyR2EnableSippyGcsSource) MarshalJSON ¶
func (r SippyUpdateParamsBodyR2EnableSippyGcsSource) MarshalJSON() (data []byte, err error)
type SippyUpdateParamsBodyR2EnableSippyGcsSourceProvider ¶
type SippyUpdateParamsBodyR2EnableSippyGcsSourceProvider string
const (
SippyUpdateParamsBodyR2EnableSippyGcsSourceProviderGcs SippyUpdateParamsBodyR2EnableSippyGcsSourceProvider = "gcs"
)
func (SippyUpdateParamsBodyR2EnableSippyGcsSourceProvider) IsKnown ¶
func (r SippyUpdateParamsBodyR2EnableSippyGcsSourceProvider) IsKnown() bool
type SippyUpdateParamsBodyUnion ¶
type SippyUpdateParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by r2.SippyUpdateParamsBodyR2EnableSippyAws, r2.SippyUpdateParamsBodyR2EnableSippyGcs, SippyUpdateParamsBody.
type SippyUpdateResponseEnvelope ¶
type SippyUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result Sippy `json:"result,required"` // Whether the API call was successful Success SippyUpdateResponseEnvelopeSuccess `json:"success,required"` JSON sippyUpdateResponseEnvelopeJSON `json:"-"` }
func (*SippyUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *SippyUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SippyUpdateResponseEnvelopeSuccess ¶
type SippyUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
SippyUpdateResponseEnvelopeSuccessTrue SippyUpdateResponseEnvelopeSuccess = true
)
func (SippyUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r SippyUpdateResponseEnvelopeSuccess) IsKnown() bool
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
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 TemporaryCredentialNewParams ¶
type TemporaryCredentialNewParams struct { // Account ID AccountID param.Field[string] `path:"account_id,required"` TemporaryCredential TemporaryCredentialParam `json:"temporary_credential,required"` }
func (TemporaryCredentialNewParams) MarshalJSON ¶
func (r TemporaryCredentialNewParams) MarshalJSON() (data []byte, err error)
type TemporaryCredentialNewResponse ¶
type TemporaryCredentialNewResponse struct { // ID for new access key AccessKeyID string `json:"accessKeyId"` // Secret access key SecretAccessKey string `json:"secretAccessKey"` // Security token SessionToken string `json:"sessionToken"` JSON temporaryCredentialNewResponseJSON `json:"-"` }
func (*TemporaryCredentialNewResponse) UnmarshalJSON ¶
func (r *TemporaryCredentialNewResponse) UnmarshalJSON(data []byte) (err error)
type TemporaryCredentialNewResponseEnvelope ¶
type TemporaryCredentialNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []string `json:"messages,required"` Result TemporaryCredentialNewResponse `json:"result,required"` // Whether the API call was successful Success TemporaryCredentialNewResponseEnvelopeSuccess `json:"success,required"` JSON temporaryCredentialNewResponseEnvelopeJSON `json:"-"` }
func (*TemporaryCredentialNewResponseEnvelope) UnmarshalJSON ¶
func (r *TemporaryCredentialNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TemporaryCredentialNewResponseEnvelopeSuccess ¶
type TemporaryCredentialNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
TemporaryCredentialNewResponseEnvelopeSuccessTrue TemporaryCredentialNewResponseEnvelopeSuccess = true
)
func (TemporaryCredentialNewResponseEnvelopeSuccess) IsKnown ¶
func (r TemporaryCredentialNewResponseEnvelopeSuccess) IsKnown() bool
type TemporaryCredentialParam ¶
type TemporaryCredentialParam struct { // Name of the R2 bucket Bucket param.Field[string] `json:"bucket,required"` // The parent access key id to use for signing ParentAccessKeyID param.Field[string] `json:"parentAccessKeyId,required"` // Permissions allowed on the credentials Permission param.Field[TemporaryCredentialPermission] `json:"permission,required"` // How long the credentials will live for in seconds TTLSeconds param.Field[float64] `json:"ttlSeconds,required"` // Optional object paths to scope the credentials to Objects param.Field[[]string] `json:"objects"` // Optional prefix paths to scope the credentials to Prefixes param.Field[[]string] `json:"prefixes"` }
func (TemporaryCredentialParam) MarshalJSON ¶
func (r TemporaryCredentialParam) MarshalJSON() (data []byte, err error)
type TemporaryCredentialPermission ¶
type TemporaryCredentialPermission string
Permissions allowed on the credentials
const ( TemporaryCredentialPermissionAdminReadWrite TemporaryCredentialPermission = "admin-read-write" TemporaryCredentialPermissionAdminReadOnly TemporaryCredentialPermission = "admin-read-only" TemporaryCredentialPermissionObjectReadWrite TemporaryCredentialPermission = "object-read-write" TemporaryCredentialPermissionObjectReadOnly TemporaryCredentialPermission = "object-read-only" )
func (TemporaryCredentialPermission) IsKnown ¶
func (r TemporaryCredentialPermission) IsKnown() bool
type TemporaryCredentialService ¶
type TemporaryCredentialService struct {
Options []option.RequestOption
}
TemporaryCredentialService 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 NewTemporaryCredentialService method instead.
func NewTemporaryCredentialService ¶
func NewTemporaryCredentialService(opts ...option.RequestOption) (r *TemporaryCredentialService)
NewTemporaryCredentialService 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 (*TemporaryCredentialService) New ¶
func (r *TemporaryCredentialService) New(ctx context.Context, params TemporaryCredentialNewParams, opts ...option.RequestOption) (res *TemporaryCredentialNewResponse, err error)
Creates temporary access credentials on a bucket that can be optionally scoped to prefixes or objects.