api_gateway

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: 20 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 APIGatewayService

type APIGatewayService struct {
	Options        []option.RequestOption
	Configurations *ConfigurationService
	Discovery      *DiscoveryService
	Operations     *OperationService
	Schemas        *SchemaService
	Settings       *SettingService
	UserSchemas    *UserSchemaService
}

APIGatewayService 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 NewAPIGatewayService method instead.

func NewAPIGatewayService

func NewAPIGatewayService(opts ...option.RequestOption) (r *APIGatewayService)

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

type APIShield struct {
	// The endpoint which can contain path parameter templates in curly braces, each
	// will be replaced from left to right with {varN}, starting with {var1}, during
	// insertion. This will further be Cloudflare-normalized upon insertion. See:
	// https://developers.cloudflare.com/rules/normalization/how-it-works/.
	Endpoint string `json:"endpoint,required" format:"uri-template"`
	// RFC3986-compliant host.
	Host        string    `json:"host,required" format:"hostname"`
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The HTTP method used to access the endpoint.
	Method APIShieldMethod `json:"method,required"`
	// UUID
	OperationID string            `json:"operation_id,required"`
	Features    APIShieldFeatures `json:"features"`
	JSON        apiShieldJSON     `json:"-"`
}

func (*APIShield) UnmarshalJSON

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

type APIShieldFeatures

type APIShieldFeatures struct {
	// This field can have the runtime type of
	// [APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds].
	Thresholds interface{} `json:"thresholds,required"`
	// This field can have the runtime type of
	// [APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
	ParameterSchemas interface{} `json:"parameter_schemas,required"`
	// This field can have the runtime type of
	// [APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting].
	APIRouting interface{} `json:"api_routing,required"`
	// This field can have the runtime type of
	// [APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals].
	ConfidenceIntervals interface{} `json:"confidence_intervals,required"`
	// This field can have the runtime type of
	// [APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo].
	SchemaInfo interface{}           `json:"schema_info,required"`
	JSON       apiShieldFeaturesJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*APIShieldFeatures) UnmarshalJSON

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

type APIShieldFeaturesAPIShieldOperationFeatureAPIRouting

type APIShieldFeaturesAPIShieldOperationFeatureAPIRouting struct {
	// API Routing settings on endpoint.
	APIRouting APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting `json:"api_routing"`
	JSON       apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingJSON       `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureAPIRouting) UnmarshalJSON

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

type APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting

type APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting struct {
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// Target route.
	Route string                                                             `json:"route"`
	JSON  apiShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON `json:"-"`
}

API Routing settings on endpoint.

func (*APIShieldFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals struct {
	ConfidenceIntervals APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals `json:"confidence_intervals"`
	JSON                apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON                `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervals) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals struct {
	LastUpdated        time.Time                                                                                          `json:"last_updated" format:"date-time"`
	SuggestedThreshold APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold `json:"suggested_threshold"`
	JSON               apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON               `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold struct {
	ConfidenceIntervals APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals `json:"confidence_intervals"`
	// Suggested threshold.
	Mean float64                                                                                                `json:"mean"`
	JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals struct {
	// Upper and lower bound for percentile estimate
	P90 APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 `json:"p90"`
	// Upper and lower bound for percentile estimate
	P95 APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 `json:"p95"`
	// Upper and lower bound for percentile estimate
	P99  APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99  `json:"p99"`
	JSON apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 struct {
	// Lower bound for percentile estimate
	Lower float64 `json:"lower"`
	// Upper bound for percentile estimate
	Upper float64                                                                                                                      `json:"upper"`
	JSON  apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON `json:"-"`
}

Upper and lower bound for percentile estimate

func (*APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 struct {
	// Lower bound for percentile estimate
	Lower float64 `json:"lower"`
	// Upper bound for percentile estimate
	Upper float64                                                                                                                      `json:"upper"`
	JSON  apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON `json:"-"`
}

Upper and lower bound for percentile estimate

func (*APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99

type APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 struct {
	// Lower bound for percentile estimate
	Lower float64 `json:"lower"`
	// Upper bound for percentile estimate
	Upper float64                                                                                                                      `json:"upper"`
	JSON  apiShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON `json:"-"`
}

Upper and lower bound for percentile estimate

func (*APIShieldFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas

type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas struct {
	ParameterSchemas APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas `json:"parameter_schemas,required"`
	JSON             apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasJSON             `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureParameterSchemas) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas

type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas struct {
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// An operation schema object containing a response.
	ParameterSchemas APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas `json:"parameter_schemas"`
	JSON             apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON             `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas

type APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas struct {
	// An array containing the learned parameter schemas.
	Parameters []interface{} `json:"parameters"`
	// An empty response object. This field is required to yield a valid operation
	// schema.
	Responses interface{}                                                                                    `json:"responses,nullable"`
	JSON      apiShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON `json:"-"`
}

An operation schema object containing a response.

func (*APIShieldFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo

type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo struct {
	SchemaInfo APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo `json:"schema_info"`
	JSON       apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoJSON       `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureSchemaInfo) UnmarshalJSON

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

type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo

type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo struct {
	// Schema active on endpoint.
	ActiveSchema APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema `json:"active_schema"`
	// True if a Cloudflare-provided learned schema is available for this endpoint.
	LearnedAvailable bool `json:"learned_available"`
	// Action taken on requests failing validation.
	MitigationAction APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction `json:"mitigation_action,nullable"`
	JSON             apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON             `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema

type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema struct {
	// UUID
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// True if schema is Cloudflare-provided.
	IsLearned bool `json:"is_learned"`
	// Schema file name.
	Name string                                                                         `json:"name"`
	JSON apiShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON `json:"-"`
}

Schema active on endpoint.

func (*APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema) UnmarshalJSON

type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction

type APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction string

Action taken on requests failing validation.

const (
	APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone  APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none"
	APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog   APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log"
	APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block"
)

func (APIShieldFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction) IsKnown

type APIShieldFeaturesAPIShieldOperationFeatureThresholds

type APIShieldFeaturesAPIShieldOperationFeatureThresholds struct {
	Thresholds APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds `json:"thresholds"`
	JSON       apiShieldFeaturesAPIShieldOperationFeatureThresholdsJSON       `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureThresholds) UnmarshalJSON

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

type APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds

type APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds struct {
	// The total number of auth-ids seen across this calculation.
	AuthIDTokens int64 `json:"auth_id_tokens"`
	// The number of data points used for the threshold suggestion calculation.
	DataPoints  int64     `json:"data_points"`
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// The p50 quantile of requests (in period_seconds).
	P50 int64 `json:"p50"`
	// The p90 quantile of requests (in period_seconds).
	P90 int64 `json:"p90"`
	// The p99 quantile of requests (in period_seconds).
	P99 int64 `json:"p99"`
	// The period over which this threshold is suggested.
	PeriodSeconds int64 `json:"period_seconds"`
	// The estimated number of requests covered by these calculations.
	Requests int64 `json:"requests"`
	// The suggested threshold in requests done by the same auth_id or period_seconds.
	SuggestedThreshold int64                                                              `json:"suggested_threshold"`
	JSON               apiShieldFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON `json:"-"`
}

func (*APIShieldFeaturesAPIShieldOperationFeatureThresholdsThresholds) UnmarshalJSON

type APIShieldMethod

type APIShieldMethod string

The HTTP method used to access the endpoint.

const (
	APIShieldMethodGet     APIShieldMethod = "GET"
	APIShieldMethodPost    APIShieldMethod = "POST"
	APIShieldMethodHead    APIShieldMethod = "HEAD"
	APIShieldMethodOptions APIShieldMethod = "OPTIONS"
	APIShieldMethodPut     APIShieldMethod = "PUT"
	APIShieldMethodDelete  APIShieldMethod = "DELETE"
	APIShieldMethodConnect APIShieldMethod = "CONNECT"
	APIShieldMethodPatch   APIShieldMethod = "PATCH"
	APIShieldMethodTrace   APIShieldMethod = "TRACE"
)

func (APIShieldMethod) IsKnown

func (r APIShieldMethod) IsKnown() bool

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

type Configuration struct {
	AuthIDCharacteristics []ConfigurationAuthIDCharacteristic `json:"auth_id_characteristics,required"`
	JSON                  configurationJSON                   `json:"-"`
}

func (*Configuration) UnmarshalJSON

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

type ConfigurationAuthIDCharacteristic

type ConfigurationAuthIDCharacteristic struct {
	// The name of the characteristic field, i.e., the header or cookie name.
	Name string `json:"name,required"`
	// The type of characteristic.
	Type ConfigurationAuthIDCharacteristicsType `json:"type,required"`
	JSON configurationAuthIDCharacteristicJSON  `json:"-"`
	// contains filtered or unexported fields
}

Auth ID Characteristic

func (ConfigurationAuthIDCharacteristic) AsUnion

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

Possible runtime types of the union are api_gateway.ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristic, api_gateway.ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaim.

func (*ConfigurationAuthIDCharacteristic) UnmarshalJSON

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

type ConfigurationAuthIDCharacteristicParam

type ConfigurationAuthIDCharacteristicParam struct {
	// The name of the characteristic field, i.e., the header or cookie name.
	Name param.Field[string] `json:"name,required"`
	// The type of characteristic.
	Type param.Field[ConfigurationAuthIDCharacteristicsType] `json:"type,required"`
}

Auth ID Characteristic

func (ConfigurationAuthIDCharacteristicParam) MarshalJSON

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

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristic

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristic struct {
	// The name of the characteristic field, i.e., the header or cookie name.
	Name string `json:"name,required"`
	// The type of characteristic.
	Type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType `json:"type,required"`
	JSON configurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJSON `json:"-"`
}

Auth ID Characteristic

func (*ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristic) UnmarshalJSON

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaim

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaim struct {
	// Claim location expressed as `$(token_config_id):$(json_path)`, where
	// `token_config_id` is the ID of the token configuration used in validating the
	// JWT, and `json_path` is a RFC 9535 JSONPath
	// (https://goessner.net/articles/JsonPath/,
	// https://www.rfc-editor.org/rfc/rfc9535.html). The JSONPath expression may be in
	// dot or bracket notation, may only specify literal keys or array indexes, and
	// must return a singleton value, which will be interpreted as a string.
	Name string `json:"name,required"`
	// The type of characteristic.
	Type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimType `json:"type,required"`
	JSON configurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimJSON `json:"-"`
}

Auth ID Characteristic extracted from JWT Token Claims

func (*ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaim) UnmarshalJSON

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimParam

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimParam struct {
	// Claim location expressed as `$(token_config_id):$(json_path)`, where
	// `token_config_id` is the ID of the token configuration used in validating the
	// JWT, and `json_path` is a RFC 9535 JSONPath
	// (https://goessner.net/articles/JsonPath/,
	// https://www.rfc-editor.org/rfc/rfc9535.html). The JSONPath expression may be in
	// dot or bracket notation, may only specify literal keys or array indexes, and
	// must return a singleton value, which will be interpreted as a string.
	Name param.Field[string] `json:"name,required"`
	// The type of characteristic.
	Type param.Field[ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimType] `json:"type,required"`
}

Auth ID Characteristic extracted from JWT Token Claims

func (ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimParam) MarshalJSON

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimType

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimType string

The type of characteristic.

const (
	ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimTypeJwt ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimType = "jwt"
)

