hyperdrive

package
v4.3.0 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const 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 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 {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type ConfigDeleteResponse

type ConfigDeleteResponse = interface{}

type ConfigDeleteResponseEnvelope

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

func (*ConfigDeleteResponseEnvelope) UnmarshalJSON

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

type ConfigDeleteResponseEnvelopeSuccess

type ConfigDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigDeleteResponseEnvelopeSuccessTrue ConfigDeleteResponseEnvelopeSuccess = true
)

func (ConfigDeleteResponseEnvelopeSuccess) IsKnown

type ConfigEditParams

type ConfigEditParams struct {
	// Identifier
	AccountID param.Field[string]                       `path:"account_id,required"`
	Caching   param.Field[ConfigEditParamsCachingUnion] `json:"caching"`
	MTLS      param.Field[ConfigEditParamsMTLS]         `json:"mtls"`
	Name      param.Field[string]                       `json:"name"`
	Origin    param.Field[ConfigEditParamsOriginUnion]  `json:"origin"`
}

func (ConfigEditParams) MarshalJSON

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

type ConfigEditParamsCaching

type ConfigEditParamsCaching struct {
	// When set to true, disables the caching of SQL responses. (Default: false)
	Disabled param.Field[bool] `json:"disabled"`
	// When present, specifies max duration for which items should persist in the
	// cache. Not returned if set to default. (Default: 60)
	MaxAge param.Field[int64] `json:"max_age"`
	// When present, indicates the number of seconds cache may serve the response after
	// it becomes stale. Not returned if set to default. (Default: 15)
	StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}

func (ConfigEditParamsCaching) MarshalJSON

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

type ConfigEditParamsCachingHyperdriveHyperdriveCachingCommon

type ConfigEditParamsCachingHyperdriveHyperdriveCachingCommon struct {
	// When set to true, disables the caching of SQL responses. (Default: false)
	Disabled param.Field[bool] `json:"disabled"`
}

func (ConfigEditParamsCachingHyperdriveHyperdriveCachingCommon) MarshalJSON

type ConfigEditParamsCachingHyperdriveHyperdriveCachingEnabled

type ConfigEditParamsCachingHyperdriveHyperdriveCachingEnabled struct {
	// When set to true, disables the caching of SQL responses. (Default: false)
	Disabled param.Field[bool] `json:"disabled"`
	// When present, specifies max duration for which items should persist in the
	// cache. Not returned if set to default. (Default: 60)
	MaxAge param.Field[int64] `json:"max_age"`
	// When present, indicates the number of seconds cache may serve the response after
	// it becomes stale. Not returned if set to default. (Default: 15)
	StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}

func (ConfigEditParamsCachingHyperdriveHyperdriveCachingEnabled) MarshalJSON

type ConfigEditParamsMTLS added in v4.3.0

type ConfigEditParamsMTLS struct {
	// CA certificate ID
	CACertificateID param.Field[string] `json:"ca_certificate_id"`
	// mTLS certificate ID
	MTLSCertificateID param.Field[string] `json:"mtls_certificate_id"`
	// SSL mode used for CA verification. Must be 'require', 'verify-ca', or
	// 'verify-full'
	Sslmode param.Field[string] `json:"sslmode"`
}

func (ConfigEditParamsMTLS) MarshalJSON added in v4.3.0

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

type ConfigEditParamsOrigin

type ConfigEditParamsOrigin struct {
	// The Client ID of the Access token to use when connecting to the origin database.
	AccessClientID param.Field[string] `json:"access_client_id"`
	// The Client Secret of the Access token to use when connecting to the origin
	// database. This value is write-only and never returned by the API.
	AccessClientSecret param.Field[string] `json:"access_client_secret"`
	// The name of your origin database.
	Database param.Field[string] `json:"database"`
	// The host (hostname or IP) of your origin database.
	Host param.Field[string] `json:"host"`
	// The password required to access your origin database. This value is write-only
	// and never returned by the API.
	Password param.Field[string] `json:"password"`
	// The port (default: 5432 for Postgres) of your origin database.
	Port param.Field[int64] `json:"port"`
	// Specifies the URL scheme used to connect to your origin database.
	Scheme param.Field[ConfigEditParamsOriginScheme] `json:"scheme"`
	// The user of your origin database.
	User param.Field[string] `json:"user"`
}

