spectrum

package
v3.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin

This is an alias to an internal value.

View Source
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare

This is an alias to an internal value.

View Source
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser

This is an alias to an internal value.

View Source
const CertificateCADigicert = shared.CertificateCADigicert

This is an alias to an internal value.

View Source
const CertificateCAGoogle = shared.CertificateCAGoogle

This is an alias to an internal value.

View Source
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt

This is an alias to an internal value.

View Source
const CertificateCASSLCom = shared.CertificateCASSLCom

This is an alias to an internal value.

View Source
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC

This is an alias to an internal value.

View Source
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy

This is an alias to an internal value.

View Source
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector

This is an alias to an internal value.

View Source
const MemberStatusAccepted = shared.MemberStatusAccepted

This is an alias to an internal value.

View Source
const MemberStatusPending = shared.MemberStatusPending

This is an alias to an internal value.

View Source
const SortDirectionAsc = shared.SortDirectionAsc

This is an alias to an internal value.

View Source
const SortDirectionDesc = shared.SortDirectionDesc

This is an alias to an internal value.

View Source
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly

This is an alias to an internal value.

View Source
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly

This is an alias to an internal value.

View Source
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment

This is an alias to an internal value.

View Source
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled

This is an alias to an internal value.

View Source
const SubscriptionStateExpired = shared.SubscriptionStateExpired

This is an alias to an internal value.

View Source
const SubscriptionStateFailed = shared.SubscriptionStateFailed

This is an alias to an internal value.

View Source
const SubscriptionStatePaid = shared.SubscriptionStatePaid

This is an alias to an internal value.

View Source
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned

This is an alias to an internal value.

View Source
const SubscriptionStateTrial = shared.SubscriptionStateTrial

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

type AnalyticsAggregateCurrentGetParams

type AnalyticsAggregateCurrentGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,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

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

type AnalyticsAggregateCurrentGetResponse

type AnalyticsAggregateCurrentGetResponse struct {
	// Application identifier.
	AppID string `json:"appID,required"`
	// Number of bytes sent
	BytesEgress float64 `json:"bytesEgress,required"`
	// Number of bytes received
	BytesIngress float64 `json:"bytesIngress,required"`
	// Number of connections
	Connections float64 `json:"connections,required"`
	// Average duration of connections
	DurationAvg float64                                  `json:"durationAvg,required"`
	JSON        analyticsAggregateCurrentGetResponseJSON `json:"-"`
}

func (*AnalyticsAggregateCurrentGetResponse) UnmarshalJSON

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

type AnalyticsAggregateCurrentGetResponseEnvelope

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

func (*AnalyticsAggregateCurrentGetResponseEnvelope) UnmarshalJSON

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

type AnalyticsAggregateCurrentGetResponseEnvelopeSuccess

type AnalyticsAggregateCurrentGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AnalyticsAggregateCurrentGetResponseEnvelopeSuccessTrue AnalyticsAggregateCurrentGetResponseEnvelopeSuccess = true
)

func (AnalyticsAggregateCurrentGetResponseEnvelopeSuccess) IsKnown

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

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,required"`
	// Used to select time series resolution.
	TimeDelta param.Field[AnalyticsEventBytimeGetParamsTimeDelta] `query:"time_delta,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      |
	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

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

type AnalyticsEventBytimeGetResponse

type AnalyticsEventBytimeGetResponse struct {
	// List of columns returned by the analytics query.
	Data []AnalyticsEventBytimeGetResponseData `json:"data,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,required"`
	// Maximum result for each selected metrics across all data.
	Max map[string]float64 `json:"max,required"`
	// Minimum result for each selected metrics across all data.
	Min   map[string]float64                   `json:"min,required"`
	Query AnalyticsEventBytimeGetResponseQuery `json:"query,required"`
	// Total number of rows in the result.
	Rows float64 `json:"rows,required"`
	// Total result for each selected metrics across all data.
	Totals map[string]float64 `json:"totals,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 spectrum.AnalyticsEventBytimeGetResponseDataMetricsArray or spectrum.AnalyticsEventBytimeGetResponseDataMetricsArray.

type AnalyticsEventBytimeGetResponseEnvelope

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

func (*AnalyticsEventBytimeGetResponseEnvelope) UnmarshalJSON

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

