speed

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const 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 CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

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

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 Availability

type Availability struct {
	Quota   AvailabilityQuota `json:"quota"`
	Regions []LabeledRegion   `json:"regions"`
	// Available regions.
	RegionsPerPlan AvailabilityRegionsPerPlan `json:"regionsPerPlan"`
	JSON           availabilityJSON           `json:"-"`
}

func (*Availability) UnmarshalJSON

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

type AvailabilityListParams

type AvailabilityListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type AvailabilityListResponseEnvelope

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

func (*AvailabilityListResponseEnvelope) UnmarshalJSON

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

type AvailabilityQuota

type AvailabilityQuota struct {
	// Cloudflare plan.
	Plan string `json:"plan"`
	// The number of tests available per plan.
	QuotasPerPlan AvailabilityQuotaQuotasPerPlan `json:"quotasPerPlan"`
	// The number of remaining schedules available.
	RemainingSchedules float64 `json:"remainingSchedules"`
	// The number of remaining tests available.
	RemainingTests float64 `json:"remainingTests"`
	// The number of schedules available per plan.
	ScheduleQuotasPerPlan AvailabilityQuotaScheduleQuotasPerPlan `json:"scheduleQuotasPerPlan"`
	JSON                  availabilityQuotaJSON                  `json:"-"`
}

func (*AvailabilityQuota) UnmarshalJSON

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

type AvailabilityQuotaQuotasPerPlan

type AvailabilityQuotaQuotasPerPlan struct {
	// Counts per account plan.
	Value AvailabilityQuotaQuotasPerPlanValue `json:"value"`
	JSON  availabilityQuotaQuotasPerPlanJSON  `json:"-"`
}

The number of tests available per plan.

func (*AvailabilityQuotaQuotasPerPlan) UnmarshalJSON

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

type AvailabilityQuotaQuotasPerPlanValue

type AvailabilityQuotaQuotasPerPlanValue struct {
	Business   int64                                   `json:"business"`
	Enterprise int64                                   `json:"enterprise"`
	Free       int64                                   `json:"free"`
	Pro        int64                                   `json:"pro"`
	JSON       availabilityQuotaQuotasPerPlanValueJSON `json:"-"`
}

Counts per account plan.

func (*AvailabilityQuotaQuotasPerPlanValue) UnmarshalJSON

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

type AvailabilityQuotaScheduleQuotasPerPlan

type AvailabilityQuotaScheduleQuotasPerPlan struct {
	// Counts per account plan.
	Value AvailabilityQuotaScheduleQuotasPerPlanValue `json:"value"`
	JSON  availabilityQuotaScheduleQuotasPerPlanJSON  `json:"-"`
}

The number of schedules available per plan.

func (*AvailabilityQuotaScheduleQuotasPerPlan) UnmarshalJSON

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

type AvailabilityQuotaScheduleQuotasPerPlanValue

type AvailabilityQuotaScheduleQuotasPerPlanValue struct {
	Business   int64                                           `json:"business"`
	Enterprise int64                                           `json:"enterprise"`
	Free       int64                                           `json:"free"`
	Pro        int64                                           `json:"pro"`
	JSON       availabilityQuotaScheduleQuotasPerPlanValueJSON `json:"-"`
}

Counts per account plan.

func (*AvailabilityQuotaScheduleQuotasPerPlanValue) UnmarshalJSON

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

type AvailabilityRegionsPerPlan

type AvailabilityRegionsPerPlan struct {
	Business   []LabeledRegion                `json:"business"`
	Enterprise []LabeledRegion                `json:"enterprise"`
	Free       []LabeledRegion                `json:"free"`
	Pro        []LabeledRegion                `json:"pro"`
	JSON       availabilityRegionsPerPlanJSON `json:"-"`
}

Available regions.

func (*AvailabilityRegionsPerPlan) UnmarshalJSON

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

type AvailabilityService

type AvailabilityService struct {
	Options []option.RequestOption
}

AvailabilityService 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 NewAvailabilityService method instead.

func NewAvailabilityService

func NewAvailabilityService(opts ...option.RequestOption) (r *AvailabilityService)

NewAvailabilityService 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 (*AvailabilityService) List

Retrieves quota for all plans, as well as the current zone quota.

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 Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type LabeledRegion

type LabeledRegion struct {
	Label string `json:"label"`
	// A test region.
	Value LabeledRegionValue `json:"value"`
	JSON  labeledRegionJSON  `json:"-"`
}

A test region with a label.

func (*LabeledRegion) UnmarshalJSON

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

type LabeledRegionValue

type LabeledRegionValue string

A test region.