func (ConfigEditParamsOrigin) MarshalJSON

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

type ConfigEditParamsOriginHyperdriveHyperdriveDatabase

type ConfigEditParamsOriginHyperdriveHyperdriveDatabase struct {
	// The name of your origin database.
	Database param.Field[string] `json:"database"`
	// The password required to access your origin database. This value is write-only
	// and never returned by the API.
	Password param.Field[string] `json:"password"`
	// Specifies the URL scheme used to connect to your origin database.
	Scheme param.Field[ConfigEditParamsOriginHyperdriveHyperdriveDatabaseScheme] `json:"scheme"`
	// 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 added in v4.2.0

type ConfigEditParamsOriginHyperdriveInternetOrigin struct {
	// The host (hostname or IP) of your origin database.
	Host param.Field[string] `json:"host,required"`
	// The port (default: 5432 for Postgres) of your origin database.
	Port param.Field[int64] `json:"port,required"`
}

func (ConfigEditParamsOriginHyperdriveInternetOrigin) MarshalJSON added in v4.2.0

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

type ConfigEditParamsOriginHyperdriveOverAccessOrigin added in v4.2.0

type ConfigEditParamsOriginHyperdriveOverAccessOrigin struct {
	// The Client ID of the Access token to use when connecting to the origin database.
	AccessClientID param.Field[string] `json:"access_client_id,required"`
	// The Client Secret of the Access token to use when connecting to the origin
	// database. This value is write-only and never returned by the API.
	AccessClientSecret param.Field[string] `json:"access_client_secret,required"`
	// The host (hostname or IP) of your origin database.
	Host param.Field[string] `json:"host,required"`
}

func (ConfigEditParamsOriginHyperdriveOverAccessOrigin) MarshalJSON added in v4.2.0

func (r ConfigEditParamsOriginHyperdriveOverAccessOrigin) 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 ConfigEditResponseEnvelope

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

func (*ConfigEditResponseEnvelope) UnmarshalJSON

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

type ConfigEditResponseEnvelopeSuccess

type ConfigEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigEditResponseEnvelopeSuccessTrue ConfigEditResponseEnvelopeSuccess = true
)

func (ConfigEditResponseEnvelopeSuccess) IsKnown

type ConfigGetParams

type ConfigGetParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type ConfigGetResponseEnvelope

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

func (*ConfigGetResponseEnvelope) UnmarshalJSON

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

type ConfigGetResponseEnvelopeSuccess

type ConfigGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigGetResponseEnvelopeSuccessTrue ConfigGetResponseEnvelopeSuccess = true
)

func (ConfigGetResponseEnvelopeSuccess) IsKnown

type ConfigListParams

type ConfigListParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
}

type ConfigNewParams

type ConfigNewParams struct {
	// Identifier
	AccountID  param.Field[string] `path:"account_id,required"`
	Hyperdrive HyperdriveParam     `json:"hyperdrive,required"`
}

func (ConfigNewParams) MarshalJSON

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

type ConfigNewResponseEnvelope

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

func (*ConfigNewResponseEnvelope) UnmarshalJSON

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

type ConfigNewResponseEnvelopeSuccess

type ConfigNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigNewResponseEnvelopeSuccessTrue ConfigNewResponseEnvelopeSuccess = true
)

func (ConfigNewResponseEnvelopeSuccess) IsKnown

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 *Hyperdrive, err error)

Patches and returns the specified Hyperdrive configuration. Custom caching settings are not kept if caching is disabled.

func (*ConfigService) Get

func (r *ConfigService) Get(ctx context.Context, hyperdriveID string, query ConfigGetParams, opts ...option.RequestOption) (res *Hyperdrive, 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 *Hyperdrive, err error)

Creates and returns a new Hyperdrive configuration.

func (*ConfigService) Update

func (r *ConfigService) Update(ctx context.Context, hyperdriveID string, params ConfigUpdateParams, opts ...option.RequestOption) (res *Hyperdrive, err error)

Updates and returns the specified Hyperdrive configuration.

type ConfigUpdateParams

