Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CheckRegion
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type HTTPConfiguration
- type HTTPConfigurationMethod
- type HTTPConfigurationParam
- type Healthcheck
- type HealthcheckDeleteParams
- type HealthcheckDeleteResponse
- type HealthcheckDeleteResponseEnvelope
- type HealthcheckDeleteResponseEnvelopeSuccess
- type HealthcheckEditParams
- type HealthcheckEditResponseEnvelope
- type HealthcheckEditResponseEnvelopeSuccess
- type HealthcheckGetParams
- type HealthcheckGetResponseEnvelope
- type HealthcheckGetResponseEnvelopeSuccess
- type HealthcheckListParams
- type HealthcheckNewParams
- type HealthcheckNewResponseEnvelope
- type HealthcheckNewResponseEnvelopeSuccess
- type HealthcheckService
- func (r *HealthcheckService) Delete(ctx context.Context, healthcheckID string, body HealthcheckDeleteParams, ...) (res *HealthcheckDeleteResponse, err error)
- func (r *HealthcheckService) Edit(ctx context.Context, healthcheckID string, params HealthcheckEditParams, ...) (res *Healthcheck, err error)
- func (r *HealthcheckService) Get(ctx context.Context, healthcheckID string, query HealthcheckGetParams, ...) (res *Healthcheck, err error)
- func (r *HealthcheckService) List(ctx context.Context, params HealthcheckListParams, ...) (res *pagination.SinglePage[Healthcheck], err error)
- func (r *HealthcheckService) ListAutoPaging(ctx context.Context, params HealthcheckListParams, ...) *pagination.SinglePageAutoPager[Healthcheck]
- func (r *HealthcheckService) New(ctx context.Context, params HealthcheckNewParams, opts ...option.RequestOption) (res *Healthcheck, err error)
- func (r *HealthcheckService) Update(ctx context.Context, healthcheckID string, params HealthcheckUpdateParams, ...) (res *Healthcheck, err error)
- type HealthcheckStatus
- type HealthcheckUpdateParams
- type HealthcheckUpdateResponseEnvelope
- type HealthcheckUpdateResponseEnvelopeSuccess
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type PreviewDeleteParams
- type PreviewDeleteResponse
- type PreviewDeleteResponseEnvelope
- type PreviewDeleteResponseEnvelopeSuccess
- type PreviewGetParams
- type PreviewGetResponseEnvelope
- type PreviewGetResponseEnvelopeSuccess
- type PreviewNewParams
- type PreviewNewResponseEnvelope
- type PreviewNewResponseEnvelopeSuccess
- type PreviewService
- func (r *PreviewService) Delete(ctx context.Context, healthcheckID string, body PreviewDeleteParams, ...) (res *PreviewDeleteResponse, err error)
- func (r *PreviewService) Get(ctx context.Context, healthcheckID string, query PreviewGetParams, ...) (res *Healthcheck, err error)
- func (r *PreviewService) New(ctx context.Context, params PreviewNewParams, opts ...option.RequestOption) (res *Healthcheck, err error)
- type QueryHealthcheckParam
- type ResponseInfo
- type Role
- type SortDirection
- type TCPConfiguration
- type TCPConfigurationMethod
- type TCPConfigurationParam
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 CheckRegion ¶
type CheckRegion string
WNAM: Western North America, ENAM: Eastern North America, WEU: Western Europe, EEU: Eastern Europe, NSAM: Northern South America, SSAM: Southern South America, OC: Oceania, ME: Middle East, NAF: North Africa, SAF: South Africa, IN: India, SEAS: South East Asia, NEAS: North East Asia, ALL_REGIONS: all regions (BUSINESS and ENTERPRISE customers only).
const ( CheckRegionWnam CheckRegion = "WNAM" CheckRegionEnam CheckRegion = "ENAM" CheckRegionWeu CheckRegion = "WEU" CheckRegionEeu CheckRegion = "EEU" CheckRegionNsam CheckRegion = "NSAM" CheckRegionSsam CheckRegion = "SSAM" CheckRegionOc CheckRegion = "OC" CheckRegionMe CheckRegion = "ME" CheckRegionNaf CheckRegion = "NAF" CheckRegionSaf CheckRegion = "SAF" CheckRegionIn CheckRegion = "IN" CheckRegionSeas CheckRegion = "SEAS" CheckRegionNeas CheckRegion = "NEAS" CheckRegionAllRegions CheckRegion = "ALL_REGIONS" )
func (CheckRegion) IsKnown ¶
func (r CheckRegion) IsKnown() bool
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 HTTPConfiguration ¶
type HTTPConfiguration struct { // Do not validate the certificate when the health check uses HTTPS. AllowInsecure bool `json:"allow_insecure"` // A case-insensitive sub-string to look for in the response body. If this string // is not found, the origin will be marked as unhealthy. ExpectedBody string `json:"expected_body"` // The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all // codes starting with 2) of the health check. ExpectedCodes []string `json:"expected_codes,nullable"` // Follow redirects if the origin returns a 3xx status code. FollowRedirects bool `json:"follow_redirects"` // The HTTP request headers to send in the health check. It is recommended you set // a Host header by default. The User-Agent header cannot be overridden. Header map[string][]string `json:"header,nullable"` // The HTTP method to use for the health check. Method HTTPConfigurationMethod `json:"method"` // The endpoint path to health check against. Path string `json:"path"` // Port number to connect to for the health check. Defaults to 80 if type is HTTP // or 443 if type is HTTPS. Port int64 `json:"port"` JSON httpConfigurationJSON `json:"-"` }
Parameters specific to an HTTP or HTTPS health check.
func (*HTTPConfiguration) UnmarshalJSON ¶
func (r *HTTPConfiguration) UnmarshalJSON(data []byte) (err error)
type HTTPConfigurationMethod ¶
type HTTPConfigurationMethod string
The HTTP method to use for the health check.
const ( HTTPConfigurationMethodGet HTTPConfigurationMethod = "GET" HTTPConfigurationMethodHead HTTPConfigurationMethod = "HEAD" )
func (HTTPConfigurationMethod) IsKnown ¶
func (r HTTPConfigurationMethod) IsKnown() bool
type HTTPConfigurationParam ¶
type HTTPConfigurationParam struct { // Do not validate the certificate when the health check uses HTTPS. AllowInsecure param.Field[bool] `json:"allow_insecure"` // A case-insensitive sub-string to look for in the response body. If this string // is not found, the origin will be marked as unhealthy. ExpectedBody param.Field[string] `json:"expected_body"` // The expected HTTP response codes (e.g. "200") or code ranges (e.g. "2xx" for all // codes starting with 2) of the health check. ExpectedCodes param.Field[[]string] `json:"expected_codes"` // Follow redirects if the origin returns a 3xx status code. FollowRedirects param.Field[bool] `json:"follow_redirects"` // The HTTP request headers to send in the health check. It is recommended you set // a Host header by default. The User-Agent header cannot be overridden. Header param.Field[map[string][]string] `json:"header"` // The HTTP method to use for the health check. Method param.Field[HTTPConfigurationMethod] `json:"method"` // The endpoint path to health check against. Path param.Field[string] `json:"path"` // Port number to connect to for the health check. Defaults to 80 if type is HTTP // or 443 if type is HTTPS. Port param.Field[int64] `json:"port"` }
Parameters specific to an HTTP or HTTPS health check.
func (HTTPConfigurationParam) MarshalJSON ¶
func (r HTTPConfigurationParam) MarshalJSON() (data []byte, err error)
type Healthcheck ¶
type Healthcheck struct { // Identifier ID string `json:"id"` // The hostname or IP address of the origin server to run health checks on. Address string `json:"address"` // A list of regions from which to run health checks. Null means Cloudflare will // pick a default region. CheckRegions []CheckRegion `json:"check_regions,nullable"` // The number of consecutive fails required from a health check before changing the // health to unhealthy. ConsecutiveFails int64 `json:"consecutive_fails"` // The number of consecutive successes required from a health check before changing // the health to healthy. ConsecutiveSuccesses int64 `json:"consecutive_successes"` CreatedOn time.Time `json:"created_on" format:"date-time"` // A human-readable description of the health check. Description string `json:"description"` // The current failure reason if status is unhealthy. FailureReason string `json:"failure_reason"` // Parameters specific to an HTTP or HTTPS health check. HTTPConfig HTTPConfiguration `json:"http_config,nullable"` // The interval between each health check. Shorter intervals may give quicker // notifications if the origin status changes, but will increase load on the origin // as we check from multiple locations. Interval int64 `json:"interval"` ModifiedOn time.Time `json:"modified_on" format:"date-time"` // A short name to identify the health check. Only alphanumeric characters, hyphens // and underscores are allowed. Name string `json:"name"` // The number of retries to attempt in case of a timeout before marking the origin // as unhealthy. Retries are attempted immediately. Retries int64 `json:"retries"` // The current status of the origin server according to the health check. Status HealthcheckStatus `json:"status"` // If suspended, no health checks are sent to the origin. Suspended bool `json:"suspended"` // Parameters specific to TCP health check. TCPConfig TCPConfiguration `json:"tcp_config,nullable"` // The timeout (in seconds) before marking the health check as failed. Timeout int64 `json:"timeout"` // The protocol to use for the health check. Currently supported protocols are // 'HTTP', 'HTTPS' and 'TCP'. Type string `json:"type"` JSON healthcheckJSON `json:"-"` }
func (*Healthcheck) UnmarshalJSON ¶
func (r *Healthcheck) UnmarshalJSON(data []byte) (err error)
type HealthcheckDeleteParams ¶
type HealthcheckDeleteResponse ¶
type HealthcheckDeleteResponse struct { // Identifier ID string `json:"id"` JSON healthcheckDeleteResponseJSON `json:"-"` }
func (*HealthcheckDeleteResponse) UnmarshalJSON ¶
func (r *HealthcheckDeleteResponse) UnmarshalJSON(data []byte) (err error)
type HealthcheckDeleteResponseEnvelope ¶
type HealthcheckDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result HealthcheckDeleteResponse `json:"result,required"` // Whether the API call was successful Success HealthcheckDeleteResponseEnvelopeSuccess `json:"success,required"` JSON healthcheckDeleteResponseEnvelopeJSON `json:"-"` }
func (*HealthcheckDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *HealthcheckDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type HealthcheckDeleteResponseEnvelopeSuccess ¶
type HealthcheckDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
HealthcheckDeleteResponseEnvelopeSuccessTrue HealthcheckDeleteResponseEnvelopeSuccess = true
)
func (HealthcheckDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r HealthcheckDeleteResponseEnvelopeSuccess) IsKnown() bool
type HealthcheckEditParams ¶
type HealthcheckEditParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` QueryHealthcheck QueryHealthcheckParam `json:"query_healthcheck,required"` }
func (HealthcheckEditParams) MarshalJSON ¶
func (r HealthcheckEditParams) MarshalJSON() (data []byte, err error)
type HealthcheckEditResponseEnvelope ¶
type HealthcheckEditResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Healthcheck `json:"result,required"` // Whether the API call was successful Success HealthcheckEditResponseEnvelopeSuccess `json:"success,required"` JSON healthcheckEditResponseEnvelopeJSON `json:"-"` }
func (*HealthcheckEditResponseEnvelope) UnmarshalJSON ¶
func (r *HealthcheckEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type HealthcheckEditResponseEnvelopeSuccess ¶
type HealthcheckEditResponseEnvelopeSuccess bool
Whether the API call was successful
const (
HealthcheckEditResponseEnvelopeSuccessTrue HealthcheckEditResponseEnvelopeSuccess = true
)
func (HealthcheckEditResponseEnvelopeSuccess) IsKnown ¶
func (r HealthcheckEditResponseEnvelopeSuccess) IsKnown() bool
type HealthcheckGetParams ¶
type HealthcheckGetResponseEnvelope ¶
type HealthcheckGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Healthcheck `json:"result,required"` // Whether the API call was successful Success HealthcheckGetResponseEnvelopeSuccess `json:"success,required"` JSON healthcheckGetResponseEnvelopeJSON `json:"-"` }
func (*HealthcheckGetResponseEnvelope) UnmarshalJSON ¶
func (r *HealthcheckGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type HealthcheckGetResponseEnvelopeSuccess ¶
type HealthcheckGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
HealthcheckGetResponseEnvelopeSuccessTrue HealthcheckGetResponseEnvelopeSuccess = true
)
func (HealthcheckGetResponseEnvelopeSuccess) IsKnown ¶
func (r HealthcheckGetResponseEnvelopeSuccess) IsKnown() bool
type HealthcheckListParams ¶
type HealthcheckListParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` // Page number of paginated results. Page param.Field[interface{}] `query:"page"` // Maximum number of results per page. Must be a multiple of 5. PerPage param.Field[interface{}] `query:"per_page"` }
func (HealthcheckListParams) URLQuery ¶ added in v2.1.0
func (r HealthcheckListParams) URLQuery() (v url.Values)
URLQuery serializes HealthcheckListParams's query parameters as `url.Values`.
type HealthcheckNewParams ¶
type HealthcheckNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` QueryHealthcheck QueryHealthcheckParam `json:"query_healthcheck,required"` }
func (HealthcheckNewParams) MarshalJSON ¶
func (r HealthcheckNewParams) MarshalJSON() (data []byte, err error)
type HealthcheckNewResponseEnvelope ¶
type HealthcheckNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Healthcheck `json:"result,required"` // Whether the API call was successful Success HealthcheckNewResponseEnvelopeSuccess `json:"success,required"` JSON healthcheckNewResponseEnvelopeJSON `json:"-"` }
func (*HealthcheckNewResponseEnvelope) UnmarshalJSON ¶
func (r *HealthcheckNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type HealthcheckNewResponseEnvelopeSuccess ¶
type HealthcheckNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
HealthcheckNewResponseEnvelopeSuccessTrue HealthcheckNewResponseEnvelopeSuccess = true
)
func (HealthcheckNewResponseEnvelopeSuccess) IsKnown ¶
func (r HealthcheckNewResponseEnvelopeSuccess) IsKnown() bool
type HealthcheckService ¶
type HealthcheckService struct { Options []option.RequestOption Previews *PreviewService }
HealthcheckService 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 NewHealthcheckService method instead.
func NewHealthcheckService ¶
func NewHealthcheckService(opts ...option.RequestOption) (r *HealthcheckService)
NewHealthcheckService 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 (*HealthcheckService) Delete ¶
func (r *HealthcheckService) Delete(ctx context.Context, healthcheckID string, body HealthcheckDeleteParams, opts ...option.RequestOption) (res *HealthcheckDeleteResponse, err error)
Delete a health check.
func (*HealthcheckService) Edit ¶
func (r *HealthcheckService) Edit(ctx context.Context, healthcheckID string, params HealthcheckEditParams, opts ...option.RequestOption) (res *Healthcheck, err error)
Patch a configured health check.
func (*HealthcheckService) Get ¶
func (r *HealthcheckService) Get(ctx context.Context, healthcheckID string, query HealthcheckGetParams, opts ...option.RequestOption) (res *Healthcheck, err error)
Fetch a single configured health check.
func (*HealthcheckService) List ¶
func (r *HealthcheckService) List(ctx context.Context, params HealthcheckListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Healthcheck], err error)
List configured health checks.
func (*HealthcheckService) ListAutoPaging ¶
func (r *HealthcheckService) ListAutoPaging(ctx context.Context, params HealthcheckListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Healthcheck]
List configured health checks.
func (*HealthcheckService) New ¶
func (r *HealthcheckService) New(ctx context.Context, params HealthcheckNewParams, opts ...option.RequestOption) (res *Healthcheck, err error)
Create a new health check.
func (*HealthcheckService) Update ¶
func (r *HealthcheckService) Update(ctx context.Context, healthcheckID string, params HealthcheckUpdateParams, opts ...option.RequestOption) (res *Healthcheck, err error)
Update a configured health check.
type HealthcheckStatus ¶
type HealthcheckStatus string
The current status of the origin server according to the health check.
const ( HealthcheckStatusUnknown HealthcheckStatus = "unknown" HealthcheckStatusHealthy HealthcheckStatus = "healthy" HealthcheckStatusUnhealthy HealthcheckStatus = "unhealthy" HealthcheckStatusSuspended HealthcheckStatus = "suspended" )
func (HealthcheckStatus) IsKnown ¶
func (r HealthcheckStatus) IsKnown() bool
type HealthcheckUpdateParams ¶
type HealthcheckUpdateParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` QueryHealthcheck QueryHealthcheckParam `json:"query_healthcheck,required"` }
func (HealthcheckUpdateParams) MarshalJSON ¶
func (r HealthcheckUpdateParams) MarshalJSON() (data []byte, err error)
type HealthcheckUpdateResponseEnvelope ¶
type HealthcheckUpdateResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Healthcheck `json:"result,required"` // Whether the API call was successful Success HealthcheckUpdateResponseEnvelopeSuccess `json:"success,required"` JSON healthcheckUpdateResponseEnvelopeJSON `json:"-"` }
func (*HealthcheckUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *HealthcheckUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type HealthcheckUpdateResponseEnvelopeSuccess ¶
type HealthcheckUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
HealthcheckUpdateResponseEnvelopeSuccessTrue HealthcheckUpdateResponseEnvelopeSuccess = true
)
func (HealthcheckUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r HealthcheckUpdateResponseEnvelopeSuccess) IsKnown() bool
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 PreviewDeleteParams ¶
type PreviewDeleteResponse ¶
type PreviewDeleteResponse struct { // Identifier ID string `json:"id"` JSON previewDeleteResponseJSON `json:"-"` }
func (*PreviewDeleteResponse) UnmarshalJSON ¶
func (r *PreviewDeleteResponse) UnmarshalJSON(data []byte) (err error)
type PreviewDeleteResponseEnvelope ¶
type PreviewDeleteResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result PreviewDeleteResponse `json:"result,required"` // Whether the API call was successful Success PreviewDeleteResponseEnvelopeSuccess `json:"success,required"` JSON previewDeleteResponseEnvelopeJSON `json:"-"` }
func (*PreviewDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *PreviewDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PreviewDeleteResponseEnvelopeSuccess ¶
type PreviewDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
PreviewDeleteResponseEnvelopeSuccessTrue PreviewDeleteResponseEnvelopeSuccess = true
)
func (PreviewDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r PreviewDeleteResponseEnvelopeSuccess) IsKnown() bool
type PreviewGetParams ¶
type PreviewGetResponseEnvelope ¶
type PreviewGetResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Healthcheck `json:"result,required"` // Whether the API call was successful Success PreviewGetResponseEnvelopeSuccess `json:"success,required"` JSON previewGetResponseEnvelopeJSON `json:"-"` }
func (*PreviewGetResponseEnvelope) UnmarshalJSON ¶
func (r *PreviewGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PreviewGetResponseEnvelopeSuccess ¶
type PreviewGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
PreviewGetResponseEnvelopeSuccessTrue PreviewGetResponseEnvelopeSuccess = true
)
func (PreviewGetResponseEnvelopeSuccess) IsKnown ¶
func (r PreviewGetResponseEnvelopeSuccess) IsKnown() bool
type PreviewNewParams ¶
type PreviewNewParams struct { // Identifier ZoneID param.Field[string] `path:"zone_id,required"` QueryHealthcheck QueryHealthcheckParam `json:"query_healthcheck,required"` }
func (PreviewNewParams) MarshalJSON ¶
func (r PreviewNewParams) MarshalJSON() (data []byte, err error)
type PreviewNewResponseEnvelope ¶
type PreviewNewResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` Result Healthcheck `json:"result,required"` // Whether the API call was successful Success PreviewNewResponseEnvelopeSuccess `json:"success,required"` JSON previewNewResponseEnvelopeJSON `json:"-"` }
func (*PreviewNewResponseEnvelope) UnmarshalJSON ¶
func (r *PreviewNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PreviewNewResponseEnvelopeSuccess ¶
type PreviewNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
PreviewNewResponseEnvelopeSuccessTrue PreviewNewResponseEnvelopeSuccess = true
)
func (PreviewNewResponseEnvelopeSuccess) IsKnown ¶
func (r PreviewNewResponseEnvelopeSuccess) IsKnown() bool
type PreviewService ¶
type PreviewService struct {
Options []option.RequestOption
}
PreviewService 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 NewPreviewService method instead.
func NewPreviewService ¶
func NewPreviewService(opts ...option.RequestOption) (r *PreviewService)
NewPreviewService 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 (*PreviewService) Delete ¶
func (r *PreviewService) Delete(ctx context.Context, healthcheckID string, body PreviewDeleteParams, opts ...option.RequestOption) (res *PreviewDeleteResponse, err error)
Delete a health check.
func (*PreviewService) Get ¶
func (r *PreviewService) Get(ctx context.Context, healthcheckID string, query PreviewGetParams, opts ...option.RequestOption) (res *Healthcheck, err error)
Fetch a single configured health check preview.
func (*PreviewService) New ¶
func (r *PreviewService) New(ctx context.Context, params PreviewNewParams, opts ...option.RequestOption) (res *Healthcheck, err error)
Create a new preview health check.
type QueryHealthcheckParam ¶
type QueryHealthcheckParam struct { // The hostname or IP address of the origin server to run health checks on. Address param.Field[string] `json:"address,required"` // A short name to identify the health check. Only alphanumeric characters, hyphens // and underscores are allowed. Name param.Field[string] `json:"name,required"` // A list of regions from which to run health checks. Null means Cloudflare will // pick a default region. CheckRegions param.Field[[]CheckRegion] `json:"check_regions"` // The number of consecutive fails required from a health check before changing the // health to unhealthy. ConsecutiveFails param.Field[int64] `json:"consecutive_fails"` // The number of consecutive successes required from a health check before changing // the health to healthy. ConsecutiveSuccesses param.Field[int64] `json:"consecutive_successes"` // A human-readable description of the health check. Description param.Field[string] `json:"description"` // Parameters specific to an HTTP or HTTPS health check. HTTPConfig param.Field[HTTPConfigurationParam] `json:"http_config"` // The interval between each health check. Shorter intervals may give quicker // notifications if the origin status changes, but will increase load on the origin // as we check from multiple locations. Interval param.Field[int64] `json:"interval"` // The number of retries to attempt in case of a timeout before marking the origin // as unhealthy. Retries are attempted immediately. Retries param.Field[int64] `json:"retries"` // If suspended, no health checks are sent to the origin. Suspended param.Field[bool] `json:"suspended"` // Parameters specific to TCP health check. TCPConfig param.Field[TCPConfigurationParam] `json:"tcp_config"` // The timeout (in seconds) before marking the health check as failed. Timeout param.Field[int64] `json:"timeout"` // The protocol to use for the health check. Currently supported protocols are // 'HTTP', 'HTTPS' and 'TCP'. Type param.Field[string] `json:"type"` }
func (QueryHealthcheckParam) MarshalJSON ¶
func (r QueryHealthcheckParam) MarshalJSON() (data []byte, err error)
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.
type TCPConfiguration ¶
type TCPConfiguration struct { // The TCP connection method to use for the health check. Method TCPConfigurationMethod `json:"method"` // Port number to connect to for the health check. Defaults to 80. Port int64 `json:"port"` JSON tcpConfigurationJSON `json:"-"` }
Parameters specific to TCP health check.
func (*TCPConfiguration) UnmarshalJSON ¶
func (r *TCPConfiguration) UnmarshalJSON(data []byte) (err error)
type TCPConfigurationMethod ¶
type TCPConfigurationMethod string
The TCP connection method to use for the health check.
const (
TCPConfigurationMethodConnectionEstablished TCPConfigurationMethod = "connection_established"
)
func (TCPConfigurationMethod) IsKnown ¶
func (r TCPConfigurationMethod) IsKnown() bool
type TCPConfigurationParam ¶
type TCPConfigurationParam struct { // The TCP connection method to use for the health check. Method param.Field[TCPConfigurationMethod] `json:"method"` // Port number to connect to for the health check. Defaults to 80. Port param.Field[int64] `json:"port"` }
Parameters specific to TCP health check.
func (TCPConfigurationParam) MarshalJSON ¶
func (r TCPConfigurationParam) MarshalJSON() (data []byte, err error)