type AnalyticsEventBytimeGetResponseEnvelopeSuccess

type AnalyticsEventBytimeGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AnalyticsEventBytimeGetResponseEnvelopeSuccessTrue AnalyticsEventBytimeGetResponseEnvelopeSuccess = true
)

func (AnalyticsEventBytimeGetResponseEnvelopeSuccess) IsKnown

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

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

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

type AnalyticsEventSummaryGetResponse

type AnalyticsEventSummaryGetResponse struct {
	// List of columns returned by the analytics query.
	Data []AnalyticsEventSummaryGetResponseData `json:"data,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,required"`
	// Maximum result for each selected metrics across all data.
	Max map[string]float64 `json:"max,required"`
	// Minimum result for each selected metrics across all data.
	Min   map[string]float64                    `json:"min,required"`
	Query AnalyticsEventSummaryGetResponseQuery `json:"query,required"`
	// Total number of rows in the result.
	Rows float64 `json:"rows,required"`
	// Total result for each selected metrics across all data.
	Totals map[string]float64 `json:"totals,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 spectrum.AnalyticsEventSummaryGetResponseDataMetricsArray or spectrum.AnalyticsEventSummaryGetResponseDataMetricsArray.

type AnalyticsEventSummaryGetResponseEnvelope

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

func (*AnalyticsEventSummaryGetResponseEnvelope) UnmarshalJSON

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

type AnalyticsEventSummaryGetResponseEnvelopeSuccess

type AnalyticsEventSummaryGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AnalyticsEventSummaryGetResponseEnvelopeSuccessTrue AnalyticsEventSummaryGetResponseEnvelopeSuccess = true
)

func (AnalyticsEventSummaryGetResponseEnvelopeSuccess) IsKnown

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

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

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 AppDeleteParams struct {
	// Zone identifier.
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type AppDeleteResponse

type AppDeleteResponse struct {
	// Identifier
	ID   string                `json:"id,required"`
	JSON appDeleteResponseJSON `json:"-"`
}

func (*AppDeleteResponse) UnmarshalJSON

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

type AppDeleteResponseEnvelope

type AppDeleteResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success AppDeleteResponseEnvelopeSuccess `json:"success,required"`
	Result  AppDeleteResponse                `json:"result,nullable"`
	JSON    appDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*AppDeleteResponseEnvelope) UnmarshalJSON

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

type AppDeleteResponseEnvelopeSuccess

type AppDeleteResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AppDeleteResponseEnvelopeSuccessTrue AppDeleteResponseEnvelopeSuccess = true
)

func (AppDeleteResponseEnvelopeSuccess) IsKnown

type AppGetParams

type AppGetParams struct {
	// Zone identifier.
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type AppGetResponse

type AppGetResponse struct {
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// App identifier.
	ID string `json:"id,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
	// 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"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// 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,required"`
	// 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"`
	// 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,required"`
	// 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.
	TrafficType AppGetResponseTrafficType `json:"traffic_type"`
	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 spectrum.AppGetResponseSpectrumConfigAppConfig, spectrum.AppGetResponseSpectrumConfigPaygoAppConfig.

func (*AppGetResponse) UnmarshalJSON

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

type AppGetResponseEnvelope

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

func (*AppGetResponseEnvelope) UnmarshalJSON

func (r *AppGetResponseEnvelope) 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 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,required"`
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// Enables IP Access Rules for this application. Notes: Only available for TCP
	// applications.
	IPFirewall bool `json:"ip_firewall,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,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,required"`
	// 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,required"`
	// The type of TLS termination associated with the application.
	TLS AppGetResponseSpectrumConfigAppConfigTLS `json:"tls,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.
	TrafficType AppGetResponseSpectrumConfigAppConfigTrafficType `json:"traffic_type,required"`
	// 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"`
	// The anycast edge IP configuration for the hostname of this application.
	EdgeIPs EdgeIPs `json:"edge_ips"`
	// 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"`
	JSON       appGetResponseSpectrumConfigAppConfigJSON `json:"-"`
}

func (*AppGetResponseSpectrumConfigAppConfig) UnmarshalJSON

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

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

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

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.