type ConfigUpdateParams struct {
	// Identifier
	AccountID  param.Field[string] `path:"account_id,required"`
	Hyperdrive HyperdriveParam     `json:"hyperdrive,required"`
}

func (ConfigUpdateParams) MarshalJSON

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

type ConfigUpdateResponseEnvelope

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

func (*ConfigUpdateResponseEnvelope) UnmarshalJSON

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

type ConfigUpdateResponseEnvelopeSuccess

type ConfigUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigUpdateResponseEnvelopeSuccessTrue ConfigUpdateResponseEnvelopeSuccess = true
)

func (ConfigUpdateResponseEnvelopeSuccess) IsKnown

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource added in v4.2.0

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type Hyperdrive

type Hyperdrive struct {
	// Identifier
	ID      string            `json:"id,required"`
	Name    string            `json:"name,required"`
	Origin  HyperdriveOrigin  `json:"origin,required"`
	Caching HyperdriveCaching `json:"caching"`
	// When the Hyperdrive configuration was created.
	CreatedOn time.Time `json:"created_on" format:"date-time"`
	// When the Hyperdrive configuration was last modified.
	ModifiedOn time.Time      `json:"modified_on" format:"date-time"`
	MTLS       HyperdriveMTLS `json:"mtls"`
	JSON       hyperdriveJSON `json:"-"`
}

func (*Hyperdrive) UnmarshalJSON

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

type HyperdriveCaching

type HyperdriveCaching struct {
	// When set to true, disables the caching of SQL responses. (Default: false)
	Disabled bool `json:"disabled"`
	// When present, specifies max duration for which items should persist in the
	// cache. Not returned if set to default. (Default: 60)
	MaxAge int64 `json:"max_age"`
	// When present, indicates the number of seconds cache may serve the response after
	// it becomes stale. Not returned if set to default. (Default: 15)
	StaleWhileRevalidate int64                 `json:"stale_while_revalidate"`
	JSON                 hyperdriveCachingJSON `json:"-"`
	// contains filtered or unexported fields
}

func (HyperdriveCaching) AsUnion

AsUnion returns a HyperdriveCachingUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are hyperdrive.HyperdriveCachingHyperdriveHyperdriveCachingCommon, hyperdrive.HyperdriveCachingHyperdriveHyperdriveCachingEnabled.

func (*HyperdriveCaching) UnmarshalJSON

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

type HyperdriveCachingHyperdriveHyperdriveCachingCommon

type HyperdriveCachingHyperdriveHyperdriveCachingCommon struct {
	// When set to true, disables the caching of SQL responses. (Default: false)
	Disabled bool                                                   `json:"disabled"`
	JSON     hyperdriveCachingHyperdriveHyperdriveCachingCommonJSON `json:"-"`
}

func (*HyperdriveCachingHyperdriveHyperdriveCachingCommon) UnmarshalJSON

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

type HyperdriveCachingHyperdriveHyperdriveCachingCommonParam

type HyperdriveCachingHyperdriveHyperdriveCachingCommonParam struct {
	// When set to true, disables the caching of SQL responses. (Default: false)
	Disabled param.Field[bool] `json:"disabled"`
}

func (HyperdriveCachingHyperdriveHyperdriveCachingCommonParam) MarshalJSON

type HyperdriveCachingHyperdriveHyperdriveCachingEnabled

type HyperdriveCachingHyperdriveHyperdriveCachingEnabled struct {
	// When set to true, disables the caching of SQL responses. (Default: false)
	Disabled bool `json:"disabled"`
	// When present, specifies max duration for which items should persist in the
	// cache. Not returned if set to default. (Default: 60)
	MaxAge int64 `json:"max_age"`
	// When present, indicates the number of seconds cache may serve the response after
	// it becomes stale. Not returned if set to default. (Default: 15)
	StaleWhileRevalidate int64                                                   `json:"stale_while_revalidate"`
	JSON                 hyperdriveCachingHyperdriveHyperdriveCachingEnabledJSON `json:"-"`
}

func (*HyperdriveCachingHyperdriveHyperdriveCachingEnabled) UnmarshalJSON

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

type HyperdriveCachingHyperdriveHyperdriveCachingEnabledParam

