Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AnalyticsListParams
- type AnalyticsListParamsQuery
- type AnalyticsListParamsQueryDimension
- type AnalyticsListParamsQueryMetric
- type AnalyticsListResponseEnvelope
- type AnalyticsListResponseEnvelopeSuccess
- type AnalyticsService
- type AnalyticsStoredParams
- type AnalyticsStoredParamsQuery
- type AnalyticsStoredParamsQueryDimension
- type AnalyticsStoredParamsQueryMetric
- type AnalyticsStoredResponseEnvelope
- type AnalyticsStoredResponseEnvelopeSuccess
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Components
- type ComponentsData
- type ComponentsQuery
- type Error
- type ErrorData
- type MemberParam
- type MemberRoleParam
- type MemberRolesPermissionsParam
- type MemberStatus
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type RatePlan
- type RatePlanParam
- type ResponseInfo
- type Role
- type Schema
- type SchemaData
- type SchemaQuery
- type SortDirection
- type StorageService
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsListParams ¶
type AnalyticsListParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` // For specifying result metrics. Query param.Field[AnalyticsListParamsQuery] `query:"query"` }
func (AnalyticsListParams) URLQuery ¶
func (r AnalyticsListParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsListParams's query parameters as `url.Values`.
type AnalyticsListParamsQuery ¶
type AnalyticsListParamsQuery struct { // Can be used to break down the data by given attributes. Dimensions param.Field[[]AnalyticsListParamsQueryDimension] `query:"dimensions"` // Used to filter rows by one or more dimensions. Filters can be combined using OR // and AND boolean logic. AND takes precedence over OR in all the expressions. The // OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. // The AND operator is defined using a semicolon (;) or AND keyword surrounded by // whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) // and needs to be percent-encoded as %3B. Comparison options are: // // | Operator | Name | URL Encoded | // | -------- | ------------------------ | ----------- | // | == | Equals | %3D%3D | // | != | Does not equals | !%3D | // | > | Greater Than | %3E | // | < | Less Than | %3C | // | >= | Greater than or equal to | %3E%3D | // | <= | Less than or equal to | %3C%3D . | Filters param.Field[string] `query:"filters"` // Limit number of returned metrics. Limit param.Field[int64] `query:"limit"` // One or more metrics to compute. Metrics param.Field[[]AnalyticsListParamsQueryMetric] `query:"metrics"` // Start of time interval to query, defaults to 6 hours before request received. Since param.Field[time.Time] `query:"since" format:"date-time"` // Array of dimensions or metrics to sort by, each dimension/metric may be prefixed // by - (descending) or + (ascending). Sort param.Field[[]string] `query:"sort"` // End of time interval to query, defaults to current time. Until param.Field[time.Time] `query:"until" format:"date-time"` }
For specifying result metrics.
func (AnalyticsListParamsQuery) URLQuery ¶
func (r AnalyticsListParamsQuery) URLQuery() (v url.Values)
URLQuery serializes AnalyticsListParamsQuery's query parameters as `url.Values`.
type AnalyticsListParamsQueryDimension ¶
type AnalyticsListParamsQueryDimension string
For drilling down on metrics.
const ( AnalyticsListParamsQueryDimensionAccountID AnalyticsListParamsQueryDimension = "accountId" AnalyticsListParamsQueryDimensionResponseCode AnalyticsListParamsQueryDimension = "responseCode" AnalyticsListParamsQueryDimensionRequestType AnalyticsListParamsQueryDimension = "requestType" )
func (AnalyticsListParamsQueryDimension) IsKnown ¶
func (r AnalyticsListParamsQueryDimension) IsKnown() bool
type AnalyticsListParamsQueryMetric ¶
type AnalyticsListParamsQueryMetric string
A quantitative measurement of KV usage.
const ( AnalyticsListParamsQueryMetricRequests AnalyticsListParamsQueryMetric = "requests" AnalyticsListParamsQueryMetricWriteKiB AnalyticsListParamsQueryMetric = "writeKiB" AnalyticsListParamsQueryMetricReadKiB AnalyticsListParamsQueryMetric = "readKiB" )
func (AnalyticsListParamsQueryMetric) IsKnown ¶
func (r AnalyticsListParamsQueryMetric) IsKnown() bool
type AnalyticsListResponseEnvelope ¶
type AnalyticsListResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success AnalyticsListResponseEnvelopeSuccess `json:"success,required"` // Metrics on Workers KV requests. Result Schema `json:"result"` JSON analyticsListResponseEnvelopeJSON `json:"-"` }
func (*AnalyticsListResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsListResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsListResponseEnvelopeSuccess ¶
type AnalyticsListResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AnalyticsListResponseEnvelopeSuccessTrue AnalyticsListResponseEnvelopeSuccess = true
)
func (AnalyticsListResponseEnvelopeSuccess) IsKnown ¶
func (r AnalyticsListResponseEnvelopeSuccess) IsKnown() bool
type AnalyticsService ¶
type AnalyticsService struct {
Options []option.RequestOption
}
AnalyticsService 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 NewAnalyticsService method instead.
func NewAnalyticsService ¶
func NewAnalyticsService(opts ...option.RequestOption) (r *AnalyticsService)
NewAnalyticsService 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 (*AnalyticsService) List ¶
func (r *AnalyticsService) List(ctx context.Context, params AnalyticsListParams, opts ...option.RequestOption) (res *Schema, err error)
Retrieves Workers KV request metrics for the given account.
func (*AnalyticsService) Stored ¶
func (r *AnalyticsService) Stored(ctx context.Context, params AnalyticsStoredParams, opts ...option.RequestOption) (res *Components, err error)
Retrieves Workers KV stored data metrics for the given account.
type AnalyticsStoredParams ¶
type AnalyticsStoredParams struct { // Identifier AccountID param.Field[string] `path:"account_id,required"` // For specifying result metrics. Query param.Field[AnalyticsStoredParamsQuery] `query:"query"` }
func (AnalyticsStoredParams) URLQuery ¶
func (r AnalyticsStoredParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsStoredParams's query parameters as `url.Values`.
type AnalyticsStoredParamsQuery ¶
type AnalyticsStoredParamsQuery struct { // Can be used to break down the data by given attributes. Dimensions param.Field[[]AnalyticsStoredParamsQueryDimension] `query:"dimensions"` // Used to filter rows by one or more dimensions. Filters can be combined using OR // and AND boolean logic. AND takes precedence over OR in all the expressions. The // OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. // The AND operator is defined using a semicolon (;) or AND keyword surrounded by // whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) // and needs to be percent-encoded as %3B. Comparison options are: // // | Operator | Name | URL Encoded | // | -------- | ------------------------ | ----------- | // | == | Equals | %3D%3D | // | != | Does not equals | !%3D | // | > | Greater Than | %3E | // | < | Less Than | %3C | // | >= | Greater than or equal to | %3E%3D | // | <= | Less than or equal to | %3C%3D . | Filters param.Field[string] `query:"filters"` // Limit number of returned metrics. Limit param.Field[int64] `query:"limit"` // One or more metrics to compute. Metrics param.Field[[]AnalyticsStoredParamsQueryMetric] `query:"metrics"` // Start of time interval to query, defaults to 6 hours before request received. Since param.Field[time.Time] `query:"since" format:"date-time"` // Array of dimensions or metrics to sort by, each dimension/metric may be prefixed // by - (descending) or + (ascending). Sort param.Field[[]string] `query:"sort"` // End of time interval to query, defaults to current time. Until param.Field[time.Time] `query:"until" format:"date-time"` }
For specifying result metrics.
func (AnalyticsStoredParamsQuery) URLQuery ¶
func (r AnalyticsStoredParamsQuery) URLQuery() (v url.Values)
URLQuery serializes AnalyticsStoredParamsQuery's query parameters as `url.Values`.
type AnalyticsStoredParamsQueryDimension ¶
type AnalyticsStoredParamsQueryDimension string
For drilling down on metrics.
const (
AnalyticsStoredParamsQueryDimensionNamespaceID AnalyticsStoredParamsQueryDimension = "namespaceId"
)
func (AnalyticsStoredParamsQueryDimension) IsKnown ¶
func (r AnalyticsStoredParamsQueryDimension) IsKnown() bool
type AnalyticsStoredParamsQueryMetric ¶
type AnalyticsStoredParamsQueryMetric string
A quantitative measurement of KV usage.
const ( AnalyticsStoredParamsQueryMetricStoredBytes AnalyticsStoredParamsQueryMetric = "storedBytes" AnalyticsStoredParamsQueryMetricStoredKeys AnalyticsStoredParamsQueryMetric = "storedKeys" )
func (AnalyticsStoredParamsQueryMetric) IsKnown ¶
func (r AnalyticsStoredParamsQueryMetric) IsKnown() bool
type AnalyticsStoredResponseEnvelope ¶
type AnalyticsStoredResponseEnvelope struct { Errors []shared.ResponseInfo `json:"errors,required"` Messages []shared.ResponseInfo `json:"messages,required"` // Whether the API call was successful Success AnalyticsStoredResponseEnvelopeSuccess `json:"success,required"` // Metrics on Workers KV requests. Result Components `json:"result"` JSON analyticsStoredResponseEnvelopeJSON `json:"-"` }
func (*AnalyticsStoredResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsStoredResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsStoredResponseEnvelopeSuccess ¶
type AnalyticsStoredResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AnalyticsStoredResponseEnvelopeSuccessTrue AnalyticsStoredResponseEnvelopeSuccess = true
)
func (AnalyticsStoredResponseEnvelopeSuccess) IsKnown ¶
func (r AnalyticsStoredResponseEnvelopeSuccess) IsKnown() bool
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type CertificateCA ¶
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 Components ¶
type Components struct { Data []ComponentsData `json:"data,required,nullable"` // Number of seconds between current time and last processed event, i.e. how many // seconds of data could be missing. DataLag float64 `json:"data_lag,required"` // Maximum results for each metric. Max map[string]float64 `json:"max,required"` // Minimum results for each metric. Min map[string]float64 `json:"min,required"` // For specifying result metrics. Query ComponentsQuery `json:"query,required"` // Total number of rows in the result. Rows float64 `json:"rows,required"` // Total results for metrics across all data. Totals map[string]float64 `json:"totals,required"` // Time interval buckets by beginning and ending TimeIntervals [][]time.Time `json:"time_intervals" format:"date-time"` JSON componentsJSON `json:"-"` }
Metrics on Workers KV requests.
func (*Components) UnmarshalJSON ¶
func (r *Components) UnmarshalJSON(data []byte) (err error)
type ComponentsData ¶
type ComponentsData struct { // List of metrics returned by the query. Metrics [][]float64 `json:"metrics,required"` Dimensions []string `json:"dimensions"` JSON componentsDataJSON `json:"-"` }
func (*ComponentsData) UnmarshalJSON ¶
func (r *ComponentsData) UnmarshalJSON(data []byte) (err error)
type ComponentsQuery ¶
type ComponentsQuery struct { // Can be used to break down the data by given attributes. Dimensions []string `json:"dimensions"` // Used to filter rows by one or more dimensions. Filters can be combined using OR // and AND boolean logic. AND takes precedence over OR in all the expressions. The // OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. // The AND operator is defined using a semicolon (;) or AND keyword surrounded by // whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) // and needs to be percent-encoded as %3B. Comparison options are: // // | Operator | Name | URL Encoded | // | -------- | ------------------------ | ----------- | // | == | Equals | %3D%3D | // | != | Does not equals | !%3D | // | > | Greater Than | %3E | // | < | Less Than | %3C | // | >= | Greater than or equal to | %3E%3D | // | <= | Less than or equal to | %3C%3D . | Filters string `json:"filters"` // Limit number of returned metrics. Limit int64 `json:"limit"` // One or more metrics to compute. Metrics []string `json:"metrics"` // Start of time interval to query, defaults to 6 hours before request received. Since time.Time `json:"since" format:"date-time"` // Array of dimensions or metrics to sort by, each dimension/metric may be prefixed // by - (descending) or + (ascending). Sort []string `json:"sort"` // End of time interval to query, defaults to current time. Until time.Time `json:"until" format:"date-time"` JSON componentsQueryJSON `json:"-"` }
For specifying result metrics.
func (*ComponentsQuery) UnmarshalJSON ¶
func (r *ComponentsQuery) UnmarshalJSON(data []byte) (err error)
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 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 RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type Schema ¶
type Schema struct { Data []SchemaData `json:"data,required,nullable"` // Number of seconds between current time and last processed event, i.e. how many // seconds of data could be missing. DataLag float64 `json:"data_lag,required"` // Maximum results for each metric. Max map[string]float64 `json:"max,required"` // Minimum results for each metric. Min map[string]float64 `json:"min,required"` // For specifying result metrics. Query SchemaQuery `json:"query,required"` // Total number of rows in the result. Rows float64 `json:"rows,required"` // Total results for metrics across all data. Totals map[string]float64 `json:"totals,required"` // Time interval buckets by beginning and ending TimeIntervals [][]time.Time `json:"time_intervals" format:"date-time"` JSON schemaJSON `json:"-"` }
Metrics on Workers KV requests.
func (*Schema) UnmarshalJSON ¶
type SchemaData ¶
type SchemaData struct { // List of metrics returned by the query. Metrics [][]float64 `json:"metrics,required"` Dimensions []string `json:"dimensions"` JSON schemaDataJSON `json:"-"` }
func (*SchemaData) UnmarshalJSON ¶
func (r *SchemaData) UnmarshalJSON(data []byte) (err error)
type SchemaQuery ¶
type SchemaQuery struct { // Can be used to break down the data by given attributes. Dimensions []string `json:"dimensions"` // Used to filter rows by one or more dimensions. Filters can be combined using OR // and AND boolean logic. AND takes precedence over OR in all the expressions. The // OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. // The AND operator is defined using a semicolon (;) or AND keyword surrounded by // whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) // and needs to be percent-encoded as %3B. Comparison options are: // // | Operator | Name | URL Encoded | // | -------- | ------------------------ | ----------- | // | == | Equals | %3D%3D | // | != | Does not equals | !%3D | // | > | Greater Than | %3E | // | < | Less Than | %3C | // | >= | Greater than or equal to | %3E%3D | // | <= | Less than or equal to | %3C%3D . | Filters string `json:"filters"` // Limit number of returned metrics. Limit int64 `json:"limit"` // One or more metrics to compute. Metrics []string `json:"metrics"` // Start of time interval to query, defaults to 6 hours before request received. Since time.Time `json:"since" format:"date-time"` // Array of dimensions or metrics to sort by, each dimension/metric may be prefixed // by - (descending) or + (ascending). Sort []string `json:"sort"` // End of time interval to query, defaults to current time. Until time.Time `json:"until" format:"date-time"` JSON schemaQueryJSON `json:"-"` }
For specifying result metrics.
func (*SchemaQuery) UnmarshalJSON ¶
func (r *SchemaQuery) UnmarshalJSON(data []byte) (err error)
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type StorageService ¶
type StorageService struct { Options []option.RequestOption Analytics *AnalyticsService }
StorageService 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 NewStorageService method instead.
func NewStorageService ¶
func NewStorageService(opts ...option.RequestOption) (r *StorageService)
NewStorageService 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 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.