const (
	AppGetResponseSpectrumConfigAppConfigTrafficTypeDirect AppGetResponseSpectrumConfigAppConfigTrafficType = "direct"
	AppGetResponseSpectrumConfigAppConfigTrafficTypeHTTP   AppGetResponseSpectrumConfigAppConfigTrafficType = "http"
	AppGetResponseSpectrumConfigAppConfigTrafficTypeHTTPS  AppGetResponseSpectrumConfigAppConfigTrafficType = "https"
)

func (AppGetResponseSpectrumConfigAppConfigTrafficType) IsKnown

type AppGetResponseSpectrumConfigPaygoAppConfig

type AppGetResponseSpectrumConfigPaygoAppConfig struct {
	// App identifier.
	ID string `json:"id,required"`
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,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,required"`
	// List of origin IP addresses. Array may contain multiple IP addresses for load
	// balancing.
	OriginDirect []string                                       `json:"origin_direct" format:"URI"`
	JSON         appGetResponseSpectrumConfigPaygoAppConfigJSON `json:"-"`
}

func (*AppGetResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON

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

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.

const (
	AppGetResponseTrafficTypeDirect AppGetResponseTrafficType = "direct"
	AppGetResponseTrafficTypeHTTP   AppGetResponseTrafficType = "http"
	AppGetResponseTrafficTypeHTTPS  AppGetResponseTrafficType = "https"
)

func (AppGetResponseTrafficType) IsKnown

func (r AppGetResponseTrafficType) IsKnown() bool

type AppGetResponseUnion

type AppGetResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by spectrum.AppGetResponseSpectrumConfigAppConfig or spectrum.AppGetResponseSpectrumConfigPaygoAppConfig.

type AppListParams

type AppListParams struct {
	// Zone identifier.
	ZoneID param.Field[string] `path:"zone_id,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 AppListResponseArray

type AppListResponseArray []AppListResponseArrayItem

type AppListResponseArrayItem

type AppListResponseArrayItem struct {
	// App identifier.
	ID string `json:"id,required"`
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// Enables IP Access Rules for this application. Notes: Only available for TCP
	// applications.
	IPFirewall bool `json:"ip_firewall,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,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,required"`
	// 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 AppListResponseArrayProxyProtocol `json:"proxy_protocol,required"`
	// The type of TLS termination associated with the application.
	TLS AppListResponseArrayTLS `json:"tls,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.
	TrafficType AppListResponseArrayTrafficType `json:"traffic_type,required"`
	// 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"`
	// The anycast edge IP configuration for the hostname of this application.
	EdgeIPs EdgeIPs `json:"edge_ips"`
	// 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"`
	JSON       appListResponseArrayItemJSON `json:"-"`
}

func (*AppListResponseArrayItem) UnmarshalJSON

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

type AppListResponseArrayProxyProtocol

type AppListResponseArrayProxyProtocol 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 (
	AppListResponseArrayProxyProtocolOff    AppListResponseArrayProxyProtocol = "off"
	AppListResponseArrayProxyProtocolV1     AppListResponseArrayProxyProtocol = "v1"
	AppListResponseArrayProxyProtocolV2     AppListResponseArrayProxyProtocol = "v2"
	AppListResponseArrayProxyProtocolSimple AppListResponseArrayProxyProtocol = "simple"
)

func (AppListResponseArrayProxyProtocol) IsKnown

type AppListResponseArrayTLS

type AppListResponseArrayTLS string

The type of TLS termination associated with the application.

const (
	AppListResponseArrayTLSOff      AppListResponseArrayTLS = "off"
	AppListResponseArrayTLSFlexible AppListResponseArrayTLS = "flexible"
	AppListResponseArrayTLSFull     AppListResponseArrayTLS = "full"
	AppListResponseArrayTLSStrict   AppListResponseArrayTLS = "strict"
)

func (AppListResponseArrayTLS) IsKnown

func (r AppListResponseArrayTLS) IsKnown() bool

type AppListResponseArrayTrafficType

type AppListResponseArrayTrafficType 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 (
	AppListResponseArrayTrafficTypeDirect AppListResponseArrayTrafficType = "direct"
	AppListResponseArrayTrafficTypeHTTP   AppListResponseArrayTrafficType = "http"
	AppListResponseArrayTrafficTypeHTTPS  AppListResponseArrayTrafficType = "https"
)

func (AppListResponseArrayTrafficType) IsKnown

type AppListResponseEnvelope

type AppListResponseEnvelope struct {
	Errors   []shared.ResponseInfo `json:"errors,required"`
	Messages []shared.ResponseInfo `json:"messages,required"`
	// Whether the API call was successful
	Success    AppListResponseEnvelopeSuccess    `json:"success,required"`
	Result     AppListResponseUnion              `json:"result"`
	ResultInfo AppListResponseEnvelopeResultInfo `json:"result_info"`
	JSON       appListResponseEnvelopeJSON       `json:"-"`
}

func (*AppListResponseEnvelope) UnmarshalJSON

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

type AppListResponseEnvelopeResultInfo

type AppListResponseEnvelopeResultInfo struct {
	// Total number of results for the requested service
	Count float64 `json:"count"`
	// Current page within paginated list of results
	Page float64 `json:"page"`
	// Number of results per page of results
	PerPage float64 `json:"per_page"`
	// Total results available without any search parameters
	TotalCount float64                               `json:"total_count"`
	JSON       appListResponseEnvelopeResultInfoJSON `json:"-"`
}

func (*AppListResponseEnvelopeResultInfo) UnmarshalJSON

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

type AppListResponseEnvelopeSuccess

type AppListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AppListResponseEnvelopeSuccessTrue AppListResponseEnvelopeSuccess = true
)