func (ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaimType) IsKnown

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicParam

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicParam struct {
	// The name of the characteristic field, i.e., the header or cookie name.
	Name param.Field[string] `json:"name,required"`
	// The type of characteristic.
	Type param.Field[ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType] `json:"type,required"`
}

Auth ID Characteristic

func (ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicParam) MarshalJSON

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType

type ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType string

The type of characteristic.

const (
	ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicTypeHeader ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType = "header"
	ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicTypeCookie ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType = "cookie"
)

func (ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicType) IsKnown

type ConfigurationAuthIDCharacteristicsType

type ConfigurationAuthIDCharacteristicsType string

The type of characteristic.

const (
	ConfigurationAuthIDCharacteristicsTypeHeader ConfigurationAuthIDCharacteristicsType = "header"
	ConfigurationAuthIDCharacteristicsTypeCookie ConfigurationAuthIDCharacteristicsType = "cookie"
	ConfigurationAuthIDCharacteristicsTypeJwt    ConfigurationAuthIDCharacteristicsType = "jwt"
)

func (ConfigurationAuthIDCharacteristicsType) IsKnown

type ConfigurationAuthIDCharacteristicsUnion

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

Auth ID Characteristic

Union satisfied by api_gateway.ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristic or api_gateway.ConfigurationAuthIDCharacteristicsAPIShieldAuthIDCharacteristicJwtClaim.

type ConfigurationGetParams

type ConfigurationGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Requests information about certain properties.
	Properties param.Field[[]ConfigurationGetParamsProperty] `query:"properties"`
}

func (ConfigurationGetParams) URLQuery

func (r ConfigurationGetParams) URLQuery() (v url.Values)

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

type ConfigurationGetParamsProperty

type ConfigurationGetParamsProperty string
const (
	ConfigurationGetParamsPropertyAuthIDCharacteristics ConfigurationGetParamsProperty = "auth_id_characteristics"
)

func (ConfigurationGetParamsProperty) IsKnown

type ConfigurationGetResponseEnvelope

type ConfigurationGetResponseEnvelope struct {
	Errors   Message       `json:"errors,required"`
	Messages Message       `json:"messages,required"`
	Result   Configuration `json:"result,required"`
	// Whether the API call was successful
	Success ConfigurationGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    configurationGetResponseEnvelopeJSON    `json:"-"`
}

func (*ConfigurationGetResponseEnvelope) UnmarshalJSON

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

type ConfigurationGetResponseEnvelopeSuccess

type ConfigurationGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	ConfigurationGetResponseEnvelopeSuccessTrue ConfigurationGetResponseEnvelopeSuccess = true
)

func (ConfigurationGetResponseEnvelopeSuccess) IsKnown

type ConfigurationParam

type ConfigurationParam struct {
	AuthIDCharacteristics param.Field[[]ConfigurationAuthIDCharacteristicsUnionParam] `json:"auth_id_characteristics,required"`
}

func (ConfigurationParam) MarshalJSON

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

type ConfigurationService

type ConfigurationService struct {
	Options []option.RequestOption
}

ConfigurationService 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 NewConfigurationService method instead.

func NewConfigurationService

func NewConfigurationService(opts ...option.RequestOption) (r *ConfigurationService)

NewConfigurationService 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 (*ConfigurationService) Get

Retrieve information about specific configuration properties

func (*ConfigurationService) Update

Set configuration properties

type ConfigurationUpdateParams

type ConfigurationUpdateParams struct {
	// Identifier
	ZoneID        param.Field[string] `path:"zone_id,required"`
	Configuration ConfigurationParam  `json:"configuration,required"`
}

func (ConfigurationUpdateParams) MarshalJSON

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

type ConfigurationUpdateResponse

type ConfigurationUpdateResponse struct {
	Errors   Message `json:"errors,required"`
	Messages Message `json:"messages,required"`
	// Whether the API call was successful
	Success ConfigurationUpdateResponseSuccess `json:"success,required"`
	JSON    configurationUpdateResponseJSON    `json:"-"`
}

func (*ConfigurationUpdateResponse) UnmarshalJSON

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

type ConfigurationUpdateResponseSuccess

type ConfigurationUpdateResponseSuccess bool

Whether the API call was successful

const (
	ConfigurationUpdateResponseSuccessTrue ConfigurationUpdateResponseSuccess = true
)

func (ConfigurationUpdateResponseSuccess) IsKnown

type DiscoveryGetParams

type DiscoveryGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type DiscoveryGetResponse

type DiscoveryGetResponse struct {
	Schemas   []interface{}            `json:"schemas,required"`
	Timestamp time.Time                `json:"timestamp,required" format:"date-time"`
	JSON      discoveryGetResponseJSON `json:"-"`
}

func (*DiscoveryGetResponse) UnmarshalJSON

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

type DiscoveryGetResponseEnvelope

type DiscoveryGetResponseEnvelope struct {
	Errors   Message              `json:"errors,required"`
	Messages Message              `json:"messages,required"`
	Result   DiscoveryGetResponse `json:"result,required"`
	// Whether the API call was successful
	Success DiscoveryGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    discoveryGetResponseEnvelopeJSON    `json:"-"`
}

func (*DiscoveryGetResponseEnvelope) UnmarshalJSON

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

type DiscoveryGetResponseEnvelopeSuccess

type DiscoveryGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DiscoveryGetResponseEnvelopeSuccessTrue DiscoveryGetResponseEnvelopeSuccess = true
)

func (DiscoveryGetResponseEnvelopeSuccess) IsKnown

type DiscoveryOperation

type DiscoveryOperation struct {
	// UUID
	ID string `json:"id,required"`
	// The endpoint which can contain path parameter templates in curly braces, each
	// will be replaced from left to right with {varN}, starting with {var1}, during
	// insertion. This will further be Cloudflare-normalized upon insertion. See:
	// https://developers.cloudflare.com/rules/normalization/how-it-works/.
	Endpoint string `json:"endpoint,required" format:"uri-template"`
	// RFC3986-compliant host.
	Host        string    `json:"host,required" format:"hostname"`
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The HTTP method used to access the endpoint.
	Method DiscoveryOperationMethod `json:"method,required"`
	// API discovery engine(s) that discovered this operation
	Origin []DiscoveryOperationOrigin `json:"origin,required"`
	// State of operation in API Discovery
	//
	// - `review` - Operation is not saved into API Shield Endpoint Management
	// - `saved` - Operation is saved into API Shield Endpoint Management
	// - `ignored` - Operation is marked as ignored
	State    DiscoveryOperationState    `json:"state,required"`
	Features DiscoveryOperationFeatures `json:"features"`
	JSON     discoveryOperationJSON     `json:"-"`
}

func (*DiscoveryOperation) UnmarshalJSON

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

type DiscoveryOperationEditParams

type DiscoveryOperationEditParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Mark state of operation in API Discovery
	//
	// - `review` - Mark operation as for review
	// - `ignored` - Mark operation as ignored
	State param.Field[DiscoveryOperationEditParamsState] `json:"state"`
}

func (DiscoveryOperationEditParams) MarshalJSON

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

type DiscoveryOperationEditParamsState

type DiscoveryOperationEditParamsState string

Mark state of operation in API Discovery

- `review` - Mark operation as for review - `ignored` - Mark operation as ignored

const (
	DiscoveryOperationEditParamsStateReview  DiscoveryOperationEditParamsState = "review"
	DiscoveryOperationEditParamsStateIgnored DiscoveryOperationEditParamsState = "ignored"
)

func (DiscoveryOperationEditParamsState) IsKnown

type DiscoveryOperationEditResponse

type DiscoveryOperationEditResponse struct {
	// State of operation in API Discovery
	//
	// - `review` - Operation is not saved into API Shield Endpoint Management
	// - `saved` - Operation is saved into API Shield Endpoint Management
	// - `ignored` - Operation is marked as ignored
	State DiscoveryOperationEditResponseState `json:"state"`
	JSON  discoveryOperationEditResponseJSON  `json:"-"`
}

func (*DiscoveryOperationEditResponse) UnmarshalJSON

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

type DiscoveryOperationEditResponseEnvelope

type DiscoveryOperationEditResponseEnvelope struct {
	Errors   Message                        `json:"errors,required"`
	Messages Message                        `json:"messages,required"`
	Result   DiscoveryOperationEditResponse `json:"result,required"`
	// Whether the API call was successful
	Success DiscoveryOperationEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    discoveryOperationEditResponseEnvelopeJSON    `json:"-"`
}

func (*DiscoveryOperationEditResponseEnvelope) UnmarshalJSON

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

type DiscoveryOperationEditResponseEnvelopeSuccess

type DiscoveryOperationEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	DiscoveryOperationEditResponseEnvelopeSuccessTrue DiscoveryOperationEditResponseEnvelopeSuccess = true
)

func (DiscoveryOperationEditResponseEnvelopeSuccess) IsKnown

type DiscoveryOperationEditResponseState

type DiscoveryOperationEditResponseState string

State of operation in API Discovery

- `review` - Operation is not saved into API Shield Endpoint Management - `saved` - Operation is saved into API Shield Endpoint Management - `ignored` - Operation is marked as ignored

const (
	DiscoveryOperationEditResponseStateReview  DiscoveryOperationEditResponseState = "review"
	DiscoveryOperationEditResponseStateSaved   DiscoveryOperationEditResponseState = "saved"
	DiscoveryOperationEditResponseStateIgnored DiscoveryOperationEditResponseState = "ignored"
)

func (DiscoveryOperationEditResponseState) IsKnown

type DiscoveryOperationFeatures

type DiscoveryOperationFeatures struct {
	TrafficStats DiscoveryOperationFeaturesTrafficStats `json:"traffic_stats"`
	JSON         discoveryOperationFeaturesJSON         `json:"-"`
}

func (*DiscoveryOperationFeatures) UnmarshalJSON

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

type DiscoveryOperationFeaturesTrafficStats

type DiscoveryOperationFeaturesTrafficStats struct {
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The period in seconds these statistics were computed over
	PeriodSeconds int64 `json:"period_seconds,required"`
	// The average number of requests seen during this period
	Requests float64                                    `json:"requests,required"`
	JSON     discoveryOperationFeaturesTrafficStatsJSON `json:"-"`
}

func (*DiscoveryOperationFeaturesTrafficStats) UnmarshalJSON

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

type DiscoveryOperationListParams

type DiscoveryOperationListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// When `true`, only return API Discovery results that are not saved into API
	// Shield Endpoint Management
	Diff param.Field[bool] `query:"diff"`
	// Direction to order results.
	Direction param.Field[DiscoveryOperationListParamsDirection] `query:"direction"`
	// Filter results to only include endpoints containing this pattern.
	Endpoint param.Field[string] `query:"endpoint"`
	// Filter results to only include the specified hosts.
	Host param.Field[[]string] `query:"host"`
	// Filter results to only include the specified HTTP methods.
	Method param.Field[[]string] `query:"method"`
	// Field to order by
	Order param.Field[DiscoveryOperationListParamsOrder] `query:"order"`
	// Filter results to only include discovery results sourced from a particular
	// discovery engine
	//
	//   - `ML` - Discovered operations that were sourced using ML API Discovery
	//   - `SessionIdentifier` - Discovered operations that were sourced using Session
	//     Identifier API Discovery
	Origin param.Field[DiscoveryOperationListParamsOrigin] `query:"origin"`
	// Page number of paginated results.
	Page param.Field[int64] `query:"page"`
	// Maximum number of results per page.
	PerPage param.Field[int64] `query:"per_page"`
	// Filter results to only include discovery results in a particular state. States
	// are as follows
	//
	//   - `review` - Discovered operations that are not saved into API Shield Endpoint
	//     Management
	//   - `saved` - Discovered operations that are already saved into API Shield
	//     Endpoint Management
	//   - `ignored` - Discovered operations that have been marked as ignored
	State param.Field[DiscoveryOperationListParamsState] `query:"state"`
}