const (
	LabeledRegionValueAsiaEast1           LabeledRegionValue = "asia-east1"
	LabeledRegionValueAsiaNortheast1      LabeledRegionValue = "asia-northeast1"
	LabeledRegionValueAsiaNortheast2      LabeledRegionValue = "asia-northeast2"
	LabeledRegionValueAsiaSouth1          LabeledRegionValue = "asia-south1"
	LabeledRegionValueAsiaSoutheast1      LabeledRegionValue = "asia-southeast1"
	LabeledRegionValueAustraliaSoutheast1 LabeledRegionValue = "australia-southeast1"
	LabeledRegionValueEuropeNorth1        LabeledRegionValue = "europe-north1"
	LabeledRegionValueEuropeSouthwest1    LabeledRegionValue = "europe-southwest1"
	LabeledRegionValueEuropeWest1         LabeledRegionValue = "europe-west1"
	LabeledRegionValueEuropeWest2         LabeledRegionValue = "europe-west2"
	LabeledRegionValueEuropeWest3         LabeledRegionValue = "europe-west3"
	LabeledRegionValueEuropeWest4         LabeledRegionValue = "europe-west4"
	LabeledRegionValueEuropeWest8         LabeledRegionValue = "europe-west8"
	LabeledRegionValueEuropeWest9         LabeledRegionValue = "europe-west9"
	LabeledRegionValueMeWest1             LabeledRegionValue = "me-west1"
	LabeledRegionValueSouthamericaEast1   LabeledRegionValue = "southamerica-east1"
	LabeledRegionValueUsCentral1          LabeledRegionValue = "us-central1"
	LabeledRegionValueUsEast1             LabeledRegionValue = "us-east1"
	LabeledRegionValueUsEast4             LabeledRegionValue = "us-east4"
	LabeledRegionValueUsSouth1            LabeledRegionValue = "us-south1"
	LabeledRegionValueUsWest1             LabeledRegionValue = "us-west1"
)

func (LabeledRegionValue) IsKnown

func (r LabeledRegionValue) IsKnown() bool

type LighthouseReport

type LighthouseReport struct {
	// Cumulative Layout Shift.
	Cls float64 `json:"cls"`
	// The type of device.
	DeviceType LighthouseReportDeviceType `json:"deviceType"`
	Error      LighthouseReportError      `json:"error"`
	// First Contentful Paint.
	Fcp float64 `json:"fcp"`
	// The URL to the full Lighthouse JSON report.
	JsonReportURL string `json:"jsonReportUrl"`
	// Largest Contentful Paint.
	Lcp float64 `json:"lcp"`
	// The Lighthouse performance score.
	PerformanceScore float64 `json:"performanceScore"`
	// Speed Index.
	Si float64 `json:"si"`
	// The state of the Lighthouse report.
	State LighthouseReportState `json:"state"`
	// Total Blocking Time.
	Tbt float64 `json:"tbt"`
	// Time To First Byte.
	Ttfb float64 `json:"ttfb"`
	// Time To Interactive.
	Tti  float64              `json:"tti"`
	JSON lighthouseReportJSON `json:"-"`
}

The Lighthouse report.

func (*LighthouseReport) UnmarshalJSON

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

type LighthouseReportDeviceType

type LighthouseReportDeviceType string

The type of device.

const (
	LighthouseReportDeviceTypeDesktop LighthouseReportDeviceType = "DESKTOP"
	LighthouseReportDeviceTypeMobile  LighthouseReportDeviceType = "MOBILE"
)

func (LighthouseReportDeviceType) IsKnown

func (r LighthouseReportDeviceType) IsKnown() bool

type LighthouseReportError

type LighthouseReportError struct {
	// The error code of the Lighthouse result.
	Code LighthouseReportErrorCode `json:"code"`
	// Detailed error message.
	Detail string `json:"detail"`
	// The final URL displayed to the user.
	FinalDisplayedURL string                    `json:"finalDisplayedUrl"`
	JSON              lighthouseReportErrorJSON `json:"-"`
}

func (*LighthouseReportError) UnmarshalJSON

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

type LighthouseReportErrorCode

type LighthouseReportErrorCode string

The error code of the Lighthouse result.

const (
	LighthouseReportErrorCodeNotReachable      LighthouseReportErrorCode = "NOT_REACHABLE"
	LighthouseReportErrorCodeDNSFailure        LighthouseReportErrorCode = "DNS_FAILURE"
	LighthouseReportErrorCodeNotHTML           LighthouseReportErrorCode = "NOT_HTML"
	LighthouseReportErrorCodeLighthouseTimeout LighthouseReportErrorCode = "LIGHTHOUSE_TIMEOUT"
	LighthouseReportErrorCodeUnknown           LighthouseReportErrorCode = "UNKNOWN"
)

func (LighthouseReportErrorCode) IsKnown

func (r LighthouseReportErrorCode) IsKnown() bool

type LighthouseReportState

type LighthouseReportState string

The state of the Lighthouse report.

const (
	LighthouseReportStateRunning  LighthouseReportState = "RUNNING"
	LighthouseReportStateComplete LighthouseReportState = "COMPLETE"
	LighthouseReportStateFailed   LighthouseReportState = "FAILED"
)

func (LighthouseReportState) IsKnown

func (r LighthouseReportState) IsKnown() bool

type MemberParam

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRoleParam

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissionsParam

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

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 MemberUserParam

type MemberUserParam = shared.MemberUserParam

Details of the user associated to the membership.

This is an alias to an internal type.

type PageListParams

type PageListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type PageListResponse