func (AppListResponseEnvelopeSuccess) IsKnown

type AppListResponseUnion

type AppListResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by spectrum.AppListResponseArray or spectrum.AppListResponseArray.

type AppNewParams

type AppNewParams struct {
	// Zone identifier.
	ZoneID param.Field[string]   `path:"zone_id,required"`
	Body   AppNewParamsBodyUnion `json:"body,required"`
}

func (AppNewParams) MarshalJSON

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

type AppNewParamsBody

type AppNewParamsBody struct {
	// 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 name and type of DNS record for the Spectrum application.
	DNS param.Field[DNSParam] `json:"dns,required"`
	// 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,required"`
	// 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"`
	// 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 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.
	TrafficType param.Field[AppNewParamsBodyTrafficType] `json:"traffic_type"`
}

func (AppNewParamsBody) MarshalJSON

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

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,required"`
	// Enables IP Access Rules for this application. Notes: Only available for TCP
	// applications.
	IPFirewall param.Field[bool] `json:"ip_firewall,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 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,required"`
	// The type of TLS termination associated with the application.
	TLS param.Field[AppNewParamsBodySpectrumConfigAppConfigTLS] `json:"tls,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.
	TrafficType param.Field[AppNewParamsBodySpectrumConfigAppConfigTrafficType] `json:"traffic_type,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[EdgeIPsUnionParam] `json:"edge_ips"`
	// 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"`
}

func (AppNewParamsBodySpectrumConfigAppConfig) MarshalJSON

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

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

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

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.

const (
	AppNewParamsBodySpectrumConfigAppConfigTrafficTypeDirect AppNewParamsBodySpectrumConfigAppConfigTrafficType = "direct"
	AppNewParamsBodySpectrumConfigAppConfigTrafficTypeHTTP   AppNewParamsBodySpectrumConfigAppConfigTrafficType = "http"
	AppNewParamsBodySpectrumConfigAppConfigTrafficTypeHTTPS  AppNewParamsBodySpectrumConfigAppConfigTrafficType = "https"
)

func (AppNewParamsBodySpectrumConfigAppConfigTrafficType) IsKnown

type AppNewParamsBodySpectrumConfigPaygoAppConfig

type AppNewParamsBodySpectrumConfigPaygoAppConfig struct {
	// The name and type of DNS record for the Spectrum application.
	DNS param.Field[DNSParam] `json:"dns,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"`
	// List of origin IP addresses. Array may contain multiple IP addresses for load
	// balancing.
	OriginDirect param.Field[[]string] `json:"origin_direct" format:"URI"`
}

func (AppNewParamsBodySpectrumConfigPaygoAppConfig) MarshalJSON

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

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.