func (DiscoveryOperationListParams) URLQuery

func (r DiscoveryOperationListParams) URLQuery() (v url.Values)

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

type DiscoveryOperationListParamsDirection

type DiscoveryOperationListParamsDirection string

Direction to order results.

const (
	DiscoveryOperationListParamsDirectionAsc  DiscoveryOperationListParamsDirection = "asc"
	DiscoveryOperationListParamsDirectionDesc DiscoveryOperationListParamsDirection = "desc"
)

func (DiscoveryOperationListParamsDirection) IsKnown

type DiscoveryOperationListParamsOrder

type DiscoveryOperationListParamsOrder string

Field to order by

const (
	DiscoveryOperationListParamsOrderHost                    DiscoveryOperationListParamsOrder = "host"
	DiscoveryOperationListParamsOrderMethod                  DiscoveryOperationListParamsOrder = "method"
	DiscoveryOperationListParamsOrderEndpoint                DiscoveryOperationListParamsOrder = "endpoint"
	DiscoveryOperationListParamsOrderTrafficStatsRequests    DiscoveryOperationListParamsOrder = "traffic_stats.requests"
	DiscoveryOperationListParamsOrderTrafficStatsLastUpdated DiscoveryOperationListParamsOrder = "traffic_stats.last_updated"
)

func (DiscoveryOperationListParamsOrder) IsKnown

type DiscoveryOperationListParamsOrigin

type DiscoveryOperationListParamsOrigin string

Filter results to only include discovery results sourced from a particular discovery engine

  • `ML` - Discovered operations that were sourced using ML API Discovery
  • `SessionIdentifier` - Discovered operations that were sourced using Session Identifier API Discovery
const (
	DiscoveryOperationListParamsOriginMl                DiscoveryOperationListParamsOrigin = "ML"
	DiscoveryOperationListParamsOriginSessionIdentifier DiscoveryOperationListParamsOrigin = "SessionIdentifier"
)

func (DiscoveryOperationListParamsOrigin) IsKnown

type DiscoveryOperationListParamsState

type DiscoveryOperationListParamsState string

Filter results to only include discovery results in a particular state. States are as follows

  • `review` - Discovered operations that are not saved into API Shield Endpoint Management
  • `saved` - Discovered operations that are already saved into API Shield Endpoint Management
  • `ignored` - Discovered operations that have been marked as ignored
const (
	DiscoveryOperationListParamsStateReview  DiscoveryOperationListParamsState = "review"
	DiscoveryOperationListParamsStateSaved   DiscoveryOperationListParamsState = "saved"
	DiscoveryOperationListParamsStateIgnored DiscoveryOperationListParamsState = "ignored"
)

func (DiscoveryOperationListParamsState) IsKnown

type DiscoveryOperationMethod

type DiscoveryOperationMethod string

The HTTP method used to access the endpoint.

const (
	DiscoveryOperationMethodGet     DiscoveryOperationMethod = "GET"
	DiscoveryOperationMethodPost    DiscoveryOperationMethod = "POST"
	DiscoveryOperationMethodHead    DiscoveryOperationMethod = "HEAD"
	DiscoveryOperationMethodOptions DiscoveryOperationMethod = "OPTIONS"
	DiscoveryOperationMethodPut     DiscoveryOperationMethod = "PUT"
	DiscoveryOperationMethodDelete  DiscoveryOperationMethod = "DELETE"
	DiscoveryOperationMethodConnect DiscoveryOperationMethod = "CONNECT"
	DiscoveryOperationMethodPatch   DiscoveryOperationMethod = "PATCH"
	DiscoveryOperationMethodTrace   DiscoveryOperationMethod = "TRACE"
)

func (DiscoveryOperationMethod) IsKnown

func (r DiscoveryOperationMethod) IsKnown() bool

type DiscoveryOperationOrigin

type DiscoveryOperationOrigin string
  • `ML` - Discovered operation was sourced using ML API Discovery \* `SessionIdentifier` - Discovered operation was sourced using Session Identifier API Discovery
const (
	DiscoveryOperationOriginMl                DiscoveryOperationOrigin = "ML"
	DiscoveryOperationOriginSessionIdentifier DiscoveryOperationOrigin = "SessionIdentifier"
)

func (DiscoveryOperationOrigin) IsKnown

func (r DiscoveryOperationOrigin) IsKnown() bool

type DiscoveryOperationService

type DiscoveryOperationService struct {
	Options []option.RequestOption
}

DiscoveryOperationService 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 NewDiscoveryOperationService method instead.

func NewDiscoveryOperationService

func NewDiscoveryOperationService(opts ...option.RequestOption) (r *DiscoveryOperationService)

NewDiscoveryOperationService 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 (*DiscoveryOperationService) Edit

Update the `state` on a discovered operation

func (*DiscoveryOperationService) List

Retrieve the most up to date view of discovered operations

func (*DiscoveryOperationService) ListAutoPaging

Retrieve the most up to date view of discovered operations

type DiscoveryOperationState

type DiscoveryOperationState string

State of operation in API Discovery

- `review` - Operation is not saved into API Shield Endpoint Management - `saved` - Operation is saved into API Shield Endpoint Management - `ignored` - Operation is marked as ignored

const (
	DiscoveryOperationStateReview  DiscoveryOperationState = "review"
	DiscoveryOperationStateSaved   DiscoveryOperationState = "saved"
	DiscoveryOperationStateIgnored DiscoveryOperationState = "ignored"
)

func (DiscoveryOperationState) IsKnown

func (r DiscoveryOperationState) IsKnown() bool

type DiscoveryService

type DiscoveryService struct {
	Options    []option.RequestOption
	Operations *DiscoveryOperationService
}

DiscoveryService 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 NewDiscoveryService method instead.

func NewDiscoveryService

func NewDiscoveryService(opts ...option.RequestOption) (r *DiscoveryService)

NewDiscoveryService 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 (*DiscoveryService) Get

Retrieve the most up to date view of discovered operations, rendered as OpenAPI schemas

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 Message

type Message []shared.ResponseInfo

type OperationDeleteParams

type OperationDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type OperationDeleteResponse

type OperationDeleteResponse struct {
	Errors   Message `json:"errors,required"`
	Messages Message `json:"messages,required"`
	// Whether the API call was successful
	Success OperationDeleteResponseSuccess `json:"success,required"`
	JSON    operationDeleteResponseJSON    `json:"-"`
}

func (*OperationDeleteResponse) UnmarshalJSON

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

type OperationDeleteResponseSuccess

type OperationDeleteResponseSuccess bool

Whether the API call was successful

const (
	OperationDeleteResponseSuccessTrue OperationDeleteResponseSuccess = true
)

func (OperationDeleteResponseSuccess) IsKnown

type OperationGetParams

type OperationGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Add feature(s) to the results. The feature name that is given here corresponds
	// to the resulting feature object. Have a look at the top-level object description
	// for more details on the specific meaning.
	Feature param.Field[[]OperationGetParamsFeature] `query:"feature"`
}

func (OperationGetParams) URLQuery

func (r OperationGetParams) URLQuery() (v url.Values)

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

type OperationGetParamsFeature

type OperationGetParamsFeature string
const (
	OperationGetParamsFeatureThresholds       OperationGetParamsFeature = "thresholds"
	OperationGetParamsFeatureParameterSchemas OperationGetParamsFeature = "parameter_schemas"
	OperationGetParamsFeatureSchemaInfo       OperationGetParamsFeature = "schema_info"
)

func (OperationGetParamsFeature) IsKnown

func (r OperationGetParamsFeature) IsKnown() bool

type OperationGetResponse

type OperationGetResponse struct {
	// The endpoint which can contain path parameter templates in curly braces, each
	// will be replaced from left to right with {varN}, starting with {var1}, during
	// insertion. This will further be Cloudflare-normalized upon insertion. See:
	// https://developers.cloudflare.com/rules/normalization/how-it-works/.
	Endpoint string `json:"endpoint,required" format:"uri-template"`
	// RFC3986-compliant host.
	Host        string    `json:"host,required" format:"hostname"`
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The HTTP method used to access the endpoint.
	Method OperationGetResponseMethod `json:"method,required"`
	// UUID
	OperationID string                       `json:"operation_id,required"`
	Features    OperationGetResponseFeatures `json:"features"`
	JSON        operationGetResponseJSON     `json:"-"`
}

func (*OperationGetResponse) UnmarshalJSON

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

type OperationGetResponseEnvelope

type OperationGetResponseEnvelope struct {
	Errors   Message              `json:"errors,required"`
	Messages Message              `json:"messages,required"`
	Result   OperationGetResponse `json:"result,required"`
	// Whether the API call was successful
	Success OperationGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    operationGetResponseEnvelopeJSON    `json:"-"`
}

func (*OperationGetResponseEnvelope) UnmarshalJSON

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

type OperationGetResponseEnvelopeSuccess

type OperationGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	OperationGetResponseEnvelopeSuccessTrue OperationGetResponseEnvelopeSuccess = true
)

func (OperationGetResponseEnvelopeSuccess) IsKnown

type OperationGetResponseFeatures

type OperationGetResponseFeatures struct {
	// This field can have the runtime type of
	// [OperationGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds].
	Thresholds interface{} `json:"thresholds,required"`
	// This field can have the runtime type of
	// [OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
	ParameterSchemas interface{} `json:"parameter_schemas,required"`
	// This field can have the runtime type of
	// [OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting].
	APIRouting interface{} `json:"api_routing,required"`
	// This field can have the runtime type of
	// [OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals].
	ConfidenceIntervals interface{} `json:"confidence_intervals,required"`
	// This field can have the runtime type of
	// [OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo].
	SchemaInfo interface{}                      `json:"schema_info,required"`
	JSON       operationGetResponseFeaturesJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*OperationGetResponseFeatures) UnmarshalJSON

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

type OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRouting

type OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRouting struct {
	// API Routing settings on endpoint.
	APIRouting OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting `json:"api_routing"`
	JSON       operationGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON       `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRouting) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting

type OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting struct {
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// Target route.
	Route string                                                                        `json:"route"`
	JSON  operationGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON `json:"-"`
}

API Routing settings on endpoint.

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals struct {
	ConfidenceIntervals OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals `json:"confidence_intervals"`
	JSON                operationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON                `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals struct {
	LastUpdated        time.Time                                                                                                     `json:"last_updated" format:"date-time"`
	SuggestedThreshold OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold `json:"suggested_threshold"`
	JSON               operationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON               `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold struct {
	ConfidenceIntervals OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals `json:"confidence_intervals"`
	// Suggested threshold.
	Mean float64                                                                                                           `json:"mean"`
	JSON operationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals struct {
	// Upper and lower bound for percentile estimate
	P90 OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 `json:"p90"`
	// Upper and lower bound for percentile estimate
	P95 OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 `json:"p95"`
	// Upper and lower bound for percentile estimate
	P99  OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99  `json:"p99"`
	JSON operationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 struct {
	// Lower bound for percentile estimate
	Lower float64 `json:"lower"`
	// Upper bound for percentile estimate
	Upper float64                                                                                                                                 `json:"upper"`
	JSON  operationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON `json:"-"`
}

Upper and lower bound for percentile estimate

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 struct {
	// Lower bound for percentile estimate
	Lower float64 `json:"lower"`
	// Upper bound for percentile estimate
	Upper float64                                                                                                                                 `json:"upper"`
	JSON  operationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON `json:"-"`
}

Upper and lower bound for percentile estimate

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99

type OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 struct {
	// Lower bound for percentile estimate
	Lower float64 `json:"lower"`
	// Upper bound for percentile estimate
	Upper float64                                                                                                                                 `json:"upper"`
	JSON  operationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON `json:"-"`
}

Upper and lower bound for percentile estimate

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemas

type OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemas struct {
	ParameterSchemas OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas `json:"parameter_schemas,required"`
	JSON             operationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON             `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemas) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas

type OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas struct {
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// An operation schema object containing a response.
	ParameterSchemas OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas `json:"parameter_schemas"`
	JSON             operationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON             `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas

type OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas struct {
	// An array containing the learned parameter schemas.
	Parameters []interface{} `json:"parameters"`
	// An empty response object. This field is required to yield a valid operation
	// schema.
	Responses interface{}                                                                                               `json:"responses,nullable"`
	JSON      operationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON `json:"-"`
}

An operation schema object containing a response.

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfo

type OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfo struct {
	SchemaInfo OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo `json:"schema_info"`
	JSON       operationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON       `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfo) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo

type OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo struct {
	// Schema active on endpoint.
	ActiveSchema OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema `json:"active_schema"`
	// True if a Cloudflare-provided learned schema is available for this endpoint.
	LearnedAvailable bool `json:"learned_available"`
	// Action taken on requests failing validation.
	MitigationAction OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction `json:"mitigation_action,nullable"`
	JSON             operationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON             `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema

type OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema struct {
	// UUID
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// True if schema is Cloudflare-provided.
	IsLearned bool `json:"is_learned"`
	// Schema file name.
	Name string                                                                                    `json:"name"`
	JSON operationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON `json:"-"`
}

Schema active on endpoint.

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction

type OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction string

Action taken on requests failing validation.

const (
	OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone  OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none"
	OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog   OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log"
	OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block"
)

func (OperationGetResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction) IsKnown

type OperationGetResponseFeaturesAPIShieldOperationFeatureThresholds

type OperationGetResponseFeaturesAPIShieldOperationFeatureThresholds struct {
	Thresholds OperationGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds `json:"thresholds"`
	JSON       operationGetResponseFeaturesAPIShieldOperationFeatureThresholdsJSON       `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureThresholds) UnmarshalJSON

type OperationGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds

type OperationGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds struct {
	// The total number of auth-ids seen across this calculation.
	AuthIDTokens int64 `json:"auth_id_tokens"`
	// The number of data points used for the threshold suggestion calculation.
	DataPoints  int64     `json:"data_points"`
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// The p50 quantile of requests (in period_seconds).
	P50 int64 `json:"p50"`
	// The p90 quantile of requests (in period_seconds).
	P90 int64 `json:"p90"`
	// The p99 quantile of requests (in period_seconds).
	P99 int64 `json:"p99"`
	// The period over which this threshold is suggested.
	PeriodSeconds int64 `json:"period_seconds"`
	// The estimated number of requests covered by these calculations.
	Requests int64 `json:"requests"`
	// The suggested threshold in requests done by the same auth_id or period_seconds.
	SuggestedThreshold int64                                                                         `json:"suggested_threshold"`
	JSON               operationGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON `json:"-"`
}

func (*OperationGetResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds) UnmarshalJSON

type OperationGetResponseMethod

type OperationGetResponseMethod string

The HTTP method used to access the endpoint.

const (
	OperationGetResponseMethodGet     OperationGetResponseMethod = "GET"
	OperationGetResponseMethodPost    OperationGetResponseMethod = "POST"
	OperationGetResponseMethodHead    OperationGetResponseMethod = "HEAD"
	OperationGetResponseMethodOptions OperationGetResponseMethod = "OPTIONS"
	OperationGetResponseMethodPut     OperationGetResponseMethod = "PUT"
	OperationGetResponseMethodDelete  OperationGetResponseMethod = "DELETE"
	OperationGetResponseMethodConnect OperationGetResponseMethod = "CONNECT"
	OperationGetResponseMethodPatch   OperationGetResponseMethod = "PATCH"
	OperationGetResponseMethodTrace   OperationGetResponseMethod = "TRACE"
)

func (OperationGetResponseMethod) IsKnown

func (r OperationGetResponseMethod) IsKnown() bool

type OperationListParams

type OperationListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Direction to order results.
	Direction param.Field[OperationListParamsDirection] `query:"direction"`
	// Filter results to only include endpoints containing this pattern.
	Endpoint param.Field[string] `query:"endpoint"`
	// Add feature(s) to the results. The feature name that is given here corresponds
	// to the resulting feature object. Have a look at the top-level object description
	// for more details on the specific meaning.
	Feature param.Field[[]OperationListParamsFeature] `query:"feature"`
	// Filter results to only include the specified hosts.
	Host param.Field[[]string] `query:"host"`
	// Filter results to only include the specified HTTP methods.
	Method param.Field[[]string] `query:"method"`
	// Field to order by. When requesting a feature, the feature keys are available for
	// ordering as well, e.g., `thresholds.suggested_threshold`.
	Order param.Field[OperationListParamsOrder] `query:"order"`
	// Page number of paginated results.
	Page param.Field[int64] `query:"page"`
	// Maximum number of results per page.
	PerPage param.Field[int64] `query:"per_page"`
}

func (OperationListParams) URLQuery

func (r OperationListParams) URLQuery() (v url.Values)

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

type OperationListParamsDirection

type OperationListParamsDirection string

Direction to order results.

const (
	OperationListParamsDirectionAsc  OperationListParamsDirection = "asc"
	OperationListParamsDirectionDesc OperationListParamsDirection = "desc"
)

func (OperationListParamsDirection) IsKnown

func (r OperationListParamsDirection) IsKnown() bool

type OperationListParamsFeature

type OperationListParamsFeature string
const (
	OperationListParamsFeatureThresholds       OperationListParamsFeature = "thresholds"
	OperationListParamsFeatureParameterSchemas OperationListParamsFeature = "parameter_schemas"
	OperationListParamsFeatureSchemaInfo       OperationListParamsFeature = "schema_info"
)

func (OperationListParamsFeature) IsKnown

func (r OperationListParamsFeature) IsKnown() bool

type OperationListParamsOrder

type OperationListParamsOrder string

Field to order by. When requesting a feature, the feature keys are available for ordering as well, e.g., `thresholds.suggested_threshold`.

const (
	OperationListParamsOrderMethod        OperationListParamsOrder = "method"
	OperationListParamsOrderHost          OperationListParamsOrder = "host"
	OperationListParamsOrderEndpoint      OperationListParamsOrder = "endpoint"
	OperationListParamsOrderThresholdsKey OperationListParamsOrder = "thresholds.$key"
)

func (OperationListParamsOrder) IsKnown

func (r OperationListParamsOrder) IsKnown() bool

type OperationListResponse

type OperationListResponse struct {
	// The endpoint which can contain path parameter templates in curly braces, each
	// will be replaced from left to right with {varN}, starting with {var1}, during
	// insertion. This will further be Cloudflare-normalized upon insertion. See:
	// https://developers.cloudflare.com/rules/normalization/how-it-works/.
	Endpoint string `json:"endpoint,required" format:"uri-template"`
	// RFC3986-compliant host.
	Host        string    `json:"host,required" format:"hostname"`
	LastUpdated time.Time `json:"last_updated,required" format:"date-time"`
	// The HTTP method used to access the endpoint.
	Method OperationListResponseMethod `json:"method,required"`
	// UUID
	OperationID string                        `json:"operation_id,required"`
	Features    OperationListResponseFeatures `json:"features"`
	JSON        operationListResponseJSON     `json:"-"`
}

func (*OperationListResponse) UnmarshalJSON

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

type OperationListResponseFeatures

type OperationListResponseFeatures struct {
	// This field can have the runtime type of
	// [OperationListResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds].
	Thresholds interface{} `json:"thresholds,required"`
	// This field can have the runtime type of
	// [OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas].
	ParameterSchemas interface{} `json:"parameter_schemas,required"`
	// This field can have the runtime type of
	// [OperationListResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting].
	APIRouting interface{} `json:"api_routing,required"`
	// This field can have the runtime type of
	// [OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals].
	ConfidenceIntervals interface{} `json:"confidence_intervals,required"`
	// This field can have the runtime type of
	// [OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo].
	SchemaInfo interface{}                       `json:"schema_info,required"`
	JSON       operationListResponseFeaturesJSON `json:"-"`
	// contains filtered or unexported fields
}

func (*OperationListResponseFeatures) UnmarshalJSON

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

type OperationListResponseFeaturesAPIShieldOperationFeatureAPIRouting

type OperationListResponseFeaturesAPIShieldOperationFeatureAPIRouting struct {
	// API Routing settings on endpoint.
	APIRouting OperationListResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting `json:"api_routing"`
	JSON       operationListResponseFeaturesAPIShieldOperationFeatureAPIRoutingJSON       `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureAPIRouting) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting

type OperationListResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting struct {
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// Target route.
	Route string                                                                         `json:"route"`
	JSON  operationListResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRoutingJSON `json:"-"`
}

API Routing settings on endpoint.

func (*OperationListResponseFeaturesAPIShieldOperationFeatureAPIRoutingAPIRouting) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals struct {
	ConfidenceIntervals OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals `json:"confidence_intervals"`
	JSON                operationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsJSON                `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervals) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals struct {
	LastUpdated        time.Time                                                                                                      `json:"last_updated" format:"date-time"`
	SuggestedThreshold OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold `json:"suggested_threshold"`
	JSON               operationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsJSON               `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervals) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold struct {
	ConfidenceIntervals OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals `json:"confidence_intervals"`
	// Suggested threshold.
	Mean float64                                                                                                            `json:"mean"`
	JSON operationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdJSON `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThreshold) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals struct {
	// Upper and lower bound for percentile estimate
	P90 OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 `json:"p90"`
	// Upper and lower bound for percentile estimate
	P95 OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 `json:"p95"`
	// Upper and lower bound for percentile estimate
	P99  OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99  `json:"p99"`
	JSON operationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsJSON `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervals) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90 struct {
	// Lower bound for percentile estimate
	Lower float64 `json:"lower"`
	// Upper bound for percentile estimate
	Upper float64                                                                                                                                  `json:"upper"`
	JSON  operationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90JSON `json:"-"`
}

Upper and lower bound for percentile estimate

func (*OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP90) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95 struct {
	// Lower bound for percentile estimate
	Lower float64 `json:"lower"`
	// Upper bound for percentile estimate
	Upper float64                                                                                                                                  `json:"upper"`
	JSON  operationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95JSON `json:"-"`
}

Upper and lower bound for percentile estimate

func (*OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP95) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99

type OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99 struct {
	// Lower bound for percentile estimate
	Lower float64 `json:"lower"`
	// Upper bound for percentile estimate
	Upper float64                                                                                                                                  `json:"upper"`
	JSON  operationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99JSON `json:"-"`
}

Upper and lower bound for percentile estimate

func (*OperationListResponseFeaturesAPIShieldOperationFeatureConfidenceIntervalsConfidenceIntervalsSuggestedThresholdConfidenceIntervalsP99) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemas

type OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemas struct {
	ParameterSchemas OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas `json:"parameter_schemas,required"`
	JSON             operationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasJSON             `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemas) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas

type OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas struct {
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// An operation schema object containing a response.
	ParameterSchemas OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas `json:"parameter_schemas"`
	JSON             operationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasJSON             `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemas) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas

type OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas struct {
	// An array containing the learned parameter schemas.
	Parameters []interface{} `json:"parameters"`
	// An empty response object. This field is required to yield a valid operation
	// schema.
	Responses interface{}                                                                                                `json:"responses,nullable"`
	JSON      operationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemasJSON `json:"-"`
}

An operation schema object containing a response.

func (*OperationListResponseFeaturesAPIShieldOperationFeatureParameterSchemasParameterSchemasParameterSchemas) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfo

type OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfo struct {
	SchemaInfo OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo `json:"schema_info"`
	JSON       operationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoJSON       `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfo) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo

type OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo struct {
	// Schema active on endpoint.
	ActiveSchema OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema `json:"active_schema"`
	// True if a Cloudflare-provided learned schema is available for this endpoint.
	LearnedAvailable bool `json:"learned_available"`
	// Action taken on requests failing validation.
	MitigationAction OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction `json:"mitigation_action,nullable"`
	JSON             operationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoJSON             `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfo) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema

type OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema struct {
	// UUID
	ID        string    `json:"id"`
	CreatedAt time.Time `json:"created_at" format:"date-time"`
	// True if schema is Cloudflare-provided.
	IsLearned bool `json:"is_learned"`
	// Schema file name.
	Name string                                                                                     `json:"name"`
	JSON operationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchemaJSON `json:"-"`
}

Schema active on endpoint.

func (*OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoActiveSchema) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction

type OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction string

Action taken on requests failing validation.

const (
	OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionNone  OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "none"
	OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionLog   OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "log"
	OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationActionBlock OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction = "block"
)

func (OperationListResponseFeaturesAPIShieldOperationFeatureSchemaInfoSchemaInfoMitigationAction) IsKnown

type OperationListResponseFeaturesAPIShieldOperationFeatureThresholds

type OperationListResponseFeaturesAPIShieldOperationFeatureThresholds struct {
	Thresholds OperationListResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds `json:"thresholds"`
	JSON       operationListResponseFeaturesAPIShieldOperationFeatureThresholdsJSON       `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureThresholds) UnmarshalJSON

type OperationListResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds

type OperationListResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds struct {
	// The total number of auth-ids seen across this calculation.
	AuthIDTokens int64 `json:"auth_id_tokens"`
	// The number of data points used for the threshold suggestion calculation.
	DataPoints  int64     `json:"data_points"`
	LastUpdated time.Time `json:"last_updated" format:"date-time"`
	// The p50 quantile of requests (in period_seconds).
	P50 int64 `json:"p50"`
	// The p90 quantile of requests (in period_seconds).
	P90 int64 `json:"p90"`
	// The p99 quantile of requests (in period_seconds).
	P99 int64 `json:"p99"`
	// The period over which this threshold is suggested.
	PeriodSeconds int64 `json:"period_seconds"`
	// The estimated number of requests covered by these calculations.
	Requests int64 `json:"requests"`
	// The suggested threshold in requests done by the same auth_id or period_seconds.
	SuggestedThreshold int64                                                                          `json:"suggested_threshold"`
	JSON               operationListResponseFeaturesAPIShieldOperationFeatureThresholdsThresholdsJSON `json:"-"`
}

func (*OperationListResponseFeaturesAPIShieldOperationFeatureThresholdsThresholds) UnmarshalJSON

type OperationListResponseMethod

type OperationListResponseMethod string

The HTTP method used to access the endpoint.

const (
	OperationListResponseMethodGet     OperationListResponseMethod = "GET"
	OperationListResponseMethodPost    OperationListResponseMethod = "POST"
	OperationListResponseMethodHead    OperationListResponseMethod = "HEAD"
	OperationListResponseMethodOptions OperationListResponseMethod = "OPTIONS"
	OperationListResponseMethodPut     OperationListResponseMethod = "PUT"
	OperationListResponseMethodDelete  OperationListResponseMethod = "DELETE"
	OperationListResponseMethodConnect OperationListResponseMethod = "CONNECT"
	OperationListResponseMethodPatch   OperationListResponseMethod = "PATCH"
	OperationListResponseMethodTrace   OperationListResponseMethod = "TRACE"
)

func (OperationListResponseMethod) IsKnown

func (r OperationListResponseMethod) IsKnown() bool

type OperationNewParams

type OperationNewParams struct {
	// Identifier
	ZoneID param.Field[string]      `path:"zone_id,required"`
	Body   []OperationNewParamsBody `json:"body,required"`
}

func (OperationNewParams) MarshalJSON

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

type OperationNewParamsBody

type OperationNewParamsBody struct {
	// The endpoint which can contain path parameter templates in curly braces, each
	// will be replaced from left to right with {varN}, starting with {var1}, during
	// insertion. This will further be Cloudflare-normalized upon insertion. See:
	// https://developers.cloudflare.com/rules/normalization/how-it-works/.
	Endpoint param.Field[string] `json:"endpoint,required" format:"uri-template"`
	// RFC3986-compliant host.
	Host param.Field[string] `json:"host,required" format:"hostname"`
	// The HTTP method used to access the endpoint.
	Method param.Field[OperationNewParamsBodyMethod] `json:"method,required"`
}

func (OperationNewParamsBody) MarshalJSON

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

type OperationNewParamsBodyMethod

type OperationNewParamsBodyMethod string

The HTTP method used to access the endpoint.

const (
	OperationNewParamsBodyMethodGet     OperationNewParamsBodyMethod = "GET"
	OperationNewParamsBodyMethodPost    OperationNewParamsBodyMethod = "POST"
	OperationNewParamsBodyMethodHead    OperationNewParamsBodyMethod = "HEAD"
	OperationNewParamsBodyMethodOptions OperationNewParamsBodyMethod = "OPTIONS"
	OperationNewParamsBodyMethodPut     OperationNewParamsBodyMethod = "PUT"
	OperationNewParamsBodyMethodDelete  OperationNewParamsBodyMethod = "DELETE"
	OperationNewParamsBodyMethodConnect OperationNewParamsBodyMethod = "CONNECT"
	OperationNewParamsBodyMethodPatch   OperationNewParamsBodyMethod = "PATCH"
	OperationNewParamsBodyMethodTrace   OperationNewParamsBodyMethod = "TRACE"
)

func (OperationNewParamsBodyMethod) IsKnown

func (r OperationNewParamsBodyMethod) IsKnown() bool

type OperationNewResponseEnvelope

type OperationNewResponseEnvelope struct {
	Errors   Message     `json:"errors,required"`
	Messages Message     `json:"messages,required"`
	Result   []APIShield `json:"result,required"`
	// Whether the API call was successful
	Success OperationNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    operationNewResponseEnvelopeJSON    `json:"-"`
}

func (*OperationNewResponseEnvelope) UnmarshalJSON

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

type OperationNewResponseEnvelopeSuccess

type OperationNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	OperationNewResponseEnvelopeSuccessTrue OperationNewResponseEnvelopeSuccess = true
)

func (OperationNewResponseEnvelopeSuccess) IsKnown

type OperationSchemaValidationEditParams

type OperationSchemaValidationEditParams struct {
	// Identifier
	ZoneID                  param.Field[string]          `path:"zone_id,required"`
	SettingsMultipleRequest SettingsMultipleRequestParam `json:"settings_multiple_request,required"`
}

func (OperationSchemaValidationEditParams) MarshalJSON

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

type OperationSchemaValidationEditResponseEnvelope

type OperationSchemaValidationEditResponseEnvelope struct {
	Errors   Message                 `json:"errors,required"`
	Messages Message                 `json:"messages,required"`
	Result   SettingsMultipleRequest `json:"result,required"`
	// Whether the API call was successful
	Success OperationSchemaValidationEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    operationSchemaValidationEditResponseEnvelopeJSON    `json:"-"`
}

func (*OperationSchemaValidationEditResponseEnvelope) UnmarshalJSON

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

type OperationSchemaValidationEditResponseEnvelopeSuccess

type OperationSchemaValidationEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	OperationSchemaValidationEditResponseEnvelopeSuccessTrue OperationSchemaValidationEditResponseEnvelopeSuccess = true
)

func (OperationSchemaValidationEditResponseEnvelopeSuccess) IsKnown

type OperationSchemaValidationGetParams

type OperationSchemaValidationGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type OperationSchemaValidationGetResponse

type OperationSchemaValidationGetResponse struct {
	// When set, this applies a mitigation action to this operation
	//
	//   - `log` log request when request does not conform to schema for this operation
	//   - `block` deny access to the site when request does not conform to schema for
	//     this operation
	//   - `none` will skip mitigation for this operation
	//   - `null` indicates that no operation level mitigation is in place, see Zone
	//     Level Schema Validation Settings for mitigation action that will be applied
	MitigationAction OperationSchemaValidationGetResponseMitigationAction `json:"mitigation_action,nullable"`
	JSON             operationSchemaValidationGetResponseJSON             `json:"-"`
}

func (*OperationSchemaValidationGetResponse) UnmarshalJSON

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

type OperationSchemaValidationGetResponseMitigationAction

type OperationSchemaValidationGetResponseMitigationAction string

When set, this applies a mitigation action to this operation

  • `log` log request when request does not conform to schema for this operation
  • `block` deny access to the site when request does not conform to schema for this operation
  • `none` will skip mitigation for this operation
  • `null` indicates that no operation level mitigation is in place, see Zone Level Schema Validation Settings for mitigation action that will be applied
const (
	OperationSchemaValidationGetResponseMitigationActionLog   OperationSchemaValidationGetResponseMitigationAction = "log"
	OperationSchemaValidationGetResponseMitigationActionBlock OperationSchemaValidationGetResponseMitigationAction = "block"
	OperationSchemaValidationGetResponseMitigationActionNone  OperationSchemaValidationGetResponseMitigationAction = "none"
)

func (OperationSchemaValidationGetResponseMitigationAction) IsKnown

type OperationSchemaValidationService

type OperationSchemaValidationService struct {
	Options []option.RequestOption
}

OperationSchemaValidationService 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 NewOperationSchemaValidationService method instead.

func NewOperationSchemaValidationService

func NewOperationSchemaValidationService(opts ...option.RequestOption) (r *OperationSchemaValidationService)

NewOperationSchemaValidationService 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 (*OperationSchemaValidationService) Edit

Updates multiple operation-level schema validation settings on the zone

func (*OperationSchemaValidationService) Get

Retrieves operation-level schema validation settings on the zone

func (*OperationSchemaValidationService) Update

Updates operation-level schema validation settings on the zone

type OperationSchemaValidationUpdateParams

type OperationSchemaValidationUpdateParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// When set, this applies a mitigation action to this operation
	//
	//   - `log` log request when request does not conform to schema for this operation
	//   - `block` deny access to the site when request does not conform to schema for
	//     this operation
	//   - `none` will skip mitigation for this operation
	//   - `null` indicates that no operation level mitigation is in place, see Zone
	//     Level Schema Validation Settings for mitigation action that will be applied
	MitigationAction param.Field[OperationSchemaValidationUpdateParamsMitigationAction] `json:"mitigation_action"`
}

func (OperationSchemaValidationUpdateParams) MarshalJSON

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

type OperationSchemaValidationUpdateParamsMitigationAction

type OperationSchemaValidationUpdateParamsMitigationAction string