type PageListResponse struct {
	// A test region with a label.
	Region LabeledRegion `json:"region"`
	// The frequency of the test.
	ScheduleFrequency PageListResponseScheduleFrequency `json:"scheduleFrequency"`
	Tests             []Test                            `json:"tests"`
	// A URL.
	URL  string               `json:"url"`
	JSON pageListResponseJSON `json:"-"`
}

func (*PageListResponse) UnmarshalJSON

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

type PageListResponseScheduleFrequency

type PageListResponseScheduleFrequency string

The frequency of the test.

const (
	PageListResponseScheduleFrequencyDaily  PageListResponseScheduleFrequency = "DAILY"
	PageListResponseScheduleFrequencyWeekly PageListResponseScheduleFrequency = "WEEKLY"
)

func (PageListResponseScheduleFrequency) IsKnown

type PageService

type PageService struct {
	Options []option.RequestOption
	Tests   *PageTestService
}

PageService 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 NewPageService method instead.

func NewPageService

func NewPageService(opts ...option.RequestOption) (r *PageService)

NewPageService 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 (*PageService) List

Lists all webpages which have been tested.

func (*PageService) ListAutoPaging

Lists all webpages which have been tested.

func (*PageService) Trend

func (r *PageService) Trend(ctx context.Context, url string, params PageTrendParams, opts ...option.RequestOption) (res *Trend, err error)

Lists the core web vital metrics trend over time for a specific page.

type PageTestDeleteParams

type PageTestDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// A test region.
	Region param.Field[PageTestDeleteParamsRegion] `query:"region"`
}

func (PageTestDeleteParams) URLQuery

func (r PageTestDeleteParams) URLQuery() (v url.Values)

URLQuery serializes PageTestDeleteParams's query parameters as `url.Values`.

type PageTestDeleteParamsRegion

type PageTestDeleteParamsRegion string

A test region.

const (
	PageTestDeleteParamsRegionAsiaEast1           PageTestDeleteParamsRegion = "asia-east1"
	PageTestDeleteParamsRegionAsiaNortheast1      PageTestDeleteParamsRegion = "asia-northeast1"
	PageTestDeleteParamsRegionAsiaNortheast2      PageTestDeleteParamsRegion = "asia-northeast2"
	PageTestDeleteParamsRegionAsiaSouth1          PageTestDeleteParamsRegion = "asia-south1"
	PageTestDeleteParamsRegionAsiaSoutheast1      PageTestDeleteParamsRegion = "asia-southeast1"
	PageTestDeleteParamsRegionAustraliaSoutheast1 PageTestDeleteParamsRegion = "australia-southeast1"
	PageTestDeleteParamsRegionEuropeNorth1        PageTestDeleteParamsRegion = "europe-north1"
	PageTestDeleteParamsRegionEuropeSouthwest1    PageTestDeleteParamsRegion = "europe-southwest1"
	PageTestDeleteParamsRegionEuropeWest1         PageTestDeleteParamsRegion = "europe-west1"
	PageTestDeleteParamsRegionEuropeWest2         PageTestDeleteParamsRegion = "europe-west2"
	PageTestDeleteParamsRegionEuropeWest3         PageTestDeleteParamsRegion = "europe-west3"
	PageTestDeleteParamsRegionEuropeWest4         PageTestDeleteParamsRegion = "europe-west4"
	PageTestDeleteParamsRegionEuropeWest8         PageTestDeleteParamsRegion = "europe-west8"
	PageTestDeleteParamsRegionEuropeWest9         PageTestDeleteParamsRegion = "europe-west9"
	PageTestDeleteParamsRegionMeWest1             PageTestDeleteParamsRegion = "me-west1"
	PageTestDeleteParamsRegionSouthamericaEast1   PageTestDeleteParamsRegion = "southamerica-east1"
	PageTestDeleteParamsRegionUsCentral1          PageTestDeleteParamsRegion = "us-central1"
	PageTestDeleteParamsRegionUsEast1             PageTestDeleteParamsRegion = "us-east1"
	PageTestDeleteParamsRegionUsEast4             PageTestDeleteParamsRegion = "us-east4"
	PageTestDeleteParamsRegionUsSouth1            PageTestDeleteParamsRegion = "us-south1"
	PageTestDeleteParamsRegionUsWest1             PageTestDeleteParamsRegion = "us-west1"
)

func (PageTestDeleteParamsRegion) IsKnown

func (r PageTestDeleteParamsRegion) IsKnown() bool

type PageTestDeleteResponse

type PageTestDeleteResponse struct {
	// Number of items affected.
	Count float64                    `json:"count"`
	JSON  pageTestDeleteResponseJSON `json:"-"`
}

func (*PageTestDeleteResponse) UnmarshalJSON

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

type PageTestDeleteResponseEnvelope

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

func (*PageTestDeleteResponseEnvelope) UnmarshalJSON

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

type PageTestGetParams

type PageTestGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type PageTestGetResponseEnvelope

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

func (*PageTestGetResponseEnvelope) UnmarshalJSON

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

type PageTestListParams

type PageTestListParams struct {
	// Identifier
	ZoneID  param.Field[string] `path:"zone_id,required"`
	Page    param.Field[int64]  `query:"page"`
	PerPage param.Field[int64]  `query:"per_page"`
	// A test region.
	Region param.Field[PageTestListParamsRegion] `query:"region"`
}

