Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConfigSrc
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type ConfigDeleteParams
- type ConfigDeleteResponse
- type ConfigDeleteResponseEnvelope
- type ConfigDeleteResponseEnvelopeSuccess
- type ConfigEditParams
- type ConfigEditParamsCaching
- type ConfigEditParamsCachingHyperdriveHyperdriveCachingCommon
- type ConfigEditParamsCachingHyperdriveHyperdriveCachingEnabled
- type ConfigEditParamsCachingUnion
- type ConfigEditParamsMTLS
- type ConfigEditParamsOrigin
- type ConfigEditParamsOriginHyperdriveHyperdriveDatabase
- type ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme
- type ConfigEditParamsOriginHyperdriveInternetOrigin
- type ConfigEditParamsOriginHyperdriveOverAccessOrigin
- type ConfigEditParamsOriginHyperdriveVPCServiceOrigin
- type ConfigEditParamsOriginScheme
- type ConfigEditParamsOriginUnion
- type ConfigEditResponse
- type ConfigEditResponseCaching
- type ConfigEditResponseEnvelope
- type ConfigEditResponseEnvelopeSuccess
- type ConfigEditResponseIntegration
- type ConfigEditResponseIntegrationProvider
- type ConfigEditResponseIntegrationScheme
- type ConfigEditResponseMTLS
- type ConfigEditResponseOrigin
- type ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel
- type ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme
- type ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPC
- type ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCScheme
- type ConfigEditResponseOriginPublicDatabase
- type ConfigEditResponseOriginPublicDatabaseScheme
- type ConfigEditResponseOriginScheme
- type ConfigEditResponseOriginUnion
- type ConfigGetParams
- type ConfigGetResponse
- type ConfigGetResponseCaching
- type ConfigGetResponseEnvelope
- type ConfigGetResponseEnvelopeSuccess
- type ConfigGetResponseIntegration
- type ConfigGetResponseIntegrationProvider
- type ConfigGetResponseIntegrationScheme
- type ConfigGetResponseMTLS
- type ConfigGetResponseOrigin
- type ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel
- type ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme
- type ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPC
- type ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCScheme
- type ConfigGetResponseOriginPublicDatabase
- type ConfigGetResponseOriginPublicDatabaseScheme
- type ConfigGetResponseOriginScheme
- type ConfigGetResponseOriginUnion
- type ConfigListParams
- type ConfigListResponse
- type ConfigListResponseCaching
- type ConfigListResponseIntegration
- type ConfigListResponseIntegrationProvider
- type ConfigListResponseIntegrationScheme
- type ConfigListResponseMTLS
- type ConfigListResponseOrigin
- type ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel
- type ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme
- type ConfigListResponseOriginDatabaseReachableThroughAWorkersVPC
- type ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme
- type ConfigListResponseOriginPublicDatabase
- type ConfigListResponseOriginPublicDatabaseScheme
- type ConfigListResponseOriginScheme
- type ConfigListResponseOriginUnion
- type ConfigNewParams
- type ConfigNewParamsBody
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegration
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCaching
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingUnion
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegration
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProvider
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationScheme
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationMTLS
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOrigin
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCaching
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabled
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingUnion
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginMTLS
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOrigin
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnel
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPC
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCScheme
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabase
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseScheme
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginScheme
- type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginUnion
- type ConfigNewParamsBodyUnion
- type ConfigNewResponse
- type ConfigNewResponseCaching
- type ConfigNewResponseEnvelope
- type ConfigNewResponseEnvelopeSuccess
- type ConfigNewResponseIntegration
- type ConfigNewResponseIntegrationProvider
- type ConfigNewResponseIntegrationScheme
- type ConfigNewResponseMTLS
- type ConfigNewResponseOrigin
- type ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel
- type ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme
- type ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPC
- type ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCScheme
- type ConfigNewResponseOriginPublicDatabase
- type ConfigNewResponseOriginPublicDatabaseScheme
- type ConfigNewResponseOriginScheme
- type ConfigNewResponseOriginUnion
- type ConfigRestartParams
- type ConfigRestartResponse
- type ConfigRestartResponseCaching
- type ConfigRestartResponseEnvelope
- type ConfigRestartResponseEnvelopeSuccess
- type ConfigRestartResponseIntegration
- type ConfigRestartResponseIntegrationProvider
- type ConfigRestartResponseIntegrationScheme
- type ConfigRestartResponseMTLS
- type ConfigRestartResponseOrigin
- type ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel
- type ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme
- type ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPC
- type ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCScheme
- type ConfigRestartResponseOriginPublicDatabase
- type ConfigRestartResponseOriginPublicDatabaseScheme
- type ConfigRestartResponseOriginScheme
- type ConfigRestartResponseOriginUnion
- type ConfigService
- func (r *ConfigService) Delete(ctx context.Context, hyperdriveID string, body ConfigDeleteParams, ...) (res *ConfigDeleteResponse, err error)
- func (r *ConfigService) Edit(ctx context.Context, hyperdriveID string, params ConfigEditParams, ...) (res *ConfigEditResponse, err error)
- func (r *ConfigService) Get(ctx context.Context, hyperdriveID string, query ConfigGetParams, ...) (res *ConfigGetResponse, err error)
- func (r *ConfigService) List(ctx context.Context, params ConfigListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[ConfigListResponse], err error)
- func (r *ConfigService) ListAutoPaging(ctx context.Context, params ConfigListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[ConfigListResponse]
- func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *ConfigNewResponse, err error)
- func (r *ConfigService) Restart(ctx context.Context, hyperdriveID string, body ConfigRestartParams, ...) (res *ConfigRestartResponse, err error)
- func (r *ConfigService) Update(ctx context.Context, hyperdriveID string, params ConfigUpdateParams, ...) (res *ConfigUpdateResponse, err error)
- type ConfigUpdateParams
- type ConfigUpdateResponse
- type ConfigUpdateResponseCaching
- type ConfigUpdateResponseEnvelope
- type ConfigUpdateResponseEnvelopeSuccess
- type ConfigUpdateResponseIntegration
- type ConfigUpdateResponseIntegrationProvider
- type ConfigUpdateResponseIntegrationScheme
- type ConfigUpdateResponseMTLS
- type ConfigUpdateResponseOrigin
- type ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel
- type ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme
- type ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPC
- type ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCScheme
- type ConfigUpdateResponseOriginPublicDatabase
- type ConfigUpdateResponseOriginPublicDatabaseScheme
- type ConfigUpdateResponseOriginScheme
- type ConfigUpdateResponseOriginUnion
- type Error
- type ErrorData
- type ErrorDataSource
- type HyperdriveCachingHyperdriveHyperdriveCachingCommonParam
- type HyperdriveCachingHyperdriveHyperdriveCachingEnabledParam
- type HyperdriveCachingParam
- type HyperdriveCachingUnionParam
- type HyperdriveMTLSParam
- type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelParam
- type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme
- type HyperdriveOriginDatabaseReachableThroughAWorkersVPCParam
- type HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme
- type HyperdriveOriginParam
- type HyperdriveOriginPublicDatabaseParam
- type HyperdriveOriginPublicDatabaseScheme
- type HyperdriveOriginScheme
- type HyperdriveOriginUnionParam
- type HyperdriveParam
- type HyperdriveService
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenPolicyResourcesIAMResourcesTypeObjectNested
- type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
- type TokenPolicyResourcesIAMResourcesTypeObjectString
- type TokenPolicyResourcesIAMResourcesTypeObjectStringParam
- type TokenPolicyResourcesUnion
- type TokenPolicyResourcesUnionParam
- type TokenStatus
- type TokenValue
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 CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare
This is an alias to an internal value.
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal
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 CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
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 RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
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.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
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 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 CloudflareTunnelConfigSrc ¶
type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc
Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.
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 ConfigDeleteParams ¶
type ConfigDeleteResponse ¶
type ConfigDeleteResponse = interface{}
type ConfigDeleteResponseEnvelope ¶
type ConfigDeleteResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors" api:"required"`
Messages []shared.ResponseInfo `json:"messages" api:"required"`
Result ConfigDeleteResponse `json:"result" api:"required,nullable"`
// Return the status of the API call success.
Success ConfigDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
JSON configDeleteResponseEnvelopeJSON `json:"-"`
}
func (*ConfigDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigDeleteResponseEnvelopeSuccess ¶
type ConfigDeleteResponseEnvelopeSuccess bool
Return the status of the API call success.
const (
ConfigDeleteResponseEnvelopeSuccessTrue ConfigDeleteResponseEnvelopeSuccess = true
)
func (ConfigDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigDeleteResponseEnvelopeSuccess) IsKnown() bool
type ConfigEditParams ¶
type ConfigEditParams struct {
// Define configurations using a unique string identifier.
AccountID param.Field[string] `path:"account_id" api:"required"`
Caching param.Field[ConfigEditParamsCachingUnion] `json:"caching"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS param.Field[ConfigEditParamsMTLS] `json:"mtls"`
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API. An empty value leaves the name unchanged.
Name param.Field[string] `json:"name"`
// Connect to a database through a Workers VPC Service. TLS settings (mTLS,
// sslmode) cannot be configured on the Hyperdrive when using a VPC Service origin;
// TLS must be managed on the VPC Service itself.
Origin param.Field[ConfigEditParamsOriginUnion] `json:"origin"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit param.Field[int64] `json:"origin_connection_limit"`
}
func (ConfigEditParams) MarshalJSON ¶
func (r ConfigEditParams) MarshalJSON() (data []byte, err error)
type ConfigEditParamsCaching ¶
type ConfigEditParamsCaching struct {
// Set to true to disable caching of SQL responses. Default is false.
Disabled param.Field[bool] `json:"disabled"`
// Specify the maximum duration (in seconds) items should persist in the cache.
// Defaults to 60 seconds if not specified.
MaxAge param.Field[int64] `json:"max_age"`
// Specify the number of seconds the cache may serve a stale response. Defaults to
// 15 seconds if not specified.
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (ConfigEditParamsCaching) MarshalJSON ¶
func (r ConfigEditParamsCaching) MarshalJSON() (data []byte, err error)
type ConfigEditParamsCachingHyperdriveHyperdriveCachingCommon ¶
type ConfigEditParamsCachingHyperdriveHyperdriveCachingCommon struct {
// Set to true to disable caching of SQL responses. Default is false.
Disabled param.Field[bool] `json:"disabled"`
}
func (ConfigEditParamsCachingHyperdriveHyperdriveCachingCommon) MarshalJSON ¶
func (r ConfigEditParamsCachingHyperdriveHyperdriveCachingCommon) MarshalJSON() (data []byte, err error)
type ConfigEditParamsCachingHyperdriveHyperdriveCachingEnabled ¶
type ConfigEditParamsCachingHyperdriveHyperdriveCachingEnabled struct {
// Set to true to disable caching of SQL responses. Default is false.
Disabled param.Field[bool] `json:"disabled"`
// Specify the maximum duration (in seconds) items should persist in the cache.
// Defaults to 60 seconds if not specified.
MaxAge param.Field[int64] `json:"max_age"`
// Specify the number of seconds the cache may serve a stale response. Defaults to
// 15 seconds if not specified.
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (ConfigEditParamsCachingHyperdriveHyperdriveCachingEnabled) MarshalJSON ¶
func (r ConfigEditParamsCachingHyperdriveHyperdriveCachingEnabled) MarshalJSON() (data []byte, err error)
type ConfigEditParamsCachingUnion ¶
type ConfigEditParamsCachingUnion interface {
// contains filtered or unexported methods
}
Satisfied by hyperdrive.ConfigEditParamsCachingHyperdriveHyperdriveCachingCommon, hyperdrive.ConfigEditParamsCachingHyperdriveHyperdriveCachingEnabled, ConfigEditParamsCaching.
type ConfigEditParamsMTLS ¶
type ConfigEditParamsMTLS struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID param.Field[string] `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID param.Field[string] `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode param.Field[string] `json:"sslmode"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (ConfigEditParamsMTLS) MarshalJSON ¶
func (r ConfigEditParamsMTLS) MarshalJSON() (data []byte, err error)
type ConfigEditParamsOrigin ¶
type ConfigEditParamsOrigin struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID param.Field[string] `json:"access_client_id"`
// Defines the Client Secret of the Access Token to use when connecting to the
// origin database. The API never returns this write-only value.
AccessClientSecret param.Field[string] `json:"access_client_secret"`
// Set the name of your origin database.
Database param.Field[string] `json:"database"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host param.Field[string] `json:"host"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port param.Field[int64] `json:"port"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[ConfigEditParamsOriginScheme] `json:"scheme"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID param.Field[string] `json:"service_id"`
// Set the user of your origin database.
User param.Field[string] `json:"user"`
}
Connect to a database through a Workers VPC Service. TLS settings (mTLS, sslmode) cannot be configured on the Hyperdrive when using a VPC Service origin; TLS must be managed on the VPC Service itself.
func (ConfigEditParamsOrigin) MarshalJSON ¶
func (r ConfigEditParamsOrigin) MarshalJSON() (data []byte, err error)
type ConfigEditParamsOriginHyperdriveHyperdriveDatabase ¶
type ConfigEditParamsOriginHyperdriveHyperdriveDatabase struct {
// Set the name of your origin database.
Database param.Field[string] `json:"database"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme] `json:"scheme"`
// Set the user of your origin database.
User param.Field[string] `json:"user"`
}
func (ConfigEditParamsOriginHyperdriveHyperdriveDatabase) MarshalJSON ¶
func (r ConfigEditParamsOriginHyperdriveHyperdriveDatabase) MarshalJSON() (data []byte, err error)
type ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme ¶
type ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigEditParamsOriginHyperdriveHyperdriveDatabaseSchemePostgres ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme = "postgres" ConfigEditParamsOriginHyperdriveHyperdriveDatabaseSchemePostgresql ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme = "postgresql" ConfigEditParamsOriginHyperdriveHyperdriveDatabaseSchemeMysql ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme = "mysql" )
func (ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme) IsKnown ¶
func (r ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme) IsKnown() bool
type ConfigEditParamsOriginHyperdriveInternetOrigin ¶
type ConfigEditParamsOriginHyperdriveInternetOrigin struct {
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host param.Field[string] `json:"host" api:"required"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port param.Field[int64] `json:"port" api:"required"`
}
func (ConfigEditParamsOriginHyperdriveInternetOrigin) MarshalJSON ¶
func (r ConfigEditParamsOriginHyperdriveInternetOrigin) MarshalJSON() (data []byte, err error)
type ConfigEditParamsOriginHyperdriveOverAccessOrigin ¶
type ConfigEditParamsOriginHyperdriveOverAccessOrigin struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID param.Field[string] `json:"access_client_id" api:"required"`
// Defines the Client Secret of the Access Token to use when connecting to the
// origin database. The API never returns this write-only value.
AccessClientSecret param.Field[string] `json:"access_client_secret" api:"required"`
// Defines the host (hostname or IP) of your origin database.
Host param.Field[string] `json:"host" api:"required"`
}
func (ConfigEditParamsOriginHyperdriveOverAccessOrigin) MarshalJSON ¶
func (r ConfigEditParamsOriginHyperdriveOverAccessOrigin) MarshalJSON() (data []byte, err error)
type ConfigEditParamsOriginHyperdriveVPCServiceOrigin ¶
type ConfigEditParamsOriginHyperdriveVPCServiceOrigin struct {
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID param.Field[string] `json:"service_id" api:"required"`
}
Connect to a database through a Workers VPC Service. TLS settings (mTLS, sslmode) cannot be configured on the Hyperdrive when using a VPC Service origin; TLS must be managed on the VPC Service itself.
func (ConfigEditParamsOriginHyperdriveVPCServiceOrigin) MarshalJSON ¶
func (r ConfigEditParamsOriginHyperdriveVPCServiceOrigin) MarshalJSON() (data []byte, err error)
type ConfigEditParamsOriginScheme ¶
type ConfigEditParamsOriginScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigEditParamsOriginSchemePostgres ConfigEditParamsOriginScheme = "postgres" ConfigEditParamsOriginSchemePostgresql ConfigEditParamsOriginScheme = "postgresql" ConfigEditParamsOriginSchemeMysql ConfigEditParamsOriginScheme = "mysql" )
func (ConfigEditParamsOriginScheme) IsKnown ¶
func (r ConfigEditParamsOriginScheme) IsKnown() bool
type ConfigEditParamsOriginUnion ¶
type ConfigEditParamsOriginUnion interface {
// contains filtered or unexported methods
}
Connect to a database through a Workers VPC Service. TLS settings (mTLS, sslmode) cannot be configured on the Hyperdrive when using a VPC Service origin; TLS must be managed on the VPC Service itself.
Satisfied by hyperdrive.ConfigEditParamsOriginHyperdriveHyperdriveDatabase, hyperdrive.ConfigEditParamsOriginHyperdriveInternetOrigin, hyperdrive.ConfigEditParamsOriginHyperdriveOverAccessOrigin, hyperdrive.ConfigEditParamsOriginHyperdriveVPCServiceOrigin, ConfigEditParamsOrigin.
type ConfigEditResponse ¶
type ConfigEditResponse struct {
// Define configurations using a unique string identifier.
ID string `json:"id" api:"required"`
Caching ConfigEditResponseCaching `json:"caching" api:"required"`
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name string `json:"name" api:"required"`
// Combines database connection fields with exactly one supported network location.
Origin ConfigEditResponseOrigin `json:"origin" api:"required"`
// Defines the creation time of the Hyperdrive configuration.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// Selects a PlanetScale database and provisions credentials managed by Cloudflare
// when creating a Hyperdrive configuration. The Cloudflare account must already be
// linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as
// read-only metadata and cannot be changed with replace or update operations.
Integration ConfigEditResponseIntegration `json:"integration"`
// Defines the last modified time of the Hyperdrive configuration.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS ConfigEditResponseMTLS `json:"mtls"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit int64 `json:"origin_connection_limit"`
// Defines the last time the Hyperdrive connection pool was explicitly restarted
// via the restart endpoint. Omitted if the pool has never been explicitly
// restarted.
RestartedOn time.Time `json:"restarted_on" api:"nullable" format:"date-time"`
JSON configEditResponseJSON `json:"-"`
}
func (*ConfigEditResponse) UnmarshalJSON ¶
func (r *ConfigEditResponse) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseCaching ¶
type ConfigEditResponseCaching struct {
// Defines whether caching is disabled.
Disabled bool `json:"disabled" api:"required"`
// Defines the maximum duration (in seconds) items persist in the cache.
MaxAge int64 `json:"max_age"`
// Defines the number of seconds the cache may serve a stale response.
StaleWhileRevalidate int64 `json:"stale_while_revalidate"`
JSON configEditResponseCachingJSON `json:"-"`
}
func (*ConfigEditResponseCaching) UnmarshalJSON ¶
func (r *ConfigEditResponseCaching) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseEnvelope ¶
type ConfigEditResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors" api:"required"`
Messages []shared.ResponseInfo `json:"messages" api:"required"`
Result ConfigEditResponse `json:"result" api:"required"`
// Return the status of the API call success.
Success ConfigEditResponseEnvelopeSuccess `json:"success" api:"required"`
JSON configEditResponseEnvelopeJSON `json:"-"`
}
func (*ConfigEditResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseEnvelopeSuccess ¶
type ConfigEditResponseEnvelopeSuccess bool
Return the status of the API call success.
const (
ConfigEditResponseEnvelopeSuccessTrue ConfigEditResponseEnvelopeSuccess = true
)
func (ConfigEditResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigEditResponseEnvelopeSuccess) IsKnown() bool
type ConfigEditResponseIntegration ¶
type ConfigEditResponseIntegration struct {
// The name of the PlanetScale database branch.
DatabaseBranchName string `json:"database_branch_name" api:"required"`
// The name of the PlanetScale database.
DatabaseName string `json:"database_name" api:"required"`
// The name of the PlanetScale organization.
OrganizationName string `json:"organization_name" api:"required"`
// The database integration provider used by this operation.
Provider ConfigEditResponseIntegrationProvider `json:"provider" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigEditResponseIntegrationScheme `json:"scheme" api:"required"`
// The database name to use when connecting. Defaults to `postgres` for PostgreSQL
// and `mysql` for MySQL.
CustomDatabaseName string `json:"custom_database_name"`
JSON configEditResponseIntegrationJSON `json:"-"`
}
Selects a PlanetScale database and provisions credentials managed by Cloudflare when creating a Hyperdrive configuration. The Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as read-only metadata and cannot be changed with replace or update operations.
func (*ConfigEditResponseIntegration) UnmarshalJSON ¶
func (r *ConfigEditResponseIntegration) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseIntegrationProvider ¶
type ConfigEditResponseIntegrationProvider string
The database integration provider used by this operation.
const (
ConfigEditResponseIntegrationProviderPlanetscale ConfigEditResponseIntegrationProvider = "planetscale"
)
func (ConfigEditResponseIntegrationProvider) IsKnown ¶
func (r ConfigEditResponseIntegrationProvider) IsKnown() bool
type ConfigEditResponseIntegrationScheme ¶
type ConfigEditResponseIntegrationScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigEditResponseIntegrationSchemePostgres ConfigEditResponseIntegrationScheme = "postgres" ConfigEditResponseIntegrationSchemePostgresql ConfigEditResponseIntegrationScheme = "postgresql" ConfigEditResponseIntegrationSchemeMysql ConfigEditResponseIntegrationScheme = "mysql" )
func (ConfigEditResponseIntegrationScheme) IsKnown ¶
func (r ConfigEditResponseIntegrationScheme) IsKnown() bool
type ConfigEditResponseMTLS ¶
type ConfigEditResponseMTLS struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID string `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID string `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode string `json:"sslmode"`
JSON configEditResponseMTLSJSON `json:"-"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (*ConfigEditResponseMTLS) UnmarshalJSON ¶
func (r *ConfigEditResponseMTLS) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseOrigin ¶
type ConfigEditResponseOrigin struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigEditResponseOriginScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id"`
JSON configEditResponseOriginJSON `json:"-"`
// contains filtered or unexported fields
}
Combines database connection fields with exactly one supported network location.
func (ConfigEditResponseOrigin) AsUnion ¶
func (r ConfigEditResponseOrigin) AsUnion() ConfigEditResponseOriginUnion
AsUnion returns a ConfigEditResponseOriginUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ConfigEditResponseOriginPublicDatabase, ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel, ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPC.
func (*ConfigEditResponseOrigin) UnmarshalJSON ¶
func (r *ConfigEditResponseOrigin) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel ¶
type ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id" api:"required"`
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the host (hostname or IP) of your origin database.
Host string `json:"host" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelJSON `json:"-"`
}
func (*ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON ¶
func (r *ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme ¶
type ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres" ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql" ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql" )
func (ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown ¶
func (r ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown() bool
type ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPC ¶
type ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPC struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCScheme `json:"scheme" api:"required"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configEditResponseOriginDatabaseReachableThroughAWorkersVPCJSON `json:"-"`
}
func (*ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON ¶
func (r *ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCScheme ¶
type ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgres ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres" ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql" ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCSchemeMysql ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql" )
func (ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown ¶
func (r ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown() bool
type ConfigEditResponseOriginPublicDatabase ¶
type ConfigEditResponseOriginPublicDatabase struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host" api:"required"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigEditResponseOriginPublicDatabaseScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configEditResponseOriginPublicDatabaseJSON `json:"-"`
}
func (*ConfigEditResponseOriginPublicDatabase) UnmarshalJSON ¶
func (r *ConfigEditResponseOriginPublicDatabase) UnmarshalJSON(data []byte) (err error)
type ConfigEditResponseOriginPublicDatabaseScheme ¶
type ConfigEditResponseOriginPublicDatabaseScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigEditResponseOriginPublicDatabaseSchemePostgres ConfigEditResponseOriginPublicDatabaseScheme = "postgres" ConfigEditResponseOriginPublicDatabaseSchemePostgresql ConfigEditResponseOriginPublicDatabaseScheme = "postgresql" ConfigEditResponseOriginPublicDatabaseSchemeMysql ConfigEditResponseOriginPublicDatabaseScheme = "mysql" )
func (ConfigEditResponseOriginPublicDatabaseScheme) IsKnown ¶
func (r ConfigEditResponseOriginPublicDatabaseScheme) IsKnown() bool
type ConfigEditResponseOriginScheme ¶
type ConfigEditResponseOriginScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigEditResponseOriginSchemePostgres ConfigEditResponseOriginScheme = "postgres" ConfigEditResponseOriginSchemePostgresql ConfigEditResponseOriginScheme = "postgresql" ConfigEditResponseOriginSchemeMysql ConfigEditResponseOriginScheme = "mysql" )
func (ConfigEditResponseOriginScheme) IsKnown ¶
func (r ConfigEditResponseOriginScheme) IsKnown() bool
type ConfigEditResponseOriginUnion ¶
type ConfigEditResponseOriginUnion interface {
// contains filtered or unexported methods
}
Combines database connection fields with exactly one supported network location.
Union satisfied by ConfigEditResponseOriginPublicDatabase, ConfigEditResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel or ConfigEditResponseOriginDatabaseReachableThroughAWorkersVPC.
type ConfigGetParams ¶
type ConfigGetResponse ¶
type ConfigGetResponse struct {
// Define configurations using a unique string identifier.
ID string `json:"id" api:"required"`
Caching ConfigGetResponseCaching `json:"caching" api:"required"`
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name string `json:"name" api:"required"`
// Combines database connection fields with exactly one supported network location.
Origin ConfigGetResponseOrigin `json:"origin" api:"required"`
// Defines the creation time of the Hyperdrive configuration.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// Selects a PlanetScale database and provisions credentials managed by Cloudflare
// when creating a Hyperdrive configuration. The Cloudflare account must already be
// linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as
// read-only metadata and cannot be changed with replace or update operations.
Integration ConfigGetResponseIntegration `json:"integration"`
// Defines the last modified time of the Hyperdrive configuration.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS ConfigGetResponseMTLS `json:"mtls"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit int64 `json:"origin_connection_limit"`
// Defines the last time the Hyperdrive connection pool was explicitly restarted
// via the restart endpoint. Omitted if the pool has never been explicitly
// restarted.
RestartedOn time.Time `json:"restarted_on" api:"nullable" format:"date-time"`
JSON configGetResponseJSON `json:"-"`
}
func (*ConfigGetResponse) UnmarshalJSON ¶
func (r *ConfigGetResponse) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseCaching ¶
type ConfigGetResponseCaching struct {
// Defines whether caching is disabled.
Disabled bool `json:"disabled" api:"required"`
// Defines the maximum duration (in seconds) items persist in the cache.
MaxAge int64 `json:"max_age"`
// Defines the number of seconds the cache may serve a stale response.
StaleWhileRevalidate int64 `json:"stale_while_revalidate"`
JSON configGetResponseCachingJSON `json:"-"`
}
func (*ConfigGetResponseCaching) UnmarshalJSON ¶
func (r *ConfigGetResponseCaching) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseEnvelope ¶
type ConfigGetResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors" api:"required"`
Messages []shared.ResponseInfo `json:"messages" api:"required"`
Result ConfigGetResponse `json:"result" api:"required"`
// Return the status of the API call success.
Success ConfigGetResponseEnvelopeSuccess `json:"success" api:"required"`
JSON configGetResponseEnvelopeJSON `json:"-"`
}
func (*ConfigGetResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseEnvelopeSuccess ¶
type ConfigGetResponseEnvelopeSuccess bool
Return the status of the API call success.
const (
ConfigGetResponseEnvelopeSuccessTrue ConfigGetResponseEnvelopeSuccess = true
)
func (ConfigGetResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigGetResponseEnvelopeSuccess) IsKnown() bool
type ConfigGetResponseIntegration ¶
type ConfigGetResponseIntegration struct {
// The name of the PlanetScale database branch.
DatabaseBranchName string `json:"database_branch_name" api:"required"`
// The name of the PlanetScale database.
DatabaseName string `json:"database_name" api:"required"`
// The name of the PlanetScale organization.
OrganizationName string `json:"organization_name" api:"required"`
// The database integration provider used by this operation.
Provider ConfigGetResponseIntegrationProvider `json:"provider" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigGetResponseIntegrationScheme `json:"scheme" api:"required"`
// The database name to use when connecting. Defaults to `postgres` for PostgreSQL
// and `mysql` for MySQL.
CustomDatabaseName string `json:"custom_database_name"`
JSON configGetResponseIntegrationJSON `json:"-"`
}
Selects a PlanetScale database and provisions credentials managed by Cloudflare when creating a Hyperdrive configuration. The Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as read-only metadata and cannot be changed with replace or update operations.
func (*ConfigGetResponseIntegration) UnmarshalJSON ¶
func (r *ConfigGetResponseIntegration) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseIntegrationProvider ¶
type ConfigGetResponseIntegrationProvider string
The database integration provider used by this operation.
const (
ConfigGetResponseIntegrationProviderPlanetscale ConfigGetResponseIntegrationProvider = "planetscale"
)
func (ConfigGetResponseIntegrationProvider) IsKnown ¶
func (r ConfigGetResponseIntegrationProvider) IsKnown() bool
type ConfigGetResponseIntegrationScheme ¶
type ConfigGetResponseIntegrationScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigGetResponseIntegrationSchemePostgres ConfigGetResponseIntegrationScheme = "postgres" ConfigGetResponseIntegrationSchemePostgresql ConfigGetResponseIntegrationScheme = "postgresql" ConfigGetResponseIntegrationSchemeMysql ConfigGetResponseIntegrationScheme = "mysql" )
func (ConfigGetResponseIntegrationScheme) IsKnown ¶
func (r ConfigGetResponseIntegrationScheme) IsKnown() bool
type ConfigGetResponseMTLS ¶
type ConfigGetResponseMTLS struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID string `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID string `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode string `json:"sslmode"`
JSON configGetResponseMTLSJSON `json:"-"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (*ConfigGetResponseMTLS) UnmarshalJSON ¶
func (r *ConfigGetResponseMTLS) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseOrigin ¶
type ConfigGetResponseOrigin struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigGetResponseOriginScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id"`
JSON configGetResponseOriginJSON `json:"-"`
// contains filtered or unexported fields
}
Combines database connection fields with exactly one supported network location.
func (ConfigGetResponseOrigin) AsUnion ¶
func (r ConfigGetResponseOrigin) AsUnion() ConfigGetResponseOriginUnion
AsUnion returns a ConfigGetResponseOriginUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ConfigGetResponseOriginPublicDatabase, ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel, ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPC.
func (*ConfigGetResponseOrigin) UnmarshalJSON ¶
func (r *ConfigGetResponseOrigin) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel ¶
type ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id" api:"required"`
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the host (hostname or IP) of your origin database.
Host string `json:"host" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelJSON `json:"-"`
}
func (*ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON ¶
func (r *ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme ¶
type ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres" ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql" ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql" )
func (ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown ¶
func (r ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown() bool
type ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPC ¶
type ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPC struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCScheme `json:"scheme" api:"required"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configGetResponseOriginDatabaseReachableThroughAWorkersVPCJSON `json:"-"`
}
func (*ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON ¶
func (r *ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCScheme ¶
type ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgres ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres" ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql" ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCSchemeMysql ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql" )
func (ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown ¶
func (r ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown() bool
type ConfigGetResponseOriginPublicDatabase ¶
type ConfigGetResponseOriginPublicDatabase struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host" api:"required"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigGetResponseOriginPublicDatabaseScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configGetResponseOriginPublicDatabaseJSON `json:"-"`
}
func (*ConfigGetResponseOriginPublicDatabase) UnmarshalJSON ¶
func (r *ConfigGetResponseOriginPublicDatabase) UnmarshalJSON(data []byte) (err error)
type ConfigGetResponseOriginPublicDatabaseScheme ¶
type ConfigGetResponseOriginPublicDatabaseScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigGetResponseOriginPublicDatabaseSchemePostgres ConfigGetResponseOriginPublicDatabaseScheme = "postgres" ConfigGetResponseOriginPublicDatabaseSchemePostgresql ConfigGetResponseOriginPublicDatabaseScheme = "postgresql" ConfigGetResponseOriginPublicDatabaseSchemeMysql ConfigGetResponseOriginPublicDatabaseScheme = "mysql" )
func (ConfigGetResponseOriginPublicDatabaseScheme) IsKnown ¶
func (r ConfigGetResponseOriginPublicDatabaseScheme) IsKnown() bool
type ConfigGetResponseOriginScheme ¶
type ConfigGetResponseOriginScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigGetResponseOriginSchemePostgres ConfigGetResponseOriginScheme = "postgres" ConfigGetResponseOriginSchemePostgresql ConfigGetResponseOriginScheme = "postgresql" ConfigGetResponseOriginSchemeMysql ConfigGetResponseOriginScheme = "mysql" )
func (ConfigGetResponseOriginScheme) IsKnown ¶
func (r ConfigGetResponseOriginScheme) IsKnown() bool
type ConfigGetResponseOriginUnion ¶
type ConfigGetResponseOriginUnion interface {
// contains filtered or unexported methods
}
Combines database connection fields with exactly one supported network location.
Union satisfied by ConfigGetResponseOriginPublicDatabase, ConfigGetResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel or ConfigGetResponseOriginDatabaseReachableThroughAWorkersVPC.
type ConfigListParams ¶
type ConfigListParams struct {
// Define configurations using a unique string identifier.
AccountID param.Field[string] `path:"account_id" api:"required"`
// Page number of paginated results.
Page param.Field[int64] `query:"page"`
// Maximum number of results per page.
PerPage param.Field[int64] `query:"per_page"`
}
func (ConfigListParams) URLQuery ¶ added in v7.8.0
func (r ConfigListParams) URLQuery() (v url.Values)
URLQuery serializes ConfigListParams's query parameters as `url.Values`.
type ConfigListResponse ¶
type ConfigListResponse struct {
// Define configurations using a unique string identifier.
ID string `json:"id" api:"required"`
Caching ConfigListResponseCaching `json:"caching" api:"required"`
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name string `json:"name" api:"required"`
// Combines database connection fields with exactly one supported network location.
Origin ConfigListResponseOrigin `json:"origin" api:"required"`
// Defines the creation time of the Hyperdrive configuration.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// Selects a PlanetScale database and provisions credentials managed by Cloudflare
// when creating a Hyperdrive configuration. The Cloudflare account must already be
// linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as
// read-only metadata and cannot be changed with replace or update operations.
Integration ConfigListResponseIntegration `json:"integration"`
// Defines the last modified time of the Hyperdrive configuration.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS ConfigListResponseMTLS `json:"mtls"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit int64 `json:"origin_connection_limit"`
// Defines the last time the Hyperdrive connection pool was explicitly restarted
// via the restart endpoint. Omitted if the pool has never been explicitly
// restarted.
RestartedOn time.Time `json:"restarted_on" api:"nullable" format:"date-time"`
JSON configListResponseJSON `json:"-"`
}
func (*ConfigListResponse) UnmarshalJSON ¶
func (r *ConfigListResponse) UnmarshalJSON(data []byte) (err error)
type ConfigListResponseCaching ¶
type ConfigListResponseCaching struct {
// Defines whether caching is disabled.
Disabled bool `json:"disabled" api:"required"`
// Defines the maximum duration (in seconds) items persist in the cache.
MaxAge int64 `json:"max_age"`
// Defines the number of seconds the cache may serve a stale response.
StaleWhileRevalidate int64 `json:"stale_while_revalidate"`
JSON configListResponseCachingJSON `json:"-"`
}
func (*ConfigListResponseCaching) UnmarshalJSON ¶
func (r *ConfigListResponseCaching) UnmarshalJSON(data []byte) (err error)
type ConfigListResponseIntegration ¶
type ConfigListResponseIntegration struct {
// The name of the PlanetScale database branch.
DatabaseBranchName string `json:"database_branch_name" api:"required"`
// The name of the PlanetScale database.
DatabaseName string `json:"database_name" api:"required"`
// The name of the PlanetScale organization.
OrganizationName string `json:"organization_name" api:"required"`
// The database integration provider used by this operation.
Provider ConfigListResponseIntegrationProvider `json:"provider" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigListResponseIntegrationScheme `json:"scheme" api:"required"`
// The database name to use when connecting. Defaults to `postgres` for PostgreSQL
// and `mysql` for MySQL.
CustomDatabaseName string `json:"custom_database_name"`
JSON configListResponseIntegrationJSON `json:"-"`
}
Selects a PlanetScale database and provisions credentials managed by Cloudflare when creating a Hyperdrive configuration. The Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as read-only metadata and cannot be changed with replace or update operations.
func (*ConfigListResponseIntegration) UnmarshalJSON ¶
func (r *ConfigListResponseIntegration) UnmarshalJSON(data []byte) (err error)
type ConfigListResponseIntegrationProvider ¶
type ConfigListResponseIntegrationProvider string
The database integration provider used by this operation.
const (
ConfigListResponseIntegrationProviderPlanetscale ConfigListResponseIntegrationProvider = "planetscale"
)
func (ConfigListResponseIntegrationProvider) IsKnown ¶
func (r ConfigListResponseIntegrationProvider) IsKnown() bool
type ConfigListResponseIntegrationScheme ¶
type ConfigListResponseIntegrationScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigListResponseIntegrationSchemePostgres ConfigListResponseIntegrationScheme = "postgres" ConfigListResponseIntegrationSchemePostgresql ConfigListResponseIntegrationScheme = "postgresql" ConfigListResponseIntegrationSchemeMysql ConfigListResponseIntegrationScheme = "mysql" )
func (ConfigListResponseIntegrationScheme) IsKnown ¶
func (r ConfigListResponseIntegrationScheme) IsKnown() bool
type ConfigListResponseMTLS ¶
type ConfigListResponseMTLS struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID string `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID string `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode string `json:"sslmode"`
JSON configListResponseMTLSJSON `json:"-"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (*ConfigListResponseMTLS) UnmarshalJSON ¶
func (r *ConfigListResponseMTLS) UnmarshalJSON(data []byte) (err error)
type ConfigListResponseOrigin ¶
type ConfigListResponseOrigin struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigListResponseOriginScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id"`
JSON configListResponseOriginJSON `json:"-"`
// contains filtered or unexported fields
}
Combines database connection fields with exactly one supported network location.
func (ConfigListResponseOrigin) AsUnion ¶
func (r ConfigListResponseOrigin) AsUnion() ConfigListResponseOriginUnion
AsUnion returns a ConfigListResponseOriginUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ConfigListResponseOriginPublicDatabase, ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel, ConfigListResponseOriginDatabaseReachableThroughAWorkersVPC.
func (*ConfigListResponseOrigin) UnmarshalJSON ¶
func (r *ConfigListResponseOrigin) UnmarshalJSON(data []byte) (err error)
type ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel ¶
type ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id" api:"required"`
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the host (hostname or IP) of your origin database.
Host string `json:"host" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelJSON `json:"-"`
}
func (*ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON ¶
func (r *ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON(data []byte) (err error)
type ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme ¶
type ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres" ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql" ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql" )
func (ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown ¶
func (r ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown() bool
type ConfigListResponseOriginDatabaseReachableThroughAWorkersVPC ¶
type ConfigListResponseOriginDatabaseReachableThroughAWorkersVPC struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme `json:"scheme" api:"required"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configListResponseOriginDatabaseReachableThroughAWorkersVPCJSON `json:"-"`
}
func (*ConfigListResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON ¶
func (r *ConfigListResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON(data []byte) (err error)
type ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme ¶
type ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgres ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres" ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql" ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCSchemeMysql ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql" )
func (ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown ¶
func (r ConfigListResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown() bool
type ConfigListResponseOriginPublicDatabase ¶
type ConfigListResponseOriginPublicDatabase struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host" api:"required"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigListResponseOriginPublicDatabaseScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configListResponseOriginPublicDatabaseJSON `json:"-"`
}
func (*ConfigListResponseOriginPublicDatabase) UnmarshalJSON ¶
func (r *ConfigListResponseOriginPublicDatabase) UnmarshalJSON(data []byte) (err error)
type ConfigListResponseOriginPublicDatabaseScheme ¶
type ConfigListResponseOriginPublicDatabaseScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigListResponseOriginPublicDatabaseSchemePostgres ConfigListResponseOriginPublicDatabaseScheme = "postgres" ConfigListResponseOriginPublicDatabaseSchemePostgresql ConfigListResponseOriginPublicDatabaseScheme = "postgresql" ConfigListResponseOriginPublicDatabaseSchemeMysql ConfigListResponseOriginPublicDatabaseScheme = "mysql" )
func (ConfigListResponseOriginPublicDatabaseScheme) IsKnown ¶
func (r ConfigListResponseOriginPublicDatabaseScheme) IsKnown() bool
type ConfigListResponseOriginScheme ¶
type ConfigListResponseOriginScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigListResponseOriginSchemePostgres ConfigListResponseOriginScheme = "postgres" ConfigListResponseOriginSchemePostgresql ConfigListResponseOriginScheme = "postgresql" ConfigListResponseOriginSchemeMysql ConfigListResponseOriginScheme = "mysql" )
func (ConfigListResponseOriginScheme) IsKnown ¶
func (r ConfigListResponseOriginScheme) IsKnown() bool
type ConfigListResponseOriginUnion ¶
type ConfigListResponseOriginUnion interface {
// contains filtered or unexported methods
}
Combines database connection fields with exactly one supported network location.
Union satisfied by ConfigListResponseOriginPublicDatabase, ConfigListResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel or ConfigListResponseOriginDatabaseReachableThroughAWorkersVPC.
type ConfigNewParams ¶
type ConfigNewParams struct {
// Define configurations using a unique string identifier.
AccountID param.Field[string] `path:"account_id" api:"required"`
// A request to create a Hyperdrive configuration using exactly one of
// caller-supplied origin credentials or a managed integration.
Body ConfigNewParamsBodyUnion `json:"body" api:"required"`
}
func (ConfigNewParams) MarshalJSON ¶
func (r ConfigNewParams) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBody ¶
type ConfigNewParamsBody struct {
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name param.Field[string] `json:"name" api:"required"`
Caching param.Field[interface{}] `json:"caching"`
Integration param.Field[interface{}] `json:"integration"`
MTLS param.Field[interface{}] `json:"mtls"`
Origin param.Field[interface{}] `json:"origin"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit param.Field[int64] `json:"origin_connection_limit"`
}
A request to create a Hyperdrive configuration using exactly one of caller-supplied origin credentials or a managed integration.
func (ConfigNewParamsBody) MarshalJSON ¶
func (r ConfigNewParamsBody) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegration ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegration struct {
// Selects a PlanetScale database and provisions credentials managed by Cloudflare
// when creating a Hyperdrive configuration. The Cloudflare account must already be
// linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as
// read-only metadata and cannot be changed with replace or update operations.
Integration param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegration] `json:"integration" api:"required"`
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name param.Field[string] `json:"name" api:"required"`
Caching param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingUnion] `json:"caching"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationMTLS] `json:"mtls"`
Origin param.Field[interface{}] `json:"origin"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit param.Field[int64] `json:"origin_connection_limit"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegration) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegration) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCaching ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCaching struct {
Disabled param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled] `json:"disabled"`
MaxAge param.Field[int64] `json:"max_age"`
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCaching) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCaching) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled bool
const ( ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabledTrue ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled = true ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabledFalse ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled = false )
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabled struct {
Disabled param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabled] `json:"disabled" api:"required"`
MaxAge param.Field[int64] `json:"max_age"`
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabled) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabled) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabled bool
const (
ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabledTrue ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabled = true
)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabled struct {
Disabled param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabled] `json:"disabled"`
// Specify the maximum duration (in seconds) items should persist in the cache.
// Defaults to 60 seconds if not specified.
MaxAge param.Field[int64] `json:"max_age"`
// Specify the number of seconds the cache may serve a stale response. Defaults to
// 15 seconds if not specified.
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabled) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabled) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabled bool
const (
ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabledFalse ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabled = false
)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingUnion ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingUnion interface {
// contains filtered or unexported methods
}
Satisfied by hyperdrive.ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabled, hyperdrive.ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabled, ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCaching.
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegration ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegration struct {
// The name of the PlanetScale database branch.
DatabaseBranchName param.Field[string] `json:"database_branch_name" api:"required"`
// The name of the PlanetScale database.
DatabaseName param.Field[string] `json:"database_name" api:"required"`
// The name of the PlanetScale organization.
OrganizationName param.Field[string] `json:"organization_name" api:"required"`
// The database integration provider used by this operation.
Provider param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProvider] `json:"provider" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationScheme] `json:"scheme" api:"required"`
// The database name to use when connecting. Defaults to `postgres` for PostgreSQL
// and `mysql` for MySQL.
CustomDatabaseName param.Field[string] `json:"custom_database_name"`
}
Selects a PlanetScale database and provisions credentials managed by Cloudflare when creating a Hyperdrive configuration. The Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as read-only metadata and cannot be changed with replace or update operations.
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegration) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegration) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProvider ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProvider string
The database integration provider used by this operation.
const (
ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProviderPlanetscale ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProvider = "planetscale"
)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationScheme ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationSchemePostgres ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationScheme = "postgres" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationSchemePostgresql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationScheme = "postgresql" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationSchemeMysql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationScheme = "mysql" )
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationMTLS ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationMTLS struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID param.Field[string] `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID param.Field[string] `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode param.Field[string] `json:"sslmode"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationMTLS) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationMTLS) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOrigin ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOrigin struct {
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name param.Field[string] `json:"name" api:"required"`
// Combines database connection fields with exactly one supported network location.
Origin param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginUnion] `json:"origin" api:"required"`
Caching param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingUnion] `json:"caching"`
Integration param.Field[interface{}] `json:"integration"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginMTLS] `json:"mtls"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit param.Field[int64] `json:"origin_connection_limit"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOrigin) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOrigin) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCaching ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCaching struct {
Disabled param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled] `json:"disabled"`
MaxAge param.Field[int64] `json:"max_age"`
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCaching) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCaching) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled bool
const ( ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabledTrue ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled = true ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabledFalse ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled = false )
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled) IsKnown ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled) IsKnown() bool
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabled struct {
Disabled param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabled] `json:"disabled" api:"required"`
MaxAge param.Field[int64] `json:"max_age"`
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabled) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabled) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabled bool
const (
ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabledTrue ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabled = true
)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabled struct {
Disabled param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabled] `json:"disabled"`
// Specify the maximum duration (in seconds) items should persist in the cache.
// Defaults to 60 seconds if not specified.
MaxAge param.Field[int64] `json:"max_age"`
// Specify the number of seconds the cache may serve a stale response. Defaults to
// 15 seconds if not specified.
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabled) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabled) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabled ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabled bool
const (
ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabledFalse ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabled = false
)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingUnion ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingUnion interface {
// contains filtered or unexported methods
}
Satisfied by hyperdrive.ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabled, hyperdrive.ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabled, ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCaching.
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginMTLS ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginMTLS struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID param.Field[string] `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID param.Field[string] `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode param.Field[string] `json:"sslmode"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginMTLS) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginMTLS) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOrigin ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOrigin struct {
// Set the name of your origin database.
Database param.Field[string] `json:"database" api:"required"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginScheme] `json:"scheme" api:"required"`
// Set the user of your origin database.
User param.Field[string] `json:"user" api:"required"`
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID param.Field[string] `json:"access_client_id"`
// Defines the Client Secret of the Access Token to use when connecting to the
// origin database. The API never returns this write-only value.
AccessClientSecret param.Field[string] `json:"access_client_secret"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host param.Field[string] `json:"host"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port param.Field[int64] `json:"port"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID param.Field[string] `json:"service_id"`
}
Combines database connection fields with exactly one supported network location.
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOrigin) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOrigin) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnel ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnel struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID param.Field[string] `json:"access_client_id" api:"required"`
// Defines the Client Secret of the Access Token to use when connecting to the
// origin database. The API never returns this write-only value.
AccessClientSecret param.Field[string] `json:"access_client_secret" api:"required"`
// Set the name of your origin database.
Database param.Field[string] `json:"database" api:"required"`
// Defines the host (hostname or IP) of your origin database.
Host param.Field[string] `json:"host" api:"required"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme] `json:"scheme" api:"required"`
// Set the user of your origin database.
User param.Field[string] `json:"user" api:"required"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnel) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnel) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql" )
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPC ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPC struct {
// Set the name of your origin database.
Database param.Field[string] `json:"database" api:"required"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCScheme] `json:"scheme" api:"required"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID param.Field[string] `json:"service_id" api:"required"`
// Set the user of your origin database.
User param.Field[string] `json:"user" api:"required"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPC) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPC) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCScheme ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCSchemePostgres ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCSchemeMysql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql" )
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabase ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabase struct {
// Set the name of your origin database.
Database param.Field[string] `json:"database" api:"required"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host param.Field[string] `json:"host" api:"required"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password" api:"required"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port param.Field[int64] `json:"port" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseScheme] `json:"scheme" api:"required"`
// Set the user of your origin database.
User param.Field[string] `json:"user" api:"required"`
}
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabase) MarshalJSON ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabase) MarshalJSON() (data []byte, err error)
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseScheme ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseSchemePostgres ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseScheme = "postgres" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseSchemePostgresql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseScheme = "postgresql" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseSchemeMysql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseScheme = "mysql" )
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginScheme ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginSchemePostgres ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginScheme = "postgres" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginSchemePostgresql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginScheme = "postgresql" ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginSchemeMysql ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginScheme = "mysql" )
func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginScheme) IsKnown ¶
func (r ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginScheme) IsKnown() bool
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginUnion ¶
type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginUnion interface {
// contains filtered or unexported methods
}
Combines database connection fields with exactly one supported network location.
Satisfied by hyperdrive.ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabase, hyperdrive.ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnel, hyperdrive.ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPC, ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOrigin.
type ConfigNewParamsBodyUnion ¶
type ConfigNewParamsBodyUnion interface {
// contains filtered or unexported methods
}
A request to create a Hyperdrive configuration using exactly one of caller-supplied origin credentials or a managed integration.
Satisfied by hyperdrive.ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOrigin, hyperdrive.ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegration, ConfigNewParamsBody.
type ConfigNewResponse ¶
type ConfigNewResponse struct {
// Define configurations using a unique string identifier.
ID string `json:"id" api:"required"`
Caching ConfigNewResponseCaching `json:"caching" api:"required"`
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name string `json:"name" api:"required"`
// Combines database connection fields with exactly one supported network location.
Origin ConfigNewResponseOrigin `json:"origin" api:"required"`
// Defines the creation time of the Hyperdrive configuration.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// Selects a PlanetScale database and provisions credentials managed by Cloudflare
// when creating a Hyperdrive configuration. The Cloudflare account must already be
// linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as
// read-only metadata and cannot be changed with replace or update operations.
Integration ConfigNewResponseIntegration `json:"integration"`
// Defines the last modified time of the Hyperdrive configuration.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS ConfigNewResponseMTLS `json:"mtls"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit int64 `json:"origin_connection_limit"`
// Defines the last time the Hyperdrive connection pool was explicitly restarted
// via the restart endpoint. Omitted if the pool has never been explicitly
// restarted.
RestartedOn time.Time `json:"restarted_on" api:"nullable" format:"date-time"`
JSON configNewResponseJSON `json:"-"`
}
func (*ConfigNewResponse) UnmarshalJSON ¶
func (r *ConfigNewResponse) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseCaching ¶
type ConfigNewResponseCaching struct {
// Defines whether caching is disabled.
Disabled bool `json:"disabled" api:"required"`
// Defines the maximum duration (in seconds) items persist in the cache.
MaxAge int64 `json:"max_age"`
// Defines the number of seconds the cache may serve a stale response.
StaleWhileRevalidate int64 `json:"stale_while_revalidate"`
JSON configNewResponseCachingJSON `json:"-"`
}
func (*ConfigNewResponseCaching) UnmarshalJSON ¶
func (r *ConfigNewResponseCaching) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseEnvelope ¶
type ConfigNewResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors" api:"required"`
Messages []shared.ResponseInfo `json:"messages" api:"required"`
Result ConfigNewResponse `json:"result" api:"required"`
// Return the status of the API call success.
Success ConfigNewResponseEnvelopeSuccess `json:"success" api:"required"`
JSON configNewResponseEnvelopeJSON `json:"-"`
}
func (*ConfigNewResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseEnvelopeSuccess ¶
type ConfigNewResponseEnvelopeSuccess bool
Return the status of the API call success.
const (
ConfigNewResponseEnvelopeSuccessTrue ConfigNewResponseEnvelopeSuccess = true
)
func (ConfigNewResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigNewResponseEnvelopeSuccess) IsKnown() bool
type ConfigNewResponseIntegration ¶
type ConfigNewResponseIntegration struct {
// The name of the PlanetScale database branch.
DatabaseBranchName string `json:"database_branch_name" api:"required"`
// The name of the PlanetScale database.
DatabaseName string `json:"database_name" api:"required"`
// The name of the PlanetScale organization.
OrganizationName string `json:"organization_name" api:"required"`
// The database integration provider used by this operation.
Provider ConfigNewResponseIntegrationProvider `json:"provider" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigNewResponseIntegrationScheme `json:"scheme" api:"required"`
// The database name to use when connecting. Defaults to `postgres` for PostgreSQL
// and `mysql` for MySQL.
CustomDatabaseName string `json:"custom_database_name"`
JSON configNewResponseIntegrationJSON `json:"-"`
}
Selects a PlanetScale database and provisions credentials managed by Cloudflare when creating a Hyperdrive configuration. The Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as read-only metadata and cannot be changed with replace or update operations.
func (*ConfigNewResponseIntegration) UnmarshalJSON ¶
func (r *ConfigNewResponseIntegration) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseIntegrationProvider ¶
type ConfigNewResponseIntegrationProvider string
The database integration provider used by this operation.
const (
ConfigNewResponseIntegrationProviderPlanetscale ConfigNewResponseIntegrationProvider = "planetscale"
)
func (ConfigNewResponseIntegrationProvider) IsKnown ¶
func (r ConfigNewResponseIntegrationProvider) IsKnown() bool
type ConfigNewResponseIntegrationScheme ¶
type ConfigNewResponseIntegrationScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewResponseIntegrationSchemePostgres ConfigNewResponseIntegrationScheme = "postgres" ConfigNewResponseIntegrationSchemePostgresql ConfigNewResponseIntegrationScheme = "postgresql" ConfigNewResponseIntegrationSchemeMysql ConfigNewResponseIntegrationScheme = "mysql" )
func (ConfigNewResponseIntegrationScheme) IsKnown ¶
func (r ConfigNewResponseIntegrationScheme) IsKnown() bool
type ConfigNewResponseMTLS ¶
type ConfigNewResponseMTLS struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID string `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID string `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode string `json:"sslmode"`
JSON configNewResponseMTLSJSON `json:"-"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (*ConfigNewResponseMTLS) UnmarshalJSON ¶
func (r *ConfigNewResponseMTLS) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseOrigin ¶
type ConfigNewResponseOrigin struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigNewResponseOriginScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id"`
JSON configNewResponseOriginJSON `json:"-"`
// contains filtered or unexported fields
}
Combines database connection fields with exactly one supported network location.
func (ConfigNewResponseOrigin) AsUnion ¶
func (r ConfigNewResponseOrigin) AsUnion() ConfigNewResponseOriginUnion
AsUnion returns a ConfigNewResponseOriginUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ConfigNewResponseOriginPublicDatabase, ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel, ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPC.
func (*ConfigNewResponseOrigin) UnmarshalJSON ¶
func (r *ConfigNewResponseOrigin) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel ¶
type ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id" api:"required"`
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the host (hostname or IP) of your origin database.
Host string `json:"host" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelJSON `json:"-"`
}
func (*ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON ¶
func (r *ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme ¶
type ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres" ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql" ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql" )
func (ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown ¶
func (r ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown() bool
type ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPC ¶
type ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPC struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCScheme `json:"scheme" api:"required"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configNewResponseOriginDatabaseReachableThroughAWorkersVPCJSON `json:"-"`
}
func (*ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON ¶
func (r *ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCScheme ¶
type ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgres ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres" ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql" ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCSchemeMysql ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql" )
func (ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown ¶
func (r ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown() bool
type ConfigNewResponseOriginPublicDatabase ¶
type ConfigNewResponseOriginPublicDatabase struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host" api:"required"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigNewResponseOriginPublicDatabaseScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configNewResponseOriginPublicDatabaseJSON `json:"-"`
}
func (*ConfigNewResponseOriginPublicDatabase) UnmarshalJSON ¶
func (r *ConfigNewResponseOriginPublicDatabase) UnmarshalJSON(data []byte) (err error)
type ConfigNewResponseOriginPublicDatabaseScheme ¶
type ConfigNewResponseOriginPublicDatabaseScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewResponseOriginPublicDatabaseSchemePostgres ConfigNewResponseOriginPublicDatabaseScheme = "postgres" ConfigNewResponseOriginPublicDatabaseSchemePostgresql ConfigNewResponseOriginPublicDatabaseScheme = "postgresql" ConfigNewResponseOriginPublicDatabaseSchemeMysql ConfigNewResponseOriginPublicDatabaseScheme = "mysql" )
func (ConfigNewResponseOriginPublicDatabaseScheme) IsKnown ¶
func (r ConfigNewResponseOriginPublicDatabaseScheme) IsKnown() bool
type ConfigNewResponseOriginScheme ¶
type ConfigNewResponseOriginScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigNewResponseOriginSchemePostgres ConfigNewResponseOriginScheme = "postgres" ConfigNewResponseOriginSchemePostgresql ConfigNewResponseOriginScheme = "postgresql" ConfigNewResponseOriginSchemeMysql ConfigNewResponseOriginScheme = "mysql" )
func (ConfigNewResponseOriginScheme) IsKnown ¶
func (r ConfigNewResponseOriginScheme) IsKnown() bool
type ConfigNewResponseOriginUnion ¶
type ConfigNewResponseOriginUnion interface {
// contains filtered or unexported methods
}
Combines database connection fields with exactly one supported network location.
Union satisfied by ConfigNewResponseOriginPublicDatabase, ConfigNewResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel or ConfigNewResponseOriginDatabaseReachableThroughAWorkersVPC.
type ConfigRestartParams ¶
type ConfigRestartResponse ¶
type ConfigRestartResponse struct {
// Define configurations using a unique string identifier.
ID string `json:"id" api:"required"`
Caching ConfigRestartResponseCaching `json:"caching" api:"required"`
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name string `json:"name" api:"required"`
// Combines database connection fields with exactly one supported network location.
Origin ConfigRestartResponseOrigin `json:"origin" api:"required"`
// Defines the creation time of the Hyperdrive configuration.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// Selects a PlanetScale database and provisions credentials managed by Cloudflare
// when creating a Hyperdrive configuration. The Cloudflare account must already be
// linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as
// read-only metadata and cannot be changed with replace or update operations.
Integration ConfigRestartResponseIntegration `json:"integration"`
// Defines the last modified time of the Hyperdrive configuration.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS ConfigRestartResponseMTLS `json:"mtls"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit int64 `json:"origin_connection_limit"`
// Defines the last time the Hyperdrive connection pool was explicitly restarted
// via the restart endpoint. Omitted if the pool has never been explicitly
// restarted.
RestartedOn time.Time `json:"restarted_on" api:"nullable" format:"date-time"`
JSON configRestartResponseJSON `json:"-"`
}
func (*ConfigRestartResponse) UnmarshalJSON ¶
func (r *ConfigRestartResponse) UnmarshalJSON(data []byte) (err error)
type ConfigRestartResponseCaching ¶
type ConfigRestartResponseCaching struct {
// Defines whether caching is disabled.
Disabled bool `json:"disabled" api:"required"`
// Defines the maximum duration (in seconds) items persist in the cache.
MaxAge int64 `json:"max_age"`
// Defines the number of seconds the cache may serve a stale response.
StaleWhileRevalidate int64 `json:"stale_while_revalidate"`
JSON configRestartResponseCachingJSON `json:"-"`
}
func (*ConfigRestartResponseCaching) UnmarshalJSON ¶
func (r *ConfigRestartResponseCaching) UnmarshalJSON(data []byte) (err error)
type ConfigRestartResponseEnvelope ¶
type ConfigRestartResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors" api:"required"`
Messages []shared.ResponseInfo `json:"messages" api:"required"`
Result ConfigRestartResponse `json:"result" api:"required"`
// Return the status of the API call success.
Success ConfigRestartResponseEnvelopeSuccess `json:"success" api:"required"`
JSON configRestartResponseEnvelopeJSON `json:"-"`
}
func (*ConfigRestartResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigRestartResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigRestartResponseEnvelopeSuccess ¶
type ConfigRestartResponseEnvelopeSuccess bool
Return the status of the API call success.
const (
ConfigRestartResponseEnvelopeSuccessTrue ConfigRestartResponseEnvelopeSuccess = true
)
func (ConfigRestartResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigRestartResponseEnvelopeSuccess) IsKnown() bool
type ConfigRestartResponseIntegration ¶
type ConfigRestartResponseIntegration struct {
// The name of the PlanetScale database branch.
DatabaseBranchName string `json:"database_branch_name" api:"required"`
// The name of the PlanetScale database.
DatabaseName string `json:"database_name" api:"required"`
// The name of the PlanetScale organization.
OrganizationName string `json:"organization_name" api:"required"`
// The database integration provider used by this operation.
Provider ConfigRestartResponseIntegrationProvider `json:"provider" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigRestartResponseIntegrationScheme `json:"scheme" api:"required"`
// The database name to use when connecting. Defaults to `postgres` for PostgreSQL
// and `mysql` for MySQL.
CustomDatabaseName string `json:"custom_database_name"`
JSON configRestartResponseIntegrationJSON `json:"-"`
}
Selects a PlanetScale database and provisions credentials managed by Cloudflare when creating a Hyperdrive configuration. The Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as read-only metadata and cannot be changed with replace or update operations.
func (*ConfigRestartResponseIntegration) UnmarshalJSON ¶
func (r *ConfigRestartResponseIntegration) UnmarshalJSON(data []byte) (err error)
type ConfigRestartResponseIntegrationProvider ¶
type ConfigRestartResponseIntegrationProvider string
The database integration provider used by this operation.
const (
ConfigRestartResponseIntegrationProviderPlanetscale ConfigRestartResponseIntegrationProvider = "planetscale"
)
func (ConfigRestartResponseIntegrationProvider) IsKnown ¶
func (r ConfigRestartResponseIntegrationProvider) IsKnown() bool
type ConfigRestartResponseIntegrationScheme ¶
type ConfigRestartResponseIntegrationScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigRestartResponseIntegrationSchemePostgres ConfigRestartResponseIntegrationScheme = "postgres" ConfigRestartResponseIntegrationSchemePostgresql ConfigRestartResponseIntegrationScheme = "postgresql" ConfigRestartResponseIntegrationSchemeMysql ConfigRestartResponseIntegrationScheme = "mysql" )
func (ConfigRestartResponseIntegrationScheme) IsKnown ¶
func (r ConfigRestartResponseIntegrationScheme) IsKnown() bool
type ConfigRestartResponseMTLS ¶
type ConfigRestartResponseMTLS struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID string `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID string `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode string `json:"sslmode"`
JSON configRestartResponseMTLSJSON `json:"-"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (*ConfigRestartResponseMTLS) UnmarshalJSON ¶
func (r *ConfigRestartResponseMTLS) UnmarshalJSON(data []byte) (err error)
type ConfigRestartResponseOrigin ¶
type ConfigRestartResponseOrigin struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigRestartResponseOriginScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id"`
JSON configRestartResponseOriginJSON `json:"-"`
// contains filtered or unexported fields
}
Combines database connection fields with exactly one supported network location.
func (ConfigRestartResponseOrigin) AsUnion ¶
func (r ConfigRestartResponseOrigin) AsUnion() ConfigRestartResponseOriginUnion
AsUnion returns a ConfigRestartResponseOriginUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ConfigRestartResponseOriginPublicDatabase, ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel, ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPC.
func (*ConfigRestartResponseOrigin) UnmarshalJSON ¶
func (r *ConfigRestartResponseOrigin) UnmarshalJSON(data []byte) (err error)
type ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel ¶
type ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id" api:"required"`
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the host (hostname or IP) of your origin database.
Host string `json:"host" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelJSON `json:"-"`
}
func (*ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON ¶
func (r *ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON(data []byte) (err error)
type ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme ¶
type ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres" ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql" ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql" )
type ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPC ¶
type ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPC struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCScheme `json:"scheme" api:"required"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configRestartResponseOriginDatabaseReachableThroughAWorkersVPCJSON `json:"-"`
}
func (*ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON ¶
func (r *ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON(data []byte) (err error)
type ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCScheme ¶
type ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgres ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres" ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql" ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCSchemeMysql ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql" )
func (ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown ¶
func (r ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown() bool
type ConfigRestartResponseOriginPublicDatabase ¶
type ConfigRestartResponseOriginPublicDatabase struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host" api:"required"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigRestartResponseOriginPublicDatabaseScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configRestartResponseOriginPublicDatabaseJSON `json:"-"`
}
func (*ConfigRestartResponseOriginPublicDatabase) UnmarshalJSON ¶
func (r *ConfigRestartResponseOriginPublicDatabase) UnmarshalJSON(data []byte) (err error)
type ConfigRestartResponseOriginPublicDatabaseScheme ¶
type ConfigRestartResponseOriginPublicDatabaseScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigRestartResponseOriginPublicDatabaseSchemePostgres ConfigRestartResponseOriginPublicDatabaseScheme = "postgres" ConfigRestartResponseOriginPublicDatabaseSchemePostgresql ConfigRestartResponseOriginPublicDatabaseScheme = "postgresql" ConfigRestartResponseOriginPublicDatabaseSchemeMysql ConfigRestartResponseOriginPublicDatabaseScheme = "mysql" )
func (ConfigRestartResponseOriginPublicDatabaseScheme) IsKnown ¶
func (r ConfigRestartResponseOriginPublicDatabaseScheme) IsKnown() bool
type ConfigRestartResponseOriginScheme ¶
type ConfigRestartResponseOriginScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigRestartResponseOriginSchemePostgres ConfigRestartResponseOriginScheme = "postgres" ConfigRestartResponseOriginSchemePostgresql ConfigRestartResponseOriginScheme = "postgresql" ConfigRestartResponseOriginSchemeMysql ConfigRestartResponseOriginScheme = "mysql" )
func (ConfigRestartResponseOriginScheme) IsKnown ¶
func (r ConfigRestartResponseOriginScheme) IsKnown() bool
type ConfigRestartResponseOriginUnion ¶
type ConfigRestartResponseOriginUnion interface {
// contains filtered or unexported methods
}
Combines database connection fields with exactly one supported network location.
Union satisfied by ConfigRestartResponseOriginPublicDatabase, ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel or ConfigRestartResponseOriginDatabaseReachableThroughAWorkersVPC.
type ConfigService ¶
type ConfigService struct {
Options []option.RequestOption
}
ConfigService 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 NewConfigService method instead.
func NewConfigService ¶
func NewConfigService(opts ...option.RequestOption) (r *ConfigService)
NewConfigService 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 (*ConfigService) Delete ¶
func (r *ConfigService) Delete(ctx context.Context, hyperdriveID string, body ConfigDeleteParams, opts ...option.RequestOption) (res *ConfigDeleteResponse, err error)
Deletes the specified Hyperdrive.
func (*ConfigService) Edit ¶
func (r *ConfigService) Edit(ctx context.Context, hyperdriveID string, params ConfigEditParams, opts ...option.RequestOption) (res *ConfigEditResponse, err error)
Updates and returns the specified fields of the Hyperdrive configuration. Custom caching settings are not kept if caching is disabled. For an integration-backed configuration, the integration association is preserved but cannot be changed; omit the integration field.
func (*ConfigService) Get ¶
func (r *ConfigService) Get(ctx context.Context, hyperdriveID string, query ConfigGetParams, opts ...option.RequestOption) (res *ConfigGetResponse, err error)
Returns the specified Hyperdrive configuration.
func (*ConfigService) List ¶
func (r *ConfigService) List(ctx context.Context, params ConfigListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[ConfigListResponse], err error)
Returns a list of Hyperdrives.
func (*ConfigService) ListAutoPaging ¶
func (r *ConfigService) ListAutoPaging(ctx context.Context, params ConfigListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[ConfigListResponse]
Returns a list of Hyperdrives.
func (*ConfigService) New ¶
func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *ConfigNewResponse, err error)
Creates and returns a new Hyperdrive configuration. For a PlanetScale integration, the Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard.
func (*ConfigService) Restart ¶
func (r *ConfigService) Restart(ctx context.Context, hyperdriveID string, body ConfigRestartParams, opts ...option.RequestOption) (res *ConfigRestartResponse, err error)
Restarts the connection pool for the specified Hyperdrive configuration without changing its configuration. Existing connections are drained and a new pool is established at the edge.
func (*ConfigService) Update ¶
func (r *ConfigService) Update(ctx context.Context, hyperdriveID string, params ConfigUpdateParams, opts ...option.RequestOption) (res *ConfigUpdateResponse, err error)
Replaces and returns the specified Hyperdrive configuration. The request must include the name and complete origin connection details. Omitted caching settings are reset to their defaults, while omitted mTLS settings and origin connection limits are preserved. The integration association is set only during creation and cannot be changed; omit the integration field even when replacing an integration-backed configuration. Use the update operation to modify only selected fields.
type ConfigUpdateParams ¶
type ConfigUpdateParams struct {
// Define configurations using a unique string identifier.
AccountID param.Field[string] `path:"account_id" api:"required"`
Hyperdrive HyperdriveParam `json:"hyperdrive" api:"required"`
}
func (ConfigUpdateParams) MarshalJSON ¶
func (r ConfigUpdateParams) MarshalJSON() (data []byte, err error)
type ConfigUpdateResponse ¶
type ConfigUpdateResponse struct {
// Define configurations using a unique string identifier.
ID string `json:"id" api:"required"`
Caching ConfigUpdateResponseCaching `json:"caching" api:"required"`
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name string `json:"name" api:"required"`
// Combines database connection fields with exactly one supported network location.
Origin ConfigUpdateResponseOrigin `json:"origin" api:"required"`
// Defines the creation time of the Hyperdrive configuration.
CreatedOn time.Time `json:"created_on" format:"date-time"`
// Selects a PlanetScale database and provisions credentials managed by Cloudflare
// when creating a Hyperdrive configuration. The Cloudflare account must already be
// linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as
// read-only metadata and cannot be changed with replace or update operations.
Integration ConfigUpdateResponseIntegration `json:"integration"`
// Defines the last modified time of the Hyperdrive configuration.
ModifiedOn time.Time `json:"modified_on" format:"date-time"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS ConfigUpdateResponseMTLS `json:"mtls"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit int64 `json:"origin_connection_limit"`
// Defines the last time the Hyperdrive connection pool was explicitly restarted
// via the restart endpoint. Omitted if the pool has never been explicitly
// restarted.
RestartedOn time.Time `json:"restarted_on" api:"nullable" format:"date-time"`
JSON configUpdateResponseJSON `json:"-"`
}
func (*ConfigUpdateResponse) UnmarshalJSON ¶
func (r *ConfigUpdateResponse) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseCaching ¶
type ConfigUpdateResponseCaching struct {
// Defines whether caching is disabled.
Disabled bool `json:"disabled" api:"required"`
// Defines the maximum duration (in seconds) items persist in the cache.
MaxAge int64 `json:"max_age"`
// Defines the number of seconds the cache may serve a stale response.
StaleWhileRevalidate int64 `json:"stale_while_revalidate"`
JSON configUpdateResponseCachingJSON `json:"-"`
}
func (*ConfigUpdateResponseCaching) UnmarshalJSON ¶
func (r *ConfigUpdateResponseCaching) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseEnvelope ¶
type ConfigUpdateResponseEnvelope struct {
Errors []shared.ResponseInfo `json:"errors" api:"required"`
Messages []shared.ResponseInfo `json:"messages" api:"required"`
Result ConfigUpdateResponse `json:"result" api:"required"`
// Return the status of the API call success.
Success ConfigUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
JSON configUpdateResponseEnvelopeJSON `json:"-"`
}
func (*ConfigUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *ConfigUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseEnvelopeSuccess ¶
type ConfigUpdateResponseEnvelopeSuccess bool
Return the status of the API call success.
const (
ConfigUpdateResponseEnvelopeSuccessTrue ConfigUpdateResponseEnvelopeSuccess = true
)
func (ConfigUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r ConfigUpdateResponseEnvelopeSuccess) IsKnown() bool
type ConfigUpdateResponseIntegration ¶
type ConfigUpdateResponseIntegration struct {
// The name of the PlanetScale database branch.
DatabaseBranchName string `json:"database_branch_name" api:"required"`
// The name of the PlanetScale database.
DatabaseName string `json:"database_name" api:"required"`
// The name of the PlanetScale organization.
OrganizationName string `json:"organization_name" api:"required"`
// The database integration provider used by this operation.
Provider ConfigUpdateResponseIntegrationProvider `json:"provider" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigUpdateResponseIntegrationScheme `json:"scheme" api:"required"`
// The database name to use when connecting. Defaults to `postgres` for PostgreSQL
// and `mysql` for MySQL.
CustomDatabaseName string `json:"custom_database_name"`
JSON configUpdateResponseIntegrationJSON `json:"-"`
}
Selects a PlanetScale database and provisions credentials managed by Cloudflare when creating a Hyperdrive configuration. The Cloudflare account must already be linked to PlanetScale in the Hyperdrive dashboard. The selection is returned as read-only metadata and cannot be changed with replace or update operations.
func (*ConfigUpdateResponseIntegration) UnmarshalJSON ¶
func (r *ConfigUpdateResponseIntegration) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseIntegrationProvider ¶
type ConfigUpdateResponseIntegrationProvider string
The database integration provider used by this operation.
const (
ConfigUpdateResponseIntegrationProviderPlanetscale ConfigUpdateResponseIntegrationProvider = "planetscale"
)
func (ConfigUpdateResponseIntegrationProvider) IsKnown ¶
func (r ConfigUpdateResponseIntegrationProvider) IsKnown() bool
type ConfigUpdateResponseIntegrationScheme ¶
type ConfigUpdateResponseIntegrationScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigUpdateResponseIntegrationSchemePostgres ConfigUpdateResponseIntegrationScheme = "postgres" ConfigUpdateResponseIntegrationSchemePostgresql ConfigUpdateResponseIntegrationScheme = "postgresql" ConfigUpdateResponseIntegrationSchemeMysql ConfigUpdateResponseIntegrationScheme = "mysql" )
func (ConfigUpdateResponseIntegrationScheme) IsKnown ¶
func (r ConfigUpdateResponseIntegrationScheme) IsKnown() bool
type ConfigUpdateResponseMTLS ¶
type ConfigUpdateResponseMTLS struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID string `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID string `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode string `json:"sslmode"`
JSON configUpdateResponseMTLSJSON `json:"-"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (*ConfigUpdateResponseMTLS) UnmarshalJSON ¶
func (r *ConfigUpdateResponseMTLS) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseOrigin ¶
type ConfigUpdateResponseOrigin struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigUpdateResponseOriginScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id"`
JSON configUpdateResponseOriginJSON `json:"-"`
// contains filtered or unexported fields
}
Combines database connection fields with exactly one supported network location.
func (ConfigUpdateResponseOrigin) AsUnion ¶
func (r ConfigUpdateResponseOrigin) AsUnion() ConfigUpdateResponseOriginUnion
AsUnion returns a ConfigUpdateResponseOriginUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are ConfigUpdateResponseOriginPublicDatabase, ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel, ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPC.
func (*ConfigUpdateResponseOrigin) UnmarshalJSON ¶
func (r *ConfigUpdateResponseOrigin) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel ¶
type ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID string `json:"access_client_id" api:"required"`
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the host (hostname or IP) of your origin database.
Host string `json:"host" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelJSON `json:"-"`
}
func (*ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON ¶
func (r *ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme ¶
type ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres" ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql" ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql" )
type ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPC ¶
type ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPC struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCScheme `json:"scheme" api:"required"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID string `json:"service_id" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configUpdateResponseOriginDatabaseReachableThroughAWorkersVPCJSON `json:"-"`
}
func (*ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON ¶
func (r *ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPC) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCScheme ¶
type ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgres ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres" ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql" ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCSchemeMysql ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql" )
func (ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown ¶
func (r ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown() bool
type ConfigUpdateResponseOriginPublicDatabase ¶
type ConfigUpdateResponseOriginPublicDatabase struct {
// Set the name of your origin database.
Database string `json:"database" api:"required"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host string `json:"host" api:"required"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port int64 `json:"port" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme ConfigUpdateResponseOriginPublicDatabaseScheme `json:"scheme" api:"required"`
// Set the user of your origin database.
User string `json:"user" api:"required"`
JSON configUpdateResponseOriginPublicDatabaseJSON `json:"-"`
}
func (*ConfigUpdateResponseOriginPublicDatabase) UnmarshalJSON ¶
func (r *ConfigUpdateResponseOriginPublicDatabase) UnmarshalJSON(data []byte) (err error)
type ConfigUpdateResponseOriginPublicDatabaseScheme ¶
type ConfigUpdateResponseOriginPublicDatabaseScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigUpdateResponseOriginPublicDatabaseSchemePostgres ConfigUpdateResponseOriginPublicDatabaseScheme = "postgres" ConfigUpdateResponseOriginPublicDatabaseSchemePostgresql ConfigUpdateResponseOriginPublicDatabaseScheme = "postgresql" ConfigUpdateResponseOriginPublicDatabaseSchemeMysql ConfigUpdateResponseOriginPublicDatabaseScheme = "mysql" )
func (ConfigUpdateResponseOriginPublicDatabaseScheme) IsKnown ¶
func (r ConfigUpdateResponseOriginPublicDatabaseScheme) IsKnown() bool
type ConfigUpdateResponseOriginScheme ¶
type ConfigUpdateResponseOriginScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigUpdateResponseOriginSchemePostgres ConfigUpdateResponseOriginScheme = "postgres" ConfigUpdateResponseOriginSchemePostgresql ConfigUpdateResponseOriginScheme = "postgresql" ConfigUpdateResponseOriginSchemeMysql ConfigUpdateResponseOriginScheme = "mysql" )
func (ConfigUpdateResponseOriginScheme) IsKnown ¶
func (r ConfigUpdateResponseOriginScheme) IsKnown() bool
type ConfigUpdateResponseOriginUnion ¶
type ConfigUpdateResponseOriginUnion interface {
// contains filtered or unexported methods
}
Combines database connection fields with exactly one supported network location.
Union satisfied by ConfigUpdateResponseOriginPublicDatabase, ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnel or ConfigUpdateResponseOriginDatabaseReachableThroughAWorkersVPC.
type ErrorDataSource ¶
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type HyperdriveCachingHyperdriveHyperdriveCachingCommonParam ¶
type HyperdriveCachingHyperdriveHyperdriveCachingCommonParam struct {
// Set to true to disable caching of SQL responses. Default is false.
Disabled param.Field[bool] `json:"disabled"`
}
func (HyperdriveCachingHyperdriveHyperdriveCachingCommonParam) MarshalJSON ¶
func (r HyperdriveCachingHyperdriveHyperdriveCachingCommonParam) MarshalJSON() (data []byte, err error)
type HyperdriveCachingHyperdriveHyperdriveCachingEnabledParam ¶
type HyperdriveCachingHyperdriveHyperdriveCachingEnabledParam struct {
// Set to true to disable caching of SQL responses. Default is false.
Disabled param.Field[bool] `json:"disabled"`
// Specify the maximum duration (in seconds) items should persist in the cache.
// Defaults to 60 seconds if not specified.
MaxAge param.Field[int64] `json:"max_age"`
// Specify the number of seconds the cache may serve a stale response. Defaults to
// 15 seconds if not specified.
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (HyperdriveCachingHyperdriveHyperdriveCachingEnabledParam) MarshalJSON ¶
func (r HyperdriveCachingHyperdriveHyperdriveCachingEnabledParam) MarshalJSON() (data []byte, err error)
type HyperdriveCachingParam ¶
type HyperdriveCachingParam struct {
// Set to true to disable caching of SQL responses. Default is false.
Disabled param.Field[bool] `json:"disabled"`
// Specify the maximum duration (in seconds) items should persist in the cache.
// Defaults to 60 seconds if not specified.
MaxAge param.Field[int64] `json:"max_age"`
// Specify the number of seconds the cache may serve a stale response. Defaults to
// 15 seconds if not specified.
StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}
func (HyperdriveCachingParam) MarshalJSON ¶
func (r HyperdriveCachingParam) MarshalJSON() (data []byte, err error)
type HyperdriveCachingUnionParam ¶
type HyperdriveCachingUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by hyperdrive.HyperdriveCachingHyperdriveHyperdriveCachingCommonParam, hyperdrive.HyperdriveCachingHyperdriveHyperdriveCachingEnabledParam, HyperdriveCachingParam.
type HyperdriveMTLSParam ¶
type HyperdriveMTLSParam struct {
// Define CA certificate ID obtained after uploading CA cert.
CACertificateID param.Field[string] `json:"ca_certificate_id"`
// Define mTLS certificate ID obtained after uploading client cert.
MTLSCertificateID param.Field[string] `json:"mtls_certificate_id"`
// PostgreSQL accepts `require`, `verify-ca`, and `verify-full`. MySQL accepts
// `REQUIRED`, `VERIFY_CA`, and `VERIFY_IDENTITY`. The verify modes require a CA
// certificate; the require modes cannot be used with a CA certificate.
Sslmode param.Field[string] `json:"sslmode"`
}
mTLS configuration for the origin connection. Cannot be used with VPC Service origins; TLS must be managed on the VPC Service.
func (HyperdriveMTLSParam) MarshalJSON ¶
func (r HyperdriveMTLSParam) MarshalJSON() (data []byte, err error)
type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelParam ¶
type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelParam struct {
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID param.Field[string] `json:"access_client_id" api:"required"`
// Defines the Client Secret of the Access Token to use when connecting to the
// origin database. The API never returns this write-only value.
AccessClientSecret param.Field[string] `json:"access_client_secret" api:"required"`
// Set the name of your origin database.
Database param.Field[string] `json:"database" api:"required"`
// Defines the host (hostname or IP) of your origin database.
Host param.Field[string] `json:"host" api:"required"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme] `json:"scheme" api:"required"`
// Set the user of your origin database.
User param.Field[string] `json:"user" api:"required"`
}
func (HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelParam) MarshalJSON ¶
func (r HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelParam) MarshalJSON() (data []byte, err error)
type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme ¶
type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme string
Specifies the URL scheme used to connect to your origin database.
const ( HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgres HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgres" HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemePostgresql HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "postgresql" HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelSchemeMysql HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme = "mysql" )
func (HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown ¶
func (r HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown() bool
type HyperdriveOriginDatabaseReachableThroughAWorkersVPCParam ¶
type HyperdriveOriginDatabaseReachableThroughAWorkersVPCParam struct {
// Set the name of your origin database.
Database param.Field[string] `json:"database" api:"required"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme] `json:"scheme" api:"required"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID param.Field[string] `json:"service_id" api:"required"`
// Set the user of your origin database.
User param.Field[string] `json:"user" api:"required"`
}
func (HyperdriveOriginDatabaseReachableThroughAWorkersVPCParam) MarshalJSON ¶
func (r HyperdriveOriginDatabaseReachableThroughAWorkersVPCParam) MarshalJSON() (data []byte, err error)
type HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme ¶
type HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme string
Specifies the URL scheme used to connect to your origin database.
const ( HyperdriveOriginDatabaseReachableThroughAWorkersVPCSchemePostgres HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme = "postgres" HyperdriveOriginDatabaseReachableThroughAWorkersVPCSchemePostgresql HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme = "postgresql" HyperdriveOriginDatabaseReachableThroughAWorkersVPCSchemeMysql HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme = "mysql" )
func (HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown ¶
func (r HyperdriveOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown() bool
type HyperdriveOriginParam ¶
type HyperdriveOriginParam struct {
// Set the name of your origin database.
Database param.Field[string] `json:"database" api:"required"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[HyperdriveOriginScheme] `json:"scheme" api:"required"`
// Set the user of your origin database.
User param.Field[string] `json:"user" api:"required"`
// Defines the Client ID of the Access token to use when connecting to the origin
// database.
AccessClientID param.Field[string] `json:"access_client_id"`
// Defines the Client Secret of the Access Token to use when connecting to the
// origin database. The API never returns this write-only value.
AccessClientSecret param.Field[string] `json:"access_client_secret"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host param.Field[string] `json:"host"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port param.Field[int64] `json:"port"`
// The identifier of the Workers VPC Service to connect through. Hyperdrive will
// egress through the specified VPC Service to reach the origin database.
ServiceID param.Field[string] `json:"service_id"`
}
Combines database connection fields with exactly one supported network location.
func (HyperdriveOriginParam) MarshalJSON ¶
func (r HyperdriveOriginParam) MarshalJSON() (data []byte, err error)
type HyperdriveOriginPublicDatabaseParam ¶
type HyperdriveOriginPublicDatabaseParam struct {
// Set the name of your origin database.
Database param.Field[string] `json:"database" api:"required"`
// Defines the publicly reachable hostname or IP of your origin database. Private,
// loopback, and link-local IP addresses are not allowed.
Host param.Field[string] `json:"host" api:"required"`
// Set the password needed to access your origin database. The API never returns
// this write-only value.
Password param.Field[string] `json:"password" api:"required"`
// Defines the port of your origin database. Defaults to 5432 for PostgreSQL or
// 3306 for MySQL if not specified.
Port param.Field[int64] `json:"port" api:"required"`
// Specifies the URL scheme used to connect to your origin database.
Scheme param.Field[HyperdriveOriginPublicDatabaseScheme] `json:"scheme" api:"required"`
// Set the user of your origin database.
User param.Field[string] `json:"user" api:"required"`
}
func (HyperdriveOriginPublicDatabaseParam) MarshalJSON ¶
func (r HyperdriveOriginPublicDatabaseParam) MarshalJSON() (data []byte, err error)
type HyperdriveOriginPublicDatabaseScheme ¶
type HyperdriveOriginPublicDatabaseScheme string
Specifies the URL scheme used to connect to your origin database.
const ( HyperdriveOriginPublicDatabaseSchemePostgres HyperdriveOriginPublicDatabaseScheme = "postgres" HyperdriveOriginPublicDatabaseSchemePostgresql HyperdriveOriginPublicDatabaseScheme = "postgresql" HyperdriveOriginPublicDatabaseSchemeMysql HyperdriveOriginPublicDatabaseScheme = "mysql" )
func (HyperdriveOriginPublicDatabaseScheme) IsKnown ¶
func (r HyperdriveOriginPublicDatabaseScheme) IsKnown() bool
type HyperdriveOriginScheme ¶
type HyperdriveOriginScheme string
Specifies the URL scheme used to connect to your origin database.
const ( HyperdriveOriginSchemePostgres HyperdriveOriginScheme = "postgres" HyperdriveOriginSchemePostgresql HyperdriveOriginScheme = "postgresql" HyperdriveOriginSchemeMysql HyperdriveOriginScheme = "mysql" )
func (HyperdriveOriginScheme) IsKnown ¶
func (r HyperdriveOriginScheme) IsKnown() bool
type HyperdriveOriginUnionParam ¶
type HyperdriveOriginUnionParam interface {
// contains filtered or unexported methods
}
Combines database connection fields with exactly one supported network location.
Satisfied by hyperdrive.HyperdriveOriginPublicDatabaseParam, hyperdrive.HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelParam, hyperdrive.HyperdriveOriginDatabaseReachableThroughAWorkersVPCParam, HyperdriveOriginParam.
type HyperdriveParam ¶
type HyperdriveParam struct {
// The name of the Hyperdrive configuration. Used to identify the configuration in
// the Cloudflare dashboard and API.
Name param.Field[string] `json:"name" api:"required"`
// Combines database connection fields with exactly one supported network location.
Origin param.Field[HyperdriveOriginUnionParam] `json:"origin" api:"required"`
Caching param.Field[HyperdriveCachingUnionParam] `json:"caching"`
// mTLS configuration for the origin connection. Cannot be used with VPC Service
// origins; TLS must be managed on the VPC Service.
MTLS param.Field[HyperdriveMTLSParam] `json:"mtls"`
// The (soft) maximum number of connections the Hyperdrive is allowed to make to
// the origin database.
//
// Maximum allowed: 20 for free tier accounts, 100 for paid tier accounts. If not
// specified, defaults to 20 for free tier and 60 for paid tier. Certain
// Cloudflare-managed origins may be permitted a higher limit. Contact Cloudflare
// if you need a higher limit.
OriginConnectionLimit param.Field[int64] `json:"origin_connection_limit"`
}
func (HyperdriveParam) MarshalJSON ¶
func (r HyperdriveParam) MarshalJSON() (data []byte, err error)
type HyperdriveService ¶
type HyperdriveService struct {
Options []option.RequestOption
Configs *ConfigService
}
HyperdriveService 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 NewHyperdriveService method instead.
func NewHyperdriveService ¶
func NewHyperdriveService(opts ...option.RequestOption) (r *HyperdriveService)
NewHyperdriveService 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 MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
A scope is a combination of scope objects which provides additional context.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScopeObject ¶
type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject
A scope object represents any resource that can have actions applied against invite.
This is an alias to an internal type.
type MemberStatus ¶
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUser ¶
type MemberUser = shared.MemberUser
Details of the user associated to the membership.
This is an alias to an internal type.
type 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 RatePlanID ¶
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
This is an alias to an internal type.
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type ResponseInfoSource ¶
type ResponseInfoSource = shared.ResponseInfoSource
This is an alias to an internal type.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
This is an alias to an internal type.
type 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 TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNested ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectString ¶
type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesUnion ¶
type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenPolicyResourcesUnionParam ¶
type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.