const (
	AppNewParamsBodyTrafficTypeDirect AppNewParamsBodyTrafficType = "direct"
	AppNewParamsBodyTrafficTypeHTTP   AppNewParamsBodyTrafficType = "http"
	AppNewParamsBodyTrafficTypeHTTPS  AppNewParamsBodyTrafficType = "https"
)

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 {
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// App identifier.
	ID string `json:"id,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
	// 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"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// 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,required"`
	// 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"`
	// 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,required"`
	// 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:"-"`
	// 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 spectrum.AppNewResponseSpectrumConfigAppConfig, spectrum.AppNewResponseSpectrumConfigPaygoAppConfig.

func (*AppNewResponse) UnmarshalJSON

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

type AppNewResponseEnvelope

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

func (*AppNewResponseEnvelope) UnmarshalJSON

func (r *AppNewResponseEnvelope) 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 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,required"`
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// Enables IP Access Rules for this application. Notes: Only available for TCP
	// applications.
	IPFirewall bool `json:"ip_firewall,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,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,required"`
	// 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,required"`
	// The type of TLS termination associated with the application.
	TLS AppNewResponseSpectrumConfigAppConfigTLS `json:"tls,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.
	TrafficType AppNewResponseSpectrumConfigAppConfigTrafficType `json:"traffic_type,required"`
	// 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"`
	// The anycast edge IP configuration for the hostname of this application.
	EdgeIPs EdgeIPs `json:"edge_ips"`
	// 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"`
	JSON       appNewResponseSpectrumConfigAppConfigJSON `json:"-"`
}

func (*AppNewResponseSpectrumConfigAppConfig) UnmarshalJSON

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

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

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

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.

const (
	AppNewResponseSpectrumConfigAppConfigTrafficTypeDirect AppNewResponseSpectrumConfigAppConfigTrafficType = "direct"
	AppNewResponseSpectrumConfigAppConfigTrafficTypeHTTP   AppNewResponseSpectrumConfigAppConfigTrafficType = "http"
	AppNewResponseSpectrumConfigAppConfigTrafficTypeHTTPS  AppNewResponseSpectrumConfigAppConfigTrafficType = "https"
)

func (AppNewResponseSpectrumConfigAppConfigTrafficType) IsKnown

type AppNewResponseSpectrumConfigPaygoAppConfig

type AppNewResponseSpectrumConfigPaygoAppConfig struct {
	// App identifier.
	ID string `json:"id,required"`
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,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,required"`
	// List of origin IP addresses. Array may contain multiple IP addresses for load
	// balancing.
	OriginDirect []string                                       `json:"origin_direct" format:"URI"`
	JSON         appNewResponseSpectrumConfigPaygoAppConfigJSON `json:"-"`
}

func (*AppNewResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON

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

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.

const (
	AppNewResponseTrafficTypeDirect AppNewResponseTrafficType = "direct"
	AppNewResponseTrafficTypeHTTP   AppNewResponseTrafficType = "http"
	AppNewResponseTrafficTypeHTTPS  AppNewResponseTrafficType = "https"
)

func (AppNewResponseTrafficType) IsKnown

func (r AppNewResponseTrafficType) IsKnown() bool

type AppNewResponseUnion

type AppNewResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by spectrum.AppNewResponseSpectrumConfigAppConfig or spectrum.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 *AppListResponseUnion, err error)

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,required"`
	Body   AppUpdateParamsBodyUnion `json:"body,required"`
}

func (AppUpdateParams) MarshalJSON

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

type AppUpdateParamsBody

type AppUpdateParamsBody struct {
	// 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 name and type of DNS record for the Spectrum application.
	DNS param.Field[DNSParam] `json:"dns,required"`
	// 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,required"`
	// 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"`
	// 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 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.
	TrafficType param.Field[AppUpdateParamsBodyTrafficType] `json:"traffic_type"`
}

func (AppUpdateParamsBody) MarshalJSON

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

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

type AppUpdateParamsBodySpectrumConfigAppConfig

type AppUpdateParamsBodySpectrumConfigAppConfig struct {
	// The name and type of DNS record for the Spectrum application.
	DNS param.Field[DNSParam] `json:"dns,required"`
	// Enables IP Access Rules for this application. Notes: Only available for TCP
	// applications.
	IPFirewall param.Field[bool] `json:"ip_firewall,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 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,required"`
	// The type of TLS termination associated with the application.
	TLS param.Field[AppUpdateParamsBodySpectrumConfigAppConfigTLS] `json:"tls,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.
	TrafficType param.Field[AppUpdateParamsBodySpectrumConfigAppConfigTrafficType] `json:"traffic_type,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[EdgeIPsUnionParam] `json:"edge_ips"`
	// 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"`
}