func (PageTestListParams) URLQuery

func (r PageTestListParams) URLQuery() (v url.Values)

URLQuery serializes PageTestListParams's query parameters as `url.Values`.

type PageTestListParamsRegion

type PageTestListParamsRegion string

A test region.

const (
	PageTestListParamsRegionAsiaEast1           PageTestListParamsRegion = "asia-east1"
	PageTestListParamsRegionAsiaNortheast1      PageTestListParamsRegion = "asia-northeast1"
	PageTestListParamsRegionAsiaNortheast2      PageTestListParamsRegion = "asia-northeast2"
	PageTestListParamsRegionAsiaSouth1          PageTestListParamsRegion = "asia-south1"
	PageTestListParamsRegionAsiaSoutheast1      PageTestListParamsRegion = "asia-southeast1"
	PageTestListParamsRegionAustraliaSoutheast1 PageTestListParamsRegion = "australia-southeast1"
	PageTestListParamsRegionEuropeNorth1        PageTestListParamsRegion = "europe-north1"
	PageTestListParamsRegionEuropeSouthwest1    PageTestListParamsRegion = "europe-southwest1"
	PageTestListParamsRegionEuropeWest1         PageTestListParamsRegion = "europe-west1"
	PageTestListParamsRegionEuropeWest2         PageTestListParamsRegion = "europe-west2"
	PageTestListParamsRegionEuropeWest3         PageTestListParamsRegion = "europe-west3"
	PageTestListParamsRegionEuropeWest4         PageTestListParamsRegion = "europe-west4"
	PageTestListParamsRegionEuropeWest8         PageTestListParamsRegion = "europe-west8"
	PageTestListParamsRegionEuropeWest9         PageTestListParamsRegion = "europe-west9"
	PageTestListParamsRegionMeWest1             PageTestListParamsRegion = "me-west1"
	PageTestListParamsRegionSouthamericaEast1   PageTestListParamsRegion = "southamerica-east1"
	PageTestListParamsRegionUsCentral1          PageTestListParamsRegion = "us-central1"
	PageTestListParamsRegionUsEast1             PageTestListParamsRegion = "us-east1"
	PageTestListParamsRegionUsEast4             PageTestListParamsRegion = "us-east4"
	PageTestListParamsRegionUsSouth1            PageTestListParamsRegion = "us-south1"
	PageTestListParamsRegionUsWest1             PageTestListParamsRegion = "us-west1"
)

func (PageTestListParamsRegion) IsKnown

func (r PageTestListParamsRegion) IsKnown() bool

type PageTestNewParams

type PageTestNewParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// A test region.
	Region param.Field[PageTestNewParamsRegion] `json:"region"`
}

func (PageTestNewParams) MarshalJSON

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

type PageTestNewParamsRegion

type PageTestNewParamsRegion string

A test region.

const (
	PageTestNewParamsRegionAsiaEast1           PageTestNewParamsRegion = "asia-east1"
	PageTestNewParamsRegionAsiaNortheast1      PageTestNewParamsRegion = "asia-northeast1"
	PageTestNewParamsRegionAsiaNortheast2      PageTestNewParamsRegion = "asia-northeast2"
	PageTestNewParamsRegionAsiaSouth1          PageTestNewParamsRegion = "asia-south1"
	PageTestNewParamsRegionAsiaSoutheast1      PageTestNewParamsRegion = "asia-southeast1"
	PageTestNewParamsRegionAustraliaSoutheast1 PageTestNewParamsRegion = "australia-southeast1"
	PageTestNewParamsRegionEuropeNorth1        PageTestNewParamsRegion = "europe-north1"
	PageTestNewParamsRegionEuropeSouthwest1    PageTestNewParamsRegion = "europe-southwest1"
	PageTestNewParamsRegionEuropeWest1         PageTestNewParamsRegion = "europe-west1"
	PageTestNewParamsRegionEuropeWest2         PageTestNewParamsRegion = "europe-west2"
	PageTestNewParamsRegionEuropeWest3         PageTestNewParamsRegion = "europe-west3"
	PageTestNewParamsRegionEuropeWest4         PageTestNewParamsRegion = "europe-west4"
	PageTestNewParamsRegionEuropeWest8         PageTestNewParamsRegion = "europe-west8"
	PageTestNewParamsRegionEuropeWest9         PageTestNewParamsRegion = "europe-west9"
	PageTestNewParamsRegionMeWest1             PageTestNewParamsRegion = "me-west1"
	PageTestNewParamsRegionSouthamericaEast1   PageTestNewParamsRegion = "southamerica-east1"
	PageTestNewParamsRegionUsCentral1          PageTestNewParamsRegion = "us-central1"
	PageTestNewParamsRegionUsEast1             PageTestNewParamsRegion = "us-east1"
	PageTestNewParamsRegionUsEast4             PageTestNewParamsRegion = "us-east4"
	PageTestNewParamsRegionUsSouth1            PageTestNewParamsRegion = "us-south1"
	PageTestNewParamsRegionUsWest1             PageTestNewParamsRegion = "us-west1"
)

func (PageTestNewParamsRegion) IsKnown