type HyperdriveCachingHyperdriveHyperdriveCachingEnabledParam struct {
	// When set to true, disables the caching of SQL responses. (Default: false)
	Disabled param.Field[bool] `json:"disabled"`
	// When present, specifies max duration for which items should persist in the
	// cache. Not returned if set to default. (Default: 60)
	MaxAge param.Field[int64] `json:"max_age"`
	// When present, indicates the number of seconds cache may serve the response after
	// it becomes stale. Not returned if set to default. (Default: 15)
	StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}

func (HyperdriveCachingHyperdriveHyperdriveCachingEnabledParam) MarshalJSON

type HyperdriveCachingParam

type HyperdriveCachingParam struct {
	// When set to true, disables the caching of SQL responses. (Default: false)
	Disabled param.Field[bool] `json:"disabled"`
	// When present, specifies max duration for which items should persist in the
	// cache. Not returned if set to default. (Default: 60)
	MaxAge param.Field[int64] `json:"max_age"`
	// When present, indicates the number of seconds cache may serve the response after
	// it becomes stale. Not returned if set to default. (Default: 15)
	StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"`
}

func (HyperdriveCachingParam) MarshalJSON

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

type HyperdriveCachingUnion

type HyperdriveCachingUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by hyperdrive.HyperdriveCachingHyperdriveHyperdriveCachingCommon or hyperdrive.HyperdriveCachingHyperdriveHyperdriveCachingEnabled.

type HyperdriveMTLS added in v4.3.0

type HyperdriveMTLS struct {
	// CA certificate ID
	CACertificateID string `json:"ca_certificate_id"`
	// mTLS certificate ID
	MTLSCertificateID string `json:"mtls_certificate_id"`
	// SSL mode used for CA verification. Must be 'require', 'verify-ca', or
	// 'verify-full'
	Sslmode string             `json:"sslmode"`
	JSON    hyperdriveMTLSJSON `json:"-"`
}

func (*HyperdriveMTLS) UnmarshalJSON added in v4.3.0

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

type HyperdriveMTLSParam added in v4.3.0

type HyperdriveMTLSParam struct {
	// CA certificate ID
	CACertificateID param.Field[string] `json:"ca_certificate_id"`
	// mTLS certificate ID
	MTLSCertificateID param.Field[string] `json:"mtls_certificate_id"`
	// SSL mode used for CA verification. Must be 'require', 'verify-ca', or
	// 'verify-full'
	Sslmode param.Field[string] `json:"sslmode"`
}

func (HyperdriveMTLSParam) MarshalJSON added in v4.3.0

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

type HyperdriveOrigin

type HyperdriveOrigin struct {
	// The name of your origin database.
	Database string `json:"database,required"`
	// The host (hostname or IP) of your origin database.
	Host string `json:"host,required"`
	// Specifies the URL scheme used to connect to your origin database.
	Scheme HyperdriveOriginScheme `json:"scheme,required"`
	// The user of your origin database.
	User string `json:"user,required"`
	// The Client ID of the Access token to use when connecting to the origin database.
	AccessClientID string `json:"access_client_id"`
	// The port (default: 5432 for Postgres) of your origin database.
	Port int64                `json:"port"`
	JSON hyperdriveOriginJSON `json:"-"`
	// contains filtered or unexported fields
}

func (HyperdriveOrigin) AsUnion

AsUnion returns a HyperdriveOriginUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are hyperdrive.HyperdriveOriginPublicDatabase, hyperdrive.HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnel.

func (*HyperdriveOrigin) UnmarshalJSON

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

type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnel

type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnel struct {
	// The Client ID of the Access token to use when connecting to the origin database.
	AccessClientID string `json:"access_client_id,required"`
	// The name of your origin database.
	Database string `json:"database,required"`
	// The host (hostname or IP) of your origin database.
	Host string `json:"host,required"`
	// Specifies the URL scheme used to connect to your origin database.
	Scheme HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme `json:"scheme,required"`
	// The user of your origin database.
	User string                                                            `json:"user,required"`
	JSON hyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelJSON `json:"-"`
}

func (*HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnel) UnmarshalJSON

type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelParam

type HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelParam struct {
	// The Client ID of the Access token to use when connecting to the origin database.
	AccessClientID param.Field[string] `json:"access_client_id,required"`
	// The Client Secret of the Access token to use when connecting to the origin
	// database. This value is write-only and never returned by the API.
	AccessClientSecret param.Field[string] `json:"access_client_secret,required"`
	// The name of your origin database.
	Database param.Field[string] `json:"database,required"`
	// The host (hostname or IP) of your origin database.
	Host param.Field[string] `json:"host,required"`
	// The password required to access your origin database. This value is write-only
	// and never returned by the API.
	Password param.Field[string] `json:"password,required"`
	// Specifies the URL scheme used to connect to your origin database.
	Scheme param.Field[HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelScheme] `json:"scheme,required"`
	// The user of your origin database.
	User param.Field[string] `json:"user,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 HyperdriveOriginParam

type HyperdriveOriginParam struct {
	// The name of your origin database.
	Database param.Field[string] `json:"database,required"`
	// The host (hostname or IP) of your origin database.
	Host param.Field[string] `json:"host,required"`
	// The password required to access your origin database. This value is write-only
	// and never returned by the API.
	Password param.Field[string] `json:"password,required"`
	// Specifies the URL scheme used to connect to your origin database.
	Scheme param.Field[HyperdriveOriginScheme] `json:"scheme,required"`
	// The user of your origin database.
	User param.Field[string] `json:"user,required"`
	// The Client ID of the Access token to use when connecting to the origin database.
	AccessClientID param.Field[string] `json:"access_client_id"`
	// The Client Secret of the Access token to use when connecting to the origin
	// database. This value is write-only and never returned by the API.
	AccessClientSecret param.Field[string] `json:"access_client_secret"`
	// The port (default: 5432 for Postgres) of your origin database.
	Port param.Field[int64] `json:"port"`
}

func (HyperdriveOriginParam) MarshalJSON

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

type HyperdriveOriginPublicDatabase

type HyperdriveOriginPublicDatabase struct {
	// The name of your origin database.
	Database string `json:"database,required"`
	// The host (hostname or IP) of your origin database.
	Host string `json:"host,required"`
	// The port (default: 5432 for Postgres) of your origin database.
	Port int64 `json:"port,required"`
	// Specifies the URL scheme used to connect to your origin database.
	Scheme HyperdriveOriginPublicDatabaseScheme `json:"scheme,required"`
	// The user of your origin database.
	User string                             `json:"user,required"`
	JSON hyperdriveOriginPublicDatabaseJSON `json:"-"`
}

func (*HyperdriveOriginPublicDatabase) UnmarshalJSON

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

type HyperdriveOriginPublicDatabaseParam

type HyperdriveOriginPublicDatabaseParam struct {
	// The name of your origin database.
	Database param.Field[string] `json:"database,required"`
	// The host (hostname or IP) of your origin database.
	Host param.Field[string] `json:"host,required"`
	// The password required to access your origin database. This value is write-only
	// and never returned by the API.
	Password param.Field[string] `json:"password,required"`
	// The port (default: 5432 for Postgres) of your origin database.
	Port param.Field[int64] `json:"port,required"`
	// Specifies the URL scheme used to connect to your origin database.
	Scheme param.Field[HyperdriveOriginPublicDatabaseScheme] `json:"scheme,required"`
	// The user of your origin database.
	User param.Field[string] `json:"user,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 HyperdriveOriginUnion

type HyperdriveOriginUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by hyperdrive.HyperdriveOriginPublicDatabase or hyperdrive.HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnel.

type HyperdriveOriginUnionParam

type HyperdriveOriginUnionParam interface {
	// contains filtered or unexported methods
}

Satisfied by hyperdrive.HyperdriveOriginPublicDatabaseParam, hyperdrive.HyperdriveOriginAccessProtectedDatabaseBehindCloudflareTunnelParam, HyperdriveOriginParam.

type HyperdriveParam

type HyperdriveParam struct {
	Name    param.Field[string]                      `json:"name,required"`
	Origin  param.Field[HyperdriveOriginUnionParam]  `json:"origin,required"`
	Caching param.Field[HyperdriveCachingUnionParam] `json:"caching"`
	MTLS    param.Field[HyperdriveMTLSParam]         `json:"mtls"`
}

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 added in v4.1.0

type RatePlanID = shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource added in v4.3.0

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