When set, this applies a mitigation action to this operation

  • `log` log request when request does not conform to schema for this operation
  • `block` deny access to the site when request does not conform to schema for this operation
  • `none` will skip mitigation for this operation
  • `null` indicates that no operation level mitigation is in place, see Zone Level Schema Validation Settings for mitigation action that will be applied
const (
	OperationSchemaValidationUpdateParamsMitigationActionLog   OperationSchemaValidationUpdateParamsMitigationAction = "log"
	OperationSchemaValidationUpdateParamsMitigationActionBlock OperationSchemaValidationUpdateParamsMitigationAction = "block"
	OperationSchemaValidationUpdateParamsMitigationActionNone  OperationSchemaValidationUpdateParamsMitigationAction = "none"
)

func (OperationSchemaValidationUpdateParamsMitigationAction) IsKnown

type OperationSchemaValidationUpdateResponse

type OperationSchemaValidationUpdateResponse struct {
	// When set, this applies a mitigation action to this operation
	//
	//   - `log` log request when request does not conform to schema for this operation
	//   - `block` deny access to the site when request does not conform to schema for
	//     this operation
	//   - `none` will skip mitigation for this operation
	//   - `null` indicates that no operation level mitigation is in place, see Zone
	//     Level Schema Validation Settings for mitigation action that will be applied
	MitigationAction OperationSchemaValidationUpdateResponseMitigationAction `json:"mitigation_action,nullable"`
	JSON             operationSchemaValidationUpdateResponseJSON             `json:"-"`
}

func (*OperationSchemaValidationUpdateResponse) UnmarshalJSON

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

type OperationSchemaValidationUpdateResponseMitigationAction

type OperationSchemaValidationUpdateResponseMitigationAction string

When set, this applies a mitigation action to this operation

  • `log` log request when request does not conform to schema for this operation
  • `block` deny access to the site when request does not conform to schema for this operation
  • `none` will skip mitigation for this operation
  • `null` indicates that no operation level mitigation is in place, see Zone Level Schema Validation Settings for mitigation action that will be applied
const (
	OperationSchemaValidationUpdateResponseMitigationActionLog   OperationSchemaValidationUpdateResponseMitigationAction = "log"
	OperationSchemaValidationUpdateResponseMitigationActionBlock OperationSchemaValidationUpdateResponseMitigationAction = "block"
	OperationSchemaValidationUpdateResponseMitigationActionNone  OperationSchemaValidationUpdateResponseMitigationAction = "none"
)

func (OperationSchemaValidationUpdateResponseMitigationAction) IsKnown

type OperationService

type OperationService struct {
	Options          []option.RequestOption
	SchemaValidation *OperationSchemaValidationService
}

OperationService 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 NewOperationService method instead.

func NewOperationService

func NewOperationService(opts ...option.RequestOption) (r *OperationService)

NewOperationService 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 (*OperationService) Delete

func (r *OperationService) Delete(ctx context.Context, operationID string, body OperationDeleteParams, opts ...option.RequestOption) (res *OperationDeleteResponse, err error)

Delete an operation

func (*OperationService) Get

func (r *OperationService) Get(ctx context.Context, operationID string, params OperationGetParams, opts ...option.RequestOption) (res *OperationGetResponse, err error)

Retrieve information about an operation

func (*OperationService) List

Retrieve information about all operations on a zone

func (*OperationService) ListAutoPaging

Retrieve information about all operations on a zone

func (*OperationService) New

func (r *OperationService) New(ctx context.Context, params OperationNewParams, opts ...option.RequestOption) (res *[]APIShield, err error)

Add one or more operations to a zone. Endpoints can contain path variables. Host, method, endpoint will be normalized to a canoncial form when creating an operation and must be unique on the zone. Inserting an operation that matches an existing one will return the record of the already existing operation and update its last_updated date.

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 PublicSchema

type PublicSchema struct {
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// Kind of schema
	Kind PublicSchemaKind `json:"kind,required"`
	// Name of the schema
	Name string `json:"name,required"`
	// UUID
	SchemaID string `json:"schema_id,required"`
	// Source of the schema
	Source string `json:"source"`
	// Flag whether schema is enabled for validation.
	ValidationEnabled bool             `json:"validation_enabled"`
	JSON              publicSchemaJSON `json:"-"`
}

func (*PublicSchema) UnmarshalJSON

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

type PublicSchemaKind

type PublicSchemaKind string

Kind of schema

const (
	PublicSchemaKindOpenAPIV3 PublicSchemaKind = "openapi_v3"
)

func (PublicSchemaKind) IsKnown

func (r PublicSchemaKind) IsKnown() bool

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 SchemaListParams

type SchemaListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Add feature(s) to the results. The feature name that is given here corresponds
	// to the resulting feature object. Have a look at the top-level object description
	// for more details on the specific meaning.
	Feature param.Field[[]SchemaListParamsFeature] `query:"feature"`
	// Receive schema only for the given host(s).
	Host param.Field[[]string] `query:"host"`
}

func (SchemaListParams) URLQuery

func (r SchemaListParams) URLQuery() (v url.Values)

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

type SchemaListParamsFeature

type SchemaListParamsFeature string
const (
	SchemaListParamsFeatureThresholds       SchemaListParamsFeature = "thresholds"
	SchemaListParamsFeatureParameterSchemas SchemaListParamsFeature = "parameter_schemas"
	SchemaListParamsFeatureSchemaInfo       SchemaListParamsFeature = "schema_info"
)

func (SchemaListParamsFeature) IsKnown

func (r SchemaListParamsFeature) IsKnown() bool

type SchemaListResponse

type SchemaListResponse struct {
	Schemas   []interface{}          `json:"schemas"`
	Timestamp string                 `json:"timestamp"`
	JSON      schemaListResponseJSON `json:"-"`
}

func (*SchemaListResponse) UnmarshalJSON

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

type SchemaListResponseEnvelope

type SchemaListResponseEnvelope struct {
	Errors   Message            `json:"errors,required"`
	Messages Message            `json:"messages,required"`
	Result   SchemaListResponse `json:"result,required"`
	// Whether the API call was successful
	Success SchemaListResponseEnvelopeSuccess `json:"success,required"`
	JSON    schemaListResponseEnvelopeJSON    `json:"-"`
}

func (*SchemaListResponseEnvelope) UnmarshalJSON

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

type SchemaListResponseEnvelopeSuccess

type SchemaListResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	SchemaListResponseEnvelopeSuccessTrue SchemaListResponseEnvelopeSuccess = true
)

func (SchemaListResponseEnvelopeSuccess) IsKnown

type SchemaService

type SchemaService struct {
	Options []option.RequestOption
}

SchemaService 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 NewSchemaService method instead.

func NewSchemaService

func NewSchemaService(opts ...option.RequestOption) (r *SchemaService)

NewSchemaService 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 (*SchemaService) List

func (r *SchemaService) List(ctx context.Context, params SchemaListParams, opts ...option.RequestOption) (res *SchemaListResponse, err error)

Retrieve operations and features as OpenAPI schemas

type SchemaUpload

type SchemaUpload struct {
	Schema        PublicSchema              `json:"schema,required"`
	UploadDetails SchemaUploadUploadDetails `json:"upload_details"`
	JSON          schemaUploadJSON          `json:"-"`
}

func (*SchemaUpload) UnmarshalJSON

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

type SchemaUploadUploadDetails

type SchemaUploadUploadDetails struct {
	// Diagnostic warning events that occurred during processing. These events are
	// non-critical errors found within the schema.
	Warnings []SchemaUploadUploadDetailsWarning `json:"warnings"`
	JSON     schemaUploadUploadDetailsJSON      `json:"-"`
}

func (*SchemaUploadUploadDetails) UnmarshalJSON

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

type SchemaUploadUploadDetailsWarning

type SchemaUploadUploadDetailsWarning struct {
	// Code that identifies the event that occurred.
	Code int64 `json:"code,required"`
	// JSONPath location(s) in the schema where these events were encountered. See
	// [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/)
	// for JSONPath specification.
	Locations []string `json:"locations"`
	// Diagnostic message that describes the event.
	Message string                               `json:"message"`
	JSON    schemaUploadUploadDetailsWarningJSON `json:"-"`
}

func (*SchemaUploadUploadDetailsWarning) UnmarshalJSON

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

type SettingSchemaValidationEditParams

type SettingSchemaValidationEditParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// The default mitigation action used when there is no mitigation action defined on
	// the operation Mitigation actions are as follows:
	//
	// - `log` - log request when request does not conform to schema
	// - `block` - deny access to the site when request does not conform to schema
	//
	// A special value of of `none` will skip running schema validation entirely for
	// the request when there is no mitigation action defined on the operation
	//
	// `null` will have no effect.
	ValidationDefaultMitigationAction param.Field[SettingSchemaValidationEditParamsValidationDefaultMitigationAction] `json:"validation_default_mitigation_action"`
	// When set, this overrides both zone level and operation level mitigation actions.
	//
	// - `none` will skip running schema validation entirely for the request
	//
	// To clear any override, use the special value `disable_override`
	//
	// `null` will have no effect.
	ValidationOverrideMitigationAction param.Field[SettingSchemaValidationEditParamsValidationOverrideMitigationAction] `json:"validation_override_mitigation_action"`
}

func (SettingSchemaValidationEditParams) MarshalJSON

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

type SettingSchemaValidationEditParamsValidationDefaultMitigationAction

type SettingSchemaValidationEditParamsValidationDefaultMitigationAction string

The default mitigation action used when there is no mitigation action defined on the operation Mitigation actions are as follows:

- `log` - log request when request does not conform to schema - `block` - deny access to the site when request does not conform to schema

A special value of of `none` will skip running schema validation entirely for the request when there is no mitigation action defined on the operation

`null` will have no effect.

const (
	SettingSchemaValidationEditParamsValidationDefaultMitigationActionNone  SettingSchemaValidationEditParamsValidationDefaultMitigationAction = "none"
	SettingSchemaValidationEditParamsValidationDefaultMitigationActionLog   SettingSchemaValidationEditParamsValidationDefaultMitigationAction = "log"
	SettingSchemaValidationEditParamsValidationDefaultMitigationActionBlock SettingSchemaValidationEditParamsValidationDefaultMitigationAction = "block"
)

func (SettingSchemaValidationEditParamsValidationDefaultMitigationAction) IsKnown

type SettingSchemaValidationEditParamsValidationOverrideMitigationAction

type SettingSchemaValidationEditParamsValidationOverrideMitigationAction string

When set, this overrides both zone level and operation level mitigation actions.

- `none` will skip running schema validation entirely for the request

To clear any override, use the special value `disable_override`

`null` will have no effect.

const (
	SettingSchemaValidationEditParamsValidationOverrideMitigationActionNone            SettingSchemaValidationEditParamsValidationOverrideMitigationAction = "none"
	SettingSchemaValidationEditParamsValidationOverrideMitigationActionDisableOverride SettingSchemaValidationEditParamsValidationOverrideMitigationAction = "disable_override"
)

func (SettingSchemaValidationEditParamsValidationOverrideMitigationAction) IsKnown

type SettingSchemaValidationGetParams

type SettingSchemaValidationGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type SettingSchemaValidationService

type SettingSchemaValidationService struct {
	Options []option.RequestOption
}

SettingSchemaValidationService 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 NewSettingSchemaValidationService method instead.

func NewSettingSchemaValidationService

func NewSettingSchemaValidationService(opts ...option.RequestOption) (r *SettingSchemaValidationService)

NewSettingSchemaValidationService 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 (*SettingSchemaValidationService) Edit