func (r PageTestNewParamsRegion) IsKnown() bool

type PageTestNewResponseEnvelope

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

func (*PageTestNewResponseEnvelope) UnmarshalJSON

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

type PageTestService

type PageTestService struct {
	Options []option.RequestOption
}

PageTestService 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 NewPageTestService method instead.

func NewPageTestService

func NewPageTestService(opts ...option.RequestOption) (r *PageTestService)

NewPageTestService 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 (*PageTestService) Delete

Deletes all tests for a specific webpage from a specific region. Deleted tests are still counted as part of the quota.

func (*PageTestService) Get

func (r *PageTestService) Get(ctx context.Context, url string, testID string, query PageTestGetParams, opts ...option.RequestOption) (res *Test, err error)

Retrieves the result of a specific test.

func (*PageTestService) List

Test history (list of tests) for a specific webpage.

func (*PageTestService) ListAutoPaging

Test history (list of tests) for a specific webpage.

func (*PageTestService) New

func (r *PageTestService) New(ctx context.Context, url string, params PageTestNewParams, opts ...option.RequestOption) (res *Test, err error)

Starts a test for a specific webpage, in a specific region.

type PageTrendParams

type PageTrendParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// The type of device.
	DeviceType param.Field[PageTrendParamsDeviceType] `query:"deviceType,required"`
	// A comma-separated list of metrics to include in the results.
	Metrics param.Field[string] `query:"metrics,required"`
	// A test region.
	Region param.Field[PageTrendParamsRegion] `query:"region,required"`
	Start  param.Field[time.Time]             `query:"start,required" format:"date-time"`
	// The timezone of the start and end timestamps.
	Tz  param.Field[string]    `query:"tz,required"`
	End param.Field[time.Time] `query:"end" format:"date-time"`
}

func (PageTrendParams) URLQuery

func (r PageTrendParams) URLQuery() (v url.Values)

URLQuery serializes PageTrendParams's query parameters as `url.Values`.

type PageTrendParamsDeviceType

type PageTrendParamsDeviceType string

The type of device.

const (
	PageTrendParamsDeviceTypeDesktop PageTrendParamsDeviceType = "DESKTOP"
	PageTrendParamsDeviceTypeMobile  PageTrendParamsDeviceType = "MOBILE"
)

func (PageTrendParamsDeviceType) IsKnown

func (r PageTrendParamsDeviceType) IsKnown() bool

type PageTrendParamsRegion

type PageTrendParamsRegion string

A test region.

const (
	PageTrendParamsRegionAsiaEast1           PageTrendParamsRegion = "asia-east1"
	PageTrendParamsRegionAsiaNortheast1      PageTrendParamsRegion = "asia-northeast1"
	PageTrendParamsRegionAsiaNortheast2      PageTrendParamsRegion = "asia-northeast2"
	PageTrendParamsRegionAsiaSouth1          PageTrendParamsRegion = "asia-south1"
	PageTrendParamsRegionAsiaSoutheast1      PageTrendParamsRegion = "asia-southeast1"
	PageTrendParamsRegionAustraliaSoutheast1 PageTrendParamsRegion = "australia-southeast1"
	PageTrendParamsRegionEuropeNorth1        PageTrendParamsRegion = "europe-north1"
	PageTrendParamsRegionEuropeSouthwest1    PageTrendParamsRegion = "europe-southwest1"
	PageTrendParamsRegionEuropeWest1         PageTrendParamsRegion = "europe-west1"
	PageTrendParamsRegionEuropeWest2         PageTrendParamsRegion = "europe-west2"
	PageTrendParamsRegionEuropeWest3         PageTrendParamsRegion = "europe-west3"
	PageTrendParamsRegionEuropeWest4         PageTrendParamsRegion = "europe-west4"
	PageTrendParamsRegionEuropeWest8         PageTrendParamsRegion = "europe-west8"
	PageTrendParamsRegionEuropeWest9         PageTrendParamsRegion = "europe-west9"
	PageTrendParamsRegionMeWest1             PageTrendParamsRegion = "me-west1"
	PageTrendParamsRegionSouthamericaEast1   PageTrendParamsRegion = "southamerica-east1"
	PageTrendParamsRegionUsCentral1          PageTrendParamsRegion = "us-central1"
	PageTrendParamsRegionUsEast1             PageTrendParamsRegion = "us-east1"
	PageTrendParamsRegionUsEast4             PageTrendParamsRegion = "us-east4"
	PageTrendParamsRegionUsSouth1            PageTrendParamsRegion = "us-south1"
	PageTrendParamsRegionUsWest1             PageTrendParamsRegion = "us-west1"
)

func (PageTrendParamsRegion) IsKnown

func (r PageTrendParamsRegion) IsKnown() bool

type PageTrendResponseEnvelope

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

func (*PageTrendResponseEnvelope) UnmarshalJSON

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

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

type Role = shared.Role

This is an alias to an internal type.

type Schedule

type Schedule struct {
	// The frequency of the test.
	Frequency ScheduleFrequency `json:"frequency"`
	// A test region.
	Region ScheduleRegion `json:"region"`
	// A URL.
	URL  string       `json:"url"`
	JSON scheduleJSON `json:"-"`
}