func (AppUpdateParamsBodySpectrumConfigAppConfig) MarshalJSON

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

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

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

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.

const (
	AppUpdateParamsBodySpectrumConfigAppConfigTrafficTypeDirect AppUpdateParamsBodySpectrumConfigAppConfigTrafficType = "direct"
	AppUpdateParamsBodySpectrumConfigAppConfigTrafficTypeHTTP   AppUpdateParamsBodySpectrumConfigAppConfigTrafficType = "http"
	AppUpdateParamsBodySpectrumConfigAppConfigTrafficTypeHTTPS  AppUpdateParamsBodySpectrumConfigAppConfigTrafficType = "https"
)

func (AppUpdateParamsBodySpectrumConfigAppConfigTrafficType) IsKnown

type AppUpdateParamsBodySpectrumConfigPaygoAppConfig

type AppUpdateParamsBodySpectrumConfigPaygoAppConfig struct {
	// The name and type of DNS record for the Spectrum application.
	DNS param.Field[DNSParam] `json:"dns,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"`
	// List of origin IP addresses. Array may contain multiple IP addresses for load
	// balancing.
	OriginDirect param.Field[[]string] `json:"origin_direct" format:"URI"`
}

func (AppUpdateParamsBodySpectrumConfigPaygoAppConfig) MarshalJSON

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

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.

const (
	AppUpdateParamsBodyTrafficTypeDirect AppUpdateParamsBodyTrafficType = "direct"
	AppUpdateParamsBodyTrafficTypeHTTP   AppUpdateParamsBodyTrafficType = "http"
	AppUpdateParamsBodyTrafficTypeHTTPS  AppUpdateParamsBodyTrafficType = "https"
)

func (AppUpdateParamsBodyTrafficType) IsKnown

type AppUpdateParamsBodyUnion

type AppUpdateParamsBodyUnion interface {
	// contains filtered or unexported methods
}

Satisfied by spectrum.AppUpdateParamsBodySpectrumConfigAppConfig, spectrum.AppUpdateParamsBodySpectrumConfigPaygoAppConfig, AppUpdateParamsBody.

type AppUpdateResponse

type AppUpdateResponse struct {
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// App identifier.
	ID string `json:"id,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,required" format:"date-time"`
	// 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"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// 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,required"`
	// 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"`
	// 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,required"`
	// 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:"-"`
	// contains filtered or unexported fields
}

func (AppUpdateResponse) AsUnion

AsUnion returns a AppUpdateResponseUnion interface which you can cast to the specific types for more type safety.

Possible runtime types of the union are spectrum.AppUpdateResponseSpectrumConfigAppConfig, spectrum.AppUpdateResponseSpectrumConfigPaygoAppConfig.

func (*AppUpdateResponse) UnmarshalJSON

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

type AppUpdateResponseEnvelope

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

func (*AppUpdateResponseEnvelope) UnmarshalJSON

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

type AppUpdateResponseEnvelopeSuccess

type AppUpdateResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	AppUpdateResponseEnvelopeSuccessTrue AppUpdateResponseEnvelopeSuccess = true
)

func (AppUpdateResponseEnvelopeSuccess) IsKnown

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

type AppUpdateResponseSpectrumConfigAppConfig

type AppUpdateResponseSpectrumConfigAppConfig struct {
	// App identifier.
	ID string `json:"id,required"`
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// Enables IP Access Rules for this application. Notes: Only available for TCP
	// applications.
	IPFirewall bool `json:"ip_firewall,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,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,required"`
	// 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,required"`
	// The type of TLS termination associated with the application.
	TLS AppUpdateResponseSpectrumConfigAppConfigTLS `json:"tls,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.
	TrafficType AppUpdateResponseSpectrumConfigAppConfigTrafficType `json:"traffic_type,required"`
	// 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"`
	// The anycast edge IP configuration for the hostname of this application.
	EdgeIPs EdgeIPs `json:"edge_ips"`
	// 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"`
	JSON       appUpdateResponseSpectrumConfigAppConfigJSON `json:"-"`
}

func (*AppUpdateResponseSpectrumConfigAppConfig) UnmarshalJSON

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

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

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

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.