Updates zone level schema validation settings on the zone

func (*SettingSchemaValidationService) Get

Retrieves zone level schema validation settings currently set on the zone

func (*SettingSchemaValidationService) Update

Updates zone level schema validation settings on the zone

type SettingSchemaValidationUpdateParams

type SettingSchemaValidationUpdateParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// The default mitigation action used when there is no mitigation action defined on
	// the operation
	//
	// Mitigation actions are as follows:
	//
	// - `log` - log request when request does not conform to schema
	// - `block` - deny access to the site when request does not conform to schema
	//
	// A special value of of `none` will skip running schema validation entirely for
	// the request when there is no mitigation action defined on the operation
	ValidationDefaultMitigationAction param.Field[SettingSchemaValidationUpdateParamsValidationDefaultMitigationAction] `json:"validation_default_mitigation_action,required"`
	// When set, this overrides both zone level and operation level mitigation actions.
	//
	// - `none` will skip running schema validation entirely for the request
	// - `null` indicates that no override is in place
	//
	// To clear any override, use the special value `disable_override` or `null`
	ValidationOverrideMitigationAction param.Field[SettingSchemaValidationUpdateParamsValidationOverrideMitigationAction] `json:"validation_override_mitigation_action"`
}

func (SettingSchemaValidationUpdateParams) MarshalJSON

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

type SettingSchemaValidationUpdateParamsValidationDefaultMitigationAction

type SettingSchemaValidationUpdateParamsValidationDefaultMitigationAction string

The default mitigation action used when there is no mitigation action defined on the operation

Mitigation actions are as follows:

- `log` - log request when request does not conform to schema - `block` - deny access to the site when request does not conform to schema

A special value of of `none` will skip running schema validation entirely for the request when there is no mitigation action defined on the operation

const (
	SettingSchemaValidationUpdateParamsValidationDefaultMitigationActionNone  SettingSchemaValidationUpdateParamsValidationDefaultMitigationAction = "none"
	SettingSchemaValidationUpdateParamsValidationDefaultMitigationActionLog   SettingSchemaValidationUpdateParamsValidationDefaultMitigationAction = "log"
	SettingSchemaValidationUpdateParamsValidationDefaultMitigationActionBlock SettingSchemaValidationUpdateParamsValidationDefaultMitigationAction = "block"
)

func (SettingSchemaValidationUpdateParamsValidationDefaultMitigationAction) IsKnown

type SettingSchemaValidationUpdateParamsValidationOverrideMitigationAction

type SettingSchemaValidationUpdateParamsValidationOverrideMitigationAction string

When set, this overrides both zone level and operation level mitigation actions.

- `none` will skip running schema validation entirely for the request - `null` indicates that no override is in place

To clear any override, use the special value `disable_override` or `null`

const (
	SettingSchemaValidationUpdateParamsValidationOverrideMitigationActionNone            SettingSchemaValidationUpdateParamsValidationOverrideMitigationAction = "none"
	SettingSchemaValidationUpdateParamsValidationOverrideMitigationActionDisableOverride SettingSchemaValidationUpdateParamsValidationOverrideMitigationAction = "disable_override"
)

func (SettingSchemaValidationUpdateParamsValidationOverrideMitigationAction) IsKnown

type SettingService

type SettingService struct {
	Options          []option.RequestOption
	SchemaValidation *SettingSchemaValidationService
}

SettingService 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 NewSettingService method instead.

func NewSettingService

func NewSettingService(opts ...option.RequestOption) (r *SettingService)

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

type Settings struct {
	// The default mitigation action used when there is no mitigation action defined on
	// the operation
	//
	// Mitigation actions are as follows:
	//
	// - `log` - log request when request does not conform to schema
	// - `block` - deny access to the site when request does not conform to schema
	//
	// A special value of of `none` will skip running schema validation entirely for
	// the request when there is no mitigation action defined on the operation
	ValidationDefaultMitigationAction SettingsValidationDefaultMitigationAction `json:"validation_default_mitigation_action"`
	// When set, this overrides both zone level and operation level mitigation actions.
	//
	// - `none` will skip running schema validation entirely for the request
	// - `null` indicates that no override is in place
	ValidationOverrideMitigationAction SettingsValidationOverrideMitigationAction `json:"validation_override_mitigation_action,nullable"`
	JSON                               settingsJSON                               `json:"-"`
}

func (*Settings) UnmarshalJSON

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

type SettingsMultipleRequest

type SettingsMultipleRequest map[string]SettingsMultipleRequestItem

type SettingsMultipleRequestItem

type SettingsMultipleRequestItem struct {
	// When set, this applies a mitigation action to this operation
	//
	//   - `log` log request when request does not conform to schema for this operation
	//   - `block` deny access to the site when request does not conform to schema for
	//     this operation
	//   - `none` will skip mitigation for this operation
	//   - `null` indicates that no operation level mitigation is in place, see Zone
	//     Level Schema Validation Settings for mitigation action that will be applied
	MitigationAction SettingsMultipleRequestItemMitigationAction `json:"mitigation_action,nullable"`
	JSON             settingsMultipleRequestItemJSON             `json:"-"`
}

Operation ID to mitigation action mappings

func (*SettingsMultipleRequestItem) UnmarshalJSON

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

type SettingsMultipleRequestItemMitigationAction

type SettingsMultipleRequestItemMitigationAction string

When set, this applies a mitigation action to this operation

  • `log` log request when request does not conform to schema for this operation
  • `block` deny access to the site when request does not conform to schema for this operation
  • `none` will skip mitigation for this operation
  • `null` indicates that no operation level mitigation is in place, see Zone Level Schema Validation Settings for mitigation action that will be applied
const (
	SettingsMultipleRequestItemMitigationActionLog   SettingsMultipleRequestItemMitigationAction = "log"
	SettingsMultipleRequestItemMitigationActionBlock SettingsMultipleRequestItemMitigationAction = "block"
	SettingsMultipleRequestItemMitigationActionNone  SettingsMultipleRequestItemMitigationAction = "none"
)

func (SettingsMultipleRequestItemMitigationAction) IsKnown

type SettingsMultipleRequestItemParam

type SettingsMultipleRequestItemParam struct {
	// When set, this applies a mitigation action to this operation
	//
	//   - `log` log request when request does not conform to schema for this operation
	//   - `block` deny access to the site when request does not conform to schema for
	//     this operation
	//   - `none` will skip mitigation for this operation
	//   - `null` indicates that no operation level mitigation is in place, see Zone
	//     Level Schema Validation Settings for mitigation action that will be applied
	MitigationAction param.Field[SettingsMultipleRequestItemMitigationAction] `json:"mitigation_action"`
}

Operation ID to mitigation action mappings

func (SettingsMultipleRequestItemParam) MarshalJSON

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

type SettingsMultipleRequestParam

type SettingsMultipleRequestParam map[string]SettingsMultipleRequestItemParam

type SettingsValidationDefaultMitigationAction

type SettingsValidationDefaultMitigationAction string

The default mitigation action used when there is no mitigation action defined on the operation

Mitigation actions are as follows:

- `log` - log request when request does not conform to schema - `block` - deny access to the site when request does not conform to schema

A special value of of `none` will skip running schema validation entirely for the request when there is no mitigation action defined on the operation

const (
	SettingsValidationDefaultMitigationActionNone  SettingsValidationDefaultMitigationAction = "none"
	SettingsValidationDefaultMitigationActionLog   SettingsValidationDefaultMitigationAction = "log"
	SettingsValidationDefaultMitigationActionBlock SettingsValidationDefaultMitigationAction = "block"
)

func (SettingsValidationDefaultMitigationAction) IsKnown

type SettingsValidationOverrideMitigationAction

type SettingsValidationOverrideMitigationAction string

When set, this overrides both zone level and operation level mitigation actions.

- `none` will skip running schema validation entirely for the request - `null` indicates that no override is in place

const (
	SettingsValidationOverrideMitigationActionNone SettingsValidationOverrideMitigationAction = "none"
)

func (SettingsValidationOverrideMitigationAction) IsKnown

type SortDirection

type SortDirection = shared.SortDirection

Direction to order DNS records in.

This is an alias to an internal type.

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.

type UserSchemaDeleteParams

type UserSchemaDeleteParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
}

type UserSchemaDeleteResponse

type UserSchemaDeleteResponse struct {
	Errors   Message `json:"errors,required"`
	Messages Message `json:"messages,required"`
	// Whether the API call was successful
	Success UserSchemaDeleteResponseSuccess `json:"success,required"`
	JSON    userSchemaDeleteResponseJSON    `json:"-"`
}

func (*UserSchemaDeleteResponse) UnmarshalJSON

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

type UserSchemaDeleteResponseSuccess

type UserSchemaDeleteResponseSuccess bool

Whether the API call was successful

const (
	UserSchemaDeleteResponseSuccessTrue UserSchemaDeleteResponseSuccess = true
)

func (UserSchemaDeleteResponseSuccess) IsKnown

type UserSchemaEditParams

type UserSchemaEditParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Flag whether schema is enabled for validation.
	ValidationEnabled param.Field[UserSchemaEditParamsValidationEnabled] `json:"validation_enabled"`
}

func (UserSchemaEditParams) MarshalJSON

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

type UserSchemaEditParamsValidationEnabled

type UserSchemaEditParamsValidationEnabled bool

Flag whether schema is enabled for validation.

const (
	UserSchemaEditParamsValidationEnabledTrue UserSchemaEditParamsValidationEnabled = true
)

func (UserSchemaEditParamsValidationEnabled) IsKnown

type UserSchemaEditResponseEnvelope

type UserSchemaEditResponseEnvelope struct {
	Errors   Message      `json:"errors,required"`
	Messages Message      `json:"messages,required"`
	Result   PublicSchema `json:"result,required"`
	// Whether the API call was successful
	Success UserSchemaEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    userSchemaEditResponseEnvelopeJSON    `json:"-"`
}

func (*UserSchemaEditResponseEnvelope) UnmarshalJSON

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

type UserSchemaEditResponseEnvelopeSuccess

type UserSchemaEditResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	UserSchemaEditResponseEnvelopeSuccessTrue UserSchemaEditResponseEnvelopeSuccess = true
)

func (UserSchemaEditResponseEnvelopeSuccess) IsKnown

type UserSchemaGetParams

type UserSchemaGetParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Omit the source-files of schemas and only retrieve their meta-data.
	OmitSource param.Field[bool] `query:"omit_source"`
}

func (UserSchemaGetParams) URLQuery

func (r UserSchemaGetParams) URLQuery() (v url.Values)

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

type UserSchemaGetResponseEnvelope

type UserSchemaGetResponseEnvelope struct {
	Errors   Message      `json:"errors,required"`
	Messages Message      `json:"messages,required"`
	Result   PublicSchema `json:"result,required"`
	// Whether the API call was successful
	Success UserSchemaGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    userSchemaGetResponseEnvelopeJSON    `json:"-"`
}

func (*UserSchemaGetResponseEnvelope) UnmarshalJSON

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

type UserSchemaGetResponseEnvelopeSuccess

type UserSchemaGetResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	UserSchemaGetResponseEnvelopeSuccessTrue UserSchemaGetResponseEnvelopeSuccess = true
)

func (UserSchemaGetResponseEnvelopeSuccess) IsKnown

type UserSchemaListParams

type UserSchemaListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Omit the source-files of schemas and only retrieve their meta-data.
	OmitSource param.Field[bool] `query:"omit_source"`
	// Page number of paginated results.
	Page param.Field[int64] `query:"page"`
	// Maximum number of results per page.
	PerPage param.Field[int64] `query:"per_page"`
	// Flag whether schema is enabled for validation.
	ValidationEnabled param.Field[bool] `query:"validation_enabled"`
}