The test schedule.

func (*Schedule) UnmarshalJSON

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

type ScheduleDeleteParams

type ScheduleDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// A test region.
	Region param.Field[ScheduleDeleteParamsRegion] `query:"region"`
}

func (ScheduleDeleteParams) URLQuery

func (r ScheduleDeleteParams) URLQuery() (v url.Values)

URLQuery serializes ScheduleDeleteParams's query parameters as `url.Values`.

type ScheduleDeleteParamsRegion

type ScheduleDeleteParamsRegion string

A test region.

const (
	ScheduleDeleteParamsRegionAsiaEast1           ScheduleDeleteParamsRegion = "asia-east1"
	ScheduleDeleteParamsRegionAsiaNortheast1      ScheduleDeleteParamsRegion = "asia-northeast1"
	ScheduleDeleteParamsRegionAsiaNortheast2      ScheduleDeleteParamsRegion = "asia-northeast2"
	ScheduleDeleteParamsRegionAsiaSouth1          ScheduleDeleteParamsRegion = "asia-south1"
	ScheduleDeleteParamsRegionAsiaSoutheast1      ScheduleDeleteParamsRegion = "asia-southeast1"
	ScheduleDeleteParamsRegionAustraliaSoutheast1 ScheduleDeleteParamsRegion = "australia-southeast1"
	ScheduleDeleteParamsRegionEuropeNorth1        ScheduleDeleteParamsRegion = "europe-north1"
	ScheduleDeleteParamsRegionEuropeSouthwest1    ScheduleDeleteParamsRegion = "europe-southwest1"
	ScheduleDeleteParamsRegionEuropeWest1         ScheduleDeleteParamsRegion = "europe-west1"
	ScheduleDeleteParamsRegionEuropeWest2         ScheduleDeleteParamsRegion = "europe-west2"
	ScheduleDeleteParamsRegionEuropeWest3         ScheduleDeleteParamsRegion = "europe-west3"
	ScheduleDeleteParamsRegionEuropeWest4         ScheduleDeleteParamsRegion = "europe-west4"
	ScheduleDeleteParamsRegionEuropeWest8         ScheduleDeleteParamsRegion = "europe-west8"
	ScheduleDeleteParamsRegionEuropeWest9         ScheduleDeleteParamsRegion = "europe-west9"
	ScheduleDeleteParamsRegionMeWest1             ScheduleDeleteParamsRegion = "me-west1"
	ScheduleDeleteParamsRegionSouthamericaEast1   ScheduleDeleteParamsRegion = "southamerica-east1"
	ScheduleDeleteParamsRegionUsCentral1          ScheduleDeleteParamsRegion = "us-central1"
	ScheduleDeleteParamsRegionUsEast1             ScheduleDeleteParamsRegion = "us-east1"
	ScheduleDeleteParamsRegionUsEast4             ScheduleDeleteParamsRegion = "us-east4"
	ScheduleDeleteParamsRegionUsSouth1            ScheduleDeleteParamsRegion = "us-south1"
	ScheduleDeleteParamsRegionUsWest1             ScheduleDeleteParamsRegion = "us-west1"
)

func (ScheduleDeleteParamsRegion) IsKnown

func (r ScheduleDeleteParamsRegion) IsKnown() bool

type ScheduleDeleteResponse

type ScheduleDeleteResponse struct {
	// Number of items affected.
	Count float64                    `json:"count"`
	JSON  scheduleDeleteResponseJSON `json:"-"`
}

func (*ScheduleDeleteResponse) UnmarshalJSON

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

type ScheduleDeleteResponseEnvelope

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

func (*ScheduleDeleteResponseEnvelope) UnmarshalJSON

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

type ScheduleFrequency

type ScheduleFrequency string

The frequency of the test.

const (
	ScheduleFrequencyDaily  ScheduleFrequency = "DAILY"
	ScheduleFrequencyWeekly ScheduleFrequency = "WEEKLY"
)

func (ScheduleFrequency) IsKnown

func (r ScheduleFrequency) IsKnown() bool

type ScheduleGetParams

type ScheduleGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// A test region.
	Region param.Field[ScheduleGetParamsRegion] `query:"region"`
}

func (ScheduleGetParams) URLQuery

func (r ScheduleGetParams) URLQuery() (v url.Values)

URLQuery serializes ScheduleGetParams's query parameters as `url.Values`.

type ScheduleGetParamsRegion

type ScheduleGetParamsRegion string

A test region.