const (
	AppUpdateResponseSpectrumConfigAppConfigTrafficTypeDirect AppUpdateResponseSpectrumConfigAppConfigTrafficType = "direct"
	AppUpdateResponseSpectrumConfigAppConfigTrafficTypeHTTP   AppUpdateResponseSpectrumConfigAppConfigTrafficType = "http"
	AppUpdateResponseSpectrumConfigAppConfigTrafficTypeHTTPS  AppUpdateResponseSpectrumConfigAppConfigTrafficType = "https"
)

func (AppUpdateResponseSpectrumConfigAppConfigTrafficType) IsKnown

type AppUpdateResponseSpectrumConfigPaygoAppConfig

type AppUpdateResponseSpectrumConfigPaygoAppConfig struct {
	// App identifier.
	ID string `json:"id,required"`
	// When the Application was created.
	CreatedOn time.Time `json:"created_on,required" format:"date-time"`
	// The name and type of DNS record for the Spectrum application.
	DNS DNS `json:"dns,required"`
	// When the Application was last modified.
	ModifiedOn time.Time `json:"modified_on,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,required"`
	// List of origin IP addresses. Array may contain multiple IP addresses for load
	// balancing.
	OriginDirect []string                                          `json:"origin_direct" format:"URI"`
	JSON         appUpdateResponseSpectrumConfigPaygoAppConfigJSON `json:"-"`
}

func (*AppUpdateResponseSpectrumConfigPaygoAppConfig) UnmarshalJSON

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

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.

const (
	AppUpdateResponseTrafficTypeDirect AppUpdateResponseTrafficType = "direct"
	AppUpdateResponseTrafficTypeHTTP   AppUpdateResponseTrafficType = "http"
	AppUpdateResponseTrafficTypeHTTPS  AppUpdateResponseTrafficType = "https"
)

func (AppUpdateResponseTrafficType) IsKnown

func (r AppUpdateResponseTrafficType) IsKnown() bool

type AppUpdateResponseUnion

type AppUpdateResponseUnion interface {
	// contains filtered or unexported methods
}

Union satisfied by spectrum.AppUpdateResponseSpectrumConfigAppConfig or spectrum.AppUpdateResponseSpectrumConfigPaygoAppConfig.

type AuditLog

type AuditLog = shared.AuditLog

This is an alias to an internal type.

type AuditLogAction

type AuditLogAction = shared.AuditLogAction

This is an alias to an internal type.

type AuditLogActor

type AuditLogActor = shared.AuditLogActor

This is an alias to an internal type.

type AuditLogActorType

type AuditLogActorType = shared.AuditLogActorType

The type of actor, whether a User, Cloudflare Admin, or an Automated System.

This is an alias to an internal type.

type AuditLogOwner

type AuditLogOwner = shared.AuditLogOwner

This is an alias to an internal type.

type AuditLogResource

type AuditLogResource = shared.AuditLogResource

This is an alias to an internal type.

type CertificateCA

type CertificateCA = shared.CertificateCA

The Certificate Authority that will issue the certificate

This is an alias to an internal type.

type CertificateRequestType

type CertificateRequestType = shared.CertificateRequestType

Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).

This is an alias to an internal type.

type CloudflareTunnel

type CloudflareTunnel = shared.CloudflareTunnel

A Cloudflare Tunnel that connects your origin to Cloudflare's edge.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

The status of the tunnel. Valid values are `inactive` (tunnel has never been run), `degraded` (tunnel is active and able to serve traffic but in an unhealthy state), `healthy` (tunnel is active and able to serve traffic), or `down` (tunnel can not serve traffic as it has no connections to the Cloudflare Edge).

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type 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

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

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

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

type DNSType

type DNSType string

The type of DNS record associated with the application.

const (
	DNSTypeCNAME   DNSType = "CNAME"
	DNSTypeAddress DNSType = "ADDRESS"
)

func (DNSType) IsKnown

func (r DNSType) IsKnown() bool

type Dimension

type Dimension string
const (
	DimensionEvent     Dimension = "event"
	DimensionAppID     Dimension = "appID"
	DimensionColoName  Dimension = "coloName"
	DimensionIPVersion Dimension = "ipVersion"
)

func (Dimension) IsKnown

func (r Dimension) IsKnown() bool

