Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AnalyticsAggregateCurrentGetParams
- type AnalyticsAggregateCurrentGetResponse
- type AnalyticsAggregateCurrentGetResponseEnvelope
- type AnalyticsAggregateCurrentGetResponseEnvelopeErrors
- type AnalyticsAggregateCurrentGetResponseEnvelopeErrorsSource
- type AnalyticsAggregateCurrentGetResponseEnvelopeMessages
- type AnalyticsAggregateCurrentGetResponseEnvelopeMessagesSource
- type AnalyticsAggregateCurrentGetResponseEnvelopeSuccess
- type AnalyticsAggregateCurrentService
- type AnalyticsAggregateService
- type AnalyticsEventBytimeGetParams
- type AnalyticsEventBytimeGetParamsMetric
- type AnalyticsEventBytimeGetParamsTimeDelta
- type AnalyticsEventBytimeGetResponse
- type AnalyticsEventBytimeGetResponseData
- type AnalyticsEventBytimeGetResponseDataMetricsArray
- type AnalyticsEventBytimeGetResponseDataMetricsUnion
- type AnalyticsEventBytimeGetResponseEnvelope
- type AnalyticsEventBytimeGetResponseEnvelopeErrors
- type AnalyticsEventBytimeGetResponseEnvelopeErrorsSource
- type AnalyticsEventBytimeGetResponseEnvelopeMessages
- type AnalyticsEventBytimeGetResponseEnvelopeMessagesSource
- type AnalyticsEventBytimeGetResponseEnvelopeSuccess
- type AnalyticsEventBytimeGetResponseQuery
- type AnalyticsEventBytimeGetResponseQueryMetric
- type AnalyticsEventBytimeService
- type AnalyticsEventService
- type AnalyticsEventSummaryGetParams
- type AnalyticsEventSummaryGetParamsMetric
- type AnalyticsEventSummaryGetResponse
- type AnalyticsEventSummaryGetResponseData
- type AnalyticsEventSummaryGetResponseDataMetricsArray
- type AnalyticsEventSummaryGetResponseDataMetricsUnion
- type AnalyticsEventSummaryGetResponseEnvelope
- type AnalyticsEventSummaryGetResponseEnvelopeErrors
- type AnalyticsEventSummaryGetResponseEnvelopeErrorsSource
- type AnalyticsEventSummaryGetResponseEnvelopeMessages
- type AnalyticsEventSummaryGetResponseEnvelopeMessagesSource
- type AnalyticsEventSummaryGetResponseEnvelopeSuccess
- type AnalyticsEventSummaryGetResponseQuery
- type AnalyticsEventSummaryGetResponseQueryMetric
- type AnalyticsEventSummaryService
- type AnalyticsService
- type AppDeleteParams
- type AppDeleteResponse
- type AppDeleteResponseEnvelope
- type AppDeleteResponseEnvelopeErrors
- type AppDeleteResponseEnvelopeErrorsSource
- type AppDeleteResponseEnvelopeMessages
- type AppDeleteResponseEnvelopeMessagesSource
- type AppDeleteResponseEnvelopeSuccess
- type AppGetParams
- type AppGetResponse
- type AppGetResponseEnvelope
- type AppGetResponseEnvelopeErrors
- type AppGetResponseEnvelopeErrorsSource
- type AppGetResponseEnvelopeMessages
- type AppGetResponseEnvelopeMessagesSource
- type AppGetResponseEnvelopeSuccess
- type AppGetResponseOriginWorkerStatus
- type AppGetResponseProxyProtocol
- type AppGetResponseSpectrumConfigAppConfig
- type AppGetResponseSpectrumConfigAppConfigOriginWorkerStatus
- type AppGetResponseSpectrumConfigAppConfigProxyProtocol
- type AppGetResponseSpectrumConfigAppConfigTLS
- type AppGetResponseSpectrumConfigAppConfigTrafficType
- type AppGetResponseSpectrumConfigPaygoAppConfig
- type AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus
- type AppGetResponseSpectrumConfigPaygoAppConfigTrafficType
- type AppGetResponseTLS
- type AppGetResponseTrafficType
- type AppGetResponseUnion
- type AppListParams
- type AppListParamsDirection
- type AppListParamsOrder
- type AppListResponse
- type AppListResponseOriginWorkerStatus
- type AppListResponseProxyProtocol
- type AppListResponseSpectrumConfigAppConfig
- type AppListResponseSpectrumConfigAppConfigOriginWorkerStatus
- type AppListResponseSpectrumConfigAppConfigProxyProtocol
- type AppListResponseSpectrumConfigAppConfigTLS
- type AppListResponseSpectrumConfigAppConfigTrafficType
- type AppListResponseSpectrumConfigPaygoAppConfig
- type AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus
- type AppListResponseSpectrumConfigPaygoAppConfigTrafficType
- type AppListResponseTLS
- type AppListResponseTrafficType
- type AppListResponseUnion
- type AppNewParams
- type AppNewParamsBody
- type AppNewParamsBodyOriginWorkerStatus
- type AppNewParamsBodyProxyProtocol
- type AppNewParamsBodySpectrumConfigAppConfig
- type AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatus
- type AppNewParamsBodySpectrumConfigAppConfigProxyProtocol
- type AppNewParamsBodySpectrumConfigAppConfigTLS
- type AppNewParamsBodySpectrumConfigAppConfigTrafficType
- type AppNewParamsBodySpectrumConfigPaygoAppConfig
- type AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus
- type AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficType
- type AppNewParamsBodyTLS
- type AppNewParamsBodyTrafficType
- type AppNewParamsBodyUnion
- type AppNewResponse
- type AppNewResponseEnvelope
- type AppNewResponseEnvelopeErrors
- type AppNewResponseEnvelopeErrorsSource
- type AppNewResponseEnvelopeMessages
- type AppNewResponseEnvelopeMessagesSource
- type AppNewResponseEnvelopeSuccess
- type AppNewResponseOriginWorkerStatus
- type AppNewResponseProxyProtocol
- type AppNewResponseSpectrumConfigAppConfig
- type AppNewResponseSpectrumConfigAppConfigOriginWorkerStatus
- type AppNewResponseSpectrumConfigAppConfigProxyProtocol
- type AppNewResponseSpectrumConfigAppConfigTLS
- type AppNewResponseSpectrumConfigAppConfigTrafficType
- type AppNewResponseSpectrumConfigPaygoAppConfig
- type AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus
- type AppNewResponseSpectrumConfigPaygoAppConfigTrafficType
- type AppNewResponseTLS
- type AppNewResponseTrafficType
- type AppNewResponseUnion
- type AppService
- func (r *AppService) Delete(ctx context.Context, appID string, body AppDeleteParams, ...) (res *AppDeleteResponse, err error)
- func (r *AppService) Get(ctx context.Context, appID string, query AppGetParams, ...) (res *AppGetResponse, err error)
- func (r *AppService) List(ctx context.Context, params AppListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AppListResponse], err error)
- func (r *AppService) ListAutoPaging(ctx context.Context, params AppListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AppListResponse]
- func (r *AppService) New(ctx context.Context, params AppNewParams, opts ...option.RequestOption) (res *AppNewResponse, err error)
- func (r *AppService) Update(ctx context.Context, appID string, params AppUpdateParams, ...) (res *AppUpdateResponse, err error)
- type AppUpdateParams
- type AppUpdateParamsBody
- type AppUpdateParamsBodyOriginWorkerStatus
- type AppUpdateParamsBodyProxyProtocol
- type AppUpdateParamsBodySpectrumConfigAppConfig
- type AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatus
- type AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol
- type AppUpdateParamsBodySpectrumConfigAppConfigTLS
- type AppUpdateParamsBodySpectrumConfigAppConfigTrafficType
- type AppUpdateParamsBodySpectrumConfigPaygoAppConfig
- type AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus
- type AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficType
- type AppUpdateParamsBodyTLS
- type AppUpdateParamsBodyTrafficType
- type AppUpdateParamsBodyUnion
- type AppUpdateResponse
- type AppUpdateResponseEnvelope
- type AppUpdateResponseEnvelopeErrors
- type AppUpdateResponseEnvelopeErrorsSource
- type AppUpdateResponseEnvelopeMessages
- type AppUpdateResponseEnvelopeMessagesSource
- type AppUpdateResponseEnvelopeSuccess
- type AppUpdateResponseOriginWorkerStatus
- type AppUpdateResponseProxyProtocol
- type AppUpdateResponseSpectrumConfigAppConfig
- type AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatus
- type AppUpdateResponseSpectrumConfigAppConfigProxyProtocol
- type AppUpdateResponseSpectrumConfigAppConfigTLS
- type AppUpdateResponseSpectrumConfigAppConfigTrafficType
- type AppUpdateResponseSpectrumConfigPaygoAppConfig
- type AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus
- type AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficType
- type AppUpdateResponseTLS
- type AppUpdateResponseTrafficType
- type AppUpdateResponseUnion
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConfigSrc
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type DNS
- type DNSParam
- type DNSType
- type Dimension
- type EdgeIPs
- type EdgeIPsConnectivity
- type EdgeIPsDynamic
- type EdgeIPsDynamicConnectivity
- type EdgeIPsDynamicParam
- type EdgeIPsDynamicType
- type EdgeIPsParam
- type EdgeIPsStatic
- type EdgeIPsStaticParam
- type EdgeIPsStaticType
- type EdgeIPsType
- type EdgeIPsUnion
- type EdgeIPsUnionParam
- type Error
- type ErrorData
- type ErrorDataSource
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type OriginDNS
- type OriginDNSParam
- type OriginDNSType
- type OriginPortUnion
- type OriginPortUnionParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type ProtocolListParams
- type ProtocolListResponse
- type ProtocolService
- func (r *ProtocolService) List(ctx context.Context, query ProtocolListParams, opts ...option.RequestOption) (res *pagination.SinglePage[ProtocolListResponse], err error)
- func (r *ProtocolService) ListAutoPaging(ctx context.Context, query ProtocolListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ProtocolListResponse]
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type SortDirection
- type SpectrumService
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenPolicyResourcesIAMResourcesTypeObjectNested
- type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
- type TokenPolicyResourcesIAMResourcesTypeObjectString
- type TokenPolicyResourcesIAMResourcesTypeObjectStringParam
- type TokenPolicyResourcesUnion
- type TokenPolicyResourcesUnionParam
- type TokenStatus
- type TokenValue
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 CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare
This is an alias to an internal value.
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal
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 CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
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 RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
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.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsAggregateCurrentGetParams ¶
type AnalyticsAggregateCurrentGetParams struct {
// Identifier.
ZoneID param.Field[string] `path:"zone_id" api:"required"`
// Comma-delimited list of Spectrum Application Id(s). If provided, the response
// will be limited to Spectrum Application Id(s) that match.
AppID param.Field[string] `query:"appID"`
// Co-location identifier.
ColoName param.Field[string] `query:"colo_name"`
}
func (AnalyticsAggregateCurrentGetParams) URLQuery ¶
func (r AnalyticsAggregateCurrentGetParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsAggregateCurrentGetParams's query parameters as `url.Values`.
type AnalyticsAggregateCurrentGetResponse ¶
type AnalyticsAggregateCurrentGetResponse struct {
// Application identifier.
AppID string `json:"appID" api:"required"`
// Number of bytes sent.
BytesEgress float64 `json:"bytesEgress" api:"required"`
// Number of bytes received.
BytesIngress float64 `json:"bytesIngress" api:"required"`
// Number of connections.
Connections float64 `json:"connections" api:"required"`
// Average duration of connections.
DurationAvg float64 `json:"durationAvg" api:"required"`
JSON analyticsAggregateCurrentGetResponseJSON `json:"-"`
}
func (*AnalyticsAggregateCurrentGetResponse) UnmarshalJSON ¶
func (r *AnalyticsAggregateCurrentGetResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsAggregateCurrentGetResponseEnvelope ¶
type AnalyticsAggregateCurrentGetResponseEnvelope struct {
Errors []AnalyticsAggregateCurrentGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AnalyticsAggregateCurrentGetResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success AnalyticsAggregateCurrentGetResponseEnvelopeSuccess `json:"success" api:"required"`
Result []AnalyticsAggregateCurrentGetResponse `json:"result"`
JSON analyticsAggregateCurrentGetResponseEnvelopeJSON `json:"-"`
}
func (*AnalyticsAggregateCurrentGetResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsAggregateCurrentGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsAggregateCurrentGetResponseEnvelopeErrors ¶
type AnalyticsAggregateCurrentGetResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AnalyticsAggregateCurrentGetResponseEnvelopeErrorsSource `json:"source"`
JSON analyticsAggregateCurrentGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AnalyticsAggregateCurrentGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AnalyticsAggregateCurrentGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AnalyticsAggregateCurrentGetResponseEnvelopeErrorsSource ¶
type AnalyticsAggregateCurrentGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON analyticsAggregateCurrentGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AnalyticsAggregateCurrentGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AnalyticsAggregateCurrentGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AnalyticsAggregateCurrentGetResponseEnvelopeMessages ¶
type AnalyticsAggregateCurrentGetResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AnalyticsAggregateCurrentGetResponseEnvelopeMessagesSource `json:"source"`
JSON analyticsAggregateCurrentGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AnalyticsAggregateCurrentGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AnalyticsAggregateCurrentGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AnalyticsAggregateCurrentGetResponseEnvelopeMessagesSource ¶
type AnalyticsAggregateCurrentGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON analyticsAggregateCurrentGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AnalyticsAggregateCurrentGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AnalyticsAggregateCurrentGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AnalyticsAggregateCurrentGetResponseEnvelopeSuccess ¶
type AnalyticsAggregateCurrentGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AnalyticsAggregateCurrentGetResponseEnvelopeSuccessTrue AnalyticsAggregateCurrentGetResponseEnvelopeSuccess = true
)
func (AnalyticsAggregateCurrentGetResponseEnvelopeSuccess) IsKnown ¶
func (r AnalyticsAggregateCurrentGetResponseEnvelopeSuccess) IsKnown() bool
type AnalyticsAggregateCurrentService ¶
type AnalyticsAggregateCurrentService struct {
Options []option.RequestOption
}
AnalyticsAggregateCurrentService 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 NewAnalyticsAggregateCurrentService method instead.
func NewAnalyticsAggregateCurrentService ¶
func NewAnalyticsAggregateCurrentService(opts ...option.RequestOption) (r *AnalyticsAggregateCurrentService)
NewAnalyticsAggregateCurrentService 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 (*AnalyticsAggregateCurrentService) Get ¶
func (r *AnalyticsAggregateCurrentService) Get(ctx context.Context, params AnalyticsAggregateCurrentGetParams, opts ...option.RequestOption) (res *[]AnalyticsAggregateCurrentGetResponse, err error)
Retrieves analytics aggregated from the last minute of usage on Spectrum applications underneath a given zone.
type AnalyticsAggregateService ¶
type AnalyticsAggregateService struct {
Options []option.RequestOption
Currents *AnalyticsAggregateCurrentService
}
AnalyticsAggregateService 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 NewAnalyticsAggregateService method instead.
func NewAnalyticsAggregateService ¶
func NewAnalyticsAggregateService(opts ...option.RequestOption) (r *AnalyticsAggregateService)
NewAnalyticsAggregateService 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 AnalyticsEventBytimeGetParams ¶
type AnalyticsEventBytimeGetParams struct {
// Identifier.
ZoneID param.Field[string] `path:"zone_id" api:"required"`
// Used to select time series resolution.
TimeDelta param.Field[AnalyticsEventBytimeGetParamsTimeDelta] `query:"time_delta" api:"required"`
// Can be used to break down the data by given attributes. Options are:
//
// | Dimension | Name | Example |
// | --------- | ----------------------------- | ---------------------------------------------------------- |
// | event | Connection Event | connect, progress, disconnect, originError, clientFiltered |
// | appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85 |
// | coloName | Colo Name | SFO |
// | ipVersion | IP version used by the client | 4, 6. |
Dimensions param.Field[[]Dimension] `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 |
//
// Use the above to construct filters.
Filters param.Field[string] `query:"filters"`
// One or more metrics to compute. Options are:
//
// | Metric | Name | Example | Unit |
// | -------------- | ----------------------------------- | ------- | --------------------- |
// | count | Count of total events | 1000 | Count |
// | bytesIngress | Sum of ingress bytes | 1000 | Sum |
// | bytesEgress | Sum of egress bytes | 1000 | Sum |
// | durationAvg | Average connection duration | 1.0 | Time in milliseconds |
// | durationMedian | Median connection duration | 1.0 | Time in milliseconds |
// | duration90th | 90th percentile connection duration | 1.0 | Time in milliseconds |
// | duration99th | 99th percentile connection duration | 1.0 | Time in milliseconds. |
Metrics param.Field[[]AnalyticsEventBytimeGetParamsMetric] `query:"metrics"`
// Start of time interval to query, defaults to `until` - 6 hours. Timestamp must
// be in RFC3339 format and uses UTC unless otherwise specified.
Since param.Field[time.Time] `query:"since" format:"date-time"`
// The sort order for the result set; sort fields must be included in `metrics` or
// `dimensions`.
Sort param.Field[[]string] `query:"sort"`
// End of time interval to query, defaults to current time. Timestamp must be in
// RFC3339 format and uses UTC unless otherwise specified.
Until param.Field[time.Time] `query:"until" format:"date-time"`
}
func (AnalyticsEventBytimeGetParams) URLQuery ¶
func (r AnalyticsEventBytimeGetParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsEventBytimeGetParams's query parameters as `url.Values`.
type AnalyticsEventBytimeGetParamsMetric ¶
type AnalyticsEventBytimeGetParamsMetric string
const ( AnalyticsEventBytimeGetParamsMetricCount AnalyticsEventBytimeGetParamsMetric = "count" AnalyticsEventBytimeGetParamsMetricBytesIngress AnalyticsEventBytimeGetParamsMetric = "bytesIngress" AnalyticsEventBytimeGetParamsMetricBytesEgress AnalyticsEventBytimeGetParamsMetric = "bytesEgress" AnalyticsEventBytimeGetParamsMetricDurationAvg AnalyticsEventBytimeGetParamsMetric = "durationAvg" AnalyticsEventBytimeGetParamsMetricDurationMedian AnalyticsEventBytimeGetParamsMetric = "durationMedian" AnalyticsEventBytimeGetParamsMetricDuration90th AnalyticsEventBytimeGetParamsMetric = "duration90th" AnalyticsEventBytimeGetParamsMetricDuration99th AnalyticsEventBytimeGetParamsMetric = "duration99th" )
func (AnalyticsEventBytimeGetParamsMetric) IsKnown ¶
func (r AnalyticsEventBytimeGetParamsMetric) IsKnown() bool
type AnalyticsEventBytimeGetParamsTimeDelta ¶
type AnalyticsEventBytimeGetParamsTimeDelta string
Used to select time series resolution.
const ( AnalyticsEventBytimeGetParamsTimeDeltaYear AnalyticsEventBytimeGetParamsTimeDelta = "year" AnalyticsEventBytimeGetParamsTimeDeltaQuarter AnalyticsEventBytimeGetParamsTimeDelta = "quarter" AnalyticsEventBytimeGetParamsTimeDeltaMonth AnalyticsEventBytimeGetParamsTimeDelta = "month" AnalyticsEventBytimeGetParamsTimeDeltaWeek AnalyticsEventBytimeGetParamsTimeDelta = "week" AnalyticsEventBytimeGetParamsTimeDeltaDay AnalyticsEventBytimeGetParamsTimeDelta = "day" AnalyticsEventBytimeGetParamsTimeDeltaHour AnalyticsEventBytimeGetParamsTimeDelta = "hour" AnalyticsEventBytimeGetParamsTimeDeltaDekaminute AnalyticsEventBytimeGetParamsTimeDelta = "dekaminute" AnalyticsEventBytimeGetParamsTimeDeltaMinute AnalyticsEventBytimeGetParamsTimeDelta = "minute" )
func (AnalyticsEventBytimeGetParamsTimeDelta) IsKnown ¶
func (r AnalyticsEventBytimeGetParamsTimeDelta) IsKnown() bool
type AnalyticsEventBytimeGetResponse ¶
type AnalyticsEventBytimeGetResponse struct {
// List of columns returned by the analytics query.
Data []AnalyticsEventBytimeGetResponseData `json:"data" api:"required"`
// 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" api:"required"`
// Maximum result for each selected metrics across all data.
Max map[string]float64 `json:"max" api:"required"`
// Minimum result for each selected metrics across all data.
Min map[string]float64 `json:"min" api:"required"`
Query AnalyticsEventBytimeGetResponseQuery `json:"query" api:"required"`
// Total number of rows in the result.
Rows float64 `json:"rows" api:"required"`
// Total result for each selected metrics across all data.
Totals map[string]float64 `json:"totals" api:"required"`
// List of time interval buckets: [start, end].
TimeIntervals [][]time.Time `json:"time_intervals" format:"date-time"`
JSON analyticsEventBytimeGetResponseJSON `json:"-"`
}
func (*AnalyticsEventBytimeGetResponse) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseData ¶
type AnalyticsEventBytimeGetResponseData struct {
Dimensions []string `json:"dimensions"`
Metrics AnalyticsEventBytimeGetResponseDataMetricsUnion `json:"metrics"`
JSON analyticsEventBytimeGetResponseDataJSON `json:"-"`
}
func (*AnalyticsEventBytimeGetResponseData) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseData) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseDataMetricsArray ¶
type AnalyticsEventBytimeGetResponseDataMetricsArray []float64
type AnalyticsEventBytimeGetResponseDataMetricsUnion ¶
type AnalyticsEventBytimeGetResponseDataMetricsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AnalyticsEventBytimeGetResponseDataMetricsArray or AnalyticsEventBytimeGetResponseDataMetricsArray.
type AnalyticsEventBytimeGetResponseEnvelope ¶
type AnalyticsEventBytimeGetResponseEnvelope struct {
Errors []AnalyticsEventBytimeGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AnalyticsEventBytimeGetResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success AnalyticsEventBytimeGetResponseEnvelopeSuccess `json:"success" api:"required"`
Result AnalyticsEventBytimeGetResponse `json:"result"`
JSON analyticsEventBytimeGetResponseEnvelopeJSON `json:"-"`
}
func (*AnalyticsEventBytimeGetResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseEnvelopeErrors ¶
type AnalyticsEventBytimeGetResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AnalyticsEventBytimeGetResponseEnvelopeErrorsSource `json:"source"`
JSON analyticsEventBytimeGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AnalyticsEventBytimeGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseEnvelopeErrorsSource ¶
type AnalyticsEventBytimeGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON analyticsEventBytimeGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AnalyticsEventBytimeGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseEnvelopeMessages ¶
type AnalyticsEventBytimeGetResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AnalyticsEventBytimeGetResponseEnvelopeMessagesSource `json:"source"`
JSON analyticsEventBytimeGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AnalyticsEventBytimeGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseEnvelopeMessagesSource ¶
type AnalyticsEventBytimeGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON analyticsEventBytimeGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AnalyticsEventBytimeGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseEnvelopeSuccess ¶
type AnalyticsEventBytimeGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AnalyticsEventBytimeGetResponseEnvelopeSuccessTrue AnalyticsEventBytimeGetResponseEnvelopeSuccess = true
)
func (AnalyticsEventBytimeGetResponseEnvelopeSuccess) IsKnown ¶
func (r AnalyticsEventBytimeGetResponseEnvelopeSuccess) IsKnown() bool
type AnalyticsEventBytimeGetResponseQuery ¶
type AnalyticsEventBytimeGetResponseQuery struct {
// Can be used to break down the data by given attributes. Options are:
//
// | Dimension | Name | Example |
// | --------- | ----------------------------- | ---------------------------------------------------------- |
// | event | Connection Event | connect, progress, disconnect, originError, clientFiltered |
// | appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85 |
// | coloName | Colo Name | SFO |
// | ipVersion | IP version used by the client | 4, 6. |
Dimensions []Dimension `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 |
//
// Use the above to construct filters.
Filters string `json:"filters"`
// Limit number of returned metrics.
Limit float64 `json:"limit"`
// One or more metrics to compute. Options are:
//
// | Metric | Name | Example | Unit |
// | -------------- | ----------------------------------- | ------- | --------------------- |
// | count | Count of total events | 1000 | Count |
// | bytesIngress | Sum of ingress bytes | 1000 | Sum |
// | bytesEgress | Sum of egress bytes | 1000 | Sum |
// | durationAvg | Average connection duration | 1.0 | Time in milliseconds |
// | durationMedian | Median connection duration | 1.0 | Time in milliseconds |
// | duration90th | 90th percentile connection duration | 1.0 | Time in milliseconds |
// | duration99th | 99th percentile connection duration | 1.0 | Time in milliseconds. |
Metrics []AnalyticsEventBytimeGetResponseQueryMetric `json:"metrics"`
// Start of time interval to query, defaults to `until` - 6 hours. Timestamp must
// be in RFC3339 format and uses UTC unless otherwise specified.
Since time.Time `json:"since" format:"date-time"`
// The sort order for the result set; sort fields must be included in `metrics` or
// `dimensions`.
Sort []string `json:"sort"`
// End of time interval to query, defaults to current time. Timestamp must be in
// RFC3339 format and uses UTC unless otherwise specified.
Until time.Time `json:"until" format:"date-time"`
JSON analyticsEventBytimeGetResponseQueryJSON `json:"-"`
}
func (*AnalyticsEventBytimeGetResponseQuery) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseQuery) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseQueryMetric ¶
type AnalyticsEventBytimeGetResponseQueryMetric string
const ( AnalyticsEventBytimeGetResponseQueryMetricCount AnalyticsEventBytimeGetResponseQueryMetric = "count" AnalyticsEventBytimeGetResponseQueryMetricBytesIngress AnalyticsEventBytimeGetResponseQueryMetric = "bytesIngress" AnalyticsEventBytimeGetResponseQueryMetricBytesEgress AnalyticsEventBytimeGetResponseQueryMetric = "bytesEgress" AnalyticsEventBytimeGetResponseQueryMetricDurationAvg AnalyticsEventBytimeGetResponseQueryMetric = "durationAvg" AnalyticsEventBytimeGetResponseQueryMetricDurationMedian AnalyticsEventBytimeGetResponseQueryMetric = "durationMedian" AnalyticsEventBytimeGetResponseQueryMetricDuration90th AnalyticsEventBytimeGetResponseQueryMetric = "duration90th" AnalyticsEventBytimeGetResponseQueryMetricDuration99th AnalyticsEventBytimeGetResponseQueryMetric = "duration99th" )
func (AnalyticsEventBytimeGetResponseQueryMetric) IsKnown ¶
func (r AnalyticsEventBytimeGetResponseQueryMetric) IsKnown() bool
type AnalyticsEventBytimeService ¶
type AnalyticsEventBytimeService struct {
Options []option.RequestOption
}
AnalyticsEventBytimeService 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 NewAnalyticsEventBytimeService method instead.
func NewAnalyticsEventBytimeService ¶
func NewAnalyticsEventBytimeService(opts ...option.RequestOption) (r *AnalyticsEventBytimeService)
NewAnalyticsEventBytimeService 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 (*AnalyticsEventBytimeService) Get ¶
func (r *AnalyticsEventBytimeService) Get(ctx context.Context, params AnalyticsEventBytimeGetParams, opts ...option.RequestOption) (res *AnalyticsEventBytimeGetResponse, err error)
Retrieves a list of aggregate metrics grouped by time interval.
type AnalyticsEventService ¶
type AnalyticsEventService struct {
Options []option.RequestOption
Bytimes *AnalyticsEventBytimeService
Summaries *AnalyticsEventSummaryService
}
AnalyticsEventService 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 NewAnalyticsEventService method instead.
func NewAnalyticsEventService ¶
func NewAnalyticsEventService(opts ...option.RequestOption) (r *AnalyticsEventService)
NewAnalyticsEventService 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 AnalyticsEventSummaryGetParams ¶
type AnalyticsEventSummaryGetParams struct {
// Identifier.
ZoneID param.Field[string] `path:"zone_id" api:"required"`
// Can be used to break down the data by given attributes. Options are:
//
// | Dimension | Name | Example |
// | --------- | ----------------------------- | ---------------------------------------------------------- |
// | event | Connection Event | connect, progress, disconnect, originError, clientFiltered |
// | appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85 |
// | coloName | Colo Name | SFO |
// | ipVersion | IP version used by the client | 4, 6. |
Dimensions param.Field[[]Dimension] `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 |
//
// Use the above to construct filters.
Filters param.Field[string] `query:"filters"`
// One or more metrics to compute. Options are:
//
// | Metric | Name | Example | Unit |
// | -------------- | ----------------------------------- | ------- | --------------------- |
// | count | Count of total events | 1000 | Count |
// | bytesIngress | Sum of ingress bytes | 1000 | Sum |
// | bytesEgress | Sum of egress bytes | 1000 | Sum |
// | durationAvg | Average connection duration | 1.0 | Time in milliseconds |
// | durationMedian | Median connection duration | 1.0 | Time in milliseconds |
// | duration90th | 90th percentile connection duration | 1.0 | Time in milliseconds |
// | duration99th | 99th percentile connection duration | 1.0 | Time in milliseconds. |
Metrics param.Field[[]AnalyticsEventSummaryGetParamsMetric] `query:"metrics"`
// Start of time interval to query, defaults to `until` - 6 hours. Timestamp must
// be in RFC3339 format and uses UTC unless otherwise specified.
Since param.Field[time.Time] `query:"since" format:"date-time"`
// The sort order for the result set; sort fields must be included in `metrics` or
// `dimensions`.
Sort param.Field[[]string] `query:"sort"`
// End of time interval to query, defaults to current time. Timestamp must be in
// RFC3339 format and uses UTC unless otherwise specified.
Until param.Field[time.Time] `query:"until" format:"date-time"`
}
func (AnalyticsEventSummaryGetParams) URLQuery ¶
func (r AnalyticsEventSummaryGetParams) URLQuery() (v url.Values)
URLQuery serializes AnalyticsEventSummaryGetParams's query parameters as `url.Values`.
type AnalyticsEventSummaryGetParamsMetric ¶
type AnalyticsEventSummaryGetParamsMetric string
const ( AnalyticsEventSummaryGetParamsMetricCount AnalyticsEventSummaryGetParamsMetric = "count" AnalyticsEventSummaryGetParamsMetricBytesIngress AnalyticsEventSummaryGetParamsMetric = "bytesIngress" AnalyticsEventSummaryGetParamsMetricBytesEgress AnalyticsEventSummaryGetParamsMetric = "bytesEgress" AnalyticsEventSummaryGetParamsMetricDurationAvg AnalyticsEventSummaryGetParamsMetric = "durationAvg" AnalyticsEventSummaryGetParamsMetricDurationMedian AnalyticsEventSummaryGetParamsMetric = "durationMedian" AnalyticsEventSummaryGetParamsMetricDuration90th AnalyticsEventSummaryGetParamsMetric = "duration90th" AnalyticsEventSummaryGetParamsMetricDuration99th AnalyticsEventSummaryGetParamsMetric = "duration99th" )
func (AnalyticsEventSummaryGetParamsMetric) IsKnown ¶
func (r AnalyticsEventSummaryGetParamsMetric) IsKnown() bool
type AnalyticsEventSummaryGetResponse ¶
type AnalyticsEventSummaryGetResponse struct {
// List of columns returned by the analytics query.
Data []AnalyticsEventSummaryGetResponseData `json:"data" api:"required"`
// 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" api:"required"`
// Maximum result for each selected metrics across all data.
Max map[string]float64 `json:"max" api:"required"`
// Minimum result for each selected metrics across all data.
Min map[string]float64 `json:"min" api:"required"`
Query AnalyticsEventSummaryGetResponseQuery `json:"query" api:"required"`
// Total number of rows in the result.
Rows float64 `json:"rows" api:"required"`
// Total result for each selected metrics across all data.
Totals map[string]float64 `json:"totals" api:"required"`
// List of time interval buckets: [start, end].
TimeIntervals [][]time.Time `json:"time_intervals" format:"date-time"`
JSON analyticsEventSummaryGetResponseJSON `json:"-"`
}
func (*AnalyticsEventSummaryGetResponse) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponse) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseData ¶
type AnalyticsEventSummaryGetResponseData struct {
Dimensions []string `json:"dimensions"`
Metrics AnalyticsEventSummaryGetResponseDataMetricsUnion `json:"metrics"`
JSON analyticsEventSummaryGetResponseDataJSON `json:"-"`
}
func (*AnalyticsEventSummaryGetResponseData) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseData) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseDataMetricsArray ¶
type AnalyticsEventSummaryGetResponseDataMetricsArray []float64
type AnalyticsEventSummaryGetResponseDataMetricsUnion ¶
type AnalyticsEventSummaryGetResponseDataMetricsUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AnalyticsEventSummaryGetResponseDataMetricsArray or AnalyticsEventSummaryGetResponseDataMetricsArray.
type AnalyticsEventSummaryGetResponseEnvelope ¶
type AnalyticsEventSummaryGetResponseEnvelope struct {
Errors []AnalyticsEventSummaryGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AnalyticsEventSummaryGetResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success AnalyticsEventSummaryGetResponseEnvelopeSuccess `json:"success" api:"required"`
Result AnalyticsEventSummaryGetResponse `json:"result"`
JSON analyticsEventSummaryGetResponseEnvelopeJSON `json:"-"`
}
func (*AnalyticsEventSummaryGetResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseEnvelopeErrors ¶
type AnalyticsEventSummaryGetResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AnalyticsEventSummaryGetResponseEnvelopeErrorsSource `json:"source"`
JSON analyticsEventSummaryGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AnalyticsEventSummaryGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseEnvelopeErrorsSource ¶
type AnalyticsEventSummaryGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON analyticsEventSummaryGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AnalyticsEventSummaryGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseEnvelopeMessages ¶
type AnalyticsEventSummaryGetResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AnalyticsEventSummaryGetResponseEnvelopeMessagesSource `json:"source"`
JSON analyticsEventSummaryGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AnalyticsEventSummaryGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseEnvelopeMessagesSource ¶
type AnalyticsEventSummaryGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON analyticsEventSummaryGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AnalyticsEventSummaryGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseEnvelopeSuccess ¶
type AnalyticsEventSummaryGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AnalyticsEventSummaryGetResponseEnvelopeSuccessTrue AnalyticsEventSummaryGetResponseEnvelopeSuccess = true
)
func (AnalyticsEventSummaryGetResponseEnvelopeSuccess) IsKnown ¶
func (r AnalyticsEventSummaryGetResponseEnvelopeSuccess) IsKnown() bool
type AnalyticsEventSummaryGetResponseQuery ¶
type AnalyticsEventSummaryGetResponseQuery struct {
// Can be used to break down the data by given attributes. Options are:
//
// | Dimension | Name | Example |
// | --------- | ----------------------------- | ---------------------------------------------------------- |
// | event | Connection Event | connect, progress, disconnect, originError, clientFiltered |
// | appID | Application ID | 40d67c87c6cd4b889a4fd57805225e85 |
// | coloName | Colo Name | SFO |
// | ipVersion | IP version used by the client | 4, 6. |
Dimensions []Dimension `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 |
//
// Use the above to construct filters.
Filters string `json:"filters"`
// Limit number of returned metrics.
Limit float64 `json:"limit"`
// One or more metrics to compute. Options are:
//
// | Metric | Name | Example | Unit |
// | -------------- | ----------------------------------- | ------- | --------------------- |
// | count | Count of total events | 1000 | Count |
// | bytesIngress | Sum of ingress bytes | 1000 | Sum |
// | bytesEgress | Sum of egress bytes | 1000 | Sum |
// | durationAvg | Average connection duration | 1.0 | Time in milliseconds |
// | durationMedian | Median connection duration | 1.0 | Time in milliseconds |
// | duration90th | 90th percentile connection duration | 1.0 | Time in milliseconds |
// | duration99th | 99th percentile connection duration | 1.0 | Time in milliseconds. |
Metrics []AnalyticsEventSummaryGetResponseQueryMetric `json:"metrics"`
// Start of time interval to query, defaults to `until` - 6 hours. Timestamp must
// be in RFC3339 format and uses UTC unless otherwise specified.
Since time.Time `json:"since" format:"date-time"`
// The sort order for the result set; sort fields must be included in `metrics` or
// `dimensions`.
Sort []string `json:"sort"`
// End of time interval to query, defaults to current time. Timestamp must be in
// RFC3339 format and uses UTC unless otherwise specified.
Until time.Time `json:"until" format:"date-time"`
JSON analyticsEventSummaryGetResponseQueryJSON `json:"-"`
}
func (*AnalyticsEventSummaryGetResponseQuery) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseQuery) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseQueryMetric ¶
type AnalyticsEventSummaryGetResponseQueryMetric string
const ( AnalyticsEventSummaryGetResponseQueryMetricCount AnalyticsEventSummaryGetResponseQueryMetric = "count" AnalyticsEventSummaryGetResponseQueryMetricBytesIngress AnalyticsEventSummaryGetResponseQueryMetric = "bytesIngress" AnalyticsEventSummaryGetResponseQueryMetricBytesEgress AnalyticsEventSummaryGetResponseQueryMetric = "bytesEgress" AnalyticsEventSummaryGetResponseQueryMetricDurationAvg AnalyticsEventSummaryGetResponseQueryMetric = "durationAvg" AnalyticsEventSummaryGetResponseQueryMetricDurationMedian AnalyticsEventSummaryGetResponseQueryMetric = "durationMedian" AnalyticsEventSummaryGetResponseQueryMetricDuration90th AnalyticsEventSummaryGetResponseQueryMetric = "duration90th" AnalyticsEventSummaryGetResponseQueryMetricDuration99th AnalyticsEventSummaryGetResponseQueryMetric = "duration99th" )
func (AnalyticsEventSummaryGetResponseQueryMetric) IsKnown ¶
func (r AnalyticsEventSummaryGetResponseQueryMetric) IsKnown() bool
type AnalyticsEventSummaryService ¶
type AnalyticsEventSummaryService struct {
Options []option.RequestOption
}
AnalyticsEventSummaryService 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 NewAnalyticsEventSummaryService method instead.
func NewAnalyticsEventSummaryService ¶
func NewAnalyticsEventSummaryService(opts ...option.RequestOption) (r *AnalyticsEventSummaryService)
NewAnalyticsEventSummaryService 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 (*AnalyticsEventSummaryService) Get ¶
func (r *AnalyticsEventSummaryService) Get(ctx context.Context, params AnalyticsEventSummaryGetParams, opts ...option.RequestOption) (res *AnalyticsEventSummaryGetResponse, err error)
Retrieves a list of summarised aggregate metrics over a given time period.
type AnalyticsService ¶
type AnalyticsService struct {
Options []option.RequestOption
Aggregates *AnalyticsAggregateService
Events *AnalyticsEventService
}
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.
type AppDeleteParams ¶
type AppDeleteResponse ¶
type AppDeleteResponse struct {
// Identifier.
ID string `json:"id" api:"required"`
JSON appDeleteResponseJSON `json:"-"`
}
func (*AppDeleteResponse) UnmarshalJSON ¶
func (r *AppDeleteResponse) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelope ¶
type AppDeleteResponseEnvelope struct {
Errors []AppDeleteResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppDeleteResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success AppDeleteResponseEnvelopeSuccess `json:"success" api:"required"`
Result AppDeleteResponse `json:"result" api:"nullable"`
JSON appDeleteResponseEnvelopeJSON `json:"-"`
}
func (*AppDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeErrors ¶
type AppDeleteResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AppDeleteResponseEnvelopeErrorsSource `json:"source"`
JSON appDeleteResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeErrorsSource ¶
type AppDeleteResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON appDeleteResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AppDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeMessages ¶
type AppDeleteResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AppDeleteResponseEnvelopeMessagesSource `json:"source"`
JSON appDeleteResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeMessagesSource ¶
type AppDeleteResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON appDeleteResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AppDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeSuccess ¶
type AppDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AppDeleteResponseEnvelopeSuccessTrue AppDeleteResponseEnvelopeSuccess = true
)
func (AppDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r AppDeleteResponseEnvelopeSuccess) IsKnown() bool
type AppGetParams ¶
type AppGetResponse ¶
type AppGetResponse struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting bool `json:"argo_smart_routing"`
// This field can have the runtime type of [[]string].
EdgeAlpnProtocols interface{} `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs EdgeIPs `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall bool `json:"ip_firewall"`
// This field can have the runtime type of [[]string].
OriginDirect interface{} `json:"origin_direct"`
// The name and type of DNS record for the Spectrum application.
OriginDNS OriginDNS `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort OriginPortUnion `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppGetResponseOriginWorkerStatus `json:"origin_worker_status"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol AppGetResponseProxyProtocol `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS AppGetResponseTLS `json:"tls"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType AppGetResponseTrafficType `json:"traffic_type"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID string `json:"virtual_network_id" format:"uuid"`
JSON appGetResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppGetResponse) AsUnion ¶
func (r AppGetResponse) AsUnion() AppGetResponseUnion
AsUnion returns a AppGetResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppGetResponseSpectrumConfigAppConfig, AppGetResponseSpectrumConfigPaygoAppConfig.
func (*AppGetResponse) UnmarshalJSON ¶
func (r *AppGetResponse) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelope ¶
type AppGetResponseEnvelope struct {
Errors []AppGetResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppGetResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success AppGetResponseEnvelopeSuccess `json:"success" api:"required"`
Result AppGetResponse `json:"result"`
JSON appGetResponseEnvelopeJSON `json:"-"`
}
func (*AppGetResponseEnvelope) UnmarshalJSON ¶
func (r *AppGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeErrors ¶
type AppGetResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AppGetResponseEnvelopeErrorsSource `json:"source"`
JSON appGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeErrorsSource ¶
type AppGetResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON appGetResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AppGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AppGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeMessages ¶
type AppGetResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AppGetResponseEnvelopeMessagesSource `json:"source"`
JSON appGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeMessagesSource ¶
type AppGetResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON appGetResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AppGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AppGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeSuccess ¶
type AppGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AppGetResponseEnvelopeSuccessTrue AppGetResponseEnvelopeSuccess = true
)
func (AppGetResponseEnvelopeSuccess) IsKnown ¶
func (r AppGetResponseEnvelopeSuccess) IsKnown() bool
type AppGetResponseOriginWorkerStatus ¶
type AppGetResponseOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppGetResponseOriginWorkerStatusAvailable AppGetResponseOriginWorkerStatus = "available" AppGetResponseOriginWorkerStatusNotFound AppGetResponseOriginWorkerStatus = "not_found" AppGetResponseOriginWorkerStatusUnknown AppGetResponseOriginWorkerStatus = "unknown" )
func (AppGetResponseOriginWorkerStatus) IsKnown ¶
func (r AppGetResponseOriginWorkerStatus) IsKnown() bool
type AppGetResponseProxyProtocol ¶
type AppGetResponseProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppGetResponseProxyProtocolOff AppGetResponseProxyProtocol = "off" AppGetResponseProxyProtocolV1 AppGetResponseProxyProtocol = "v1" AppGetResponseProxyProtocolV2 AppGetResponseProxyProtocol = "v2" AppGetResponseProxyProtocolSimple AppGetResponseProxyProtocol = "simple" )
func (AppGetResponseProxyProtocol) IsKnown ¶
func (r AppGetResponseProxyProtocol) IsKnown() bool
type AppGetResponseSpectrumConfigAppConfig ¶
type AppGetResponseSpectrumConfigAppConfig struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType AppGetResponseSpectrumConfigAppConfigTrafficType `json:"traffic_type" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting bool `json:"argo_smart_routing"`
// ALPN protocol IDs the edge offers on client TLS connections, in preference
// order, for example `["h2"]` for gRPC or `["postgresql"]` for PostgreSQL direct
// TLS. When set, clients that offer none of these protocols, or no ALPN at all,
// are disconnected. Empty means no ALPN. Notes: Requires tls "flexible", "full" or
// "strict", and is not available with traffic_type "ftp". IDs are case-sensitive
// and unique, each 1 to 255 bytes; the list encodes to at most 65535 bytes,
// counting each ID plus one length byte.
EdgeAlpnProtocols []string `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs EdgeIPs `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall bool `json:"ip_firewall"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect []string `json:"origin_direct" format:"URI"`
// The name and type of DNS record for the Spectrum application.
OriginDNS OriginDNS `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort OriginPortUnion `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppGetResponseSpectrumConfigAppConfigOriginWorkerStatus `json:"origin_worker_status"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol AppGetResponseSpectrumConfigAppConfigProxyProtocol `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS AppGetResponseSpectrumConfigAppConfigTLS `json:"tls"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID string `json:"virtual_network_id" format:"uuid"`
JSON appGetResponseSpectrumConfigAppConfigJSON `json:"-"`
}
func (*AppGetResponseSpectrumConfigAppConfig) UnmarshalJSON ¶
func (r *AppGetResponseSpectrumConfigAppConfig) UnmarshalJSON(data []byte) (err error)
type AppGetResponseSpectrumConfigAppConfigOriginWorkerStatus ¶
type AppGetResponseSpectrumConfigAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppGetResponseSpectrumConfigAppConfigOriginWorkerStatusAvailable AppGetResponseSpectrumConfigAppConfigOriginWorkerStatus = "available" AppGetResponseSpectrumConfigAppConfigOriginWorkerStatusNotFound AppGetResponseSpectrumConfigAppConfigOriginWorkerStatus = "not_found" AppGetResponseSpectrumConfigAppConfigOriginWorkerStatusUnknown AppGetResponseSpectrumConfigAppConfigOriginWorkerStatus = "unknown" )
func (AppGetResponseSpectrumConfigAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppGetResponseSpectrumConfigAppConfigOriginWorkerStatus) IsKnown() bool
type AppGetResponseSpectrumConfigAppConfigProxyProtocol ¶
type AppGetResponseSpectrumConfigAppConfigProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppGetResponseSpectrumConfigAppConfigProxyProtocolOff AppGetResponseSpectrumConfigAppConfigProxyProtocol = "off" AppGetResponseSpectrumConfigAppConfigProxyProtocolV1 AppGetResponseSpectrumConfigAppConfigProxyProtocol = "v1" AppGetResponseSpectrumConfigAppConfigProxyProtocolV2 AppGetResponseSpectrumConfigAppConfigProxyProtocol = "v2" AppGetResponseSpectrumConfigAppConfigProxyProtocolSimple AppGetResponseSpectrumConfigAppConfigProxyProtocol = "simple" )
func (AppGetResponseSpectrumConfigAppConfigProxyProtocol) IsKnown ¶
func (r AppGetResponseSpectrumConfigAppConfigProxyProtocol) IsKnown() bool
type AppGetResponseSpectrumConfigAppConfigTLS ¶
type AppGetResponseSpectrumConfigAppConfigTLS string
The type of TLS termination associated with the application.
const ( AppGetResponseSpectrumConfigAppConfigTLSOff AppGetResponseSpectrumConfigAppConfigTLS = "off" AppGetResponseSpectrumConfigAppConfigTLSFlexible AppGetResponseSpectrumConfigAppConfigTLS = "flexible" AppGetResponseSpectrumConfigAppConfigTLSFull AppGetResponseSpectrumConfigAppConfigTLS = "full" AppGetResponseSpectrumConfigAppConfigTLSStrict AppGetResponseSpectrumConfigAppConfigTLS = "strict" )
func (AppGetResponseSpectrumConfigAppConfigTLS) IsKnown ¶
func (r AppGetResponseSpectrumConfigAppConfigTLS) IsKnown() bool
type AppGetResponseSpectrumConfigAppConfigTrafficType ¶
type AppGetResponseSpectrumConfigAppConfigTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppGetResponseSpectrumConfigAppConfigTrafficTypeDirect AppGetResponseSpectrumConfigAppConfigTrafficType = "direct" AppGetResponseSpectrumConfigAppConfigTrafficTypeHTTP AppGetResponseSpectrumConfigAppConfigTrafficType = "http" AppGetResponseSpectrumConfigAppConfigTrafficTypeHTTPS AppGetResponseSpectrumConfigAppConfigTrafficType = "https" AppGetResponseSpectrumConfigAppConfigTrafficTypeWorker AppGetResponseSpectrumConfigAppConfigTrafficType = "worker" )
func (AppGetResponseSpectrumConfigAppConfigTrafficType) IsKnown ¶
func (r AppGetResponseSpectrumConfigAppConfigTrafficType) IsKnown() bool
type AppGetResponseSpectrumConfigPaygoAppConfig ¶
type AppGetResponseSpectrumConfigPaygoAppConfig struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect []string `json:"origin_direct" format:"URI"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus `json:"origin_worker_status"`
// Determines how traffic is sent to the origin. If absent, defaults to "direct".
// Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or
// UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are
// mutually exclusive. A PAYG zone may have at most one Worker application per
// transport (one TCP and one UDP); creating another for the same transport, or
// converting another application to Worker while that quota is full, is rejected
// with error code 11034 and HTTP status 400.
TrafficType AppGetResponseSpectrumConfigPaygoAppConfigTrafficType `json:"traffic_type"`
JSON appGetResponseSpectrumConfigPaygoAppConfigJSON `json:"-"`
}
func (*AppGetResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON ¶
func (r *AppGetResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON(data []byte) (err error)
type AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus ¶
type AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusAvailable AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "available" AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusNotFound AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "not_found" AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusUnknown AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "unknown" )
func (AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppGetResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown() bool
type AppGetResponseSpectrumConfigPaygoAppConfigTrafficType ¶
type AppGetResponseSpectrumConfigPaygoAppConfigTrafficType string
Determines how traffic is sent to the origin. If absent, defaults to "direct". Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are mutually exclusive. A PAYG zone may have at most one Worker application per transport (one TCP and one UDP); creating another for the same transport, or converting another application to Worker while that quota is full, is rejected with error code 11034 and HTTP status 400.
const ( AppGetResponseSpectrumConfigPaygoAppConfigTrafficTypeDirect AppGetResponseSpectrumConfigPaygoAppConfigTrafficType = "direct" AppGetResponseSpectrumConfigPaygoAppConfigTrafficTypeWorker AppGetResponseSpectrumConfigPaygoAppConfigTrafficType = "worker" )
func (AppGetResponseSpectrumConfigPaygoAppConfigTrafficType) IsKnown ¶
func (r AppGetResponseSpectrumConfigPaygoAppConfigTrafficType) IsKnown() bool
type AppGetResponseTLS ¶
type AppGetResponseTLS string
The type of TLS termination associated with the application.
const ( AppGetResponseTLSOff AppGetResponseTLS = "off" AppGetResponseTLSFlexible AppGetResponseTLS = "flexible" AppGetResponseTLSFull AppGetResponseTLS = "full" AppGetResponseTLSStrict AppGetResponseTLS = "strict" )
func (AppGetResponseTLS) IsKnown ¶
func (r AppGetResponseTLS) IsKnown() bool
type AppGetResponseTrafficType ¶
type AppGetResponseTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppGetResponseTrafficTypeDirect AppGetResponseTrafficType = "direct" AppGetResponseTrafficTypeHTTP AppGetResponseTrafficType = "http" AppGetResponseTrafficTypeHTTPS AppGetResponseTrafficType = "https" AppGetResponseTrafficTypeWorker AppGetResponseTrafficType = "worker" )
func (AppGetResponseTrafficType) IsKnown ¶
func (r AppGetResponseTrafficType) IsKnown() bool
type AppGetResponseUnion ¶
type AppGetResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppGetResponseSpectrumConfigAppConfig or AppGetResponseSpectrumConfigPaygoAppConfig.
type AppListParams ¶
type AppListParams struct {
// Zone identifier.
ZoneID param.Field[string] `path:"zone_id" api:"required"`
// Sets the direction by which results are ordered.
Direction param.Field[AppListParamsDirection] `query:"direction"`
// Application field by which results are ordered.
Order param.Field[AppListParamsOrder] `query:"order"`
// Page number of paginated results. This parameter is required in order to use
// other pagination parameters. If included in the query, `result_info` will be
// present in the response.
Page param.Field[float64] `query:"page"`
// Sets the maximum number of results per page.
PerPage param.Field[float64] `query:"per_page"`
}
func (AppListParams) URLQuery ¶
func (r AppListParams) URLQuery() (v url.Values)
URLQuery serializes AppListParams's query parameters as `url.Values`.
type AppListParamsDirection ¶
type AppListParamsDirection string
Sets the direction by which results are ordered.
const ( AppListParamsDirectionAsc AppListParamsDirection = "asc" AppListParamsDirectionDesc AppListParamsDirection = "desc" )
func (AppListParamsDirection) IsKnown ¶
func (r AppListParamsDirection) IsKnown() bool
type AppListParamsOrder ¶
type AppListParamsOrder string
Application field by which results are ordered.
const ( AppListParamsOrderProtocol AppListParamsOrder = "protocol" AppListParamsOrderAppID AppListParamsOrder = "app_id" AppListParamsOrderCreatedOn AppListParamsOrder = "created_on" AppListParamsOrderModifiedOn AppListParamsOrder = "modified_on" AppListParamsOrderDNS AppListParamsOrder = "dns" )
func (AppListParamsOrder) IsKnown ¶
func (r AppListParamsOrder) IsKnown() bool
type AppListResponse ¶
type AppListResponse struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting bool `json:"argo_smart_routing"`
// This field can have the runtime type of [[]string].
EdgeAlpnProtocols interface{} `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs EdgeIPs `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall bool `json:"ip_firewall"`
// This field can have the runtime type of [[]string].
OriginDirect interface{} `json:"origin_direct"`
// The name and type of DNS record for the Spectrum application.
OriginDNS OriginDNS `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort OriginPortUnion `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppListResponseOriginWorkerStatus `json:"origin_worker_status"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol AppListResponseProxyProtocol `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS AppListResponseTLS `json:"tls"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType AppListResponseTrafficType `json:"traffic_type"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID string `json:"virtual_network_id" format:"uuid"`
JSON appListResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppListResponse) AsUnion ¶
func (r AppListResponse) AsUnion() AppListResponseUnion
AsUnion returns a AppListResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppListResponseSpectrumConfigAppConfig, AppListResponseSpectrumConfigPaygoAppConfig.
func (*AppListResponse) UnmarshalJSON ¶
func (r *AppListResponse) UnmarshalJSON(data []byte) (err error)
type AppListResponseOriginWorkerStatus ¶
type AppListResponseOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppListResponseOriginWorkerStatusAvailable AppListResponseOriginWorkerStatus = "available" AppListResponseOriginWorkerStatusNotFound AppListResponseOriginWorkerStatus = "not_found" AppListResponseOriginWorkerStatusUnknown AppListResponseOriginWorkerStatus = "unknown" )
func (AppListResponseOriginWorkerStatus) IsKnown ¶
func (r AppListResponseOriginWorkerStatus) IsKnown() bool
type AppListResponseProxyProtocol ¶
type AppListResponseProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppListResponseProxyProtocolOff AppListResponseProxyProtocol = "off" AppListResponseProxyProtocolV1 AppListResponseProxyProtocol = "v1" AppListResponseProxyProtocolV2 AppListResponseProxyProtocol = "v2" AppListResponseProxyProtocolSimple AppListResponseProxyProtocol = "simple" )
func (AppListResponseProxyProtocol) IsKnown ¶
func (r AppListResponseProxyProtocol) IsKnown() bool
type AppListResponseSpectrumConfigAppConfig ¶
type AppListResponseSpectrumConfigAppConfig struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType AppListResponseSpectrumConfigAppConfigTrafficType `json:"traffic_type" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting bool `json:"argo_smart_routing"`
// ALPN protocol IDs the edge offers on client TLS connections, in preference
// order, for example `["h2"]` for gRPC or `["postgresql"]` for PostgreSQL direct
// TLS. When set, clients that offer none of these protocols, or no ALPN at all,
// are disconnected. Empty means no ALPN. Notes: Requires tls "flexible", "full" or
// "strict", and is not available with traffic_type "ftp". IDs are case-sensitive
// and unique, each 1 to 255 bytes; the list encodes to at most 65535 bytes,
// counting each ID plus one length byte.
EdgeAlpnProtocols []string `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs EdgeIPs `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall bool `json:"ip_firewall"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect []string `json:"origin_direct" format:"URI"`
// The name and type of DNS record for the Spectrum application.
OriginDNS OriginDNS `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort OriginPortUnion `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppListResponseSpectrumConfigAppConfigOriginWorkerStatus `json:"origin_worker_status"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol AppListResponseSpectrumConfigAppConfigProxyProtocol `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS AppListResponseSpectrumConfigAppConfigTLS `json:"tls"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID string `json:"virtual_network_id" format:"uuid"`
JSON appListResponseSpectrumConfigAppConfigJSON `json:"-"`
}
func (*AppListResponseSpectrumConfigAppConfig) UnmarshalJSON ¶
func (r *AppListResponseSpectrumConfigAppConfig) UnmarshalJSON(data []byte) (err error)
type AppListResponseSpectrumConfigAppConfigOriginWorkerStatus ¶
type AppListResponseSpectrumConfigAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppListResponseSpectrumConfigAppConfigOriginWorkerStatusAvailable AppListResponseSpectrumConfigAppConfigOriginWorkerStatus = "available" AppListResponseSpectrumConfigAppConfigOriginWorkerStatusNotFound AppListResponseSpectrumConfigAppConfigOriginWorkerStatus = "not_found" AppListResponseSpectrumConfigAppConfigOriginWorkerStatusUnknown AppListResponseSpectrumConfigAppConfigOriginWorkerStatus = "unknown" )
func (AppListResponseSpectrumConfigAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppListResponseSpectrumConfigAppConfigOriginWorkerStatus) IsKnown() bool
type AppListResponseSpectrumConfigAppConfigProxyProtocol ¶
type AppListResponseSpectrumConfigAppConfigProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppListResponseSpectrumConfigAppConfigProxyProtocolOff AppListResponseSpectrumConfigAppConfigProxyProtocol = "off" AppListResponseSpectrumConfigAppConfigProxyProtocolV1 AppListResponseSpectrumConfigAppConfigProxyProtocol = "v1" AppListResponseSpectrumConfigAppConfigProxyProtocolV2 AppListResponseSpectrumConfigAppConfigProxyProtocol = "v2" AppListResponseSpectrumConfigAppConfigProxyProtocolSimple AppListResponseSpectrumConfigAppConfigProxyProtocol = "simple" )
func (AppListResponseSpectrumConfigAppConfigProxyProtocol) IsKnown ¶
func (r AppListResponseSpectrumConfigAppConfigProxyProtocol) IsKnown() bool
type AppListResponseSpectrumConfigAppConfigTLS ¶
type AppListResponseSpectrumConfigAppConfigTLS string
The type of TLS termination associated with the application.
const ( AppListResponseSpectrumConfigAppConfigTLSOff AppListResponseSpectrumConfigAppConfigTLS = "off" AppListResponseSpectrumConfigAppConfigTLSFlexible AppListResponseSpectrumConfigAppConfigTLS = "flexible" AppListResponseSpectrumConfigAppConfigTLSFull AppListResponseSpectrumConfigAppConfigTLS = "full" AppListResponseSpectrumConfigAppConfigTLSStrict AppListResponseSpectrumConfigAppConfigTLS = "strict" )
func (AppListResponseSpectrumConfigAppConfigTLS) IsKnown ¶
func (r AppListResponseSpectrumConfigAppConfigTLS) IsKnown() bool
type AppListResponseSpectrumConfigAppConfigTrafficType ¶
type AppListResponseSpectrumConfigAppConfigTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppListResponseSpectrumConfigAppConfigTrafficTypeDirect AppListResponseSpectrumConfigAppConfigTrafficType = "direct" AppListResponseSpectrumConfigAppConfigTrafficTypeHTTP AppListResponseSpectrumConfigAppConfigTrafficType = "http" AppListResponseSpectrumConfigAppConfigTrafficTypeHTTPS AppListResponseSpectrumConfigAppConfigTrafficType = "https" AppListResponseSpectrumConfigAppConfigTrafficTypeWorker AppListResponseSpectrumConfigAppConfigTrafficType = "worker" )
func (AppListResponseSpectrumConfigAppConfigTrafficType) IsKnown ¶
func (r AppListResponseSpectrumConfigAppConfigTrafficType) IsKnown() bool
type AppListResponseSpectrumConfigPaygoAppConfig ¶
type AppListResponseSpectrumConfigPaygoAppConfig struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect []string `json:"origin_direct" format:"URI"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus `json:"origin_worker_status"`
// Determines how traffic is sent to the origin. If absent, defaults to "direct".
// Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or
// UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are
// mutually exclusive. A PAYG zone may have at most one Worker application per
// transport (one TCP and one UDP); creating another for the same transport, or
// converting another application to Worker while that quota is full, is rejected
// with error code 11034 and HTTP status 400.
TrafficType AppListResponseSpectrumConfigPaygoAppConfigTrafficType `json:"traffic_type"`
JSON appListResponseSpectrumConfigPaygoAppConfigJSON `json:"-"`
}
func (*AppListResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON ¶
func (r *AppListResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON(data []byte) (err error)
type AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus ¶
type AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusAvailable AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "available" AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusNotFound AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "not_found" AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusUnknown AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "unknown" )
func (AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppListResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown() bool
type AppListResponseSpectrumConfigPaygoAppConfigTrafficType ¶
type AppListResponseSpectrumConfigPaygoAppConfigTrafficType string
Determines how traffic is sent to the origin. If absent, defaults to "direct". Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are mutually exclusive. A PAYG zone may have at most one Worker application per transport (one TCP and one UDP); creating another for the same transport, or converting another application to Worker while that quota is full, is rejected with error code 11034 and HTTP status 400.
const ( AppListResponseSpectrumConfigPaygoAppConfigTrafficTypeDirect AppListResponseSpectrumConfigPaygoAppConfigTrafficType = "direct" AppListResponseSpectrumConfigPaygoAppConfigTrafficTypeWorker AppListResponseSpectrumConfigPaygoAppConfigTrafficType = "worker" )
func (AppListResponseSpectrumConfigPaygoAppConfigTrafficType) IsKnown ¶
func (r AppListResponseSpectrumConfigPaygoAppConfigTrafficType) IsKnown() bool
type AppListResponseTLS ¶
type AppListResponseTLS string
The type of TLS termination associated with the application.
const ( AppListResponseTLSOff AppListResponseTLS = "off" AppListResponseTLSFlexible AppListResponseTLS = "flexible" AppListResponseTLSFull AppListResponseTLS = "full" AppListResponseTLSStrict AppListResponseTLS = "strict" )
func (AppListResponseTLS) IsKnown ¶
func (r AppListResponseTLS) IsKnown() bool
type AppListResponseTrafficType ¶
type AppListResponseTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppListResponseTrafficTypeDirect AppListResponseTrafficType = "direct" AppListResponseTrafficTypeHTTP AppListResponseTrafficType = "http" AppListResponseTrafficTypeHTTPS AppListResponseTrafficType = "https" AppListResponseTrafficTypeWorker AppListResponseTrafficType = "worker" )
func (AppListResponseTrafficType) IsKnown ¶
func (r AppListResponseTrafficType) IsKnown() bool
type AppListResponseUnion ¶
type AppListResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppListResponseSpectrumConfigAppConfig or AppListResponseSpectrumConfigPaygoAppConfig.
type AppNewParams ¶
type AppNewParams struct {
// Zone identifier.
ZoneID param.Field[string] `path:"zone_id" api:"required"`
Body AppNewParamsBodyUnion `json:"body" api:"required"`
}
func (AppNewParams) MarshalJSON ¶
func (r AppNewParams) MarshalJSON() (data []byte, err error)
type AppNewParamsBody ¶
type AppNewParamsBody struct {
// The name and type of DNS record for the Spectrum application.
DNS param.Field[DNSParam] `json:"dns" api:"required"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol param.Field[string] `json:"protocol" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting param.Field[bool] `json:"argo_smart_routing"`
EdgeAlpnProtocols param.Field[interface{}] `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs param.Field[EdgeIPsUnionParam] `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall param.Field[bool] `json:"ip_firewall"`
OriginDirect param.Field[interface{}] `json:"origin_direct"`
// The name and type of DNS record for the Spectrum application.
OriginDNS param.Field[OriginDNSParam] `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort param.Field[OriginPortUnionParam] `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID param.Field[string] `json:"origin_worker_id"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol param.Field[AppNewParamsBodyProxyProtocol] `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS param.Field[AppNewParamsBodyTLS] `json:"tls"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType param.Field[AppNewParamsBodyTrafficType] `json:"traffic_type"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID param.Field[string] `json:"virtual_network_id" format:"uuid"`
}
func (AppNewParamsBody) MarshalJSON ¶
func (r AppNewParamsBody) MarshalJSON() (data []byte, err error)
type AppNewParamsBodyOriginWorkerStatus ¶
type AppNewParamsBodyOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppNewParamsBodyOriginWorkerStatusAvailable AppNewParamsBodyOriginWorkerStatus = "available" AppNewParamsBodyOriginWorkerStatusNotFound AppNewParamsBodyOriginWorkerStatus = "not_found" AppNewParamsBodyOriginWorkerStatusUnknown AppNewParamsBodyOriginWorkerStatus = "unknown" )
func (AppNewParamsBodyOriginWorkerStatus) IsKnown ¶
func (r AppNewParamsBodyOriginWorkerStatus) IsKnown() bool
type AppNewParamsBodyProxyProtocol ¶
type AppNewParamsBodyProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppNewParamsBodyProxyProtocolOff AppNewParamsBodyProxyProtocol = "off" AppNewParamsBodyProxyProtocolV1 AppNewParamsBodyProxyProtocol = "v1" AppNewParamsBodyProxyProtocolV2 AppNewParamsBodyProxyProtocol = "v2" AppNewParamsBodyProxyProtocolSimple AppNewParamsBodyProxyProtocol = "simple" )
func (AppNewParamsBodyProxyProtocol) IsKnown ¶
func (r AppNewParamsBodyProxyProtocol) IsKnown() bool
type AppNewParamsBodySpectrumConfigAppConfig ¶
type AppNewParamsBodySpectrumConfigAppConfig struct {
// The name and type of DNS record for the Spectrum application.
DNS param.Field[DNSParam] `json:"dns" api:"required"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol param.Field[string] `json:"protocol" api:"required"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType param.Field[AppNewParamsBodySpectrumConfigAppConfigTrafficType] `json:"traffic_type" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting param.Field[bool] `json:"argo_smart_routing"`
// ALPN protocol IDs the edge offers on client TLS connections, in preference
// order, for example `["h2"]` for gRPC or `["postgresql"]` for PostgreSQL direct
// TLS. When set, clients that offer none of these protocols, or no ALPN at all,
// are disconnected. Empty means no ALPN. Notes: Requires tls "flexible", "full" or
// "strict", and is not available with traffic_type "ftp". IDs are case-sensitive
// and unique, each 1 to 255 bytes; the list encodes to at most 65535 bytes,
// counting each ID plus one length byte.
EdgeAlpnProtocols param.Field[[]string] `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs param.Field[EdgeIPsUnionParam] `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall param.Field[bool] `json:"ip_firewall"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect param.Field[[]string] `json:"origin_direct" format:"URI"`
// The name and type of DNS record for the Spectrum application.
OriginDNS param.Field[OriginDNSParam] `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort param.Field[OriginPortUnionParam] `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID param.Field[string] `json:"origin_worker_id"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol param.Field[AppNewParamsBodySpectrumConfigAppConfigProxyProtocol] `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS param.Field[AppNewParamsBodySpectrumConfigAppConfigTLS] `json:"tls"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID param.Field[string] `json:"virtual_network_id" format:"uuid"`
}
func (AppNewParamsBodySpectrumConfigAppConfig) MarshalJSON ¶
func (r AppNewParamsBodySpectrumConfigAppConfig) MarshalJSON() (data []byte, err error)
type AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatus ¶
type AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatusAvailable AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatus = "available" AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatusNotFound AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatus = "not_found" AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatusUnknown AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatus = "unknown" )
func (AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppNewParamsBodySpectrumConfigAppConfigOriginWorkerStatus) IsKnown() bool
type AppNewParamsBodySpectrumConfigAppConfigProxyProtocol ¶
type AppNewParamsBodySpectrumConfigAppConfigProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppNewParamsBodySpectrumConfigAppConfigProxyProtocolOff AppNewParamsBodySpectrumConfigAppConfigProxyProtocol = "off" AppNewParamsBodySpectrumConfigAppConfigProxyProtocolV1 AppNewParamsBodySpectrumConfigAppConfigProxyProtocol = "v1" AppNewParamsBodySpectrumConfigAppConfigProxyProtocolV2 AppNewParamsBodySpectrumConfigAppConfigProxyProtocol = "v2" AppNewParamsBodySpectrumConfigAppConfigProxyProtocolSimple AppNewParamsBodySpectrumConfigAppConfigProxyProtocol = "simple" )
func (AppNewParamsBodySpectrumConfigAppConfigProxyProtocol) IsKnown ¶
func (r AppNewParamsBodySpectrumConfigAppConfigProxyProtocol) IsKnown() bool
type AppNewParamsBodySpectrumConfigAppConfigTLS ¶
type AppNewParamsBodySpectrumConfigAppConfigTLS string
The type of TLS termination associated with the application.
const ( AppNewParamsBodySpectrumConfigAppConfigTLSOff AppNewParamsBodySpectrumConfigAppConfigTLS = "off" AppNewParamsBodySpectrumConfigAppConfigTLSFlexible AppNewParamsBodySpectrumConfigAppConfigTLS = "flexible" AppNewParamsBodySpectrumConfigAppConfigTLSFull AppNewParamsBodySpectrumConfigAppConfigTLS = "full" AppNewParamsBodySpectrumConfigAppConfigTLSStrict AppNewParamsBodySpectrumConfigAppConfigTLS = "strict" )
func (AppNewParamsBodySpectrumConfigAppConfigTLS) IsKnown ¶
func (r AppNewParamsBodySpectrumConfigAppConfigTLS) IsKnown() bool
type AppNewParamsBodySpectrumConfigAppConfigTrafficType ¶
type AppNewParamsBodySpectrumConfigAppConfigTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppNewParamsBodySpectrumConfigAppConfigTrafficTypeDirect AppNewParamsBodySpectrumConfigAppConfigTrafficType = "direct" AppNewParamsBodySpectrumConfigAppConfigTrafficTypeHTTP AppNewParamsBodySpectrumConfigAppConfigTrafficType = "http" AppNewParamsBodySpectrumConfigAppConfigTrafficTypeHTTPS AppNewParamsBodySpectrumConfigAppConfigTrafficType = "https" AppNewParamsBodySpectrumConfigAppConfigTrafficTypeWorker AppNewParamsBodySpectrumConfigAppConfigTrafficType = "worker" )
func (AppNewParamsBodySpectrumConfigAppConfigTrafficType) IsKnown ¶
func (r AppNewParamsBodySpectrumConfigAppConfigTrafficType) IsKnown() bool
type AppNewParamsBodySpectrumConfigPaygoAppConfig ¶
type AppNewParamsBodySpectrumConfigPaygoAppConfig struct {
// The name and type of DNS record for the Spectrum application.
DNS param.Field[DNSParam] `json:"dns" api:"required"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol param.Field[string] `json:"protocol" api:"required"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect param.Field[[]string] `json:"origin_direct" format:"URI"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID param.Field[string] `json:"origin_worker_id"`
// Determines how traffic is sent to the origin. If absent, defaults to "direct".
// Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or
// UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are
// mutually exclusive. A PAYG zone may have at most one Worker application per
// transport (one TCP and one UDP); creating another for the same transport, or
// converting another application to Worker while that quota is full, is rejected
// with error code 11034 and HTTP status 400.
TrafficType param.Field[AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficType] `json:"traffic_type"`
}
func (AppNewParamsBodySpectrumConfigPaygoAppConfig) MarshalJSON ¶
func (r AppNewParamsBodySpectrumConfigPaygoAppConfig) MarshalJSON() (data []byte, err error)
type AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus ¶
type AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatusAvailable AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus = "available" AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatusNotFound AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus = "not_found" AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatusUnknown AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus = "unknown" )
func (AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppNewParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown() bool
type AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficType ¶
type AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficType string
Determines how traffic is sent to the origin. If absent, defaults to "direct". Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are mutually exclusive. A PAYG zone may have at most one Worker application per transport (one TCP and one UDP); creating another for the same transport, or converting another application to Worker while that quota is full, is rejected with error code 11034 and HTTP status 400.
const ( AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficTypeDirect AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficType = "direct" AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficTypeWorker AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficType = "worker" )
func (AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficType) IsKnown ¶
func (r AppNewParamsBodySpectrumConfigPaygoAppConfigTrafficType) IsKnown() bool
type AppNewParamsBodyTLS ¶
type AppNewParamsBodyTLS string
The type of TLS termination associated with the application.
const ( AppNewParamsBodyTLSOff AppNewParamsBodyTLS = "off" AppNewParamsBodyTLSFlexible AppNewParamsBodyTLS = "flexible" AppNewParamsBodyTLSFull AppNewParamsBodyTLS = "full" AppNewParamsBodyTLSStrict AppNewParamsBodyTLS = "strict" )
func (AppNewParamsBodyTLS) IsKnown ¶
func (r AppNewParamsBodyTLS) IsKnown() bool
type AppNewParamsBodyTrafficType ¶
type AppNewParamsBodyTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppNewParamsBodyTrafficTypeDirect AppNewParamsBodyTrafficType = "direct" AppNewParamsBodyTrafficTypeHTTP AppNewParamsBodyTrafficType = "http" AppNewParamsBodyTrafficTypeHTTPS AppNewParamsBodyTrafficType = "https" AppNewParamsBodyTrafficTypeWorker AppNewParamsBodyTrafficType = "worker" )
func (AppNewParamsBodyTrafficType) IsKnown ¶
func (r AppNewParamsBodyTrafficType) IsKnown() bool
type AppNewParamsBodyUnion ¶
type AppNewParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by spectrum.AppNewParamsBodySpectrumConfigAppConfig, spectrum.AppNewParamsBodySpectrumConfigPaygoAppConfig, AppNewParamsBody.
type AppNewResponse ¶
type AppNewResponse struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting bool `json:"argo_smart_routing"`
// This field can have the runtime type of [[]string].
EdgeAlpnProtocols interface{} `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs EdgeIPs `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall bool `json:"ip_firewall"`
// This field can have the runtime type of [[]string].
OriginDirect interface{} `json:"origin_direct"`
// The name and type of DNS record for the Spectrum application.
OriginDNS OriginDNS `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort OriginPortUnion `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppNewResponseOriginWorkerStatus `json:"origin_worker_status"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol AppNewResponseProxyProtocol `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS AppNewResponseTLS `json:"tls"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType AppNewResponseTrafficType `json:"traffic_type"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID string `json:"virtual_network_id" format:"uuid"`
JSON appNewResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppNewResponse) AsUnion ¶
func (r AppNewResponse) AsUnion() AppNewResponseUnion
AsUnion returns a AppNewResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppNewResponseSpectrumConfigAppConfig, AppNewResponseSpectrumConfigPaygoAppConfig.
func (*AppNewResponse) UnmarshalJSON ¶
func (r *AppNewResponse) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelope ¶
type AppNewResponseEnvelope struct {
Errors []AppNewResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppNewResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success AppNewResponseEnvelopeSuccess `json:"success" api:"required"`
Result AppNewResponse `json:"result"`
JSON appNewResponseEnvelopeJSON `json:"-"`
}
func (*AppNewResponseEnvelope) UnmarshalJSON ¶
func (r *AppNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeErrors ¶
type AppNewResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AppNewResponseEnvelopeErrorsSource `json:"source"`
JSON appNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeErrorsSource ¶
type AppNewResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON appNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AppNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AppNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeMessages ¶
type AppNewResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AppNewResponseEnvelopeMessagesSource `json:"source"`
JSON appNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeMessagesSource ¶
type AppNewResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON appNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AppNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AppNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeSuccess ¶
type AppNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AppNewResponseEnvelopeSuccessTrue AppNewResponseEnvelopeSuccess = true
)
func (AppNewResponseEnvelopeSuccess) IsKnown ¶
func (r AppNewResponseEnvelopeSuccess) IsKnown() bool
type AppNewResponseOriginWorkerStatus ¶
type AppNewResponseOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppNewResponseOriginWorkerStatusAvailable AppNewResponseOriginWorkerStatus = "available" AppNewResponseOriginWorkerStatusNotFound AppNewResponseOriginWorkerStatus = "not_found" AppNewResponseOriginWorkerStatusUnknown AppNewResponseOriginWorkerStatus = "unknown" )
func (AppNewResponseOriginWorkerStatus) IsKnown ¶
func (r AppNewResponseOriginWorkerStatus) IsKnown() bool
type AppNewResponseProxyProtocol ¶
type AppNewResponseProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppNewResponseProxyProtocolOff AppNewResponseProxyProtocol = "off" AppNewResponseProxyProtocolV1 AppNewResponseProxyProtocol = "v1" AppNewResponseProxyProtocolV2 AppNewResponseProxyProtocol = "v2" AppNewResponseProxyProtocolSimple AppNewResponseProxyProtocol = "simple" )
func (AppNewResponseProxyProtocol) IsKnown ¶
func (r AppNewResponseProxyProtocol) IsKnown() bool
type AppNewResponseSpectrumConfigAppConfig ¶
type AppNewResponseSpectrumConfigAppConfig struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType AppNewResponseSpectrumConfigAppConfigTrafficType `json:"traffic_type" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting bool `json:"argo_smart_routing"`
// ALPN protocol IDs the edge offers on client TLS connections, in preference
// order, for example `["h2"]` for gRPC or `["postgresql"]` for PostgreSQL direct
// TLS. When set, clients that offer none of these protocols, or no ALPN at all,
// are disconnected. Empty means no ALPN. Notes: Requires tls "flexible", "full" or
// "strict", and is not available with traffic_type "ftp". IDs are case-sensitive
// and unique, each 1 to 255 bytes; the list encodes to at most 65535 bytes,
// counting each ID plus one length byte.
EdgeAlpnProtocols []string `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs EdgeIPs `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall bool `json:"ip_firewall"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect []string `json:"origin_direct" format:"URI"`
// The name and type of DNS record for the Spectrum application.
OriginDNS OriginDNS `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort OriginPortUnion `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppNewResponseSpectrumConfigAppConfigOriginWorkerStatus `json:"origin_worker_status"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol AppNewResponseSpectrumConfigAppConfigProxyProtocol `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS AppNewResponseSpectrumConfigAppConfigTLS `json:"tls"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID string `json:"virtual_network_id" format:"uuid"`
JSON appNewResponseSpectrumConfigAppConfigJSON `json:"-"`
}
func (*AppNewResponseSpectrumConfigAppConfig) UnmarshalJSON ¶
func (r *AppNewResponseSpectrumConfigAppConfig) UnmarshalJSON(data []byte) (err error)
type AppNewResponseSpectrumConfigAppConfigOriginWorkerStatus ¶
type AppNewResponseSpectrumConfigAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppNewResponseSpectrumConfigAppConfigOriginWorkerStatusAvailable AppNewResponseSpectrumConfigAppConfigOriginWorkerStatus = "available" AppNewResponseSpectrumConfigAppConfigOriginWorkerStatusNotFound AppNewResponseSpectrumConfigAppConfigOriginWorkerStatus = "not_found" AppNewResponseSpectrumConfigAppConfigOriginWorkerStatusUnknown AppNewResponseSpectrumConfigAppConfigOriginWorkerStatus = "unknown" )
func (AppNewResponseSpectrumConfigAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppNewResponseSpectrumConfigAppConfigOriginWorkerStatus) IsKnown() bool
type AppNewResponseSpectrumConfigAppConfigProxyProtocol ¶
type AppNewResponseSpectrumConfigAppConfigProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppNewResponseSpectrumConfigAppConfigProxyProtocolOff AppNewResponseSpectrumConfigAppConfigProxyProtocol = "off" AppNewResponseSpectrumConfigAppConfigProxyProtocolV1 AppNewResponseSpectrumConfigAppConfigProxyProtocol = "v1" AppNewResponseSpectrumConfigAppConfigProxyProtocolV2 AppNewResponseSpectrumConfigAppConfigProxyProtocol = "v2" AppNewResponseSpectrumConfigAppConfigProxyProtocolSimple AppNewResponseSpectrumConfigAppConfigProxyProtocol = "simple" )
func (AppNewResponseSpectrumConfigAppConfigProxyProtocol) IsKnown ¶
func (r AppNewResponseSpectrumConfigAppConfigProxyProtocol) IsKnown() bool
type AppNewResponseSpectrumConfigAppConfigTLS ¶
type AppNewResponseSpectrumConfigAppConfigTLS string
The type of TLS termination associated with the application.
const ( AppNewResponseSpectrumConfigAppConfigTLSOff AppNewResponseSpectrumConfigAppConfigTLS = "off" AppNewResponseSpectrumConfigAppConfigTLSFlexible AppNewResponseSpectrumConfigAppConfigTLS = "flexible" AppNewResponseSpectrumConfigAppConfigTLSFull AppNewResponseSpectrumConfigAppConfigTLS = "full" AppNewResponseSpectrumConfigAppConfigTLSStrict AppNewResponseSpectrumConfigAppConfigTLS = "strict" )
func (AppNewResponseSpectrumConfigAppConfigTLS) IsKnown ¶
func (r AppNewResponseSpectrumConfigAppConfigTLS) IsKnown() bool
type AppNewResponseSpectrumConfigAppConfigTrafficType ¶
type AppNewResponseSpectrumConfigAppConfigTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppNewResponseSpectrumConfigAppConfigTrafficTypeDirect AppNewResponseSpectrumConfigAppConfigTrafficType = "direct" AppNewResponseSpectrumConfigAppConfigTrafficTypeHTTP AppNewResponseSpectrumConfigAppConfigTrafficType = "http" AppNewResponseSpectrumConfigAppConfigTrafficTypeHTTPS AppNewResponseSpectrumConfigAppConfigTrafficType = "https" AppNewResponseSpectrumConfigAppConfigTrafficTypeWorker AppNewResponseSpectrumConfigAppConfigTrafficType = "worker" )
func (AppNewResponseSpectrumConfigAppConfigTrafficType) IsKnown ¶
func (r AppNewResponseSpectrumConfigAppConfigTrafficType) IsKnown() bool
type AppNewResponseSpectrumConfigPaygoAppConfig ¶
type AppNewResponseSpectrumConfigPaygoAppConfig struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect []string `json:"origin_direct" format:"URI"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus `json:"origin_worker_status"`
// Determines how traffic is sent to the origin. If absent, defaults to "direct".
// Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or
// UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are
// mutually exclusive. A PAYG zone may have at most one Worker application per
// transport (one TCP and one UDP); creating another for the same transport, or
// converting another application to Worker while that quota is full, is rejected
// with error code 11034 and HTTP status 400.
TrafficType AppNewResponseSpectrumConfigPaygoAppConfigTrafficType `json:"traffic_type"`
JSON appNewResponseSpectrumConfigPaygoAppConfigJSON `json:"-"`
}
func (*AppNewResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON ¶
func (r *AppNewResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON(data []byte) (err error)
type AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus ¶
type AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusAvailable AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "available" AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusNotFound AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "not_found" AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusUnknown AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "unknown" )
func (AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppNewResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown() bool
type AppNewResponseSpectrumConfigPaygoAppConfigTrafficType ¶
type AppNewResponseSpectrumConfigPaygoAppConfigTrafficType string
Determines how traffic is sent to the origin. If absent, defaults to "direct". Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are mutually exclusive. A PAYG zone may have at most one Worker application per transport (one TCP and one UDP); creating another for the same transport, or converting another application to Worker while that quota is full, is rejected with error code 11034 and HTTP status 400.
const ( AppNewResponseSpectrumConfigPaygoAppConfigTrafficTypeDirect AppNewResponseSpectrumConfigPaygoAppConfigTrafficType = "direct" AppNewResponseSpectrumConfigPaygoAppConfigTrafficTypeWorker AppNewResponseSpectrumConfigPaygoAppConfigTrafficType = "worker" )
func (AppNewResponseSpectrumConfigPaygoAppConfigTrafficType) IsKnown ¶
func (r AppNewResponseSpectrumConfigPaygoAppConfigTrafficType) IsKnown() bool
type AppNewResponseTLS ¶
type AppNewResponseTLS string
The type of TLS termination associated with the application.
const ( AppNewResponseTLSOff AppNewResponseTLS = "off" AppNewResponseTLSFlexible AppNewResponseTLS = "flexible" AppNewResponseTLSFull AppNewResponseTLS = "full" AppNewResponseTLSStrict AppNewResponseTLS = "strict" )
func (AppNewResponseTLS) IsKnown ¶
func (r AppNewResponseTLS) IsKnown() bool
type AppNewResponseTrafficType ¶
type AppNewResponseTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppNewResponseTrafficTypeDirect AppNewResponseTrafficType = "direct" AppNewResponseTrafficTypeHTTP AppNewResponseTrafficType = "http" AppNewResponseTrafficTypeHTTPS AppNewResponseTrafficType = "https" AppNewResponseTrafficTypeWorker AppNewResponseTrafficType = "worker" )
func (AppNewResponseTrafficType) IsKnown ¶
func (r AppNewResponseTrafficType) IsKnown() bool
type AppNewResponseUnion ¶
type AppNewResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppNewResponseSpectrumConfigAppConfig or AppNewResponseSpectrumConfigPaygoAppConfig.
type AppService ¶
type AppService struct {
Options []option.RequestOption
}
AppService 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 NewAppService method instead.
func NewAppService ¶
func NewAppService(opts ...option.RequestOption) (r *AppService)
NewAppService 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 (*AppService) Delete ¶
func (r *AppService) Delete(ctx context.Context, appID string, body AppDeleteParams, opts ...option.RequestOption) (res *AppDeleteResponse, err error)
Deletes a previously existing application.
func (*AppService) Get ¶
func (r *AppService) Get(ctx context.Context, appID string, query AppGetParams, opts ...option.RequestOption) (res *AppGetResponse, err error)
Gets the application configuration of a specific application inside a zone.
func (*AppService) List ¶
func (r *AppService) List(ctx context.Context, params AppListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[AppListResponse], err error)
Retrieves a list of currently existing Spectrum applications inside a zone.
func (*AppService) ListAutoPaging ¶
func (r *AppService) ListAutoPaging(ctx context.Context, params AppListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[AppListResponse]
Retrieves a list of currently existing Spectrum applications inside a zone.
func (*AppService) New ¶
func (r *AppService) New(ctx context.Context, params AppNewParams, opts ...option.RequestOption) (res *AppNewResponse, err error)
Creates a new Spectrum application from a configuration using a name for the origin.
func (*AppService) Update ¶
func (r *AppService) Update(ctx context.Context, appID string, params AppUpdateParams, opts ...option.RequestOption) (res *AppUpdateResponse, err error)
Updates a previously existing application's configuration that uses a name for the origin.
type AppUpdateParams ¶
type AppUpdateParams struct {
// Zone identifier.
ZoneID param.Field[string] `path:"zone_id" api:"required"`
Body AppUpdateParamsBodyUnion `json:"body" api:"required"`
}
func (AppUpdateParams) MarshalJSON ¶
func (r AppUpdateParams) MarshalJSON() (data []byte, err error)
type AppUpdateParamsBody ¶
type AppUpdateParamsBody struct {
// The name and type of DNS record for the Spectrum application.
DNS param.Field[DNSParam] `json:"dns" api:"required"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol param.Field[string] `json:"protocol" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting param.Field[bool] `json:"argo_smart_routing"`
EdgeAlpnProtocols param.Field[interface{}] `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs param.Field[EdgeIPsUnionParam] `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall param.Field[bool] `json:"ip_firewall"`
OriginDirect param.Field[interface{}] `json:"origin_direct"`
// The name and type of DNS record for the Spectrum application.
OriginDNS param.Field[OriginDNSParam] `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort param.Field[OriginPortUnionParam] `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID param.Field[string] `json:"origin_worker_id"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol param.Field[AppUpdateParamsBodyProxyProtocol] `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS param.Field[AppUpdateParamsBodyTLS] `json:"tls"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType param.Field[AppUpdateParamsBodyTrafficType] `json:"traffic_type"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID param.Field[string] `json:"virtual_network_id" format:"uuid"`
}
func (AppUpdateParamsBody) MarshalJSON ¶
func (r AppUpdateParamsBody) MarshalJSON() (data []byte, err error)
type AppUpdateParamsBodyOriginWorkerStatus ¶
type AppUpdateParamsBodyOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppUpdateParamsBodyOriginWorkerStatusAvailable AppUpdateParamsBodyOriginWorkerStatus = "available" AppUpdateParamsBodyOriginWorkerStatusNotFound AppUpdateParamsBodyOriginWorkerStatus = "not_found" AppUpdateParamsBodyOriginWorkerStatusUnknown AppUpdateParamsBodyOriginWorkerStatus = "unknown" )
func (AppUpdateParamsBodyOriginWorkerStatus) IsKnown ¶
func (r AppUpdateParamsBodyOriginWorkerStatus) IsKnown() bool
type AppUpdateParamsBodyProxyProtocol ¶
type AppUpdateParamsBodyProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppUpdateParamsBodyProxyProtocolOff AppUpdateParamsBodyProxyProtocol = "off" AppUpdateParamsBodyProxyProtocolV1 AppUpdateParamsBodyProxyProtocol = "v1" AppUpdateParamsBodyProxyProtocolV2 AppUpdateParamsBodyProxyProtocol = "v2" AppUpdateParamsBodyProxyProtocolSimple AppUpdateParamsBodyProxyProtocol = "simple" )
func (AppUpdateParamsBodyProxyProtocol) IsKnown ¶
func (r AppUpdateParamsBodyProxyProtocol) IsKnown() bool
type AppUpdateParamsBodySpectrumConfigAppConfig ¶
type AppUpdateParamsBodySpectrumConfigAppConfig struct {
// The name and type of DNS record for the Spectrum application.
DNS param.Field[DNSParam] `json:"dns" api:"required"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol param.Field[string] `json:"protocol" api:"required"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType param.Field[AppUpdateParamsBodySpectrumConfigAppConfigTrafficType] `json:"traffic_type" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting param.Field[bool] `json:"argo_smart_routing"`
// ALPN protocol IDs the edge offers on client TLS connections, in preference
// order, for example `["h2"]` for gRPC or `["postgresql"]` for PostgreSQL direct
// TLS. When set, clients that offer none of these protocols, or no ALPN at all,
// are disconnected. Empty means no ALPN. Notes: Requires tls "flexible", "full" or
// "strict", and is not available with traffic_type "ftp". IDs are case-sensitive
// and unique, each 1 to 255 bytes; the list encodes to at most 65535 bytes,
// counting each ID plus one length byte.
EdgeAlpnProtocols param.Field[[]string] `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs param.Field[EdgeIPsUnionParam] `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall param.Field[bool] `json:"ip_firewall"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect param.Field[[]string] `json:"origin_direct" format:"URI"`
// The name and type of DNS record for the Spectrum application.
OriginDNS param.Field[OriginDNSParam] `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort param.Field[OriginPortUnionParam] `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID param.Field[string] `json:"origin_worker_id"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol param.Field[AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol] `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS param.Field[AppUpdateParamsBodySpectrumConfigAppConfigTLS] `json:"tls"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID param.Field[string] `json:"virtual_network_id" format:"uuid"`
}
func (AppUpdateParamsBodySpectrumConfigAppConfig) MarshalJSON ¶
func (r AppUpdateParamsBodySpectrumConfigAppConfig) MarshalJSON() (data []byte, err error)
type AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatus ¶
type AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatusAvailable AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatus = "available" AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatusNotFound AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatus = "not_found" AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatusUnknown AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatus = "unknown" )
func (AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppUpdateParamsBodySpectrumConfigAppConfigOriginWorkerStatus) IsKnown() bool
type AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol ¶
type AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocolOff AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol = "off" AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocolV1 AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol = "v1" AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocolV2 AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol = "v2" AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocolSimple AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol = "simple" )
func (AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol) IsKnown ¶
func (r AppUpdateParamsBodySpectrumConfigAppConfigProxyProtocol) IsKnown() bool
type AppUpdateParamsBodySpectrumConfigAppConfigTLS ¶
type AppUpdateParamsBodySpectrumConfigAppConfigTLS string
The type of TLS termination associated with the application.
const ( AppUpdateParamsBodySpectrumConfigAppConfigTLSOff AppUpdateParamsBodySpectrumConfigAppConfigTLS = "off" AppUpdateParamsBodySpectrumConfigAppConfigTLSFlexible AppUpdateParamsBodySpectrumConfigAppConfigTLS = "flexible" AppUpdateParamsBodySpectrumConfigAppConfigTLSFull AppUpdateParamsBodySpectrumConfigAppConfigTLS = "full" AppUpdateParamsBodySpectrumConfigAppConfigTLSStrict AppUpdateParamsBodySpectrumConfigAppConfigTLS = "strict" )
func (AppUpdateParamsBodySpectrumConfigAppConfigTLS) IsKnown ¶
func (r AppUpdateParamsBodySpectrumConfigAppConfigTLS) IsKnown() bool
type AppUpdateParamsBodySpectrumConfigAppConfigTrafficType ¶
type AppUpdateParamsBodySpectrumConfigAppConfigTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppUpdateParamsBodySpectrumConfigAppConfigTrafficTypeDirect AppUpdateParamsBodySpectrumConfigAppConfigTrafficType = "direct" AppUpdateParamsBodySpectrumConfigAppConfigTrafficTypeHTTP AppUpdateParamsBodySpectrumConfigAppConfigTrafficType = "http" AppUpdateParamsBodySpectrumConfigAppConfigTrafficTypeHTTPS AppUpdateParamsBodySpectrumConfigAppConfigTrafficType = "https" AppUpdateParamsBodySpectrumConfigAppConfigTrafficTypeWorker AppUpdateParamsBodySpectrumConfigAppConfigTrafficType = "worker" )
func (AppUpdateParamsBodySpectrumConfigAppConfigTrafficType) IsKnown ¶
func (r AppUpdateParamsBodySpectrumConfigAppConfigTrafficType) IsKnown() bool
type AppUpdateParamsBodySpectrumConfigPaygoAppConfig ¶
type AppUpdateParamsBodySpectrumConfigPaygoAppConfig struct {
// The name and type of DNS record for the Spectrum application.
DNS param.Field[DNSParam] `json:"dns" api:"required"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol param.Field[string] `json:"protocol" api:"required"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect param.Field[[]string] `json:"origin_direct" format:"URI"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID param.Field[string] `json:"origin_worker_id"`
// Determines how traffic is sent to the origin. If absent, defaults to "direct".
// Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or
// UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are
// mutually exclusive. A PAYG zone may have at most one Worker application per
// transport (one TCP and one UDP); creating another for the same transport, or
// converting another application to Worker while that quota is full, is rejected
// with error code 11034 and HTTP status 400.
TrafficType param.Field[AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficType] `json:"traffic_type"`
}
func (AppUpdateParamsBodySpectrumConfigPaygoAppConfig) MarshalJSON ¶
func (r AppUpdateParamsBodySpectrumConfigPaygoAppConfig) MarshalJSON() (data []byte, err error)
type AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus ¶
type AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatusAvailable AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus = "available" AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatusNotFound AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus = "not_found" AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatusUnknown AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus = "unknown" )
func (AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppUpdateParamsBodySpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown() bool
type AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficType ¶
type AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficType string
Determines how traffic is sent to the origin. If absent, defaults to "direct". Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are mutually exclusive. A PAYG zone may have at most one Worker application per transport (one TCP and one UDP); creating another for the same transport, or converting another application to Worker while that quota is full, is rejected with error code 11034 and HTTP status 400.
const ( AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficTypeDirect AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficType = "direct" AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficTypeWorker AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficType = "worker" )
func (AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficType) IsKnown ¶
func (r AppUpdateParamsBodySpectrumConfigPaygoAppConfigTrafficType) IsKnown() bool
type AppUpdateParamsBodyTLS ¶
type AppUpdateParamsBodyTLS string
The type of TLS termination associated with the application.
const ( AppUpdateParamsBodyTLSOff AppUpdateParamsBodyTLS = "off" AppUpdateParamsBodyTLSFlexible AppUpdateParamsBodyTLS = "flexible" AppUpdateParamsBodyTLSFull AppUpdateParamsBodyTLS = "full" AppUpdateParamsBodyTLSStrict AppUpdateParamsBodyTLS = "strict" )
func (AppUpdateParamsBodyTLS) IsKnown ¶
func (r AppUpdateParamsBodyTLS) IsKnown() bool
type AppUpdateParamsBodyTrafficType ¶
type AppUpdateParamsBodyTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppUpdateParamsBodyTrafficTypeDirect AppUpdateParamsBodyTrafficType = "direct" AppUpdateParamsBodyTrafficTypeHTTP AppUpdateParamsBodyTrafficType = "http" AppUpdateParamsBodyTrafficTypeHTTPS AppUpdateParamsBodyTrafficType = "https" AppUpdateParamsBodyTrafficTypeWorker AppUpdateParamsBodyTrafficType = "worker" )
func (AppUpdateParamsBodyTrafficType) IsKnown ¶
func (r AppUpdateParamsBodyTrafficType) IsKnown() bool
type AppUpdateParamsBodyUnion ¶
type AppUpdateParamsBodyUnion interface {
// contains filtered or unexported methods
}
Satisfied by spectrum.AppUpdateParamsBodySpectrumConfigAppConfig, spectrum.AppUpdateParamsBodySpectrumConfigPaygoAppConfig, AppUpdateParamsBody.
type AppUpdateResponse ¶
type AppUpdateResponse struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting bool `json:"argo_smart_routing"`
// This field can have the runtime type of [[]string].
EdgeAlpnProtocols interface{} `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs EdgeIPs `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall bool `json:"ip_firewall"`
// This field can have the runtime type of [[]string].
OriginDirect interface{} `json:"origin_direct"`
// The name and type of DNS record for the Spectrum application.
OriginDNS OriginDNS `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort OriginPortUnion `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppUpdateResponseOriginWorkerStatus `json:"origin_worker_status"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol AppUpdateResponseProxyProtocol `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS AppUpdateResponseTLS `json:"tls"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType AppUpdateResponseTrafficType `json:"traffic_type"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID string `json:"virtual_network_id" format:"uuid"`
JSON appUpdateResponseJSON `json:"-"`
// contains filtered or unexported fields
}
func (AppUpdateResponse) AsUnion ¶
func (r AppUpdateResponse) AsUnion() AppUpdateResponseUnion
AsUnion returns a AppUpdateResponseUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are AppUpdateResponseSpectrumConfigAppConfig, AppUpdateResponseSpectrumConfigPaygoAppConfig.
func (*AppUpdateResponse) UnmarshalJSON ¶
func (r *AppUpdateResponse) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelope ¶
type AppUpdateResponseEnvelope struct {
Errors []AppUpdateResponseEnvelopeErrors `json:"errors" api:"required"`
Messages []AppUpdateResponseEnvelopeMessages `json:"messages" api:"required"`
// Whether the API call was successful.
Success AppUpdateResponseEnvelopeSuccess `json:"success" api:"required"`
Result AppUpdateResponse `json:"result"`
JSON appUpdateResponseEnvelopeJSON `json:"-"`
}
func (*AppUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeErrors ¶
type AppUpdateResponseEnvelopeErrors struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AppUpdateResponseEnvelopeErrorsSource `json:"source"`
JSON appUpdateResponseEnvelopeErrorsJSON `json:"-"`
}
func (*AppUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeErrorsSource ¶
type AppUpdateResponseEnvelopeErrorsSource struct {
Pointer string `json:"pointer"`
JSON appUpdateResponseEnvelopeErrorsSourceJSON `json:"-"`
}
func (*AppUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeMessages ¶
type AppUpdateResponseEnvelopeMessages struct {
Code int64 `json:"code" api:"required"`
Message string `json:"message" api:"required"`
DocumentationURL string `json:"documentation_url"`
Source AppUpdateResponseEnvelopeMessagesSource `json:"source"`
JSON appUpdateResponseEnvelopeMessagesJSON `json:"-"`
}
func (*AppUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeMessagesSource ¶
type AppUpdateResponseEnvelopeMessagesSource struct {
Pointer string `json:"pointer"`
JSON appUpdateResponseEnvelopeMessagesSourceJSON `json:"-"`
}
func (*AppUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeSuccess ¶
type AppUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
AppUpdateResponseEnvelopeSuccessTrue AppUpdateResponseEnvelopeSuccess = true
)
func (AppUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r AppUpdateResponseEnvelopeSuccess) IsKnown() bool
type AppUpdateResponseOriginWorkerStatus ¶
type AppUpdateResponseOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppUpdateResponseOriginWorkerStatusAvailable AppUpdateResponseOriginWorkerStatus = "available" AppUpdateResponseOriginWorkerStatusNotFound AppUpdateResponseOriginWorkerStatus = "not_found" AppUpdateResponseOriginWorkerStatusUnknown AppUpdateResponseOriginWorkerStatus = "unknown" )
func (AppUpdateResponseOriginWorkerStatus) IsKnown ¶
func (r AppUpdateResponseOriginWorkerStatus) IsKnown() bool
type AppUpdateResponseProxyProtocol ¶
type AppUpdateResponseProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppUpdateResponseProxyProtocolOff AppUpdateResponseProxyProtocol = "off" AppUpdateResponseProxyProtocolV1 AppUpdateResponseProxyProtocol = "v1" AppUpdateResponseProxyProtocolV2 AppUpdateResponseProxyProtocol = "v2" AppUpdateResponseProxyProtocolSimple AppUpdateResponseProxyProtocol = "simple" )
func (AppUpdateResponseProxyProtocol) IsKnown ¶
func (r AppUpdateResponseProxyProtocol) IsKnown() bool
type AppUpdateResponseSpectrumConfigAppConfig ¶
type AppUpdateResponseSpectrumConfigAppConfig struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// Determines how data travels from the edge to your origin. When set to "direct",
// Spectrum will send traffic directly to your origin, and the application's type
// is derived from the `protocol`. When set to "http" or "https", Spectrum will
// apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and
// the application type matches this property exactly. When set to "worker",
// traffic is sent to the Worker specified by `origin_worker_id`.
TrafficType AppUpdateResponseSpectrumConfigAppConfigTrafficType `json:"traffic_type" api:"required"`
// Enables Argo Smart Routing for this application. Notes: Only available for TCP
// or UDP applications with traffic_type set to "direct".
ArgoSmartRouting bool `json:"argo_smart_routing"`
// ALPN protocol IDs the edge offers on client TLS connections, in preference
// order, for example `["h2"]` for gRPC or `["postgresql"]` for PostgreSQL direct
// TLS. When set, clients that offer none of these protocols, or no ALPN at all,
// are disconnected. Empty means no ALPN. Notes: Requires tls "flexible", "full" or
// "strict", and is not available with traffic_type "ftp". IDs are case-sensitive
// and unique, each 1 to 255 bytes; the list encodes to at most 65535 bytes,
// counting each ID plus one length byte.
EdgeAlpnProtocols []string `json:"edge_alpn_protocols"`
// The anycast edge IP configuration for the hostname of this application.
EdgeIPs EdgeIPs `json:"edge_ips"`
// Enables IP Access Rules for this application. Notes: Only available for TCP
// applications.
IPFirewall bool `json:"ip_firewall"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect []string `json:"origin_direct" format:"URI"`
// The name and type of DNS record for the Spectrum application.
OriginDNS OriginDNS `json:"origin_dns"`
// The destination port at the origin. Only specified in conjunction with
// origin_dns. May use an integer to specify a single origin port, for example
// `1000`, or a string to specify a range of origin ports, for example
// `"1000-2000"`. Notes: If specifying a port range, the number of ports in the
// range must match the number of ports specified in the "protocol" field.
OriginPort OriginPortUnion `json:"origin_port"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatus `json:"origin_worker_status"`
// Enables Proxy Protocol to the origin. Refer to
// [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/)
// for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple
// Proxy Protocol.
ProxyProtocol AppUpdateResponseSpectrumConfigAppConfigProxyProtocol `json:"proxy_protocol"`
// The type of TLS termination associated with the application.
TLS AppUpdateResponseSpectrumConfigAppConfigTLS `json:"tls"`
// Optional UUID of a virtual network for routing origin traffic through tunnel
// virtual networks.
VirtualNetworkID string `json:"virtual_network_id" format:"uuid"`
JSON appUpdateResponseSpectrumConfigAppConfigJSON `json:"-"`
}
func (*AppUpdateResponseSpectrumConfigAppConfig) UnmarshalJSON ¶
func (r *AppUpdateResponseSpectrumConfigAppConfig) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatus ¶
type AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatusAvailable AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatus = "available" AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatusNotFound AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatus = "not_found" AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatusUnknown AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatus = "unknown" )
func (AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppUpdateResponseSpectrumConfigAppConfigOriginWorkerStatus) IsKnown() bool
type AppUpdateResponseSpectrumConfigAppConfigProxyProtocol ¶
type AppUpdateResponseSpectrumConfigAppConfigProxyProtocol string
Enables Proxy Protocol to the origin. Refer to [Enable Proxy protocol](https://developers.cloudflare.com/spectrum/getting-started/proxy-protocol/) for implementation details on PROXY Protocol V1, PROXY Protocol V2, and Simple Proxy Protocol.
const ( AppUpdateResponseSpectrumConfigAppConfigProxyProtocolOff AppUpdateResponseSpectrumConfigAppConfigProxyProtocol = "off" AppUpdateResponseSpectrumConfigAppConfigProxyProtocolV1 AppUpdateResponseSpectrumConfigAppConfigProxyProtocol = "v1" AppUpdateResponseSpectrumConfigAppConfigProxyProtocolV2 AppUpdateResponseSpectrumConfigAppConfigProxyProtocol = "v2" AppUpdateResponseSpectrumConfigAppConfigProxyProtocolSimple AppUpdateResponseSpectrumConfigAppConfigProxyProtocol = "simple" )
func (AppUpdateResponseSpectrumConfigAppConfigProxyProtocol) IsKnown ¶
func (r AppUpdateResponseSpectrumConfigAppConfigProxyProtocol) IsKnown() bool
type AppUpdateResponseSpectrumConfigAppConfigTLS ¶
type AppUpdateResponseSpectrumConfigAppConfigTLS string
The type of TLS termination associated with the application.
const ( AppUpdateResponseSpectrumConfigAppConfigTLSOff AppUpdateResponseSpectrumConfigAppConfigTLS = "off" AppUpdateResponseSpectrumConfigAppConfigTLSFlexible AppUpdateResponseSpectrumConfigAppConfigTLS = "flexible" AppUpdateResponseSpectrumConfigAppConfigTLSFull AppUpdateResponseSpectrumConfigAppConfigTLS = "full" AppUpdateResponseSpectrumConfigAppConfigTLSStrict AppUpdateResponseSpectrumConfigAppConfigTLS = "strict" )
func (AppUpdateResponseSpectrumConfigAppConfigTLS) IsKnown ¶
func (r AppUpdateResponseSpectrumConfigAppConfigTLS) IsKnown() bool
type AppUpdateResponseSpectrumConfigAppConfigTrafficType ¶
type AppUpdateResponseSpectrumConfigAppConfigTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppUpdateResponseSpectrumConfigAppConfigTrafficTypeDirect AppUpdateResponseSpectrumConfigAppConfigTrafficType = "direct" AppUpdateResponseSpectrumConfigAppConfigTrafficTypeHTTP AppUpdateResponseSpectrumConfigAppConfigTrafficType = "http" AppUpdateResponseSpectrumConfigAppConfigTrafficTypeHTTPS AppUpdateResponseSpectrumConfigAppConfigTrafficType = "https" AppUpdateResponseSpectrumConfigAppConfigTrafficTypeWorker AppUpdateResponseSpectrumConfigAppConfigTrafficType = "worker" )
func (AppUpdateResponseSpectrumConfigAppConfigTrafficType) IsKnown ¶
func (r AppUpdateResponseSpectrumConfigAppConfigTrafficType) IsKnown() bool
type AppUpdateResponseSpectrumConfigPaygoAppConfig ¶
type AppUpdateResponseSpectrumConfigPaygoAppConfig struct {
// App identifier.
ID string `json:"id" api:"required"`
// When the Application was created.
CreatedOn time.Time `json:"created_on" api:"required" format:"date-time"`
// The name and type of DNS record for the Spectrum application.
DNS DNS `json:"dns" api:"required"`
// When the Application was last modified.
ModifiedOn time.Time `json:"modified_on" api:"required" format:"date-time"`
// The port configuration at Cloudflare's edge. May specify a single port, for
// example `"tcp/1000"`, or a range of ports, for example `"tcp/1000-2000"`.
Protocol string `json:"protocol" api:"required"`
// List of origin IP addresses. Array may contain multiple IP addresses for load
// balancing.
OriginDirect []string `json:"origin_direct" format:"URI"`
// Optional Worker script tag (worker ID) to use as the application's origin.
// Requires traffic_type "worker"; mutually exclusive with origin_direct,
// origin_dns, origin_port, proxy_protocol, and argo_smart_routing. For TCP
// applications, tls may be "off" or "flexible"; UDP applications require tls
// "off".
OriginWorkerID string `json:"origin_worker_id"`
// Name of the Worker origin. Omitted when the Worker is not found or its name
// cannot be resolved.
OriginWorkerName string `json:"origin_worker_name"`
// Lookup status of the Worker origin. Unknown indicates that its name could not be
// resolved. Only returned for Worker origins.
OriginWorkerStatus AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus `json:"origin_worker_status"`
// Determines how traffic is sent to the origin. If absent, defaults to "direct".
// Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or
// UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are
// mutually exclusive. A PAYG zone may have at most one Worker application per
// transport (one TCP and one UDP); creating another for the same transport, or
// converting another application to Worker while that quota is full, is rejected
// with error code 11034 and HTTP status 400.
TrafficType AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficType `json:"traffic_type"`
JSON appUpdateResponseSpectrumConfigPaygoAppConfigJSON `json:"-"`
}
func (*AppUpdateResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON ¶
func (r *AppUpdateResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus ¶
type AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus string
Lookup status of the Worker origin. Unknown indicates that its name could not be resolved. Only returned for Worker origins.
const ( AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusAvailable AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "available" AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusNotFound AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "not_found" AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatusUnknown AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus = "unknown" )
func (AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown ¶
func (r AppUpdateResponseSpectrumConfigPaygoAppConfigOriginWorkerStatus) IsKnown() bool
type AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficType ¶
type AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficType string
Determines how traffic is sent to the origin. If absent, defaults to "direct". Direct mode uses origin_direct. Worker mode requires origin_worker_id, TCP or UDP with a single port, and CNAME DNS; origin_worker_id and origin_direct are mutually exclusive. A PAYG zone may have at most one Worker application per transport (one TCP and one UDP); creating another for the same transport, or converting another application to Worker while that quota is full, is rejected with error code 11034 and HTTP status 400.
const ( AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficTypeDirect AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficType = "direct" AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficTypeWorker AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficType = "worker" )
func (AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficType) IsKnown ¶
func (r AppUpdateResponseSpectrumConfigPaygoAppConfigTrafficType) IsKnown() bool
type AppUpdateResponseTLS ¶
type AppUpdateResponseTLS string
The type of TLS termination associated with the application.
const ( AppUpdateResponseTLSOff AppUpdateResponseTLS = "off" AppUpdateResponseTLSFlexible AppUpdateResponseTLS = "flexible" AppUpdateResponseTLSFull AppUpdateResponseTLS = "full" AppUpdateResponseTLSStrict AppUpdateResponseTLS = "strict" )
func (AppUpdateResponseTLS) IsKnown ¶
func (r AppUpdateResponseTLS) IsKnown() bool
type AppUpdateResponseTrafficType ¶
type AppUpdateResponseTrafficType string
Determines how data travels from the edge to your origin. When set to "direct", Spectrum will send traffic directly to your origin, and the application's type is derived from the `protocol`. When set to "http" or "https", Spectrum will apply Cloudflare's HTTP/HTTPS features as it sends traffic to your origin, and the application type matches this property exactly. When set to "worker", traffic is sent to the Worker specified by `origin_worker_id`.
const ( AppUpdateResponseTrafficTypeDirect AppUpdateResponseTrafficType = "direct" AppUpdateResponseTrafficTypeHTTP AppUpdateResponseTrafficType = "http" AppUpdateResponseTrafficTypeHTTPS AppUpdateResponseTrafficType = "https" AppUpdateResponseTrafficTypeWorker AppUpdateResponseTrafficType = "worker" )
func (AppUpdateResponseTrafficType) IsKnown ¶
func (r AppUpdateResponseTrafficType) IsKnown() bool
type AppUpdateResponseUnion ¶
type AppUpdateResponseUnion interface {
// contains filtered or unexported methods
}
Union satisfied by AppUpdateResponseSpectrumConfigAppConfig or AppUpdateResponseSpectrumConfigPaygoAppConfig.
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 CloudflareTunnelConfigSrc ¶
type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc
Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.
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 DNS ¶
type DNS struct {
// The name of the DNS record associated with the application.
Name string `json:"name" format:"hostname"`
// The type of DNS record associated with the application.
Type DNSType `json:"type"`
JSON dnsJSON `json:"-"`
}
The name and type of DNS record for the Spectrum application.
func (*DNS) UnmarshalJSON ¶
type DNSParam ¶
type DNSParam struct {
// The name of the DNS record associated with the application.
Name param.Field[string] `json:"name" format:"hostname"`
// The type of DNS record associated with the application.
Type param.Field[DNSType] `json:"type"`
}
The name and type of DNS record for the Spectrum application.
func (DNSParam) MarshalJSON ¶
type EdgeIPs ¶
type EdgeIPs struct {
// The IP versions supported for inbound connections on Spectrum anycast IPs.
Connectivity EdgeIPsConnectivity `json:"connectivity"`
// This field can have the runtime type of [[]string].
IPs interface{} `json:"ips"`
// The type of edge IP configuration specified. Dynamically allocated edge IPs use
// Spectrum anycast IPs in accordance with the connectivity you specify. Only valid
// with CNAME DNS names.
Type EdgeIPsType `json:"type"`
JSON edgeIPsJSON `json:"-"`
// contains filtered or unexported fields
}
The anycast edge IP configuration for the hostname of this application.
func (EdgeIPs) AsUnion ¶
func (r EdgeIPs) AsUnion() EdgeIPsUnion
AsUnion returns a EdgeIPsUnion interface which you can cast to the specific types for more type safety.
Possible runtime types of the union are EdgeIPsDynamic, EdgeIPsStatic.
func (*EdgeIPs) UnmarshalJSON ¶
type EdgeIPsConnectivity ¶
type EdgeIPsConnectivity string
The IP versions supported for inbound connections on Spectrum anycast IPs.
const ( EdgeIPsConnectivityAll EdgeIPsConnectivity = "all" EdgeIPsConnectivityIPV4 EdgeIPsConnectivity = "ipv4" EdgeIPsConnectivityIPV6 EdgeIPsConnectivity = "ipv6" )
func (EdgeIPsConnectivity) IsKnown ¶
func (r EdgeIPsConnectivity) IsKnown() bool
type EdgeIPsDynamic ¶
type EdgeIPsDynamic struct {
// The IP versions supported for inbound connections on Spectrum anycast IPs.
Connectivity EdgeIPsDynamicConnectivity `json:"connectivity"`
// The type of edge IP configuration specified. Dynamically allocated edge IPs use
// Spectrum anycast IPs in accordance with the connectivity you specify. Only valid
// with CNAME DNS names.
Type EdgeIPsDynamicType `json:"type"`
JSON edgeIPsDynamicJSON `json:"-"`
}
func (*EdgeIPsDynamic) UnmarshalJSON ¶
func (r *EdgeIPsDynamic) UnmarshalJSON(data []byte) (err error)
type EdgeIPsDynamicConnectivity ¶
type EdgeIPsDynamicConnectivity string
The IP versions supported for inbound connections on Spectrum anycast IPs.
const ( EdgeIPsDynamicConnectivityAll EdgeIPsDynamicConnectivity = "all" EdgeIPsDynamicConnectivityIPV4 EdgeIPsDynamicConnectivity = "ipv4" EdgeIPsDynamicConnectivityIPV6 EdgeIPsDynamicConnectivity = "ipv6" )
func (EdgeIPsDynamicConnectivity) IsKnown ¶
func (r EdgeIPsDynamicConnectivity) IsKnown() bool
type EdgeIPsDynamicParam ¶
type EdgeIPsDynamicParam struct {
// The IP versions supported for inbound connections on Spectrum anycast IPs.
Connectivity param.Field[EdgeIPsDynamicConnectivity] `json:"connectivity"`
// The type of edge IP configuration specified. Dynamically allocated edge IPs use
// Spectrum anycast IPs in accordance with the connectivity you specify. Only valid
// with CNAME DNS names.
Type param.Field[EdgeIPsDynamicType] `json:"type"`
}
func (EdgeIPsDynamicParam) MarshalJSON ¶
func (r EdgeIPsDynamicParam) MarshalJSON() (data []byte, err error)
type EdgeIPsDynamicType ¶
type EdgeIPsDynamicType string
The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names.
const (
EdgeIPsDynamicTypeDynamic EdgeIPsDynamicType = "dynamic"
)
func (EdgeIPsDynamicType) IsKnown ¶
func (r EdgeIPsDynamicType) IsKnown() bool
type EdgeIPsParam ¶
type EdgeIPsParam struct {
// The IP versions supported for inbound connections on Spectrum anycast IPs.
Connectivity param.Field[EdgeIPsConnectivity] `json:"connectivity"`
IPs param.Field[interface{}] `json:"ips"`
// The type of edge IP configuration specified. Dynamically allocated edge IPs use
// Spectrum anycast IPs in accordance with the connectivity you specify. Only valid
// with CNAME DNS names.
Type param.Field[EdgeIPsType] `json:"type"`
}
The anycast edge IP configuration for the hostname of this application.
func (EdgeIPsParam) MarshalJSON ¶
func (r EdgeIPsParam) MarshalJSON() (data []byte, err error)
type EdgeIPsStatic ¶
type EdgeIPsStatic struct {
// The array of customer owned IPs we broadcast via anycast for this hostname and
// application.
IPs []string `json:"ips"`
// The type of edge IP configuration specified. Statically allocated edge IPs use
// customer IPs in accordance with the ips array you specify. Only valid with
// ADDRESS DNS names.
Type EdgeIPsStaticType `json:"type"`
JSON edgeIPsStaticJSON `json:"-"`
}
func (*EdgeIPsStatic) UnmarshalJSON ¶
func (r *EdgeIPsStatic) UnmarshalJSON(data []byte) (err error)
type EdgeIPsStaticParam ¶
type EdgeIPsStaticParam struct {
// The array of customer owned IPs we broadcast via anycast for this hostname and
// application.
IPs param.Field[[]string] `json:"ips"`
// The type of edge IP configuration specified. Statically allocated edge IPs use
// customer IPs in accordance with the ips array you specify. Only valid with
// ADDRESS DNS names.
Type param.Field[EdgeIPsStaticType] `json:"type"`
}
func (EdgeIPsStaticParam) MarshalJSON ¶
func (r EdgeIPsStaticParam) MarshalJSON() (data []byte, err error)
type EdgeIPsStaticType ¶
type EdgeIPsStaticType string
The type of edge IP configuration specified. Statically allocated edge IPs use customer IPs in accordance with the ips array you specify. Only valid with ADDRESS DNS names.
const (
EdgeIPsStaticTypeStatic EdgeIPsStaticType = "static"
)
func (EdgeIPsStaticType) IsKnown ¶
func (r EdgeIPsStaticType) IsKnown() bool
type EdgeIPsType ¶
type EdgeIPsType string
The type of edge IP configuration specified. Dynamically allocated edge IPs use Spectrum anycast IPs in accordance with the connectivity you specify. Only valid with CNAME DNS names.
const ( EdgeIPsTypeDynamic EdgeIPsType = "dynamic" EdgeIPsTypeStatic EdgeIPsType = "static" )
func (EdgeIPsType) IsKnown ¶
func (r EdgeIPsType) IsKnown() bool
type EdgeIPsUnion ¶
type EdgeIPsUnion interface {
// contains filtered or unexported methods
}
The anycast edge IP configuration for the hostname of this application.
Union satisfied by EdgeIPsDynamic or EdgeIPsStatic.
type EdgeIPsUnionParam ¶
type EdgeIPsUnionParam interface {
// contains filtered or unexported methods
}
The anycast edge IP configuration for the hostname of this application.
Satisfied by spectrum.EdgeIPsDynamicParam, spectrum.EdgeIPsStaticParam, EdgeIPsParam.
type ErrorDataSource ¶
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
The scope associated to the resource group
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScopeObject ¶
type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject
A scope object represents any resource that can have actions applied against invite.
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 MemberUser ¶
type MemberUser = shared.MemberUser
Details of the user associated to the membership.
This is an alias to an internal type.
type OriginDNS ¶
type OriginDNS struct {
// The name of the DNS record associated with the origin.
Name string `json:"name" format:"hostname"`
// The TTL of our resolution of your DNS record in seconds.
TTL int64 `json:"ttl"`
// The type of DNS record associated with the origin. "" is used to specify a
// combination of A/AAAA records.
Type OriginDNSType `json:"type"`
JSON originDNSJSON `json:"-"`
}
The name and type of DNS record for the Spectrum application.
func (*OriginDNS) UnmarshalJSON ¶
type OriginDNSParam ¶
type OriginDNSParam struct {
// The name of the DNS record associated with the origin.
Name param.Field[string] `json:"name" format:"hostname"`
// The TTL of our resolution of your DNS record in seconds.
TTL param.Field[int64] `json:"ttl"`
// The type of DNS record associated with the origin. "" is used to specify a
// combination of A/AAAA records.
Type param.Field[OriginDNSType] `json:"type"`
}
The name and type of DNS record for the Spectrum application.
func (OriginDNSParam) MarshalJSON ¶
func (r OriginDNSParam) MarshalJSON() (data []byte, err error)
type OriginDNSType ¶
type OriginDNSType string
The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.
const ( OriginDNSTypeEmpty OriginDNSType = "" OriginDNSTypeA OriginDNSType = "A" OriginDNSTypeAAAA OriginDNSType = "AAAA" OriginDNSTypeSRV OriginDNSType = "SRV" )
func (OriginDNSType) IsKnown ¶
func (r OriginDNSType) IsKnown() bool
type OriginPortUnion ¶
type OriginPortUnion interface {
ImplementsOriginPortUnion()
}
The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`. Notes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field.
Union satisfied by shared.UnionInt or shared.UnionString.
type OriginPortUnionParam ¶
type OriginPortUnionParam interface {
ImplementsOriginPortUnionParam()
}
The destination port at the origin. Only specified in conjunction with origin_dns. May use an integer to specify a single origin port, for example `1000`, or a string to specify a range of origin ports, for example `"1000-2000"`. Notes: If specifying a port range, the number of ports in the range must match the number of ports specified in the "protocol" field.
Satisfied by shared.UnionInt, shared.UnionString.
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 ProtocolListParams ¶ added in v7.10.0
type ProtocolListResponse ¶ added in v7.10.0
type ProtocolListResponse struct {
// The full name of the application protocol.
Description string `json:"description" api:"required"`
// The short name of the application protocol.
Name string `json:"name" api:"required"`
// The available listening ports for the given protocol.
Ports []int64 `json:"ports" api:"required"`
// The transport layer protocol used by the application protocol
Transport string `json:"transport" api:"required"`
JSON protocolListResponseJSON `json:"-"`
}
func (*ProtocolListResponse) UnmarshalJSON ¶ added in v7.10.0
func (r *ProtocolListResponse) UnmarshalJSON(data []byte) (err error)
type ProtocolService ¶ added in v7.10.0
type ProtocolService struct {
Options []option.RequestOption
}
ProtocolService 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 NewProtocolService method instead.
func NewProtocolService ¶ added in v7.10.0
func NewProtocolService(opts ...option.RequestOption) (r *ProtocolService)
NewProtocolService 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 (*ProtocolService) List ¶ added in v7.10.0
func (r *ProtocolService) List(ctx context.Context, query ProtocolListParams, opts ...option.RequestOption) (res *pagination.SinglePage[ProtocolListResponse], err error)
Retrieves a list of Spectrum application protocols available for a zone.
func (*ProtocolService) ListAutoPaging ¶ added in v7.10.0
func (r *ProtocolService) ListAutoPaging(ctx context.Context, query ProtocolListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[ProtocolListResponse]
Retrieves a list of Spectrum application protocols available for a zone.
type RatePlanID ¶
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
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 ResponseInfoSource ¶
type ResponseInfoSource = shared.ResponseInfoSource
This is an alias to an internal type.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
This is an alias to an internal type.
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type SpectrumService ¶
type SpectrumService struct {
Options []option.RequestOption
Analytics *AnalyticsService
Apps *AppService
Protocols *ProtocolService
}
SpectrumService 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 NewSpectrumService method instead.
func NewSpectrumService ¶
func NewSpectrumService(opts ...option.RequestOption) (r *SpectrumService)
NewSpectrumService 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.
type TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNested ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectString ¶
type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesUnion ¶
type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenPolicyResourcesUnionParam ¶
type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.