const (
	ScheduleGetParamsRegionAsiaEast1           ScheduleGetParamsRegion = "asia-east1"
	ScheduleGetParamsRegionAsiaNortheast1      ScheduleGetParamsRegion = "asia-northeast1"
	ScheduleGetParamsRegionAsiaNortheast2      ScheduleGetParamsRegion = "asia-northeast2"
	ScheduleGetParamsRegionAsiaSouth1          ScheduleGetParamsRegion = "asia-south1"
	ScheduleGetParamsRegionAsiaSoutheast1      ScheduleGetParamsRegion = "asia-southeast1"
	ScheduleGetParamsRegionAustraliaSoutheast1 ScheduleGetParamsRegion = "australia-southeast1"
	ScheduleGetParamsRegionEuropeNorth1        ScheduleGetParamsRegion = "europe-north1"
	ScheduleGetParamsRegionEuropeSouthwest1    ScheduleGetParamsRegion = "europe-southwest1"
	ScheduleGetParamsRegionEuropeWest1         ScheduleGetParamsRegion = "europe-west1"
	ScheduleGetParamsRegionEuropeWest2         ScheduleGetParamsRegion = "europe-west2"
	ScheduleGetParamsRegionEuropeWest3         ScheduleGetParamsRegion = "europe-west3"
	ScheduleGetParamsRegionEuropeWest4         ScheduleGetParamsRegion = "europe-west4"
	ScheduleGetParamsRegionEuropeWest8         ScheduleGetParamsRegion = "europe-west8"
	ScheduleGetParamsRegionEuropeWest9         ScheduleGetParamsRegion = "europe-west9"
	ScheduleGetParamsRegionMeWest1             ScheduleGetParamsRegion = "me-west1"
	ScheduleGetParamsRegionSouthamericaEast1   ScheduleGetParamsRegion = "southamerica-east1"
	ScheduleGetParamsRegionUsCentral1          ScheduleGetParamsRegion = "us-central1"
	ScheduleGetParamsRegionUsEast1             ScheduleGetParamsRegion = "us-east1"
	ScheduleGetParamsRegionUsEast4             ScheduleGetParamsRegion = "us-east4"
	ScheduleGetParamsRegionUsSouth1            ScheduleGetParamsRegion = "us-south1"
	ScheduleGetParamsRegionUsWest1             ScheduleGetParamsRegion = "us-west1"
)

func (ScheduleGetParamsRegion) IsKnown

func (r ScheduleGetParamsRegion) IsKnown() bool

type ScheduleGetResponseEnvelope

type ScheduleGetResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful.
	Success bool `json:"success,required"`
	// The test schedule.
	Result Schedule                        `json:"result"`
	JSON   scheduleGetResponseEnvelopeJSON `json:"-"`
}

func (*ScheduleGetResponseEnvelope) UnmarshalJSON

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

type ScheduleNewParams

type ScheduleNewParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// A test region.
	Region param.Field[ScheduleNewParamsRegion] `query:"region"`
}

func (ScheduleNewParams) URLQuery

func (r ScheduleNewParams) URLQuery() (v url.Values)

URLQuery serializes ScheduleNewParams's query parameters as `url.Values`.

type ScheduleNewParamsRegion

type ScheduleNewParamsRegion string

A test region.

const (
	ScheduleNewParamsRegionAsiaEast1           ScheduleNewParamsRegion = "asia-east1"
	ScheduleNewParamsRegionAsiaNortheast1      ScheduleNewParamsRegion = "asia-northeast1"
	ScheduleNewParamsRegionAsiaNortheast2      ScheduleNewParamsRegion = "asia-northeast2"
	ScheduleNewParamsRegionAsiaSouth1          ScheduleNewParamsRegion = "asia-south1"
	ScheduleNewParamsRegionAsiaSoutheast1      ScheduleNewParamsRegion = "asia-southeast1"
	ScheduleNewParamsRegionAustraliaSoutheast1 ScheduleNewParamsRegion = "australia-southeast1"
	ScheduleNewParamsRegionEuropeNorth1        ScheduleNewParamsRegion = "europe-north1"
	ScheduleNewParamsRegionEuropeSouthwest1    ScheduleNewParamsRegion = "europe-southwest1"
	ScheduleNewParamsRegionEuropeWest1         ScheduleNewParamsRegion = "europe-west1"
	ScheduleNewParamsRegionEuropeWest2         ScheduleNewParamsRegion = "europe-west2"
	ScheduleNewParamsRegionEuropeWest3         ScheduleNewParamsRegion = "europe-west3"
	ScheduleNewParamsRegionEuropeWest4         ScheduleNewParamsRegion = "europe-west4"
	ScheduleNewParamsRegionEuropeWest8         ScheduleNewParamsRegion = "europe-west8"
	ScheduleNewParamsRegionEuropeWest9         ScheduleNewParamsRegion = "europe-west9"
	ScheduleNewParamsRegionMeWest1             ScheduleNewParamsRegion = "me-west1"
	ScheduleNewParamsRegionSouthamericaEast1   ScheduleNewParamsRegion = "southamerica-east1"
	ScheduleNewParamsRegionUsCentral1          ScheduleNewParamsRegion = "us-central1"
	ScheduleNewParamsRegionUsEast1             ScheduleNewParamsRegion = "us-east1"
	ScheduleNewParamsRegionUsEast4             ScheduleNewParamsRegion = "us-east4"
	ScheduleNewParamsRegionUsSouth1            ScheduleNewParamsRegion = "us-south1"
	ScheduleNewParamsRegionUsWest1             ScheduleNewParamsRegion = "us-west1"
)

func (ScheduleNewParamsRegion) IsKnown

func (r ScheduleNewParamsRegion) IsKnown() bool

type ScheduleNewResponse