type EdgeIPs

type EdgeIPs struct {
	// The IP versions supported for inbound connections on Spectrum anycast IPs.
	Connectivity EdgeIPsConnectivity `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 EdgeIPsType `json:"type"`
	// This field can have the runtime type of [[]string].
	IPs  interface{} `json:"ips,required"`
	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 spectrum.EdgeIPsObject, spectrum.EdgeIPsObject.

func (*EdgeIPs) UnmarshalJSON

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

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 EdgeIPsObject

type EdgeIPsObject struct {
	// The IP versions supported for inbound connections on Spectrum anycast IPs.
	Connectivity EdgeIPsObjectConnectivity `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 EdgeIPsObjectType `json:"type"`
	JSON edgeIPsObjectJSON `json:"-"`
}

func (*EdgeIPsObject) UnmarshalJSON

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

type EdgeIPsObjectConnectivity

type EdgeIPsObjectConnectivity string

The IP versions supported for inbound connections on Spectrum anycast IPs.

const (
	EdgeIPsObjectConnectivityAll  EdgeIPsObjectConnectivity = "all"
	EdgeIPsObjectConnectivityIPV4 EdgeIPsObjectConnectivity = "ipv4"
	EdgeIPsObjectConnectivityIPV6 EdgeIPsObjectConnectivity = "ipv6"
)

func (EdgeIPsObjectConnectivity) IsKnown

func (r EdgeIPsObjectConnectivity) IsKnown() bool

type EdgeIPsObjectParam

type EdgeIPsObjectParam struct {
	// The IP versions supported for inbound connections on Spectrum anycast IPs.
	Connectivity param.Field[EdgeIPsObjectConnectivity] `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[EdgeIPsObjectType] `json:"type"`
}

func (EdgeIPsObjectParam) MarshalJSON

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

type EdgeIPsObjectType

type EdgeIPsObjectType 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 (
	EdgeIPsObjectTypeDynamic EdgeIPsObjectType = "dynamic"
)

func (EdgeIPsObjectType) IsKnown

func (r EdgeIPsObjectType) IsKnown() bool

type EdgeIPsParam

type EdgeIPsParam struct {
	// The IP versions supported for inbound connections on Spectrum anycast IPs.
	Connectivity param.Field[EdgeIPsConnectivity] `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[EdgeIPsType] `json:"type"`
	IPs  param.Field[interface{}] `json:"ips,required"`
}

The anycast edge IP configuration for the hostname of this application.

func (EdgeIPsParam) MarshalJSON

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

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 spectrum.EdgeIPsObject or spectrum.EdgeIPsObject.

type EdgeIPsUnionParam

type EdgeIPsUnionParam interface {
	// contains filtered or unexported methods
}

The anycast edge IP configuration for the hostname of this application.

Satisfied by spectrum.EdgeIPsObjectParam, spectrum.EdgeIPsObjectParam, EdgeIPsParam.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type MemberParam

type MemberParam = shared.MemberParam

This is an alias to an internal type.

type MemberRoleParam

type MemberRoleParam = shared.MemberRoleParam

This is an alias to an internal type.

type MemberRolesPermissionsParam

type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUserParam

type MemberUserParam = shared.MemberUserParam

Details of the user associated to the membership.

This is an alias to an internal type.

type 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

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

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 {
	ImplementsSpectrumOriginPortUnion()
}

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 {
	ImplementsSpectrumOriginPortUnionParam()
}

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 Permission

type Permission = shared.Permission

This is an alias to an internal type.

type PermissionGrant

type PermissionGrant = shared.PermissionGrant

This is an alias to an internal type.

type PermissionGrantParam

type PermissionGrantParam = shared.PermissionGrantParam

This is an alias to an internal type.

type RatePlan

type RatePlan = shared.RatePlan

The rate plan applied to the subscription.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type 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
}

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 Subscription

type Subscription = shared.Subscription

This is an alias to an internal type.

type SubscriptionFrequency

type SubscriptionFrequency = shared.SubscriptionFrequency

How often the subscription is renewed automatically.

This is an alias to an internal type.

type SubscriptionParam

type SubscriptionParam = shared.SubscriptionParam

This is an alias to an internal type.

type SubscriptionState

type SubscriptionState = shared.SubscriptionState

The state that the subscription is in.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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