func (UserSchemaListParams) URLQuery

func (r UserSchemaListParams) URLQuery() (v url.Values)

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

type UserSchemaNewParams

type UserSchemaNewParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Schema file bytes
	File param.Field[io.Reader] `json:"file,required" format:"binary"`
	// Kind of schema
	Kind param.Field[UserSchemaNewParamsKind] `json:"kind,required"`
	// Name of the schema
	Name param.Field[string] `json:"name"`
	// Flag whether schema is enabled for validation.
	ValidationEnabled param.Field[UserSchemaNewParamsValidationEnabled] `json:"validation_enabled"`
}

func (UserSchemaNewParams) MarshalMultipart

func (r UserSchemaNewParams) MarshalMultipart() (data []byte, contentType string, err error)

type UserSchemaNewParamsKind

type UserSchemaNewParamsKind string

Kind of schema

const (
	UserSchemaNewParamsKindOpenAPIV3 UserSchemaNewParamsKind = "openapi_v3"
)

func (UserSchemaNewParamsKind) IsKnown

func (r UserSchemaNewParamsKind) IsKnown() bool

type UserSchemaNewParamsValidationEnabled

type UserSchemaNewParamsValidationEnabled string

Flag whether schema is enabled for validation.

const (
	UserSchemaNewParamsValidationEnabledTrue  UserSchemaNewParamsValidationEnabled = "true"
	UserSchemaNewParamsValidationEnabledFalse UserSchemaNewParamsValidationEnabled = "false"
)

func (UserSchemaNewParamsValidationEnabled) IsKnown

type UserSchemaNewResponseEnvelope

type UserSchemaNewResponseEnvelope struct {
	Errors   Message      `json:"errors,required"`
	Messages Message      `json:"messages,required"`
	Result   SchemaUpload `json:"result,required"`
	// Whether the API call was successful
	Success UserSchemaNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    userSchemaNewResponseEnvelopeJSON    `json:"-"`
}

func (*UserSchemaNewResponseEnvelope) UnmarshalJSON

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

type UserSchemaNewResponseEnvelopeSuccess

type UserSchemaNewResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	UserSchemaNewResponseEnvelopeSuccessTrue UserSchemaNewResponseEnvelopeSuccess = true
)

func (UserSchemaNewResponseEnvelopeSuccess) IsKnown

type UserSchemaOperationListParams

type UserSchemaOperationListParams struct {
	// Identifier
	ZoneID param.Field[string] `path:"zone_id,required"`
	// Filter results to only include endpoints containing this pattern.
	Endpoint param.Field[string] `query:"endpoint"`
	// Add feature(s) to the results. The feature name that is given here corresponds
	// to the resulting feature object. Have a look at the top-level object description
	// for more details on the specific meaning.
	Feature param.Field[[]UserSchemaOperationListParamsFeature] `query:"feature"`
	// Filter results to only include the specified hosts.
	Host param.Field[[]string] `query:"host"`
	// Filter results to only include the specified HTTP methods.
	Method param.Field[[]string] `query:"method"`
	// Filter results by whether operations exist in API Shield Endpoint Management or
	// not. `new` will just return operations from the schema that do not exist in API
	// Shield Endpoint Management. `existing` will just return operations from the
	// schema that already exist in API Shield Endpoint Management.
	OperationStatus param.Field[UserSchemaOperationListParamsOperationStatus] `query:"operation_status"`
	// Page number of paginated results.
	Page param.Field[int64] `query:"page"`
	// Maximum number of results per page.
	PerPage param.Field[int64] `query:"per_page"`
}

func (UserSchemaOperationListParams) URLQuery

func (r UserSchemaOperationListParams) URLQuery() (v url.Values)

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

type UserSchemaOperationListParamsFeature

type UserSchemaOperationListParamsFeature string
const (
	UserSchemaOperationListParamsFeatureThresholds       UserSchemaOperationListParamsFeature = "thresholds"
	UserSchemaOperationListParamsFeatureParameterSchemas UserSchemaOperationListParamsFeature = "parameter_schemas"
	UserSchemaOperationListParamsFeatureSchemaInfo       UserSchemaOperationListParamsFeature = "schema_info"
)

func (UserSchemaOperationListParamsFeature) IsKnown

type UserSchemaOperationListParamsOperationStatus

type UserSchemaOperationListParamsOperationStatus string

Filter results by whether operations exist in API Shield Endpoint Management or not. `new` will just return operations from the schema that do not exist in API Shield Endpoint Management. `existing` will just return operations from the schema that already exist in API Shield Endpoint Management.

const (
	UserSchemaOperationListParamsOperationStatusNew      UserSchemaOperationListParamsOperationStatus = "new"
	UserSchemaOperationListParamsOperationStatusExisting UserSchemaOperationListParamsOperationStatus = "existing"
)

func (UserSchemaOperationListParamsOperationStatus) IsKnown

type UserSchemaOperationListResponse

type UserSchemaOperationListResponse struct {
	// The endpoint which can contain path parameter templates in curly braces, each
	// will be replaced from left to right with {varN}, starting with {var1}, during
	// insertion. This will further be Cloudflare-normalized upon insertion. See:
	// https://developers.cloudflare.com/rules/normalization/how-it-works/.
	Endpoint string `json:"endpoint,required" format:"uri-template"`
	// RFC3986-compliant host.
	Host string `json:"host,required" format:"hostname"`
	// The HTTP method used to access the endpoint.
	Method      UserSchemaOperationListResponseMethod `json:"method,required"`
	LastUpdated time.Time                             `json:"last_updated" format:"date-time"`
	// UUID
	OperationID string `json:"operation_id"`
	// This field can have the runtime type of [APIShieldFeatures].
	Features interface{}                         `json:"features,required"`
	JSON     userSchemaOperationListResponseJSON `json:"-"`
	// contains filtered or unexported fields
}

func (UserSchemaOperationListResponse) AsUnion

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

Possible runtime types of the union are api_gateway.APIShield, api_gateway.UserSchemaOperationListResponseAPIShieldBasicOperation.

func (*UserSchemaOperationListResponse) UnmarshalJSON

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

type UserSchemaOperationListResponseAPIShieldBasicOperation

type UserSchemaOperationListResponseAPIShieldBasicOperation struct {
	// The endpoint which can contain path parameter templates in curly braces, each
	// will be replaced from left to right with {varN}, starting with {var1}, during
	// insertion. This will further be Cloudflare-normalized upon insertion. See:
	// https://developers.cloudflare.com/rules/normalization/how-it-works/.
	Endpoint string `json:"endpoint,required" format:"uri-template"`
	// RFC3986-compliant host.
	Host string `json:"host,required" format:"hostname"`
	// The HTTP method used to access the endpoint.
	Method UserSchemaOperationListResponseAPIShieldBasicOperationMethod `json:"method,required"`
	JSON   userSchemaOperationListResponseAPIShieldBasicOperationJSON   `json:"-"`
}

func (*UserSchemaOperationListResponseAPIShieldBasicOperation) UnmarshalJSON

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

type UserSchemaOperationListResponseAPIShieldBasicOperationMethod

type UserSchemaOperationListResponseAPIShieldBasicOperationMethod string

The HTTP method used to access the endpoint.

const (
	UserSchemaOperationListResponseAPIShieldBasicOperationMethodGet     UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "GET"
	UserSchemaOperationListResponseAPIShieldBasicOperationMethodPost    UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "POST"
	UserSchemaOperationListResponseAPIShieldBasicOperationMethodHead    UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "HEAD"
	UserSchemaOperationListResponseAPIShieldBasicOperationMethodOptions UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "OPTIONS"
	UserSchemaOperationListResponseAPIShieldBasicOperationMethodPut     UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "PUT"
	UserSchemaOperationListResponseAPIShieldBasicOperationMethodDelete  UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "DELETE"
	UserSchemaOperationListResponseAPIShieldBasicOperationMethodConnect UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "CONNECT"
	UserSchemaOperationListResponseAPIShieldBasicOperationMethodPatch   UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "PATCH"
	UserSchemaOperationListResponseAPIShieldBasicOperationMethodTrace   UserSchemaOperationListResponseAPIShieldBasicOperationMethod = "TRACE"
)

func (UserSchemaOperationListResponseAPIShieldBasicOperationMethod) IsKnown

type UserSchemaOperationListResponseMethod

type UserSchemaOperationListResponseMethod string

The HTTP method used to access the endpoint.

const (
	UserSchemaOperationListResponseMethodGet     UserSchemaOperationListResponseMethod = "GET"
	UserSchemaOperationListResponseMethodPost    UserSchemaOperationListResponseMethod = "POST"
	UserSchemaOperationListResponseMethodHead    UserSchemaOperationListResponseMethod = "HEAD"
	UserSchemaOperationListResponseMethodOptions UserSchemaOperationListResponseMethod = "OPTIONS"
	UserSchemaOperationListResponseMethodPut     UserSchemaOperationListResponseMethod = "PUT"
	UserSchemaOperationListResponseMethodDelete  UserSchemaOperationListResponseMethod = "DELETE"
	UserSchemaOperationListResponseMethodConnect UserSchemaOperationListResponseMethod = "CONNECT"
	UserSchemaOperationListResponseMethodPatch   UserSchemaOperationListResponseMethod = "PATCH"
	UserSchemaOperationListResponseMethodTrace   UserSchemaOperationListResponseMethod = "TRACE"
)

func (UserSchemaOperationListResponseMethod) IsKnown

type UserSchemaOperationListResponseUnion

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

Union satisfied by api_gateway.APIShield or api_gateway.UserSchemaOperationListResponseAPIShieldBasicOperation.

type UserSchemaOperationService

type UserSchemaOperationService struct {
	Options []option.RequestOption
}

UserSchemaOperationService 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 NewUserSchemaOperationService method instead.

func NewUserSchemaOperationService

func NewUserSchemaOperationService(opts ...option.RequestOption) (r *UserSchemaOperationService)

NewUserSchemaOperationService 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 (*UserSchemaOperationService) List

Retrieves all operations from the schema. Operations that already exist in API Shield Endpoint Management will be returned as full operations.

func (*UserSchemaOperationService) ListAutoPaging

Retrieves all operations from the schema. Operations that already exist in API Shield Endpoint Management will be returned as full operations.

type UserSchemaService

type UserSchemaService struct {
	Options    []option.RequestOption
	Operations *UserSchemaOperationService
}

UserSchemaService 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 NewUserSchemaService method instead.

func NewUserSchemaService

func NewUserSchemaService(opts ...option.RequestOption) (r *UserSchemaService)

NewUserSchemaService 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 (*UserSchemaService) Delete

Delete a schema

func (*UserSchemaService) Edit

func (r *UserSchemaService) Edit(ctx context.Context, schemaID string, params UserSchemaEditParams, opts ...option.RequestOption) (res *PublicSchema, err error)

Enable validation for a schema

func (*UserSchemaService) Get

func (r *UserSchemaService) Get(ctx context.Context, schemaID string, params UserSchemaGetParams, opts ...option.RequestOption) (res *PublicSchema, err error)

Retrieve information about a specific schema on a zone

func (*UserSchemaService) List

Retrieve information about all schemas on a zone

func (*UserSchemaService) ListAutoPaging

Retrieve information about all schemas on a zone

func (*UserSchemaService) New

Upload a schema to a zone

Jump to

Keyboard shortcuts

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