type ScheduleNewResponse struct {
	// The test schedule.
	Schedule Schedule                `json:"schedule"`
	Test     Test                    `json:"test"`
	JSON     scheduleNewResponseJSON `json:"-"`
}

func (*ScheduleNewResponse) UnmarshalJSON

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

type ScheduleNewResponseEnvelope

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

func (*ScheduleNewResponseEnvelope) UnmarshalJSON

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

type ScheduleRegion

type ScheduleRegion string

A test region.

const (
	ScheduleRegionAsiaEast1           ScheduleRegion = "asia-east1"
	ScheduleRegionAsiaNortheast1      ScheduleRegion = "asia-northeast1"
	ScheduleRegionAsiaNortheast2      ScheduleRegion = "asia-northeast2"
	ScheduleRegionAsiaSouth1          ScheduleRegion = "asia-south1"
	ScheduleRegionAsiaSoutheast1      ScheduleRegion = "asia-southeast1"
	ScheduleRegionAustraliaSoutheast1 ScheduleRegion = "australia-southeast1"
	ScheduleRegionEuropeNorth1        ScheduleRegion = "europe-north1"
	ScheduleRegionEuropeSouthwest1    ScheduleRegion = "europe-southwest1"
	ScheduleRegionEuropeWest1         ScheduleRegion = "europe-west1"
	ScheduleRegionEuropeWest2         ScheduleRegion = "europe-west2"
	ScheduleRegionEuropeWest3         ScheduleRegion = "europe-west3"
	ScheduleRegionEuropeWest4         ScheduleRegion = "europe-west4"
	ScheduleRegionEuropeWest8         ScheduleRegion = "europe-west8"
	ScheduleRegionEuropeWest9         ScheduleRegion = "europe-west9"
	ScheduleRegionMeWest1             ScheduleRegion = "me-west1"
	ScheduleRegionSouthamericaEast1   ScheduleRegion = "southamerica-east1"
	ScheduleRegionUsCentral1          ScheduleRegion = "us-central1"
	ScheduleRegionUsEast1             ScheduleRegion = "us-east1"
	ScheduleRegionUsEast4             ScheduleRegion = "us-east4"
	ScheduleRegionUsSouth1            ScheduleRegion = "us-south1"
	ScheduleRegionUsWest1             ScheduleRegion = "us-west1"
)

func (ScheduleRegion) IsKnown

func (r ScheduleRegion) IsKnown() bool

type ScheduleService

type ScheduleService struct {
	Options []option.RequestOption
}

ScheduleService 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 NewScheduleService method instead.

func NewScheduleService

func NewScheduleService(opts ...option.RequestOption) (r *ScheduleService)

NewScheduleService 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 (*ScheduleService) Delete

Deletes a scheduled test for a page.

func (*ScheduleService) Get

func (r *ScheduleService) Get(ctx context.Context, url string, params ScheduleGetParams, opts ...option.RequestOption) (res *Schedule, err error)

Retrieves the test schedule for a page in a specific region.

func (*ScheduleService) New

Creates a scheduled test for a page.

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

type SpeedService

type SpeedService struct {
	Options        []option.RequestOption
	Schedule       *ScheduleService
	Availabilities *AvailabilityService
	Pages          *PageService
}

SpeedService 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 NewSpeedService method instead.

func NewSpeedService

func NewSpeedService(opts ...option.RequestOption) (r *SpeedService)

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

type Test struct {
	// UUID
	ID   string    `json:"id"`
	Date time.Time `json:"date" format:"date-time"`
	// The Lighthouse report.
	DesktopReport LighthouseReport `json:"desktopReport"`
	// The Lighthouse report.
	MobileReport LighthouseReport `json:"mobileReport"`
	// A test region with a label.
	Region LabeledRegion `json:"region"`
	// The frequency of the test.
	ScheduleFrequency TestScheduleFrequency `json:"scheduleFrequency"`
	// A URL.
	URL  string   `json:"url"`
	JSON testJSON `json:"-"`
}

func (*Test) UnmarshalJSON

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

type TestScheduleFrequency

type TestScheduleFrequency string

The frequency of the test.

const (
	TestScheduleFrequencyDaily  TestScheduleFrequency = "DAILY"
	TestScheduleFrequencyWeekly TestScheduleFrequency = "WEEKLY"
)

func (TestScheduleFrequency) IsKnown

func (r TestScheduleFrequency) IsKnown() bool

type Trend

type Trend struct {
	// Cumulative Layout Shift trend.
	Cls []float64 `json:"cls"`
	// First Contentful Paint trend.
	Fcp []float64 `json:"fcp"`
	// Largest Contentful Paint trend.
	Lcp []float64 `json:"lcp"`
	// The Lighthouse score trend.
	PerformanceScore []float64 `json:"performanceScore"`
	// Speed Index trend.
	Si []float64 `json:"si"`
	// Total Blocking Time trend.
	Tbt []float64 `json:"tbt"`
	// Time To First Byte trend.
	Ttfb []float64 `json:"ttfb"`
	// Time To Interactive trend.
	Tti  []float64 `json:"tti"`
	JSON trendJSON `json:"-"`
}

func (*Trend) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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