Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type ConfigDeleteParams
- type ConfigDeleteResponseEnvelope
- type ConfigDeleteResponseEnvelopeSuccess
- type ConfigDeleteResponseUnion
- type ConfigEditParams
- type ConfigEditResponseEnvelope
- type ConfigEditResponseEnvelopeSuccess
- type ConfigGetParams
- type ConfigGetResponseEnvelope
- type ConfigGetResponseEnvelopeSuccess
- type ConfigListParams
- type ConfigNewParams
- type ConfigNewResponseEnvelope
- type ConfigNewResponseEnvelopeSuccess
- type ConfigService
- func (r *ConfigService) Delete(ctx context.Context, hyperdriveID string, body ConfigDeleteParams, ...) (res *ConfigDeleteResponseUnion, err error)
- func (r *ConfigService) Edit(ctx context.Context, hyperdriveID string, params ConfigEditParams, ...) (res *Hyperdrive, err error)
- func (r *ConfigService) Get(ctx context.Context, hyperdriveID string, query ConfigGetParams, ...) (res *Hyperdrive, err error)
- func (r *ConfigService) List(ctx context.Context, query ConfigListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Hyperdrive], err error)
- func (r *ConfigService) ListAutoPaging(ctx context.Context, query ConfigListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Hyperdrive]
- func (r *ConfigService) New(ctx context.Context, params ConfigNewParams, opts ...option.RequestOption) (res *Hyperdrive, err error)
- func (r *ConfigService) Update(ctx context.Context, hyperdriveID string, params ConfigUpdateParams, ...) (res *Hyperdrive, err error)
- type ConfigUpdateParams
- type ConfigUpdateResponseEnvelope
- type ConfigUpdateResponseEnvelopeSuccess
- type Configuration
- type ConfigurationParam
- type ConfigurationScheme
- type Error
- type ErrorData
- type Hyperdrive
- type HyperdriveCaching
- type HyperdriveCachingParam
- type HyperdriveParam
- type HyperdriveService
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type ResponseInfo
- type Role
- type SortDirection
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type CertificateCA ¶ added in v2.2.0
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶ added in v2.2.0
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 ¶ added in v2.3.0
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 ConfigDeleteResponseEnvelope ¶
type ConfigDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result ConfigDeleteResponseUnion `json:"result,required"` // 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 ¶
func (r ConfigDeleteResponseEnvelopeSuccess) IsKnown() bool
type ConfigDeleteResponseUnion ¶
type ConfigDeleteResponseUnion interface {
ImplementsHyperdriveConfigDeleteResponseUnion()
}
Union satisfied by hyperdrive.ConfigDeleteResponseUnknown or shared.UnionString.
type ConfigEditParams ¶
type ConfigEditParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` Hyperdrive HyperdriveParam `json:"hyperdrive,required"` }
func (ConfigEditParams) MarshalJSON ¶
func (r ConfigEditParams) MarshalJSON() (data []byte, err error)
type ConfigEditResponseEnvelope ¶
type ConfigEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Hyperdrive `json:"result,required,nullable"` // 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 ¶
func (r ConfigEditResponseEnvelopeSuccess) IsKnown() bool
type ConfigGetParams ¶
type ConfigGetResponseEnvelope ¶
type ConfigGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Hyperdrive `json:"result,required,nullable"` // 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 ¶
func (r ConfigGetResponseEnvelopeSuccess) IsKnown() bool
type ConfigListParams ¶
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,nullable"` // 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 ¶
func (r ConfigNewResponseEnvelopeSuccess) IsKnown() bool
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 *ConfigDeleteResponseUnion, 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. Updates to the origin and caching settings are applied with an all-or-nothing approach.
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 ¶
func (r *ConfigService) List(ctx context.Context, query ConfigListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Hyperdrive], err error)
Returns a list of Hyperdrives
func (*ConfigService) ListAutoPaging ¶
func (r *ConfigService) ListAutoPaging(ctx context.Context, query ConfigListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Hyperdrive]
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,nullable"` // 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 ¶
func (r ConfigUpdateResponseEnvelopeSuccess) IsKnown() bool
type Configuration ¶
type Configuration 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 ConfigurationScheme `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 configurationJSON `json:"-"` }
func (*Configuration) UnmarshalJSON ¶
func (r *Configuration) UnmarshalJSON(data []byte) (err error)
type ConfigurationParam ¶
type ConfigurationParam 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"` // Specifies the URL scheme used to connect to your origin database. Scheme param.Field[ConfigurationScheme] `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 port (default: 5432 for Postgres) of your origin database. Port param.Field[int64] `json:"port"` }
func (ConfigurationParam) MarshalJSON ¶
func (r ConfigurationParam) MarshalJSON() (data []byte, err error)
type ConfigurationScheme ¶
type ConfigurationScheme string
Specifies the URL scheme used to connect to your origin database.
const ( ConfigurationSchemePostgres ConfigurationScheme = "postgres" ConfigurationSchemePostgresql ConfigurationScheme = "postgresql" ConfigurationSchemeMysql ConfigurationScheme = "mysql" )
func (ConfigurationScheme) IsKnown ¶
func (r ConfigurationScheme) IsKnown() bool
type Hyperdrive ¶
type Hyperdrive struct { Caching HyperdriveCaching `json:"caching"` Name string `json:"name"` Origin Configuration `json:"origin"` 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. (Default: 60) MaxAge int64 `json:"max_age"` // When present, indicates the number of seconds cache may serve the response after // it becomes stale. (Default: 15) StaleWhileRevalidate int64 `json:"stale_while_revalidate"` JSON hyperdriveCachingJSON `json:"-"` }
func (*HyperdriveCaching) UnmarshalJSON ¶
func (r *HyperdriveCaching) UnmarshalJSON(data []byte) (err error)
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. (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. (Default: 15) StaleWhileRevalidate param.Field[int64] `json:"stale_while_revalidate"` }
func (HyperdriveCachingParam) MarshalJSON ¶
func (r HyperdriveCachingParam) MarshalJSON() (data []byte, err error)
type HyperdriveParam ¶
type HyperdriveParam struct { Caching param.Field[HyperdriveCachingParam] `json:"caching"` Name param.Field[string] `json:"name"` Origin param.Field[ConfigurationParam] `json:"origin"` }
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 MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberStatus ¶ added in v2.3.0
type MemberStatus = shared.MemberStatus
A member's status in the account.
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
Details of the user associated to the membership.
This is an alias to an internal type.
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
type SortDirection ¶ added in v2.2.0
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.