Documentation ¶
Index ¶
- type AnalyticsAggregateCurrentGetParams
- type AnalyticsAggregateCurrentGetResponse
- type AnalyticsAggregateCurrentGetResponseEnvelope
- type AnalyticsAggregateCurrentGetResponseEnvelopeErrors
- type AnalyticsAggregateCurrentGetResponseEnvelopeMessages
- type AnalyticsAggregateCurrentGetResponseEnvelopeSuccess
- type AnalyticsAggregateCurrentService
- type AnalyticsAggregateService
- type AnalyticsEventBytimeGetParams
- type AnalyticsEventBytimeGetParamsDimension
- type AnalyticsEventBytimeGetParamsMetric
- type AnalyticsEventBytimeGetParamsTimeDelta
- type AnalyticsEventBytimeGetResponse
- type AnalyticsEventBytimeGetResponseEnvelope
- type AnalyticsEventBytimeGetResponseEnvelopeErrors
- type AnalyticsEventBytimeGetResponseEnvelopeMessages
- type AnalyticsEventBytimeGetResponseEnvelopeSuccess
- type AnalyticsEventBytimeService
- type AnalyticsEventService
- type AnalyticsEventSummaryGetParams
- type AnalyticsEventSummaryGetParamsDimension
- type AnalyticsEventSummaryGetParamsMetric
- type AnalyticsEventSummaryGetResponse
- type AnalyticsEventSummaryGetResponseEnvelope
- type AnalyticsEventSummaryGetResponseEnvelopeErrors
- type AnalyticsEventSummaryGetResponseEnvelopeMessages
- type AnalyticsEventSummaryGetResponseEnvelopeSuccess
- type AnalyticsEventSummaryService
- type AnalyticsService
- type AppDeleteResponse
- type AppDeleteResponseEnvelope
- type AppDeleteResponseEnvelopeErrors
- type AppDeleteResponseEnvelopeMessages
- type AppDeleteResponseEnvelopeSuccess
- type AppGetResponse
- type AppGetResponseEnvelope
- type AppGetResponseEnvelopeErrors
- type AppGetResponseEnvelopeMessages
- type AppGetResponseEnvelopeSuccess
- type AppListParams
- type AppListParamsDirection
- type AppListParamsOrder
- type AppListResponse
- type AppNewParams
- type AppNewParamsDNS
- type AppNewParamsDNSType
- type AppNewParamsEdgeIPs
- type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable
- type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType
- type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable
- type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity
- type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType
- type AppNewParamsOriginDNS
- type AppNewParamsOriginDNSType
- type AppNewParamsOriginPort
- type AppNewParamsProxyProtocol
- type AppNewParamsTLS
- type AppNewParamsTrafficType
- type AppNewResponse
- type AppNewResponseDNS
- type AppNewResponseDNSType
- type AppNewResponseEdgeIPs
- type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable
- type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType
- type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable
- type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity
- type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType
- type AppNewResponseEnvelope
- type AppNewResponseEnvelopeErrors
- type AppNewResponseEnvelopeMessages
- type AppNewResponseEnvelopeSuccess
- type AppNewResponseOriginDNS
- type AppNewResponseOriginDNSType
- type AppNewResponseOriginPort
- type AppNewResponseProxyProtocol
- type AppNewResponseTLS
- type AppNewResponseTrafficType
- type AppService
- func (r *AppService) Delete(ctx context.Context, zone string, appID string, opts ...option.RequestOption) (res *AppDeleteResponse, err error)
- func (r *AppService) Get(ctx context.Context, zone string, appID string, opts ...option.RequestOption) (res *AppGetResponse, err error)
- func (r *AppService) List(ctx context.Context, zone string, query AppListParams, ...) (res *shared.V4PagePaginationArray[AppListResponse], err error)
- func (r *AppService) ListAutoPaging(ctx context.Context, zone string, query AppListParams, ...) *shared.V4PagePaginationArrayAutoPager[AppListResponse]
- func (r *AppService) New(ctx context.Context, zone string, body AppNewParams, ...) (res *AppNewResponse, err error)
- func (r *AppService) Update(ctx context.Context, zone string, appID string, body AppUpdateParams, ...) (res *AppUpdateResponse, err error)
- type AppUpdateParams
- type AppUpdateParamsDNS
- type AppUpdateParamsDNSType
- type AppUpdateParamsEdgeIPs
- type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable
- type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType
- type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable
- type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity
- type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType
- type AppUpdateParamsOriginDNS
- type AppUpdateParamsOriginDNSType
- type AppUpdateParamsOriginPort
- type AppUpdateParamsProxyProtocol
- type AppUpdateParamsTLS
- type AppUpdateParamsTrafficType
- type AppUpdateResponse
- type AppUpdateResponseDNS
- type AppUpdateResponseDNSType
- type AppUpdateResponseEdgeIPs
- type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable
- type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType
- type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable
- type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity
- type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType
- type AppUpdateResponseEnvelope
- type AppUpdateResponseEnvelopeErrors
- type AppUpdateResponseEnvelopeMessages
- type AppUpdateResponseEnvelopeSuccess
- type AppUpdateResponseOriginDNS
- type AppUpdateResponseOriginDNSType
- type AppUpdateResponseOriginPort
- type AppUpdateResponseProxyProtocol
- type AppUpdateResponseTLS
- type AppUpdateResponseTrafficType
- type Error
- type SpectrumService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AnalyticsAggregateCurrentGetParams ¶
type AnalyticsAggregateCurrentGetParams struct { // Comma-delimited list of Spectrum Application Id(s). If provided, the response // will be limited to Spectrum Application Id(s) that match. AppIDParam param.Field[string] `query:"app_id_param"` // 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 = interface{}
type AnalyticsAggregateCurrentGetResponseEnvelope ¶
type AnalyticsAggregateCurrentGetResponseEnvelope struct { Errors []AnalyticsAggregateCurrentGetResponseEnvelopeErrors `json:"errors,required"` Messages []AnalyticsAggregateCurrentGetResponseEnvelopeMessages `json:"messages,required"` Result []AnalyticsAggregateCurrentGetResponse `json:"result,required"` // Whether the API call was successful Success AnalyticsAggregateCurrentGetResponseEnvelopeSuccess `json:"success,required"` JSON analyticsAggregateCurrentGetResponseEnvelopeJSON `json:"-"` }
func (*AnalyticsAggregateCurrentGetResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsAggregateCurrentGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsAggregateCurrentGetResponseEnvelopeErrors ¶
type AnalyticsAggregateCurrentGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON analyticsAggregateCurrentGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*AnalyticsAggregateCurrentGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AnalyticsAggregateCurrentGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AnalyticsAggregateCurrentGetResponseEnvelopeMessages ¶
type AnalyticsAggregateCurrentGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON analyticsAggregateCurrentGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*AnalyticsAggregateCurrentGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AnalyticsAggregateCurrentGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AnalyticsAggregateCurrentGetResponseEnvelopeSuccess ¶
type AnalyticsAggregateCurrentGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AnalyticsAggregateCurrentGetResponseEnvelopeSuccessTrue AnalyticsAggregateCurrentGetResponseEnvelopeSuccess = true
)
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, zone string, query 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 { // 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[[]AnalyticsEventBytimeGetParamsDimension] `query:"dimensions"` // Used to filter rows by one or more dimensions. Filters can be combined using OR // and AND boolean logic. AND takes precedence over OR in all the expressions. The // OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. // The AND operator is defined using a semicolon (;) or AND keyword surrounded by // whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) // and needs to be percent-encoded as %3B. Comparison options are: // // | Operator | Name | URL Encoded | // | -------- | ------------------------ | ----------- | // | == | Equals | %3D%3D | // | != | Does not equals | !%3D | // | > | Greater Than | %3E | // | < | Less Than | %3C | // | >= | Greater than or equal to | %3E%3D | // | <= | Less than or equal to | %3C%3D . | Filters param.Field[string] `query:"filters"` // 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[[]interface{}] `query:"sort"` // Used to select time series resolution. TimeDelta param.Field[AnalyticsEventBytimeGetParamsTimeDelta] `query:"time_delta"` // 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 AnalyticsEventBytimeGetParamsDimension ¶
type AnalyticsEventBytimeGetParamsDimension string
const ( AnalyticsEventBytimeGetParamsDimensionEvent AnalyticsEventBytimeGetParamsDimension = "event" AnalyticsEventBytimeGetParamsDimensionAppID AnalyticsEventBytimeGetParamsDimension = "appID" AnalyticsEventBytimeGetParamsDimensionColoName AnalyticsEventBytimeGetParamsDimension = "coloName" AnalyticsEventBytimeGetParamsDimensionIPVersion AnalyticsEventBytimeGetParamsDimension = "ipVersion" )
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" )
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" )
type AnalyticsEventBytimeGetResponse ¶
type AnalyticsEventBytimeGetResponse interface {
ImplementsSpectrumAnalyticsEventBytimeGetResponse()
}
Union satisfied by spectrum.AnalyticsEventBytimeGetResponseUnknown or shared.UnionString.
type AnalyticsEventBytimeGetResponseEnvelope ¶
type AnalyticsEventBytimeGetResponseEnvelope struct { Errors []AnalyticsEventBytimeGetResponseEnvelopeErrors `json:"errors,required"` Messages []AnalyticsEventBytimeGetResponseEnvelopeMessages `json:"messages,required"` Result AnalyticsEventBytimeGetResponse `json:"result,required,nullable"` // Whether the API call was successful Success AnalyticsEventBytimeGetResponseEnvelopeSuccess `json:"success,required"` JSON analyticsEventBytimeGetResponseEnvelopeJSON `json:"-"` }
func (*AnalyticsEventBytimeGetResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseEnvelopeErrors ¶
type AnalyticsEventBytimeGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON analyticsEventBytimeGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*AnalyticsEventBytimeGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseEnvelopeMessages ¶
type AnalyticsEventBytimeGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON analyticsEventBytimeGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*AnalyticsEventBytimeGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AnalyticsEventBytimeGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventBytimeGetResponseEnvelopeSuccess ¶
type AnalyticsEventBytimeGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AnalyticsEventBytimeGetResponseEnvelopeSuccessTrue AnalyticsEventBytimeGetResponseEnvelopeSuccess = true
)
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, zone string, query 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 { // 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[[]AnalyticsEventSummaryGetParamsDimension] `query:"dimensions"` // Used to filter rows by one or more dimensions. Filters can be combined using OR // and AND boolean logic. AND takes precedence over OR in all the expressions. The // OR operator is defined using a comma (,) or OR keyword surrounded by whitespace. // The AND operator is defined using a semicolon (;) or AND keyword surrounded by // whitespace. Note that the semicolon is a reserved character in URLs (rfc1738) // and needs to be percent-encoded as %3B. Comparison options are: // // | Operator | Name | URL Encoded | // | -------- | ------------------------ | ----------- | // | == | Equals | %3D%3D | // | != | Does not equals | !%3D | // | > | Greater Than | %3E | // | < | Less Than | %3C | // | >= | Greater than or equal to | %3E%3D | // | <= | Less than or equal to | %3C%3D . | Filters param.Field[string] `query:"filters"` // 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[[]interface{}] `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 AnalyticsEventSummaryGetParamsDimension ¶
type AnalyticsEventSummaryGetParamsDimension string
const ( AnalyticsEventSummaryGetParamsDimensionEvent AnalyticsEventSummaryGetParamsDimension = "event" AnalyticsEventSummaryGetParamsDimensionAppID AnalyticsEventSummaryGetParamsDimension = "appID" AnalyticsEventSummaryGetParamsDimensionColoName AnalyticsEventSummaryGetParamsDimension = "coloName" AnalyticsEventSummaryGetParamsDimensionIPVersion AnalyticsEventSummaryGetParamsDimension = "ipVersion" )
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" )
type AnalyticsEventSummaryGetResponse ¶
type AnalyticsEventSummaryGetResponse interface {
ImplementsSpectrumAnalyticsEventSummaryGetResponse()
}
Union satisfied by spectrum.AnalyticsEventSummaryGetResponseUnknown or shared.UnionString.
type AnalyticsEventSummaryGetResponseEnvelope ¶
type AnalyticsEventSummaryGetResponseEnvelope struct { Errors []AnalyticsEventSummaryGetResponseEnvelopeErrors `json:"errors,required"` Messages []AnalyticsEventSummaryGetResponseEnvelopeMessages `json:"messages,required"` Result AnalyticsEventSummaryGetResponse `json:"result,required,nullable"` // Whether the API call was successful Success AnalyticsEventSummaryGetResponseEnvelopeSuccess `json:"success,required"` JSON analyticsEventSummaryGetResponseEnvelopeJSON `json:"-"` }
func (*AnalyticsEventSummaryGetResponseEnvelope) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseEnvelopeErrors ¶
type AnalyticsEventSummaryGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON analyticsEventSummaryGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*AnalyticsEventSummaryGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseEnvelopeMessages ¶
type AnalyticsEventSummaryGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON analyticsEventSummaryGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*AnalyticsEventSummaryGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AnalyticsEventSummaryGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AnalyticsEventSummaryGetResponseEnvelopeSuccess ¶
type AnalyticsEventSummaryGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AnalyticsEventSummaryGetResponseEnvelopeSuccessTrue AnalyticsEventSummaryGetResponseEnvelopeSuccess = true
)
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, zone string, query 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 AppDeleteResponse ¶
type AppDeleteResponse struct { // Application identifier. ID string `json:"id"` JSON appDeleteResponseJSON `json:"-"` }
func (*AppDeleteResponse) UnmarshalJSON ¶
func (r *AppDeleteResponse) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelope ¶
type AppDeleteResponseEnvelope struct { Errors []AppDeleteResponseEnvelopeErrors `json:"errors,required"` Messages []AppDeleteResponseEnvelopeMessages `json:"messages,required"` Result AppDeleteResponse `json:"result,required,nullable"` // Whether the API call was successful Success AppDeleteResponseEnvelopeSuccess `json:"success,required"` JSON appDeleteResponseEnvelopeJSON `json:"-"` }
func (*AppDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeErrors ¶
type AppDeleteResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON appDeleteResponseEnvelopeErrorsJSON `json:"-"` }
func (*AppDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeMessages ¶
type AppDeleteResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON appDeleteResponseEnvelopeMessagesJSON `json:"-"` }
func (*AppDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppDeleteResponseEnvelopeSuccess ¶
type AppDeleteResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AppDeleteResponseEnvelopeSuccessTrue AppDeleteResponseEnvelopeSuccess = true
)
type AppGetResponse ¶
type AppGetResponse interface {
ImplementsSpectrumAppGetResponse()
}
Union satisfied by spectrum.AppGetResponseUnknown or shared.UnionString.
type AppGetResponseEnvelope ¶
type AppGetResponseEnvelope struct { Errors []AppGetResponseEnvelopeErrors `json:"errors,required"` Messages []AppGetResponseEnvelopeMessages `json:"messages,required"` Result AppGetResponse `json:"result,required,nullable"` // Whether the API call was successful Success AppGetResponseEnvelopeSuccess `json:"success,required"` JSON appGetResponseEnvelopeJSON `json:"-"` }
func (*AppGetResponseEnvelope) UnmarshalJSON ¶
func (r *AppGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeErrors ¶
type AppGetResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON appGetResponseEnvelopeErrorsJSON `json:"-"` }
func (*AppGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeMessages ¶
type AppGetResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON appGetResponseEnvelopeMessagesJSON `json:"-"` }
func (*AppGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppGetResponseEnvelopeSuccess ¶
type AppGetResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AppGetResponseEnvelopeSuccessTrue AppGetResponseEnvelopeSuccess = true
)
type AppListParams ¶
type AppListParams struct { // 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" )
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" )
type AppListResponse ¶
type AppListResponse = interface{}
type AppNewParams ¶
type AppNewParams struct { // The name and type of DNS record for the Spectrum application. DNS param.Field[AppNewParamsDNS] `json:"dns,required"` // The name and type of DNS record for the Spectrum application. OriginDNS param.Field[AppNewParamsOriginDNS] `json:"origin_dns,required"` // 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[AppNewParamsOriginPort] `json:"origin_port,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,required"` // Enables Argo Smart Routing for this application. Notes: Only available for TCP // applications with traffic_type set to "direct". ArgoSmartRouting param.Field[bool] `json:"argo_smart_routing"` // The anycast edge IP configuration for the hostname of this application. EdgeIPs param.Field[AppNewParamsEdgeIPs] `json:"edge_ips"` // Enables IP Access Rules for this application. Notes: Only available for TCP // applications. IPFirewall param.Field[bool] `json:"ip_firewall"` // 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[AppNewParamsProxyProtocol] `json:"proxy_protocol"` // The type of TLS termination associated with the application. TLS param.Field[AppNewParamsTLS] `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. TrafficType param.Field[AppNewParamsTrafficType] `json:"traffic_type"` }
func (AppNewParams) MarshalJSON ¶
func (r AppNewParams) MarshalJSON() (data []byte, err error)
type AppNewParamsDNS ¶
type AppNewParamsDNS 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[AppNewParamsDNSType] `json:"type"` }
The name and type of DNS record for the Spectrum application.
func (AppNewParamsDNS) MarshalJSON ¶
func (r AppNewParamsDNS) MarshalJSON() (data []byte, err error)
type AppNewParamsDNSType ¶
type AppNewParamsDNSType string
The type of DNS record associated with the application.
const ( AppNewParamsDNSTypeCNAME AppNewParamsDNSType = "CNAME" AppNewParamsDNSTypeAddress AppNewParamsDNSType = "ADDRESS" )
type AppNewParamsEdgeIPs ¶
type AppNewParamsEdgeIPs interface {
// contains filtered or unexported methods
}
The anycast edge IP configuration for the hostname of this application.
Satisfied by spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable, spectrum.AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable.
type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable ¶
type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable 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[AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType] `json:"type"` }
func (AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) MarshalJSON ¶
func (r AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) MarshalJSON() (data []byte, err error)
type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType ¶
type AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType 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 (
AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableTypeStatic AppNewParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType = "static"
)
type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable ¶
type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. Connectivity param.Field[AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity] `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[AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType] `json:"type"` }
func (AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable) MarshalJSON ¶
func (r AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable) MarshalJSON() (data []byte, err error)
type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity ¶
type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity string
The IP versions supported for inbound connections on Spectrum anycast IPs.
const ( AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "all" AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV4 AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv4" AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV6 AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv6" )
type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType ¶
type AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType 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 (
AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic AppNewParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType = "dynamic"
)
type AppNewParamsOriginDNS ¶
type AppNewParamsOriginDNS 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[AppNewParamsOriginDNSType] `json:"type"` }
The name and type of DNS record for the Spectrum application.
func (AppNewParamsOriginDNS) MarshalJSON ¶
func (r AppNewParamsOriginDNS) MarshalJSON() (data []byte, err error)
type AppNewParamsOriginDNSType ¶
type AppNewParamsOriginDNSType string
The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.
const ( AppNewParamsOriginDNSTypeEmpty AppNewParamsOriginDNSType = "" AppNewParamsOriginDNSTypeA AppNewParamsOriginDNSType = "A" AppNewParamsOriginDNSTypeAAAA AppNewParamsOriginDNSType = "AAAA" AppNewParamsOriginDNSTypeSRV AppNewParamsOriginDNSType = "SRV" )
type AppNewParamsOriginPort ¶
type AppNewParamsOriginPort interface {
ImplementsSpectrumAppNewParamsOriginPort()
}
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 AppNewParamsProxyProtocol ¶
type AppNewParamsProxyProtocol 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 ( AppNewParamsProxyProtocolOff AppNewParamsProxyProtocol = "off" AppNewParamsProxyProtocolV1 AppNewParamsProxyProtocol = "v1" AppNewParamsProxyProtocolV2 AppNewParamsProxyProtocol = "v2" AppNewParamsProxyProtocolSimple AppNewParamsProxyProtocol = "simple" )
type AppNewParamsTLS ¶
type AppNewParamsTLS string
The type of TLS termination associated with the application.
const ( AppNewParamsTLSOff AppNewParamsTLS = "off" AppNewParamsTLSFlexible AppNewParamsTLS = "flexible" AppNewParamsTLSFull AppNewParamsTLS = "full" AppNewParamsTLSStrict AppNewParamsTLS = "strict" )
type AppNewParamsTrafficType ¶
type AppNewParamsTrafficType 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.
const ( AppNewParamsTrafficTypeDirect AppNewParamsTrafficType = "direct" AppNewParamsTrafficTypeHTTP AppNewParamsTrafficType = "http" AppNewParamsTrafficTypeHTTPS AppNewParamsTrafficType = "https" )
type AppNewResponse ¶
type AppNewResponse struct { // Application identifier. ID string `json:"id"` // Enables Argo Smart Routing for this application. Notes: Only available for TCP // applications with traffic_type set to "direct". ArgoSmartRouting bool `json:"argo_smart_routing"` // When the Application was created. CreatedOn time.Time `json:"created_on" format:"date-time"` // The name and type of DNS record for the Spectrum application. DNS AppNewResponseDNS `json:"dns"` // The anycast edge IP configuration for the hostname of this application. EdgeIPs AppNewResponseEdgeIPs `json:"edge_ips"` // Enables IP Access Rules for this application. Notes: Only available for TCP // applications. IPFirewall bool `json:"ip_firewall"` // When the Application was last modified. ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The name and type of DNS record for the Spectrum application. OriginDNS AppNewResponseOriginDNS `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 AppNewResponseOriginPort `json:"origin_port"` // 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"` // 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. TrafficType AppNewResponseTrafficType `json:"traffic_type"` JSON appNewResponseJSON `json:"-"` }
func (*AppNewResponse) UnmarshalJSON ¶
func (r *AppNewResponse) UnmarshalJSON(data []byte) (err error)
type AppNewResponseDNS ¶
type AppNewResponseDNS 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 AppNewResponseDNSType `json:"type"` JSON appNewResponseDNSJSON `json:"-"` }
The name and type of DNS record for the Spectrum application.
func (*AppNewResponseDNS) UnmarshalJSON ¶
func (r *AppNewResponseDNS) UnmarshalJSON(data []byte) (err error)
type AppNewResponseDNSType ¶
type AppNewResponseDNSType string
The type of DNS record associated with the application.
const ( AppNewResponseDNSTypeCNAME AppNewResponseDNSType = "CNAME" AppNewResponseDNSTypeAddress AppNewResponseDNSType = "ADDRESS" )
type AppNewResponseEdgeIPs ¶
type AppNewResponseEdgeIPs interface {
// contains filtered or unexported methods
}
The anycast edge IP configuration for the hostname of this application.
Union satisfied by spectrum.AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable or spectrum.AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable.
type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable ¶
type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable 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 AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType `json:"type"` JSON appNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON `json:"-"` }
func (*AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) UnmarshalJSON ¶
func (r *AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType ¶
type AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType 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 (
AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableTypeStatic AppNewResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType = "static"
)
type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable ¶
type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. Connectivity AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity `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 AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType `json:"type"` JSON appNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON `json:"-"` }
func (*AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable) UnmarshalJSON ¶
func (r *AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity ¶
type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity string
The IP versions supported for inbound connections on Spectrum anycast IPs.
const ( AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "all" AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV4 AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv4" AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV6 AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv6" )
type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType ¶
type AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType 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 (
AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic AppNewResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType = "dynamic"
)
type AppNewResponseEnvelope ¶
type AppNewResponseEnvelope struct { Errors []AppNewResponseEnvelopeErrors `json:"errors,required"` Messages []AppNewResponseEnvelopeMessages `json:"messages,required"` Result AppNewResponse `json:"result,required,nullable"` // Whether the API call was successful Success AppNewResponseEnvelopeSuccess `json:"success,required"` JSON appNewResponseEnvelopeJSON `json:"-"` }
func (*AppNewResponseEnvelope) UnmarshalJSON ¶
func (r *AppNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeErrors ¶
type AppNewResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON appNewResponseEnvelopeErrorsJSON `json:"-"` }
func (*AppNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeMessages ¶
type AppNewResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON appNewResponseEnvelopeMessagesJSON `json:"-"` }
func (*AppNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppNewResponseEnvelopeSuccess ¶
type AppNewResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AppNewResponseEnvelopeSuccessTrue AppNewResponseEnvelopeSuccess = true
)
type AppNewResponseOriginDNS ¶
type AppNewResponseOriginDNS 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 AppNewResponseOriginDNSType `json:"type"` JSON appNewResponseOriginDNSJSON `json:"-"` }
The name and type of DNS record for the Spectrum application.
func (*AppNewResponseOriginDNS) UnmarshalJSON ¶
func (r *AppNewResponseOriginDNS) UnmarshalJSON(data []byte) (err error)
type AppNewResponseOriginDNSType ¶
type AppNewResponseOriginDNSType string
The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.
const ( AppNewResponseOriginDNSTypeEmpty AppNewResponseOriginDNSType = "" AppNewResponseOriginDNSTypeA AppNewResponseOriginDNSType = "A" AppNewResponseOriginDNSTypeAAAA AppNewResponseOriginDNSType = "AAAA" AppNewResponseOriginDNSTypeSRV AppNewResponseOriginDNSType = "SRV" )
type AppNewResponseOriginPort ¶
type AppNewResponseOriginPort interface {
ImplementsSpectrumAppNewResponseOriginPort()
}
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 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" )
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" )
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.
const ( AppNewResponseTrafficTypeDirect AppNewResponseTrafficType = "direct" AppNewResponseTrafficTypeHTTP AppNewResponseTrafficType = "http" AppNewResponseTrafficTypeHTTPS AppNewResponseTrafficType = "https" )
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, zone string, appID string, opts ...option.RequestOption) (res *AppDeleteResponse, err error)
Deletes a previously existing application.
func (*AppService) Get ¶
func (r *AppService) Get(ctx context.Context, zone string, appID string, 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, zone string, query AppListParams, opts ...option.RequestOption) (res *shared.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, zone string, query AppListParams, opts ...option.RequestOption) *shared.V4PagePaginationArrayAutoPager[AppListResponse]
Retrieves a list of currently existing Spectrum applications inside a zone.
func (*AppService) New ¶
func (r *AppService) New(ctx context.Context, zone string, body 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, zone string, appID string, body 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 { // The name and type of DNS record for the Spectrum application. DNS param.Field[AppUpdateParamsDNS] `json:"dns,required"` // The name and type of DNS record for the Spectrum application. OriginDNS param.Field[AppUpdateParamsOriginDNS] `json:"origin_dns,required"` // 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[AppUpdateParamsOriginPort] `json:"origin_port,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,required"` // Enables Argo Smart Routing for this application. Notes: Only available for TCP // applications with traffic_type set to "direct". ArgoSmartRouting param.Field[bool] `json:"argo_smart_routing"` // The anycast edge IP configuration for the hostname of this application. EdgeIPs param.Field[AppUpdateParamsEdgeIPs] `json:"edge_ips"` // Enables IP Access Rules for this application. Notes: Only available for TCP // applications. IPFirewall param.Field[bool] `json:"ip_firewall"` // 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[AppUpdateParamsProxyProtocol] `json:"proxy_protocol"` // The type of TLS termination associated with the application. TLS param.Field[AppUpdateParamsTLS] `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. TrafficType param.Field[AppUpdateParamsTrafficType] `json:"traffic_type"` }
func (AppUpdateParams) MarshalJSON ¶
func (r AppUpdateParams) MarshalJSON() (data []byte, err error)
type AppUpdateParamsDNS ¶
type AppUpdateParamsDNS 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[AppUpdateParamsDNSType] `json:"type"` }
The name and type of DNS record for the Spectrum application.
func (AppUpdateParamsDNS) MarshalJSON ¶
func (r AppUpdateParamsDNS) MarshalJSON() (data []byte, err error)
type AppUpdateParamsDNSType ¶
type AppUpdateParamsDNSType string
The type of DNS record associated with the application.
const ( AppUpdateParamsDNSTypeCNAME AppUpdateParamsDNSType = "CNAME" AppUpdateParamsDNSTypeAddress AppUpdateParamsDNSType = "ADDRESS" )
type AppUpdateParamsEdgeIPs ¶
type AppUpdateParamsEdgeIPs interface {
// contains filtered or unexported methods
}
The anycast edge IP configuration for the hostname of this application.
Satisfied by spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable, spectrum.AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable.
type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable ¶
type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable 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[AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType] `json:"type"` }
func (AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) MarshalJSON ¶
func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) MarshalJSON() (data []byte, err error)
type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType ¶
type AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType 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 (
AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableTypeStatic AppUpdateParamsEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType = "static"
)
type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable ¶
type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. Connectivity param.Field[AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity] `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[AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType] `json:"type"` }
func (AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable) MarshalJSON ¶
func (r AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariable) MarshalJSON() (data []byte, err error)
type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity ¶
type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity string
The IP versions supported for inbound connections on Spectrum anycast IPs.
const ( AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "all" AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV4 AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv4" AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV6 AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv6" )
type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType ¶
type AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType 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 (
AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic AppUpdateParamsEdgeIPsSpectrumEdgeIPEyeballIPsVariableType = "dynamic"
)
type AppUpdateParamsOriginDNS ¶
type AppUpdateParamsOriginDNS 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[AppUpdateParamsOriginDNSType] `json:"type"` }
The name and type of DNS record for the Spectrum application.
func (AppUpdateParamsOriginDNS) MarshalJSON ¶
func (r AppUpdateParamsOriginDNS) MarshalJSON() (data []byte, err error)
type AppUpdateParamsOriginDNSType ¶
type AppUpdateParamsOriginDNSType string
The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.
const ( AppUpdateParamsOriginDNSTypeEmpty AppUpdateParamsOriginDNSType = "" AppUpdateParamsOriginDNSTypeA AppUpdateParamsOriginDNSType = "A" AppUpdateParamsOriginDNSTypeAAAA AppUpdateParamsOriginDNSType = "AAAA" AppUpdateParamsOriginDNSTypeSRV AppUpdateParamsOriginDNSType = "SRV" )
type AppUpdateParamsOriginPort ¶
type AppUpdateParamsOriginPort interface {
ImplementsSpectrumAppUpdateParamsOriginPort()
}
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 AppUpdateParamsProxyProtocol ¶
type AppUpdateParamsProxyProtocol 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 ( AppUpdateParamsProxyProtocolOff AppUpdateParamsProxyProtocol = "off" AppUpdateParamsProxyProtocolV1 AppUpdateParamsProxyProtocol = "v1" AppUpdateParamsProxyProtocolV2 AppUpdateParamsProxyProtocol = "v2" AppUpdateParamsProxyProtocolSimple AppUpdateParamsProxyProtocol = "simple" )
type AppUpdateParamsTLS ¶
type AppUpdateParamsTLS string
The type of TLS termination associated with the application.
const ( AppUpdateParamsTLSOff AppUpdateParamsTLS = "off" AppUpdateParamsTLSFlexible AppUpdateParamsTLS = "flexible" AppUpdateParamsTLSFull AppUpdateParamsTLS = "full" AppUpdateParamsTLSStrict AppUpdateParamsTLS = "strict" )
type AppUpdateParamsTrafficType ¶
type AppUpdateParamsTrafficType 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.
const ( AppUpdateParamsTrafficTypeDirect AppUpdateParamsTrafficType = "direct" AppUpdateParamsTrafficTypeHTTP AppUpdateParamsTrafficType = "http" AppUpdateParamsTrafficTypeHTTPS AppUpdateParamsTrafficType = "https" )
type AppUpdateResponse ¶
type AppUpdateResponse struct { // Application identifier. ID string `json:"id"` // Enables Argo Smart Routing for this application. Notes: Only available for TCP // applications with traffic_type set to "direct". ArgoSmartRouting bool `json:"argo_smart_routing"` // When the Application was created. CreatedOn time.Time `json:"created_on" format:"date-time"` // The name and type of DNS record for the Spectrum application. DNS AppUpdateResponseDNS `json:"dns"` // The anycast edge IP configuration for the hostname of this application. EdgeIPs AppUpdateResponseEdgeIPs `json:"edge_ips"` // Enables IP Access Rules for this application. Notes: Only available for TCP // applications. IPFirewall bool `json:"ip_firewall"` // When the Application was last modified. ModifiedOn time.Time `json:"modified_on" format:"date-time"` // The name and type of DNS record for the Spectrum application. OriginDNS AppUpdateResponseOriginDNS `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 AppUpdateResponseOriginPort `json:"origin_port"` // 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"` // 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. TrafficType AppUpdateResponseTrafficType `json:"traffic_type"` JSON appUpdateResponseJSON `json:"-"` }
func (*AppUpdateResponse) UnmarshalJSON ¶
func (r *AppUpdateResponse) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseDNS ¶
type AppUpdateResponseDNS 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 AppUpdateResponseDNSType `json:"type"` JSON appUpdateResponseDNSJSON `json:"-"` }
The name and type of DNS record for the Spectrum application.
func (*AppUpdateResponseDNS) UnmarshalJSON ¶
func (r *AppUpdateResponseDNS) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseDNSType ¶
type AppUpdateResponseDNSType string
The type of DNS record associated with the application.
const ( AppUpdateResponseDNSTypeCNAME AppUpdateResponseDNSType = "CNAME" AppUpdateResponseDNSTypeAddress AppUpdateResponseDNSType = "ADDRESS" )
type AppUpdateResponseEdgeIPs ¶
type AppUpdateResponseEdgeIPs interface {
// contains filtered or unexported methods
}
The anycast edge IP configuration for the hostname of this application.
Union satisfied by spectrum.AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable or spectrum.AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable.
type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable ¶
type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable 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 AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType `json:"type"` JSON appUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableJSON `json:"-"` }
func (*AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) UnmarshalJSON ¶
func (r *AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariable) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType ¶
type AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType 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 (
AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableTypeStatic AppUpdateResponseEdgeIPsSpectrumEdgeIPCustomerOwnedIPsVariableType = "static"
)
type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable ¶
type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable struct { // The IP versions supported for inbound connections on Spectrum anycast IPs. Connectivity AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity `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 AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType `json:"type"` JSON appUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableJSON `json:"-"` }
func (*AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable) UnmarshalJSON ¶
func (r *AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariable) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity ¶
type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity string
The IP versions supported for inbound connections on Spectrum anycast IPs.
const ( AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityAll AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "all" AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV4 AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv4" AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivityIPV6 AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableConnectivity = "ipv6" )
type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType ¶
type AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType 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 (
AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableTypeDynamic AppUpdateResponseEdgeIPsSpectrumEdgeIPEyeballIPsVariableType = "dynamic"
)
type AppUpdateResponseEnvelope ¶
type AppUpdateResponseEnvelope struct { Errors []AppUpdateResponseEnvelopeErrors `json:"errors,required"` Messages []AppUpdateResponseEnvelopeMessages `json:"messages,required"` Result AppUpdateResponse `json:"result,required,nullable"` // Whether the API call was successful Success AppUpdateResponseEnvelopeSuccess `json:"success,required"` JSON appUpdateResponseEnvelopeJSON `json:"-"` }
func (*AppUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeErrors ¶
type AppUpdateResponseEnvelopeErrors struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON appUpdateResponseEnvelopeErrorsJSON `json:"-"` }
func (*AppUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeMessages ¶
type AppUpdateResponseEnvelopeMessages struct { Code int64 `json:"code,required"` Message string `json:"message,required"` JSON appUpdateResponseEnvelopeMessagesJSON `json:"-"` }
func (*AppUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *AppUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseEnvelopeSuccess ¶
type AppUpdateResponseEnvelopeSuccess bool
Whether the API call was successful
const (
AppUpdateResponseEnvelopeSuccessTrue AppUpdateResponseEnvelopeSuccess = true
)
type AppUpdateResponseOriginDNS ¶
type AppUpdateResponseOriginDNS 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 AppUpdateResponseOriginDNSType `json:"type"` JSON appUpdateResponseOriginDNSJSON `json:"-"` }
The name and type of DNS record for the Spectrum application.
func (*AppUpdateResponseOriginDNS) UnmarshalJSON ¶
func (r *AppUpdateResponseOriginDNS) UnmarshalJSON(data []byte) (err error)
type AppUpdateResponseOriginDNSType ¶
type AppUpdateResponseOriginDNSType string
The type of DNS record associated with the origin. "" is used to specify a combination of A/AAAA records.
const ( AppUpdateResponseOriginDNSTypeEmpty AppUpdateResponseOriginDNSType = "" AppUpdateResponseOriginDNSTypeA AppUpdateResponseOriginDNSType = "A" AppUpdateResponseOriginDNSTypeAAAA AppUpdateResponseOriginDNSType = "AAAA" AppUpdateResponseOriginDNSTypeSRV AppUpdateResponseOriginDNSType = "SRV" )
type AppUpdateResponseOriginPort ¶
type AppUpdateResponseOriginPort interface {
ImplementsSpectrumAppUpdateResponseOriginPort()
}
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 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" )
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" )
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.
const ( AppUpdateResponseTrafficTypeDirect AppUpdateResponseTrafficType = "direct" AppUpdateResponseTrafficTypeHTTP AppUpdateResponseTrafficType = "http" AppUpdateResponseTrafficTypeHTTPS AppUpdateResponseTrafficType = "https" )
type SpectrumService ¶
type SpectrumService struct { Options []option.RequestOption Analytics *AnalyticsService Apps *AppService }
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.