hyperdrive

package
v7.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

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

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type 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 ConfigDeleteParams struct {
	// Define configurations using a unique string identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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 ConfigGetParams struct {
	// Define configurations using a unique string identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled bool
const (
	ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabledTrue  ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled = true
	ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabledFalse ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled = false
)

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingDisabled) IsKnown

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

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabled

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabled bool
const (
	ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabledTrue ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabled = true
)

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateDisabledDisabled) IsKnown

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

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabled

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabled bool
const (
	ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabledFalse ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabled = false
)

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationCachingHyperdriveHyperdriveCachingCreateEnabledDisabled) IsKnown

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

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProvider

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProvider string

The database integration provider used by this operation.

const (
	ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProviderPlanetscale ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProvider = "planetscale"
)

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationProvider) IsKnown

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

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithIntegrationIntegrationScheme) IsKnown

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

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

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

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled bool
const (
	ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabledTrue  ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled = true
	ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabledFalse ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled = false
)

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingDisabled) IsKnown

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

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabled

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabled bool
const (
	ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabledTrue ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabled = true
)

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateDisabledDisabled) IsKnown

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

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabled

type ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabled bool
const (
	ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabledFalse ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabled = false
)

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginCachingHyperdriveHyperdriveCachingCreateEnabledDisabled) IsKnown

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

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

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

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

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown

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

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

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginDatabaseReachableThroughAWorkersVPCScheme) IsKnown

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

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

func (ConfigNewParamsBodyHyperdriveHyperdriveConfigCreateWithOriginOriginPublicDatabaseScheme) IsKnown

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

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

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

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

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

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

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

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

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

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

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 ConfigRestartParams struct {
	// Define configurations using a unique string identifier.
	AccountID param.Field[string] `path:"account_id" api:"required"`
}

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

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

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

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

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

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

func (ConfigRestartResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown

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

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

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

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

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

Returns a list of Hyperdrives.

func (*ConfigService) ListAutoPaging

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

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

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

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

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

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

func (ConfigUpdateResponseOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme) IsKnown

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

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

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

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

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 Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

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

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

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

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

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

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

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

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 Member

type Member = shared.Member

This is an alias to an internal type.

type MemberPoliciesAccess

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

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

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

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

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

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

This is an alias to an internal type.

type MemberPolicy

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanID

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 ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

type Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

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

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

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

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

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

Jump to

Keyboard shortcuts

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