hyperdrive

package
v2.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 12 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 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 CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN added in v2.1.0

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam added in v2.1.0

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

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

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

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

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

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

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"`
	// 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 ConfigurationScheme `json:"scheme,required"`
	// The user of your origin database.
	User string            `json:"user,required"`
	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"`
	// 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[ConfigurationScheme] `json:"scheme,required"`
	// The user of your origin database.
	User param.Field[string] `json:"user,required"`
}

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 Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

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

type Member = shared.Member

This is an alias to an internal type.

type MemberParam added in v2.1.0

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRole added in v2.1.0

type MemberRole = shared.MemberRole

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

type MemberRolesPermissions = shared.MemberRolesPermissions

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

type MemberUser = shared.MemberUser

This is an alias to an internal type.

type MemberUserParam added in v2.1.0

type MemberUserParam = shared.MemberUserParam

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 ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

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