Documentation
¶
Index ¶
- type AvailabilityListParams
- type AvailabilityListResponseEnvelope
- type AvailabilityService
- type Error
- type ObservatoryAvailabilities
- type ObservatoryAvailabilitiesQuota
- type ObservatoryAvailabilitiesRegion
- type ObservatoryAvailabilitiesRegionsValue
- type ObservatoryPageTest
- type ObservatoryPageTestDesktopReport
- type ObservatoryPageTestDesktopReportDeviceType
- type ObservatoryPageTestDesktopReportError
- type ObservatoryPageTestDesktopReportErrorCode
- type ObservatoryPageTestDesktopReportState
- type ObservatoryPageTestMobileReport
- type ObservatoryPageTestMobileReportDeviceType
- type ObservatoryPageTestMobileReportError
- type ObservatoryPageTestMobileReportErrorCode
- type ObservatoryPageTestMobileReportState
- type ObservatoryPageTestRegion
- type ObservatoryPageTestRegionValue
- type ObservatoryPageTestScheduleFrequency
- type ObservatorySchedule
- type ObservatoryScheduleFrequency
- type ObservatoryScheduleRegion
- type ObservatoryTrend
- type PageListParams
- type PageListResponse
- type PageListResponseEnvelope
- type PageListResponseRegion
- type PageListResponseRegionValue
- type PageListResponseScheduleFrequency
- type PageService
- type ScheduleNewParams
- type ScheduleNewParamsRegion
- type ScheduleNewResponse
- type ScheduleNewResponseEnvelope
- type ScheduleService
- type SpeedDeleteParams
- type SpeedDeleteParamsRegion
- type SpeedDeleteResponse
- type SpeedDeleteResponseEnvelope
- type SpeedScheduleGetParams
- type SpeedScheduleGetParamsRegion
- type SpeedScheduleGetResponseEnvelope
- type SpeedService
- func (r *SpeedService) Delete(ctx context.Context, url string, params SpeedDeleteParams, ...) (res *SpeedDeleteResponse, err error)
- func (r *SpeedService) ScheduleGet(ctx context.Context, url string, params SpeedScheduleGetParams, ...) (res *ObservatorySchedule, err error)
- func (r *SpeedService) TrendsList(ctx context.Context, url string, params SpeedTrendsListParams, ...) (res *ObservatoryTrend, err error)
- type SpeedTrendsListParams
- type SpeedTrendsListParamsDeviceType
- type SpeedTrendsListParamsRegion
- type SpeedTrendsListResponseEnvelope
- type TestDeleteParams
- type TestDeleteParamsRegion
- type TestDeleteResponse
- type TestDeleteResponseEnvelope
- type TestGetParams
- type TestGetResponseEnvelope
- type TestListParams
- type TestListParamsRegion
- type TestListResponse
- type TestListResponseError
- type TestListResponseMessage
- type TestListResponseResultInfo
- type TestNewParams
- type TestNewParamsRegion
- type TestNewResponseEnvelope
- type TestService
- func (r *TestService) Delete(ctx context.Context, url string, params TestDeleteParams, ...) (res *TestDeleteResponse, err error)
- func (r *TestService) Get(ctx context.Context, url string, testID string, query TestGetParams, ...) (res *ObservatoryPageTest, err error)
- func (r *TestService) List(ctx context.Context, url string, params TestListParams, ...) (res *TestListResponse, err error)
- func (r *TestService) New(ctx context.Context, url string, params TestNewParams, ...) (res *ObservatoryPageTest, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AvailabilityListParams ¶
type AvailabilityListResponseEnvelope ¶
type AvailabilityListResponseEnvelope struct {
Result ObservatoryAvailabilities `json:"result"`
JSON availabilityListResponseEnvelopeJSON `json:"-"`
}
func (*AvailabilityListResponseEnvelope) UnmarshalJSON ¶
func (r *AvailabilityListResponseEnvelope) 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 ¶
func (r *AvailabilityService) List(ctx context.Context, query AvailabilityListParams, opts ...option.RequestOption) (res *ObservatoryAvailabilities, err error)
Retrieves quota for all plans, as well as the current zone quota.
type ObservatoryAvailabilities ¶
type ObservatoryAvailabilities struct {
Quota ObservatoryAvailabilitiesQuota `json:"quota"`
Regions []ObservatoryAvailabilitiesRegion `json:"regions"`
RegionsPerPlan interface{} `json:"regionsPerPlan"`
JSON observatoryAvailabilitiesJSON `json:"-"`
}
func (*ObservatoryAvailabilities) UnmarshalJSON ¶
func (r *ObservatoryAvailabilities) UnmarshalJSON(data []byte) (err error)
type ObservatoryAvailabilitiesQuota ¶
type ObservatoryAvailabilitiesQuota struct {
// Cloudflare plan.
Plan string `json:"plan"`
// The number of tests available per plan.
QuotasPerPlan map[string]float64 `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 map[string]float64 `json:"scheduleQuotasPerPlan"`
JSON observatoryAvailabilitiesQuotaJSON `json:"-"`
}
func (*ObservatoryAvailabilitiesQuota) UnmarshalJSON ¶
func (r *ObservatoryAvailabilitiesQuota) UnmarshalJSON(data []byte) (err error)
type ObservatoryAvailabilitiesRegion ¶
type ObservatoryAvailabilitiesRegion struct {
Label string `json:"label"`
// A test region.
Value ObservatoryAvailabilitiesRegionsValue `json:"value"`
JSON observatoryAvailabilitiesRegionJSON `json:"-"`
}
A test region with a label.
func (*ObservatoryAvailabilitiesRegion) UnmarshalJSON ¶
func (r *ObservatoryAvailabilitiesRegion) UnmarshalJSON(data []byte) (err error)
type ObservatoryAvailabilitiesRegionsValue ¶
type ObservatoryAvailabilitiesRegionsValue string
A test region.
const ( ObservatoryAvailabilitiesRegionsValueAsiaEast1 ObservatoryAvailabilitiesRegionsValue = "asia-east1" ObservatoryAvailabilitiesRegionsValueAsiaNortheast1 ObservatoryAvailabilitiesRegionsValue = "asia-northeast1" ObservatoryAvailabilitiesRegionsValueAsiaNortheast2 ObservatoryAvailabilitiesRegionsValue = "asia-northeast2" ObservatoryAvailabilitiesRegionsValueAsiaSouth1 ObservatoryAvailabilitiesRegionsValue = "asia-south1" ObservatoryAvailabilitiesRegionsValueAsiaSoutheast1 ObservatoryAvailabilitiesRegionsValue = "asia-southeast1" ObservatoryAvailabilitiesRegionsValueAustraliaSoutheast1 ObservatoryAvailabilitiesRegionsValue = "australia-southeast1" ObservatoryAvailabilitiesRegionsValueEuropeNorth1 ObservatoryAvailabilitiesRegionsValue = "europe-north1" ObservatoryAvailabilitiesRegionsValueEuropeSouthwest1 ObservatoryAvailabilitiesRegionsValue = "europe-southwest1" ObservatoryAvailabilitiesRegionsValueEuropeWest1 ObservatoryAvailabilitiesRegionsValue = "europe-west1" ObservatoryAvailabilitiesRegionsValueEuropeWest2 ObservatoryAvailabilitiesRegionsValue = "europe-west2" ObservatoryAvailabilitiesRegionsValueEuropeWest3 ObservatoryAvailabilitiesRegionsValue = "europe-west3" ObservatoryAvailabilitiesRegionsValueEuropeWest4 ObservatoryAvailabilitiesRegionsValue = "europe-west4" ObservatoryAvailabilitiesRegionsValueEuropeWest8 ObservatoryAvailabilitiesRegionsValue = "europe-west8" ObservatoryAvailabilitiesRegionsValueEuropeWest9 ObservatoryAvailabilitiesRegionsValue = "europe-west9" ObservatoryAvailabilitiesRegionsValueMeWest1 ObservatoryAvailabilitiesRegionsValue = "me-west1" ObservatoryAvailabilitiesRegionsValueSouthamericaEast1 ObservatoryAvailabilitiesRegionsValue = "southamerica-east1" ObservatoryAvailabilitiesRegionsValueUsCentral1 ObservatoryAvailabilitiesRegionsValue = "us-central1" ObservatoryAvailabilitiesRegionsValueUsEast1 ObservatoryAvailabilitiesRegionsValue = "us-east1" ObservatoryAvailabilitiesRegionsValueUsEast4 ObservatoryAvailabilitiesRegionsValue = "us-east4" ObservatoryAvailabilitiesRegionsValueUsSouth1 ObservatoryAvailabilitiesRegionsValue = "us-south1" ObservatoryAvailabilitiesRegionsValueUsWest1 ObservatoryAvailabilitiesRegionsValue = "us-west1" )
type ObservatoryPageTest ¶
type ObservatoryPageTest struct {
// UUID
ID string `json:"id"`
Date time.Time `json:"date" format:"date-time"`
// The Lighthouse report.
DesktopReport ObservatoryPageTestDesktopReport `json:"desktopReport"`
// The Lighthouse report.
MobileReport ObservatoryPageTestMobileReport `json:"mobileReport"`
// A test region with a label.
Region ObservatoryPageTestRegion `json:"region"`
// The frequency of the test.
ScheduleFrequency ObservatoryPageTestScheduleFrequency `json:"scheduleFrequency"`
// A URL.
URL string `json:"url"`
JSON observatoryPageTestJSON `json:"-"`
}
func (*ObservatoryPageTest) UnmarshalJSON ¶
func (r *ObservatoryPageTest) UnmarshalJSON(data []byte) (err error)
type ObservatoryPageTestDesktopReport ¶
type ObservatoryPageTestDesktopReport struct {
// Cumulative Layout Shift.
Cls float64 `json:"cls"`
// The type of device.
DeviceType ObservatoryPageTestDesktopReportDeviceType `json:"deviceType"`
Error ObservatoryPageTestDesktopReportError `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 ObservatoryPageTestDesktopReportState `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 observatoryPageTestDesktopReportJSON `json:"-"`
}
The Lighthouse report.
func (*ObservatoryPageTestDesktopReport) UnmarshalJSON ¶
func (r *ObservatoryPageTestDesktopReport) UnmarshalJSON(data []byte) (err error)
type ObservatoryPageTestDesktopReportDeviceType ¶
type ObservatoryPageTestDesktopReportDeviceType string
The type of device.
const ( ObservatoryPageTestDesktopReportDeviceTypeDesktop ObservatoryPageTestDesktopReportDeviceType = "DESKTOP" ObservatoryPageTestDesktopReportDeviceTypeMobile ObservatoryPageTestDesktopReportDeviceType = "MOBILE" )
type ObservatoryPageTestDesktopReportError ¶
type ObservatoryPageTestDesktopReportError struct {
// The error code of the Lighthouse result.
Code ObservatoryPageTestDesktopReportErrorCode `json:"code"`
// Detailed error message.
Detail string `json:"detail"`
// The final URL displayed to the user.
FinalDisplayedURL string `json:"finalDisplayedUrl"`
JSON observatoryPageTestDesktopReportErrorJSON `json:"-"`
}
func (*ObservatoryPageTestDesktopReportError) UnmarshalJSON ¶
func (r *ObservatoryPageTestDesktopReportError) UnmarshalJSON(data []byte) (err error)
type ObservatoryPageTestDesktopReportErrorCode ¶
type ObservatoryPageTestDesktopReportErrorCode string
The error code of the Lighthouse result.
const ( ObservatoryPageTestDesktopReportErrorCodeNotReachable ObservatoryPageTestDesktopReportErrorCode = "NOT_REACHABLE" ObservatoryPageTestDesktopReportErrorCodeDNSFailure ObservatoryPageTestDesktopReportErrorCode = "DNS_FAILURE" ObservatoryPageTestDesktopReportErrorCodeNotHTML ObservatoryPageTestDesktopReportErrorCode = "NOT_HTML" ObservatoryPageTestDesktopReportErrorCodeLighthouseTimeout ObservatoryPageTestDesktopReportErrorCode = "LIGHTHOUSE_TIMEOUT" ObservatoryPageTestDesktopReportErrorCodeUnknown ObservatoryPageTestDesktopReportErrorCode = "UNKNOWN" )
type ObservatoryPageTestDesktopReportState ¶
type ObservatoryPageTestDesktopReportState string
The state of the Lighthouse report.
const ( ObservatoryPageTestDesktopReportStateRunning ObservatoryPageTestDesktopReportState = "RUNNING" ObservatoryPageTestDesktopReportStateComplete ObservatoryPageTestDesktopReportState = "COMPLETE" ObservatoryPageTestDesktopReportStateFailed ObservatoryPageTestDesktopReportState = "FAILED" )
type ObservatoryPageTestMobileReport ¶
type ObservatoryPageTestMobileReport struct {
// Cumulative Layout Shift.
Cls float64 `json:"cls"`
// The type of device.
DeviceType ObservatoryPageTestMobileReportDeviceType `json:"deviceType"`
Error ObservatoryPageTestMobileReportError `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 ObservatoryPageTestMobileReportState `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 observatoryPageTestMobileReportJSON `json:"-"`
}
The Lighthouse report.
func (*ObservatoryPageTestMobileReport) UnmarshalJSON ¶
func (r *ObservatoryPageTestMobileReport) UnmarshalJSON(data []byte) (err error)
type ObservatoryPageTestMobileReportDeviceType ¶
type ObservatoryPageTestMobileReportDeviceType string
The type of device.
const ( ObservatoryPageTestMobileReportDeviceTypeDesktop ObservatoryPageTestMobileReportDeviceType = "DESKTOP" ObservatoryPageTestMobileReportDeviceTypeMobile ObservatoryPageTestMobileReportDeviceType = "MOBILE" )
type ObservatoryPageTestMobileReportError ¶
type ObservatoryPageTestMobileReportError struct {
// The error code of the Lighthouse result.
Code ObservatoryPageTestMobileReportErrorCode `json:"code"`
// Detailed error message.
Detail string `json:"detail"`
// The final URL displayed to the user.
FinalDisplayedURL string `json:"finalDisplayedUrl"`
JSON observatoryPageTestMobileReportErrorJSON `json:"-"`
}
func (*ObservatoryPageTestMobileReportError) UnmarshalJSON ¶
func (r *ObservatoryPageTestMobileReportError) UnmarshalJSON(data []byte) (err error)
type ObservatoryPageTestMobileReportErrorCode ¶
type ObservatoryPageTestMobileReportErrorCode string
The error code of the Lighthouse result.
const ( ObservatoryPageTestMobileReportErrorCodeNotReachable ObservatoryPageTestMobileReportErrorCode = "NOT_REACHABLE" ObservatoryPageTestMobileReportErrorCodeDNSFailure ObservatoryPageTestMobileReportErrorCode = "DNS_FAILURE" ObservatoryPageTestMobileReportErrorCodeNotHTML ObservatoryPageTestMobileReportErrorCode = "NOT_HTML" ObservatoryPageTestMobileReportErrorCodeLighthouseTimeout ObservatoryPageTestMobileReportErrorCode = "LIGHTHOUSE_TIMEOUT" ObservatoryPageTestMobileReportErrorCodeUnknown ObservatoryPageTestMobileReportErrorCode = "UNKNOWN" )
type ObservatoryPageTestMobileReportState ¶
type ObservatoryPageTestMobileReportState string
The state of the Lighthouse report.
const ( ObservatoryPageTestMobileReportStateRunning ObservatoryPageTestMobileReportState = "RUNNING" ObservatoryPageTestMobileReportStateComplete ObservatoryPageTestMobileReportState = "COMPLETE" ObservatoryPageTestMobileReportStateFailed ObservatoryPageTestMobileReportState = "FAILED" )
type ObservatoryPageTestRegion ¶
type ObservatoryPageTestRegion struct {
Label string `json:"label"`
// A test region.
Value ObservatoryPageTestRegionValue `json:"value"`
JSON observatoryPageTestRegionJSON `json:"-"`
}
A test region with a label.
func (*ObservatoryPageTestRegion) UnmarshalJSON ¶
func (r *ObservatoryPageTestRegion) UnmarshalJSON(data []byte) (err error)
type ObservatoryPageTestRegionValue ¶
type ObservatoryPageTestRegionValue string
A test region.
const ( ObservatoryPageTestRegionValueAsiaEast1 ObservatoryPageTestRegionValue = "asia-east1" ObservatoryPageTestRegionValueAsiaNortheast1 ObservatoryPageTestRegionValue = "asia-northeast1" ObservatoryPageTestRegionValueAsiaNortheast2 ObservatoryPageTestRegionValue = "asia-northeast2" ObservatoryPageTestRegionValueAsiaSouth1 ObservatoryPageTestRegionValue = "asia-south1" ObservatoryPageTestRegionValueAsiaSoutheast1 ObservatoryPageTestRegionValue = "asia-southeast1" ObservatoryPageTestRegionValueAustraliaSoutheast1 ObservatoryPageTestRegionValue = "australia-southeast1" ObservatoryPageTestRegionValueEuropeNorth1 ObservatoryPageTestRegionValue = "europe-north1" ObservatoryPageTestRegionValueEuropeSouthwest1 ObservatoryPageTestRegionValue = "europe-southwest1" ObservatoryPageTestRegionValueEuropeWest1 ObservatoryPageTestRegionValue = "europe-west1" ObservatoryPageTestRegionValueEuropeWest2 ObservatoryPageTestRegionValue = "europe-west2" ObservatoryPageTestRegionValueEuropeWest3 ObservatoryPageTestRegionValue = "europe-west3" ObservatoryPageTestRegionValueEuropeWest4 ObservatoryPageTestRegionValue = "europe-west4" ObservatoryPageTestRegionValueEuropeWest8 ObservatoryPageTestRegionValue = "europe-west8" ObservatoryPageTestRegionValueEuropeWest9 ObservatoryPageTestRegionValue = "europe-west9" ObservatoryPageTestRegionValueMeWest1 ObservatoryPageTestRegionValue = "me-west1" ObservatoryPageTestRegionValueSouthamericaEast1 ObservatoryPageTestRegionValue = "southamerica-east1" ObservatoryPageTestRegionValueUsCentral1 ObservatoryPageTestRegionValue = "us-central1" ObservatoryPageTestRegionValueUsEast1 ObservatoryPageTestRegionValue = "us-east1" ObservatoryPageTestRegionValueUsEast4 ObservatoryPageTestRegionValue = "us-east4" ObservatoryPageTestRegionValueUsSouth1 ObservatoryPageTestRegionValue = "us-south1" ObservatoryPageTestRegionValueUsWest1 ObservatoryPageTestRegionValue = "us-west1" )
type ObservatoryPageTestScheduleFrequency ¶
type ObservatoryPageTestScheduleFrequency string
The frequency of the test.
const ( ObservatoryPageTestScheduleFrequencyDaily ObservatoryPageTestScheduleFrequency = "DAILY" ObservatoryPageTestScheduleFrequencyWeekly ObservatoryPageTestScheduleFrequency = "WEEKLY" )
type ObservatorySchedule ¶
type ObservatorySchedule struct {
// The frequency of the test.
Frequency ObservatoryScheduleFrequency `json:"frequency"`
// A test region.
Region ObservatoryScheduleRegion `json:"region"`
// A URL.
URL string `json:"url"`
JSON observatoryScheduleJSON `json:"-"`
}
The test schedule.
func (*ObservatorySchedule) UnmarshalJSON ¶
func (r *ObservatorySchedule) UnmarshalJSON(data []byte) (err error)
type ObservatoryScheduleFrequency ¶
type ObservatoryScheduleFrequency string
The frequency of the test.
const ( ObservatoryScheduleFrequencyDaily ObservatoryScheduleFrequency = "DAILY" ObservatoryScheduleFrequencyWeekly ObservatoryScheduleFrequency = "WEEKLY" )
type ObservatoryScheduleRegion ¶
type ObservatoryScheduleRegion string
A test region.
const ( ObservatoryScheduleRegionAsiaEast1 ObservatoryScheduleRegion = "asia-east1" ObservatoryScheduleRegionAsiaNortheast1 ObservatoryScheduleRegion = "asia-northeast1" ObservatoryScheduleRegionAsiaNortheast2 ObservatoryScheduleRegion = "asia-northeast2" ObservatoryScheduleRegionAsiaSouth1 ObservatoryScheduleRegion = "asia-south1" ObservatoryScheduleRegionAsiaSoutheast1 ObservatoryScheduleRegion = "asia-southeast1" ObservatoryScheduleRegionAustraliaSoutheast1 ObservatoryScheduleRegion = "australia-southeast1" ObservatoryScheduleRegionEuropeNorth1 ObservatoryScheduleRegion = "europe-north1" ObservatoryScheduleRegionEuropeSouthwest1 ObservatoryScheduleRegion = "europe-southwest1" ObservatoryScheduleRegionEuropeWest1 ObservatoryScheduleRegion = "europe-west1" ObservatoryScheduleRegionEuropeWest2 ObservatoryScheduleRegion = "europe-west2" ObservatoryScheduleRegionEuropeWest3 ObservatoryScheduleRegion = "europe-west3" ObservatoryScheduleRegionEuropeWest4 ObservatoryScheduleRegion = "europe-west4" ObservatoryScheduleRegionEuropeWest8 ObservatoryScheduleRegion = "europe-west8" ObservatoryScheduleRegionEuropeWest9 ObservatoryScheduleRegion = "europe-west9" ObservatoryScheduleRegionMeWest1 ObservatoryScheduleRegion = "me-west1" ObservatoryScheduleRegionSouthamericaEast1 ObservatoryScheduleRegion = "southamerica-east1" ObservatoryScheduleRegionUsCentral1 ObservatoryScheduleRegion = "us-central1" ObservatoryScheduleRegionUsEast1 ObservatoryScheduleRegion = "us-east1" ObservatoryScheduleRegionUsEast4 ObservatoryScheduleRegion = "us-east4" ObservatoryScheduleRegionUsSouth1 ObservatoryScheduleRegion = "us-south1" ObservatoryScheduleRegionUsWest1 ObservatoryScheduleRegion = "us-west1" )
type ObservatoryTrend ¶
type ObservatoryTrend 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 observatoryTrendJSON `json:"-"`
}
func (*ObservatoryTrend) UnmarshalJSON ¶
func (r *ObservatoryTrend) UnmarshalJSON(data []byte) (err error)
type PageListParams ¶
type PageListResponse ¶
type PageListResponse struct {
// A test region with a label.
Region PageListResponseRegion `json:"region"`
// The frequency of the test.
ScheduleFrequency PageListResponseScheduleFrequency `json:"scheduleFrequency"`
Tests []ObservatoryPageTest `json:"tests"`
// A URL.
URL string `json:"url"`
JSON pageListResponseJSON `json:"-"`
}
func (*PageListResponse) UnmarshalJSON ¶
func (r *PageListResponse) UnmarshalJSON(data []byte) (err error)
type PageListResponseEnvelope ¶
type PageListResponseEnvelope struct {
Result []PageListResponse `json:"result"`
JSON pageListResponseEnvelopeJSON `json:"-"`
}
func (*PageListResponseEnvelope) UnmarshalJSON ¶
func (r *PageListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PageListResponseRegion ¶
type PageListResponseRegion struct {
Label string `json:"label"`
// A test region.
Value PageListResponseRegionValue `json:"value"`
JSON pageListResponseRegionJSON `json:"-"`
}
A test region with a label.
func (*PageListResponseRegion) UnmarshalJSON ¶
func (r *PageListResponseRegion) UnmarshalJSON(data []byte) (err error)
type PageListResponseRegionValue ¶
type PageListResponseRegionValue string
A test region.
const ( PageListResponseRegionValueAsiaEast1 PageListResponseRegionValue = "asia-east1" PageListResponseRegionValueAsiaNortheast1 PageListResponseRegionValue = "asia-northeast1" PageListResponseRegionValueAsiaNortheast2 PageListResponseRegionValue = "asia-northeast2" PageListResponseRegionValueAsiaSouth1 PageListResponseRegionValue = "asia-south1" PageListResponseRegionValueAsiaSoutheast1 PageListResponseRegionValue = "asia-southeast1" PageListResponseRegionValueAustraliaSoutheast1 PageListResponseRegionValue = "australia-southeast1" PageListResponseRegionValueEuropeNorth1 PageListResponseRegionValue = "europe-north1" PageListResponseRegionValueEuropeSouthwest1 PageListResponseRegionValue = "europe-southwest1" PageListResponseRegionValueEuropeWest1 PageListResponseRegionValue = "europe-west1" PageListResponseRegionValueEuropeWest2 PageListResponseRegionValue = "europe-west2" PageListResponseRegionValueEuropeWest3 PageListResponseRegionValue = "europe-west3" PageListResponseRegionValueEuropeWest4 PageListResponseRegionValue = "europe-west4" PageListResponseRegionValueEuropeWest8 PageListResponseRegionValue = "europe-west8" PageListResponseRegionValueEuropeWest9 PageListResponseRegionValue = "europe-west9" PageListResponseRegionValueMeWest1 PageListResponseRegionValue = "me-west1" PageListResponseRegionValueSouthamericaEast1 PageListResponseRegionValue = "southamerica-east1" PageListResponseRegionValueUsCentral1 PageListResponseRegionValue = "us-central1" PageListResponseRegionValueUsEast1 PageListResponseRegionValue = "us-east1" PageListResponseRegionValueUsEast4 PageListResponseRegionValue = "us-east4" PageListResponseRegionValueUsSouth1 PageListResponseRegionValue = "us-south1" PageListResponseRegionValueUsWest1 PageListResponseRegionValue = "us-west1" )
type PageListResponseScheduleFrequency ¶
type PageListResponseScheduleFrequency string
The frequency of the test.
const ( PageListResponseScheduleFrequencyDaily PageListResponseScheduleFrequency = "DAILY" PageListResponseScheduleFrequencyWeekly PageListResponseScheduleFrequency = "WEEKLY" )
type PageService ¶
type PageService struct {
Options []option.RequestOption
}
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 ¶
func (r *PageService) List(ctx context.Context, query PageListParams, opts ...option.RequestOption) (res *[]PageListResponse, err error)
Lists all webpages which have been tested.
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" )
type ScheduleNewResponse ¶
type ScheduleNewResponse struct {
// The test schedule.
Schedule ObservatorySchedule `json:"schedule"`
Test ObservatoryPageTest `json:"test"`
JSON scheduleNewResponseJSON `json:"-"`
}
func (*ScheduleNewResponse) UnmarshalJSON ¶
func (r *ScheduleNewResponse) UnmarshalJSON(data []byte) (err error)
type ScheduleNewResponseEnvelope ¶
type ScheduleNewResponseEnvelope struct {
Result ScheduleNewResponse `json:"result"`
JSON scheduleNewResponseEnvelopeJSON `json:"-"`
}
func (*ScheduleNewResponseEnvelope) UnmarshalJSON ¶
func (r *ScheduleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
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) New ¶
func (r *ScheduleService) New(ctx context.Context, url string, params ScheduleNewParams, opts ...option.RequestOption) (res *ScheduleNewResponse, err error)
Creates a scheduled test for a page.
type SpeedDeleteParams ¶
type SpeedDeleteParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// A test region.
Region param.Field[SpeedDeleteParamsRegion] `query:"region"`
}
func (SpeedDeleteParams) URLQuery ¶
func (r SpeedDeleteParams) URLQuery() (v url.Values)
URLQuery serializes SpeedDeleteParams's query parameters as `url.Values`.
type SpeedDeleteParamsRegion ¶
type SpeedDeleteParamsRegion string
A test region.
const ( SpeedDeleteParamsRegionAsiaEast1 SpeedDeleteParamsRegion = "asia-east1" SpeedDeleteParamsRegionAsiaNortheast1 SpeedDeleteParamsRegion = "asia-northeast1" SpeedDeleteParamsRegionAsiaNortheast2 SpeedDeleteParamsRegion = "asia-northeast2" SpeedDeleteParamsRegionAsiaSouth1 SpeedDeleteParamsRegion = "asia-south1" SpeedDeleteParamsRegionAsiaSoutheast1 SpeedDeleteParamsRegion = "asia-southeast1" SpeedDeleteParamsRegionAustraliaSoutheast1 SpeedDeleteParamsRegion = "australia-southeast1" SpeedDeleteParamsRegionEuropeNorth1 SpeedDeleteParamsRegion = "europe-north1" SpeedDeleteParamsRegionEuropeSouthwest1 SpeedDeleteParamsRegion = "europe-southwest1" SpeedDeleteParamsRegionEuropeWest1 SpeedDeleteParamsRegion = "europe-west1" SpeedDeleteParamsRegionEuropeWest2 SpeedDeleteParamsRegion = "europe-west2" SpeedDeleteParamsRegionEuropeWest3 SpeedDeleteParamsRegion = "europe-west3" SpeedDeleteParamsRegionEuropeWest4 SpeedDeleteParamsRegion = "europe-west4" SpeedDeleteParamsRegionEuropeWest8 SpeedDeleteParamsRegion = "europe-west8" SpeedDeleteParamsRegionEuropeWest9 SpeedDeleteParamsRegion = "europe-west9" SpeedDeleteParamsRegionMeWest1 SpeedDeleteParamsRegion = "me-west1" SpeedDeleteParamsRegionSouthamericaEast1 SpeedDeleteParamsRegion = "southamerica-east1" SpeedDeleteParamsRegionUsCentral1 SpeedDeleteParamsRegion = "us-central1" SpeedDeleteParamsRegionUsEast1 SpeedDeleteParamsRegion = "us-east1" SpeedDeleteParamsRegionUsEast4 SpeedDeleteParamsRegion = "us-east4" SpeedDeleteParamsRegionUsSouth1 SpeedDeleteParamsRegion = "us-south1" SpeedDeleteParamsRegionUsWest1 SpeedDeleteParamsRegion = "us-west1" )
type SpeedDeleteResponse ¶
type SpeedDeleteResponse struct {
// Number of items affected.
Count float64 `json:"count"`
JSON speedDeleteResponseJSON `json:"-"`
}
func (*SpeedDeleteResponse) UnmarshalJSON ¶
func (r *SpeedDeleteResponse) UnmarshalJSON(data []byte) (err error)
type SpeedDeleteResponseEnvelope ¶
type SpeedDeleteResponseEnvelope struct {
Result SpeedDeleteResponse `json:"result"`
JSON speedDeleteResponseEnvelopeJSON `json:"-"`
}
func (*SpeedDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *SpeedDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SpeedScheduleGetParams ¶
type SpeedScheduleGetParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// A test region.
Region param.Field[SpeedScheduleGetParamsRegion] `query:"region"`
}
func (SpeedScheduleGetParams) URLQuery ¶
func (r SpeedScheduleGetParams) URLQuery() (v url.Values)
URLQuery serializes SpeedScheduleGetParams's query parameters as `url.Values`.
type SpeedScheduleGetParamsRegion ¶
type SpeedScheduleGetParamsRegion string
A test region.
const ( SpeedScheduleGetParamsRegionAsiaEast1 SpeedScheduleGetParamsRegion = "asia-east1" SpeedScheduleGetParamsRegionAsiaNortheast1 SpeedScheduleGetParamsRegion = "asia-northeast1" SpeedScheduleGetParamsRegionAsiaNortheast2 SpeedScheduleGetParamsRegion = "asia-northeast2" SpeedScheduleGetParamsRegionAsiaSouth1 SpeedScheduleGetParamsRegion = "asia-south1" SpeedScheduleGetParamsRegionAsiaSoutheast1 SpeedScheduleGetParamsRegion = "asia-southeast1" SpeedScheduleGetParamsRegionAustraliaSoutheast1 SpeedScheduleGetParamsRegion = "australia-southeast1" SpeedScheduleGetParamsRegionEuropeNorth1 SpeedScheduleGetParamsRegion = "europe-north1" SpeedScheduleGetParamsRegionEuropeSouthwest1 SpeedScheduleGetParamsRegion = "europe-southwest1" SpeedScheduleGetParamsRegionEuropeWest1 SpeedScheduleGetParamsRegion = "europe-west1" SpeedScheduleGetParamsRegionEuropeWest2 SpeedScheduleGetParamsRegion = "europe-west2" SpeedScheduleGetParamsRegionEuropeWest3 SpeedScheduleGetParamsRegion = "europe-west3" SpeedScheduleGetParamsRegionEuropeWest4 SpeedScheduleGetParamsRegion = "europe-west4" SpeedScheduleGetParamsRegionEuropeWest8 SpeedScheduleGetParamsRegion = "europe-west8" SpeedScheduleGetParamsRegionEuropeWest9 SpeedScheduleGetParamsRegion = "europe-west9" SpeedScheduleGetParamsRegionMeWest1 SpeedScheduleGetParamsRegion = "me-west1" SpeedScheduleGetParamsRegionSouthamericaEast1 SpeedScheduleGetParamsRegion = "southamerica-east1" SpeedScheduleGetParamsRegionUsCentral1 SpeedScheduleGetParamsRegion = "us-central1" SpeedScheduleGetParamsRegionUsEast1 SpeedScheduleGetParamsRegion = "us-east1" SpeedScheduleGetParamsRegionUsEast4 SpeedScheduleGetParamsRegion = "us-east4" SpeedScheduleGetParamsRegionUsSouth1 SpeedScheduleGetParamsRegion = "us-south1" SpeedScheduleGetParamsRegionUsWest1 SpeedScheduleGetParamsRegion = "us-west1" )
type SpeedScheduleGetResponseEnvelope ¶
type SpeedScheduleGetResponseEnvelope struct {
// The test schedule.
Result ObservatorySchedule `json:"result"`
JSON speedScheduleGetResponseEnvelopeJSON `json:"-"`
}
func (*SpeedScheduleGetResponseEnvelope) UnmarshalJSON ¶
func (r *SpeedScheduleGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type SpeedService ¶
type SpeedService struct {
Options []option.RequestOption
Tests *TestService
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.
func (*SpeedService) Delete ¶
func (r *SpeedService) Delete(ctx context.Context, url string, params SpeedDeleteParams, opts ...option.RequestOption) (res *SpeedDeleteResponse, err error)
Deletes a scheduled test for a page.
func (*SpeedService) ScheduleGet ¶
func (r *SpeedService) ScheduleGet(ctx context.Context, url string, params SpeedScheduleGetParams, opts ...option.RequestOption) (res *ObservatorySchedule, err error)
Retrieves the test schedule for a page in a specific region.
func (*SpeedService) TrendsList ¶
func (r *SpeedService) TrendsList(ctx context.Context, url string, params SpeedTrendsListParams, opts ...option.RequestOption) (res *ObservatoryTrend, err error)
Lists the core web vital metrics trend over time for a specific page.
type SpeedTrendsListParams ¶
type SpeedTrendsListParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// The type of device.
DeviceType param.Field[SpeedTrendsListParamsDeviceType] `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[SpeedTrendsListParamsRegion] `query:"region,required"`
// The timezone of the start and end timestamps.
Tz param.Field[string] `query:"tz,required"`
}
func (SpeedTrendsListParams) URLQuery ¶
func (r SpeedTrendsListParams) URLQuery() (v url.Values)
URLQuery serializes SpeedTrendsListParams's query parameters as `url.Values`.
type SpeedTrendsListParamsDeviceType ¶
type SpeedTrendsListParamsDeviceType string
The type of device.
const ( SpeedTrendsListParamsDeviceTypeDesktop SpeedTrendsListParamsDeviceType = "DESKTOP" SpeedTrendsListParamsDeviceTypeMobile SpeedTrendsListParamsDeviceType = "MOBILE" )
type SpeedTrendsListParamsRegion ¶
type SpeedTrendsListParamsRegion string
A test region.
const ( SpeedTrendsListParamsRegionAsiaEast1 SpeedTrendsListParamsRegion = "asia-east1" SpeedTrendsListParamsRegionAsiaNortheast1 SpeedTrendsListParamsRegion = "asia-northeast1" SpeedTrendsListParamsRegionAsiaNortheast2 SpeedTrendsListParamsRegion = "asia-northeast2" SpeedTrendsListParamsRegionAsiaSouth1 SpeedTrendsListParamsRegion = "asia-south1" SpeedTrendsListParamsRegionAsiaSoutheast1 SpeedTrendsListParamsRegion = "asia-southeast1" SpeedTrendsListParamsRegionAustraliaSoutheast1 SpeedTrendsListParamsRegion = "australia-southeast1" SpeedTrendsListParamsRegionEuropeNorth1 SpeedTrendsListParamsRegion = "europe-north1" SpeedTrendsListParamsRegionEuropeSouthwest1 SpeedTrendsListParamsRegion = "europe-southwest1" SpeedTrendsListParamsRegionEuropeWest1 SpeedTrendsListParamsRegion = "europe-west1" SpeedTrendsListParamsRegionEuropeWest2 SpeedTrendsListParamsRegion = "europe-west2" SpeedTrendsListParamsRegionEuropeWest3 SpeedTrendsListParamsRegion = "europe-west3" SpeedTrendsListParamsRegionEuropeWest4 SpeedTrendsListParamsRegion = "europe-west4" SpeedTrendsListParamsRegionEuropeWest8 SpeedTrendsListParamsRegion = "europe-west8" SpeedTrendsListParamsRegionEuropeWest9 SpeedTrendsListParamsRegion = "europe-west9" SpeedTrendsListParamsRegionMeWest1 SpeedTrendsListParamsRegion = "me-west1" SpeedTrendsListParamsRegionSouthamericaEast1 SpeedTrendsListParamsRegion = "southamerica-east1" SpeedTrendsListParamsRegionUsCentral1 SpeedTrendsListParamsRegion = "us-central1" SpeedTrendsListParamsRegionUsEast1 SpeedTrendsListParamsRegion = "us-east1" SpeedTrendsListParamsRegionUsEast4 SpeedTrendsListParamsRegion = "us-east4" SpeedTrendsListParamsRegionUsSouth1 SpeedTrendsListParamsRegion = "us-south1" SpeedTrendsListParamsRegionUsWest1 SpeedTrendsListParamsRegion = "us-west1" )
type SpeedTrendsListResponseEnvelope ¶
type SpeedTrendsListResponseEnvelope struct {
Result ObservatoryTrend `json:"result"`
JSON speedTrendsListResponseEnvelopeJSON `json:"-"`
}
func (*SpeedTrendsListResponseEnvelope) UnmarshalJSON ¶
func (r *SpeedTrendsListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TestDeleteParams ¶
type TestDeleteParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// A test region.
Region param.Field[TestDeleteParamsRegion] `query:"region"`
}
func (TestDeleteParams) URLQuery ¶
func (r TestDeleteParams) URLQuery() (v url.Values)
URLQuery serializes TestDeleteParams's query parameters as `url.Values`.
type TestDeleteParamsRegion ¶
type TestDeleteParamsRegion string
A test region.
const ( TestDeleteParamsRegionAsiaEast1 TestDeleteParamsRegion = "asia-east1" TestDeleteParamsRegionAsiaNortheast1 TestDeleteParamsRegion = "asia-northeast1" TestDeleteParamsRegionAsiaNortheast2 TestDeleteParamsRegion = "asia-northeast2" TestDeleteParamsRegionAsiaSouth1 TestDeleteParamsRegion = "asia-south1" TestDeleteParamsRegionAsiaSoutheast1 TestDeleteParamsRegion = "asia-southeast1" TestDeleteParamsRegionAustraliaSoutheast1 TestDeleteParamsRegion = "australia-southeast1" TestDeleteParamsRegionEuropeNorth1 TestDeleteParamsRegion = "europe-north1" TestDeleteParamsRegionEuropeSouthwest1 TestDeleteParamsRegion = "europe-southwest1" TestDeleteParamsRegionEuropeWest1 TestDeleteParamsRegion = "europe-west1" TestDeleteParamsRegionEuropeWest2 TestDeleteParamsRegion = "europe-west2" TestDeleteParamsRegionEuropeWest3 TestDeleteParamsRegion = "europe-west3" TestDeleteParamsRegionEuropeWest4 TestDeleteParamsRegion = "europe-west4" TestDeleteParamsRegionEuropeWest8 TestDeleteParamsRegion = "europe-west8" TestDeleteParamsRegionEuropeWest9 TestDeleteParamsRegion = "europe-west9" TestDeleteParamsRegionMeWest1 TestDeleteParamsRegion = "me-west1" TestDeleteParamsRegionSouthamericaEast1 TestDeleteParamsRegion = "southamerica-east1" TestDeleteParamsRegionUsCentral1 TestDeleteParamsRegion = "us-central1" TestDeleteParamsRegionUsEast1 TestDeleteParamsRegion = "us-east1" TestDeleteParamsRegionUsEast4 TestDeleteParamsRegion = "us-east4" TestDeleteParamsRegionUsSouth1 TestDeleteParamsRegion = "us-south1" TestDeleteParamsRegionUsWest1 TestDeleteParamsRegion = "us-west1" )
type TestDeleteResponse ¶
type TestDeleteResponse struct {
// Number of items affected.
Count float64 `json:"count"`
JSON testDeleteResponseJSON `json:"-"`
}
func (*TestDeleteResponse) UnmarshalJSON ¶
func (r *TestDeleteResponse) UnmarshalJSON(data []byte) (err error)
type TestDeleteResponseEnvelope ¶
type TestDeleteResponseEnvelope struct {
Result TestDeleteResponse `json:"result"`
JSON testDeleteResponseEnvelopeJSON `json:"-"`
}
func (*TestDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *TestDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TestGetParams ¶
type TestGetResponseEnvelope ¶
type TestGetResponseEnvelope struct {
Result ObservatoryPageTest `json:"result"`
JSON testGetResponseEnvelopeJSON `json:"-"`
}
func (*TestGetResponseEnvelope) UnmarshalJSON ¶
func (r *TestGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TestListParams ¶
type TestListParams 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[TestListParamsRegion] `query:"region"`
}
func (TestListParams) URLQuery ¶
func (r TestListParams) URLQuery() (v url.Values)
URLQuery serializes TestListParams's query parameters as `url.Values`.
type TestListParamsRegion ¶
type TestListParamsRegion string
A test region.
const ( TestListParamsRegionAsiaEast1 TestListParamsRegion = "asia-east1" TestListParamsRegionAsiaNortheast1 TestListParamsRegion = "asia-northeast1" TestListParamsRegionAsiaNortheast2 TestListParamsRegion = "asia-northeast2" TestListParamsRegionAsiaSouth1 TestListParamsRegion = "asia-south1" TestListParamsRegionAsiaSoutheast1 TestListParamsRegion = "asia-southeast1" TestListParamsRegionAustraliaSoutheast1 TestListParamsRegion = "australia-southeast1" TestListParamsRegionEuropeNorth1 TestListParamsRegion = "europe-north1" TestListParamsRegionEuropeSouthwest1 TestListParamsRegion = "europe-southwest1" TestListParamsRegionEuropeWest1 TestListParamsRegion = "europe-west1" TestListParamsRegionEuropeWest2 TestListParamsRegion = "europe-west2" TestListParamsRegionEuropeWest3 TestListParamsRegion = "europe-west3" TestListParamsRegionEuropeWest4 TestListParamsRegion = "europe-west4" TestListParamsRegionEuropeWest8 TestListParamsRegion = "europe-west8" TestListParamsRegionEuropeWest9 TestListParamsRegion = "europe-west9" TestListParamsRegionMeWest1 TestListParamsRegion = "me-west1" TestListParamsRegionSouthamericaEast1 TestListParamsRegion = "southamerica-east1" TestListParamsRegionUsCentral1 TestListParamsRegion = "us-central1" TestListParamsRegionUsEast1 TestListParamsRegion = "us-east1" TestListParamsRegionUsEast4 TestListParamsRegion = "us-east4" TestListParamsRegionUsSouth1 TestListParamsRegion = "us-south1" TestListParamsRegionUsWest1 TestListParamsRegion = "us-west1" )
type TestListResponse ¶
type TestListResponse struct {
Errors []TestListResponseError `json:"errors,required"`
Messages []TestListResponseMessage `json:"messages,required"`
// Whether the API call was successful.
Success bool `json:"success,required"`
ResultInfo TestListResponseResultInfo `json:"result_info"`
JSON testListResponseJSON `json:"-"`
}
func (*TestListResponse) UnmarshalJSON ¶
func (r *TestListResponse) UnmarshalJSON(data []byte) (err error)
type TestListResponseError ¶
type TestListResponseError struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON testListResponseErrorJSON `json:"-"`
}
func (*TestListResponseError) UnmarshalJSON ¶
func (r *TestListResponseError) UnmarshalJSON(data []byte) (err error)
type TestListResponseMessage ¶
type TestListResponseMessage struct {
Code int64 `json:"code,required"`
Message string `json:"message,required"`
JSON testListResponseMessageJSON `json:"-"`
}
func (*TestListResponseMessage) UnmarshalJSON ¶
func (r *TestListResponseMessage) UnmarshalJSON(data []byte) (err error)
type TestListResponseResultInfo ¶
type TestListResponseResultInfo struct {
Count int64 `json:"count"`
Page int64 `json:"page"`
PerPage int64 `json:"per_page"`
TotalCount int64 `json:"total_count"`
JSON testListResponseResultInfoJSON `json:"-"`
}
func (*TestListResponseResultInfo) UnmarshalJSON ¶
func (r *TestListResponseResultInfo) UnmarshalJSON(data []byte) (err error)
type TestNewParams ¶
type TestNewParams struct {
// Identifier
ZoneID param.Field[string] `path:"zone_id,required"`
// A test region.
Region param.Field[TestNewParamsRegion] `json:"region"`
}
func (TestNewParams) MarshalJSON ¶
func (r TestNewParams) MarshalJSON() (data []byte, err error)
type TestNewParamsRegion ¶
type TestNewParamsRegion string
A test region.
const ( TestNewParamsRegionAsiaEast1 TestNewParamsRegion = "asia-east1" TestNewParamsRegionAsiaNortheast1 TestNewParamsRegion = "asia-northeast1" TestNewParamsRegionAsiaNortheast2 TestNewParamsRegion = "asia-northeast2" TestNewParamsRegionAsiaSouth1 TestNewParamsRegion = "asia-south1" TestNewParamsRegionAsiaSoutheast1 TestNewParamsRegion = "asia-southeast1" TestNewParamsRegionAustraliaSoutheast1 TestNewParamsRegion = "australia-southeast1" TestNewParamsRegionEuropeNorth1 TestNewParamsRegion = "europe-north1" TestNewParamsRegionEuropeSouthwest1 TestNewParamsRegion = "europe-southwest1" TestNewParamsRegionEuropeWest1 TestNewParamsRegion = "europe-west1" TestNewParamsRegionEuropeWest2 TestNewParamsRegion = "europe-west2" TestNewParamsRegionEuropeWest3 TestNewParamsRegion = "europe-west3" TestNewParamsRegionEuropeWest4 TestNewParamsRegion = "europe-west4" TestNewParamsRegionEuropeWest8 TestNewParamsRegion = "europe-west8" TestNewParamsRegionEuropeWest9 TestNewParamsRegion = "europe-west9" TestNewParamsRegionMeWest1 TestNewParamsRegion = "me-west1" TestNewParamsRegionSouthamericaEast1 TestNewParamsRegion = "southamerica-east1" TestNewParamsRegionUsCentral1 TestNewParamsRegion = "us-central1" TestNewParamsRegionUsEast1 TestNewParamsRegion = "us-east1" TestNewParamsRegionUsEast4 TestNewParamsRegion = "us-east4" TestNewParamsRegionUsSouth1 TestNewParamsRegion = "us-south1" TestNewParamsRegionUsWest1 TestNewParamsRegion = "us-west1" )
type TestNewResponseEnvelope ¶
type TestNewResponseEnvelope struct {
Result ObservatoryPageTest `json:"result"`
JSON testNewResponseEnvelopeJSON `json:"-"`
}
func (*TestNewResponseEnvelope) UnmarshalJSON ¶
func (r *TestNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type TestService ¶
type TestService struct {
Options []option.RequestOption
}
TestService 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 NewTestService method instead.
func NewTestService ¶
func NewTestService(opts ...option.RequestOption) (r *TestService)
NewTestService 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 (*TestService) Delete ¶
func (r *TestService) Delete(ctx context.Context, url string, params TestDeleteParams, opts ...option.RequestOption) (res *TestDeleteResponse, err error)
Deletes all tests for a specific webpage from a specific region. Deleted tests are still counted as part of the quota.
func (*TestService) Get ¶
func (r *TestService) Get(ctx context.Context, url string, testID string, query TestGetParams, opts ...option.RequestOption) (res *ObservatoryPageTest, err error)
Retrieves the result of a specific test.
func (*TestService) List ¶
func (r *TestService) List(ctx context.Context, url string, params TestListParams, opts ...option.RequestOption) (res *TestListResponse, err error)
Test history (list of tests) for a specific webpage.
func (*TestService) New ¶
func (r *TestService) New(ctx context.Context, url string, params TestNewParams, opts ...option.RequestOption) (res *ObservatoryPageTest, err error)
Starts a test for a specific webpage, in a specific region.