schema_validation

package
v6.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2026 License: Apache-2.0 Imports: 16 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 CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare

This is an alias to an internal value.

View Source
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal

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 CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic

This is an alias to an internal value.

View Source
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP

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 MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow

This is an alias to an internal value.

View Source
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny

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 RatePlanIDBusiness = shared.RatePlanIDBusiness

This is an alias to an internal value.

View Source
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDFree = shared.RatePlanIDFree

This is an alias to an internal value.

View Source
const RatePlanIDLite = shared.RatePlanIDLite

This is an alias to an internal value.

View Source
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness

This is an alias to an internal value.

View Source
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise

This is an alias to an internal value.

View Source
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree

This is an alias to an internal value.

View Source
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro

This is an alias to an internal value.

View Source
const RatePlanIDPro = shared.RatePlanIDPro

This is an alias to an internal value.

View Source
const RatePlanIDProPlus = shared.RatePlanIDProPlus

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.

View Source
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow

This is an alias to an internal value.

View Source
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny

This is an alias to an internal value.

View Source
const TokenStatusActive = shared.TokenStatusActive

This is an alias to an internal value.

View Source
const TokenStatusDisabled = shared.TokenStatusDisabled

This is an alias to an internal value.

View Source
const TokenStatusExpired = shared.TokenStatusExpired

This is an alias to an internal value.

Variables

This section is empty.

Functions

This section is empty.

Types

type ASN

type ASN = shared.ASN

This is an alias to an internal type.

type ASNParam

type ASNParam = shared.ASNParam

This is an alias to an internal type.

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

type CloudflareTunnelConfigSrc = shared.CloudflareTunnelConfigSrc

Indicates if this is a locally or remotely configured tunnel. If `local`, manage the tunnel using a YAML file on the origin machine. If `cloudflare`, manage the tunnel on the Zero Trust dashboard.

This is an alias to an internal type.

type CloudflareTunnelConnection

type CloudflareTunnelConnection = shared.CloudflareTunnelConnection

This is an alias to an internal type.

type CloudflareTunnelStatus

type CloudflareTunnelStatus = shared.CloudflareTunnelStatus

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

This is an alias to an internal type.

type CloudflareTunnelTunType

type CloudflareTunnelTunType = shared.CloudflareTunnelTunType

The type of tunnel.

This is an alias to an internal type.

type Error

type Error = apierror.Error

type ErrorData

type ErrorData = shared.ErrorData

This is an alias to an internal type.

type ErrorDataSource

type ErrorDataSource = shared.ErrorDataSource

This is an alias to an internal type.

type Member

type Member = shared.Member

This is an alias to an internal type.

type MemberPoliciesAccess

type MemberPoliciesAccess = shared.MemberPoliciesAccess

Allow or deny operations against the resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroup

type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type MemberPoliciesPermissionGroupsMeta

type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type MemberPoliciesResourceGroup

type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup

A group of scoped resources.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsMeta

type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta

Attributes associated to the resource group.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScope

type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope

A scope is a combination of scope objects which provides additional context.

This is an alias to an internal type.

type MemberPoliciesResourceGroupsScopeObject

type MemberPoliciesResourceGroupsScopeObject = shared.MemberPoliciesResourceGroupsScopeObject

A scope object represents any resource that can have actions applied against invite.

This is an alias to an internal type.

type MemberPolicy

type MemberPolicy = shared.MemberPolicy

This is an alias to an internal type.

type MemberStatus

type MemberStatus = shared.MemberStatus

A member's status in the account.

This is an alias to an internal type.

type MemberUser

type MemberUser = shared.MemberUser

Details of the user associated to the membership.

This is an alias to an internal type.

type 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 added in v6.3.0

type PublicSchema struct {
	CreatedAt time.Time `json:"created_at,required" format:"date-time"`
	// The kind of the schema
	Kind PublicSchemaKind `json:"kind,required"`
	// A human-readable name for the schema
	Name string `json:"name,required"`
	// A unique identifier of this schema
	SchemaID string `json:"schema_id,required" format:"uuid"`
	// The raw schema, e.g., the OpenAPI schema, either as JSON or YAML
	Source string `json:"source,required"`
	// An indicator if this schema is enabled
	ValidationEnabled bool             `json:"validation_enabled"`
	JSON              publicSchemaJSON `json:"-"`
}

A schema used in schema validation

func (*PublicSchema) UnmarshalJSON added in v6.3.0

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

type PublicSchemaKind added in v6.3.0

type PublicSchemaKind string

The kind of the schema

const (
	PublicSchemaKindOpenAPIV3 PublicSchemaKind = "openapi_v3"
)

func (PublicSchemaKind) IsKnown added in v6.3.0

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 RatePlanID

type RatePlanID = shared.RatePlanID

The ID of the rate plan.

This is an alias to an internal type.

type RatePlanParam

type RatePlanParam = shared.RatePlanParam

The rate plan applied to the subscription.

This is an alias to an internal type.

type ResponseInfo

type ResponseInfo = shared.ResponseInfo

This is an alias to an internal type.

type ResponseInfoSource

type ResponseInfoSource = shared.ResponseInfoSource

This is an alias to an internal type.

type Role

type Role = shared.Role

This is an alias to an internal type.

type RoleParam

type RoleParam = shared.RoleParam

This is an alias to an internal type.

type RolePermissions

type RolePermissions = shared.RolePermissions

This is an alias to an internal type.

type RolePermissionsParam

type RolePermissionsParam = shared.RolePermissionsParam

This is an alias to an internal type.

type SchemaDeleteParams

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

type SchemaDeleteResponse

type SchemaDeleteResponse struct {
	// The ID of the schema that was just deleted
	ID   string                   `json:"id,required" format:"uuid"`
	JSON schemaDeleteResponseJSON `json:"-"`
}

func (*SchemaDeleteResponse) UnmarshalJSON

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

type SchemaDeleteResponseEnvelope

type SchemaDeleteResponseEnvelope struct {
	Errors   api_gateway.Message  `json:"errors,required"`
	Messages api_gateway.Message  `json:"messages,required"`
	Result   SchemaDeleteResponse `json:"result,required"`
	// Whether the API call was successful.
	Success SchemaDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    schemaDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*SchemaDeleteResponseEnvelope) UnmarshalJSON

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

type SchemaDeleteResponseEnvelopeSuccess

type SchemaDeleteResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SchemaDeleteResponseEnvelopeSuccessTrue SchemaDeleteResponseEnvelopeSuccess = true
)

func (SchemaDeleteResponseEnvelopeSuccess) IsKnown

type SchemaEditParams

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

func (SchemaEditParams) MarshalJSON

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

type SchemaEditResponseEnvelope

type SchemaEditResponseEnvelope struct {
	Errors   api_gateway.Message `json:"errors,required"`
	Messages api_gateway.Message `json:"messages,required"`
	// A schema used in schema validation
	Result PublicSchema `json:"result,required"`
	// Whether the API call was successful.
	Success SchemaEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    schemaEditResponseEnvelopeJSON    `json:"-"`
}

func (*SchemaEditResponseEnvelope) UnmarshalJSON

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

type SchemaEditResponseEnvelopeSuccess

type SchemaEditResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SchemaEditResponseEnvelopeSuccessTrue SchemaEditResponseEnvelopeSuccess = true
)

func (SchemaEditResponseEnvelopeSuccess) IsKnown

type SchemaGetParams

type SchemaGetParams 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 (SchemaGetParams) URLQuery

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

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

type SchemaGetResponseEnvelope

type SchemaGetResponseEnvelope struct {
	Errors   api_gateway.Message `json:"errors,required"`
	Messages api_gateway.Message `json:"messages,required"`
	// A schema used in schema validation
	Result PublicSchema `json:"result,required"`
	// Whether the API call was successful.
	Success SchemaGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    schemaGetResponseEnvelopeJSON    `json:"-"`
}

func (*SchemaGetResponseEnvelope) UnmarshalJSON

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

type SchemaGetResponseEnvelopeSuccess

type SchemaGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SchemaGetResponseEnvelopeSuccessTrue SchemaGetResponseEnvelopeSuccess = true
)

func (SchemaGetResponseEnvelopeSuccess) IsKnown

type SchemaListParams

type SchemaListParams 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"`
	// Filter for enabled schemas
	ValidationEnabled param.Field[bool] `query:"validation_enabled"`
}

func (SchemaListParams) URLQuery

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

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

type SchemaNewParams

type SchemaNewParams struct {
	// Identifier.
	ZoneID param.Field[string] `path:"zone_id,required"`
	// The kind of the schema
	Kind param.Field[SchemaNewParamsKind] `json:"kind,required"`
	// A human-readable name for the schema
	Name param.Field[string] `json:"name,required"`
	// The raw schema, e.g., the OpenAPI schema, either as JSON or YAML
	Source param.Field[string] `json:"source,required"`
	// An indicator if this schema is enabled
	ValidationEnabled param.Field[bool] `json:"validation_enabled,required"`
}

func (SchemaNewParams) MarshalJSON

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

type SchemaNewParamsKind

type SchemaNewParamsKind string

The kind of the schema

const (
	SchemaNewParamsKindOpenAPIV3 SchemaNewParamsKind = "openapi_v3"
)

func (SchemaNewParamsKind) IsKnown

func (r SchemaNewParamsKind) IsKnown() bool

type SchemaNewResponseEnvelope

type SchemaNewResponseEnvelope struct {
	Errors   []SchemaNewResponseEnvelopeErrors   `json:"errors,required"`
	Messages []SchemaNewResponseEnvelopeMessages `json:"messages,required"`
	// A schema used in schema validation
	Result PublicSchema `json:"result,required"`
	// Whether the API call was successful.
	Success SchemaNewResponseEnvelopeSuccess `json:"success,required"`
	JSON    schemaNewResponseEnvelopeJSON    `json:"-"`
}

func (*SchemaNewResponseEnvelope) UnmarshalJSON

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

type SchemaNewResponseEnvelopeErrors

type SchemaNewResponseEnvelopeErrors struct {
	// A unique error code that describes the kind of issue with the schema
	Code int64 `json:"code,required"`
	// A short text explaining the issue with the schema
	Message          string                                `json:"message,required"`
	DocumentationURL string                                `json:"documentation_url"`
	Source           SchemaNewResponseEnvelopeErrorsSource `json:"source"`
	JSON             schemaNewResponseEnvelopeErrorsJSON   `json:"-"`
}

func (*SchemaNewResponseEnvelopeErrors) UnmarshalJSON

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

type SchemaNewResponseEnvelopeErrorsSource

type SchemaNewResponseEnvelopeErrorsSource struct {
	// A list of JSON path expression(s) that describe the location(s) of the issue
	// within the provided resource. See
	// [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/)
	// for JSONPath specification.
	Locations []string                                  `json:"locations"`
	Pointer   string                                    `json:"pointer"`
	JSON      schemaNewResponseEnvelopeErrorsSourceJSON `json:"-"`
}

func (*SchemaNewResponseEnvelopeErrorsSource) UnmarshalJSON

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

type SchemaNewResponseEnvelopeMessages

type SchemaNewResponseEnvelopeMessages struct {
	// A unique error code that describes the kind of issue with the schema
	Code int64 `json:"code,required"`
	// A short text explaining the issue with the schema
	Message          string                                  `json:"message,required"`
	DocumentationURL string                                  `json:"documentation_url"`
	Source           SchemaNewResponseEnvelopeMessagesSource `json:"source"`
	JSON             schemaNewResponseEnvelopeMessagesJSON   `json:"-"`
}

func (*SchemaNewResponseEnvelopeMessages) UnmarshalJSON

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

type SchemaNewResponseEnvelopeMessagesSource

type SchemaNewResponseEnvelopeMessagesSource struct {
	// A list of JSON path expression(s) that describe the location(s) of the issue
	// within the provided resource. See
	// [https://goessner.net/articles/JsonPath/](https://goessner.net/articles/JsonPath/)
	// for JSONPath specification.
	Locations []string                                    `json:"locations"`
	Pointer   string                                      `json:"pointer"`
	JSON      schemaNewResponseEnvelopeMessagesSourceJSON `json:"-"`
}

func (*SchemaNewResponseEnvelopeMessagesSource) UnmarshalJSON

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

type SchemaNewResponseEnvelopeSuccess

type SchemaNewResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SchemaNewResponseEnvelopeSuccessTrue SchemaNewResponseEnvelopeSuccess = true
)

func (SchemaNewResponseEnvelopeSuccess) 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) Delete

func (r *SchemaService) Delete(ctx context.Context, schemaID string, body SchemaDeleteParams, opts ...option.RequestOption) (res *SchemaDeleteResponse, err error)

Delete a schema

func (*SchemaService) Edit

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

Edit details of a schema to enable validation

func (*SchemaService) Get

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

Get details of a schema

func (*SchemaService) List

List all uploaded schemas

func (*SchemaService) ListAutoPaging

List all uploaded schemas

func (*SchemaService) New

func (r *SchemaService) New(ctx context.Context, params SchemaNewParams, opts ...option.RequestOption) (res *PublicSchema, err error)

Upload a schema

type SchemaValidationService

type SchemaValidationService struct {
	Options  []option.RequestOption
	Schemas  *SchemaService
	Settings *SettingService
}

SchemaValidationService 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 NewSchemaValidationService method instead.

func NewSchemaValidationService

func NewSchemaValidationService(opts ...option.RequestOption) (r *SchemaValidationService)

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

type SettingEditParams struct {
	// Identifier.
	ZoneID param.Field[string] `path:"zone_id,required"`
	// The default mitigation action used 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
	// - `"none"` - skip running schema validation
	ValidationDefaultMitigationAction param.Field[SettingEditParamsValidationDefaultMitigationAction] `json:"validation_default_mitigation_action"`
	// When set, this overrides both zone level and operation level mitigation actions.
	//
	// - `"none"` - skip running schema validation entirely for the request
	// - `null` - clears any existing override
	ValidationOverrideMitigationAction param.Field[SettingEditParamsValidationOverrideMitigationAction] `json:"validation_override_mitigation_action"`
}

func (SettingEditParams) MarshalJSON

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

type SettingEditParamsValidationDefaultMitigationAction

type SettingEditParamsValidationDefaultMitigationAction string

The default mitigation action used 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 - `"none"` - skip running schema validation

const (
	SettingEditParamsValidationDefaultMitigationActionNone  SettingEditParamsValidationDefaultMitigationAction = "none"
	SettingEditParamsValidationDefaultMitigationActionLog   SettingEditParamsValidationDefaultMitigationAction = "log"
	SettingEditParamsValidationDefaultMitigationActionBlock SettingEditParamsValidationDefaultMitigationAction = "block"
)

func (SettingEditParamsValidationDefaultMitigationAction) IsKnown

type SettingEditParamsValidationOverrideMitigationAction

type SettingEditParamsValidationOverrideMitigationAction string

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

- `"none"` - skip running schema validation entirely for the request - `null` - clears any existing override

const (
	SettingEditParamsValidationOverrideMitigationActionNone SettingEditParamsValidationOverrideMitigationAction = "none"
)

func (SettingEditParamsValidationOverrideMitigationAction) IsKnown

type SettingEditResponse

type SettingEditResponse struct {
	// The default mitigation action used
	//
	// 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
	// - `none` - skip running schema validation
	ValidationDefaultMitigationAction SettingEditResponseValidationDefaultMitigationAction `json:"validation_default_mitigation_action,required"`
	// When not null, this overrides global both zone level and operation level
	// mitigation actions. This can serve as a quick way to disable schema validation
	// for the whole zone.
	//
	// - `"none"` will skip running schema validation entirely for the request
	ValidationOverrideMitigationAction SettingEditResponseValidationOverrideMitigationAction `json:"validation_override_mitigation_action"`
	JSON                               settingEditResponseJSON                               `json:"-"`
}

func (*SettingEditResponse) UnmarshalJSON

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

type SettingEditResponseEnvelope

type SettingEditResponseEnvelope struct {
	Errors   api_gateway.Message `json:"errors,required"`
	Messages api_gateway.Message `json:"messages,required"`
	Result   SettingEditResponse `json:"result,required"`
	// Whether the API call was successful.
	Success SettingEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    settingEditResponseEnvelopeJSON    `json:"-"`
}

func (*SettingEditResponseEnvelope) UnmarshalJSON

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

type SettingEditResponseEnvelopeSuccess

type SettingEditResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SettingEditResponseEnvelopeSuccessTrue SettingEditResponseEnvelopeSuccess = true
)

func (SettingEditResponseEnvelopeSuccess) IsKnown

type SettingEditResponseValidationDefaultMitigationAction

type SettingEditResponseValidationDefaultMitigationAction string

The default mitigation action used

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 - `none` - skip running schema validation

const (
	SettingEditResponseValidationDefaultMitigationActionNone  SettingEditResponseValidationDefaultMitigationAction = "none"
	SettingEditResponseValidationDefaultMitigationActionLog   SettingEditResponseValidationDefaultMitigationAction = "log"
	SettingEditResponseValidationDefaultMitigationActionBlock SettingEditResponseValidationDefaultMitigationAction = "block"
)

func (SettingEditResponseValidationDefaultMitigationAction) IsKnown

type SettingEditResponseValidationOverrideMitigationAction

type SettingEditResponseValidationOverrideMitigationAction string

When not null, this overrides global both zone level and operation level mitigation actions. This can serve as a quick way to disable schema validation for the whole zone.

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

const (
	SettingEditResponseValidationOverrideMitigationActionNone SettingEditResponseValidationOverrideMitigationAction = "none"
)

func (SettingEditResponseValidationOverrideMitigationAction) IsKnown

type SettingGetParams

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

type SettingGetResponse

type SettingGetResponse struct {
	// The default mitigation action used
	//
	// 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
	// - `none` - skip running schema validation
	ValidationDefaultMitigationAction SettingGetResponseValidationDefaultMitigationAction `json:"validation_default_mitigation_action,required"`
	// When not null, this overrides global both zone level and operation level
	// mitigation actions. This can serve as a quick way to disable schema validation
	// for the whole zone.
	//
	// - `"none"` will skip running schema validation entirely for the request
	ValidationOverrideMitigationAction SettingGetResponseValidationOverrideMitigationAction `json:"validation_override_mitigation_action"`
	JSON                               settingGetResponseJSON                               `json:"-"`
}

func (*SettingGetResponse) UnmarshalJSON

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

type SettingGetResponseEnvelope

type SettingGetResponseEnvelope struct {
	Errors   api_gateway.Message `json:"errors,required"`
	Messages api_gateway.Message `json:"messages,required"`
	Result   SettingGetResponse  `json:"result,required"`
	// Whether the API call was successful.
	Success SettingGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    settingGetResponseEnvelopeJSON    `json:"-"`
}

func (*SettingGetResponseEnvelope) UnmarshalJSON

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

type SettingGetResponseEnvelopeSuccess

type SettingGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SettingGetResponseEnvelopeSuccessTrue SettingGetResponseEnvelopeSuccess = true
)

func (SettingGetResponseEnvelopeSuccess) IsKnown

type SettingGetResponseValidationDefaultMitigationAction

type SettingGetResponseValidationDefaultMitigationAction string

The default mitigation action used

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 - `none` - skip running schema validation

const (
	SettingGetResponseValidationDefaultMitigationActionNone  SettingGetResponseValidationDefaultMitigationAction = "none"
	SettingGetResponseValidationDefaultMitigationActionLog   SettingGetResponseValidationDefaultMitigationAction = "log"
	SettingGetResponseValidationDefaultMitigationActionBlock SettingGetResponseValidationDefaultMitigationAction = "block"
)

func (SettingGetResponseValidationDefaultMitigationAction) IsKnown

type SettingGetResponseValidationOverrideMitigationAction

type SettingGetResponseValidationOverrideMitigationAction string

When not null, this overrides global both zone level and operation level mitigation actions. This can serve as a quick way to disable schema validation for the whole zone.

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

const (
	SettingGetResponseValidationOverrideMitigationActionNone SettingGetResponseValidationOverrideMitigationAction = "none"
)

func (SettingGetResponseValidationOverrideMitigationAction) IsKnown

type SettingOperationBulkEditParams

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

func (SettingOperationBulkEditParams) MarshalJSON

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

type SettingOperationBulkEditParamsBody

type SettingOperationBulkEditParamsBody struct {
	// 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 _ `none` - skip
	//     running schema validation \* null - clears any existing per-operation setting
	MitigationAction param.Field[SettingOperationBulkEditParamsBodyMitigationAction] `json:"mitigation_action"`
}

Operation ID to mitigation action mappings

func (SettingOperationBulkEditParamsBody) MarshalJSON

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

type SettingOperationBulkEditParamsBodyMitigationAction

type SettingOperationBulkEditParamsBodyMitigationAction string

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 _ `none` - skip running schema validation \* null - clears any existing per-operation setting
const (
	SettingOperationBulkEditParamsBodyMitigationActionNone  SettingOperationBulkEditParamsBodyMitigationAction = "none"
	SettingOperationBulkEditParamsBodyMitigationActionLog   SettingOperationBulkEditParamsBodyMitigationAction = "log"
	SettingOperationBulkEditParamsBodyMitigationActionBlock SettingOperationBulkEditParamsBodyMitigationAction = "block"
)

func (SettingOperationBulkEditParamsBodyMitigationAction) IsKnown

type SettingOperationBulkEditResponse

type SettingOperationBulkEditResponse map[string]SettingOperationBulkEditResponseItem

type SettingOperationBulkEditResponseEnvelope

type SettingOperationBulkEditResponseEnvelope struct {
	Errors   api_gateway.Message `json:"errors,required"`
	Messages api_gateway.Message `json:"messages,required"`
	// Operation ID to per operation setting mapping
	Result SettingOperationBulkEditResponse `json:"result,required"`
	// Whether the API call was successful.
	Success SettingOperationBulkEditResponseEnvelopeSuccess `json:"success,required"`
	JSON    settingOperationBulkEditResponseEnvelopeJSON    `json:"-"`
}

func (*SettingOperationBulkEditResponseEnvelope) UnmarshalJSON

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

type SettingOperationBulkEditResponseEnvelopeSuccess

type SettingOperationBulkEditResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SettingOperationBulkEditResponseEnvelopeSuccessTrue SettingOperationBulkEditResponseEnvelopeSuccess = true
)

func (SettingOperationBulkEditResponseEnvelopeSuccess) IsKnown

type SettingOperationBulkEditResponseItem

type SettingOperationBulkEditResponseItem struct {
	// When set, this applies a mitigation action to this operation which supersedes a
	// global schema validation setting just for 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
	MitigationAction SettingOperationBulkEditResponseItemMitigationAction `json:"mitigation_action,required"`
	// UUID.
	OperationID string                                   `json:"operation_id,required"`
	JSON        settingOperationBulkEditResponseItemJSON `json:"-"`
}

func (*SettingOperationBulkEditResponseItem) UnmarshalJSON

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

type SettingOperationBulkEditResponseItemMitigationAction

type SettingOperationBulkEditResponseItemMitigationAction string

When set, this applies a mitigation action to this operation which supersedes a global schema validation setting just for 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
const (
	SettingOperationBulkEditResponseItemMitigationActionLog   SettingOperationBulkEditResponseItemMitigationAction = "log"
	SettingOperationBulkEditResponseItemMitigationActionBlock SettingOperationBulkEditResponseItemMitigationAction = "block"
	SettingOperationBulkEditResponseItemMitigationActionNone  SettingOperationBulkEditResponseItemMitigationAction = "none"
)

func (SettingOperationBulkEditResponseItemMitigationAction) IsKnown

type SettingOperationDeleteParams

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

type SettingOperationDeleteResponse

type SettingOperationDeleteResponse struct {
	// UUID.
	OperationID string                             `json:"operation_id"`
	JSON        settingOperationDeleteResponseJSON `json:"-"`
}

func (*SettingOperationDeleteResponse) UnmarshalJSON

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

type SettingOperationDeleteResponseEnvelope

type SettingOperationDeleteResponseEnvelope struct {
	Errors   api_gateway.Message            `json:"errors,required"`
	Messages api_gateway.Message            `json:"messages,required"`
	Result   SettingOperationDeleteResponse `json:"result,required"`
	// Whether the API call was successful.
	Success SettingOperationDeleteResponseEnvelopeSuccess `json:"success,required"`
	JSON    settingOperationDeleteResponseEnvelopeJSON    `json:"-"`
}

func (*SettingOperationDeleteResponseEnvelope) UnmarshalJSON

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

type SettingOperationDeleteResponseEnvelopeSuccess

type SettingOperationDeleteResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SettingOperationDeleteResponseEnvelopeSuccessTrue SettingOperationDeleteResponseEnvelopeSuccess = true
)

func (SettingOperationDeleteResponseEnvelopeSuccess) IsKnown

type SettingOperationGetParams

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

type SettingOperationGetResponse

type SettingOperationGetResponse struct {
	// When set, this applies a mitigation action to this operation which supersedes a
	// global schema validation setting just for 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
	MitigationAction SettingOperationGetResponseMitigationAction `json:"mitigation_action,required"`
	// UUID.
	OperationID string                          `json:"operation_id,required"`
	JSON        settingOperationGetResponseJSON `json:"-"`
}

func (*SettingOperationGetResponse) UnmarshalJSON

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

type SettingOperationGetResponseEnvelope

type SettingOperationGetResponseEnvelope struct {
	Errors   api_gateway.Message         `json:"errors,required"`
	Messages api_gateway.Message         `json:"messages,required"`
	Result   SettingOperationGetResponse `json:"result,required"`
	// Whether the API call was successful.
	Success SettingOperationGetResponseEnvelopeSuccess `json:"success,required"`
	JSON    settingOperationGetResponseEnvelopeJSON    `json:"-"`
}

func (*SettingOperationGetResponseEnvelope) UnmarshalJSON

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

type SettingOperationGetResponseEnvelopeSuccess

type SettingOperationGetResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SettingOperationGetResponseEnvelopeSuccessTrue SettingOperationGetResponseEnvelopeSuccess = true
)

func (SettingOperationGetResponseEnvelopeSuccess) IsKnown

type SettingOperationGetResponseMitigationAction

type SettingOperationGetResponseMitigationAction string

When set, this applies a mitigation action to this operation which supersedes a global schema validation setting just for 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
const (
	SettingOperationGetResponseMitigationActionLog   SettingOperationGetResponseMitigationAction = "log"
	SettingOperationGetResponseMitigationActionBlock SettingOperationGetResponseMitigationAction = "block"
	SettingOperationGetResponseMitigationActionNone  SettingOperationGetResponseMitigationAction = "none"
)

func (SettingOperationGetResponseMitigationAction) IsKnown

type SettingOperationListParams

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

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

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

type SettingOperationListResponse

type SettingOperationListResponse struct {
	// When set, this applies a mitigation action to this operation which supersedes a
	// global schema validation setting just for 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
	MitigationAction SettingOperationListResponseMitigationAction `json:"mitigation_action,required"`
	// UUID.
	OperationID string                           `json:"operation_id,required"`
	JSON        settingOperationListResponseJSON `json:"-"`
}

func (*SettingOperationListResponse) UnmarshalJSON

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

type SettingOperationListResponseMitigationAction

type SettingOperationListResponseMitigationAction string

When set, this applies a mitigation action to this operation which supersedes a global schema validation setting just for 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
const (
	SettingOperationListResponseMitigationActionLog   SettingOperationListResponseMitigationAction = "log"
	SettingOperationListResponseMitigationActionBlock SettingOperationListResponseMitigationAction = "block"
	SettingOperationListResponseMitigationActionNone  SettingOperationListResponseMitigationAction = "none"
)

func (SettingOperationListResponseMitigationAction) IsKnown

type SettingOperationService

type SettingOperationService struct {
	Options []option.RequestOption
}

SettingOperationService 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 NewSettingOperationService method instead.

func NewSettingOperationService

func NewSettingOperationService(opts ...option.RequestOption) (r *SettingOperationService)

NewSettingOperationService 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 (*SettingOperationService) BulkEdit

Bulk edit per-operation schema validation settings

func (*SettingOperationService) Delete

Delete per-operation schema validation setting

func (*SettingOperationService) Get

Get per-operation schema validation setting

func (*SettingOperationService) List

List per-operation schema validation settings

func (*SettingOperationService) ListAutoPaging

List per-operation schema validation settings

func (*SettingOperationService) Update

Update per-operation schema validation setting

type SettingOperationUpdateParams

type SettingOperationUpdateParams 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` - clears any mitigation action
	MitigationAction param.Field[SettingOperationUpdateParamsMitigationAction] `json:"mitigation_action,required"`
}

func (SettingOperationUpdateParams) MarshalJSON

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

type SettingOperationUpdateParamsMitigationAction

type SettingOperationUpdateParamsMitigationAction 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` - clears any mitigation action
const (
	SettingOperationUpdateParamsMitigationActionLog   SettingOperationUpdateParamsMitigationAction = "log"
	SettingOperationUpdateParamsMitigationActionBlock SettingOperationUpdateParamsMitigationAction = "block"
	SettingOperationUpdateParamsMitigationActionNone  SettingOperationUpdateParamsMitigationAction = "none"
)

func (SettingOperationUpdateParamsMitigationAction) IsKnown

type SettingOperationUpdateResponse

type SettingOperationUpdateResponse struct {
	// When set, this applies a mitigation action to this operation which supersedes a
	// global schema validation setting just for 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
	MitigationAction SettingOperationUpdateResponseMitigationAction `json:"mitigation_action,required"`
	// UUID.
	OperationID string                             `json:"operation_id,required"`
	JSON        settingOperationUpdateResponseJSON `json:"-"`
}

func (*SettingOperationUpdateResponse) UnmarshalJSON

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

type SettingOperationUpdateResponseEnvelope

type SettingOperationUpdateResponseEnvelope struct {
	Errors   api_gateway.Message            `json:"errors,required"`
	Messages api_gateway.Message            `json:"messages,required"`
	Result   SettingOperationUpdateResponse `json:"result,required"`
	// Whether the API call was successful.
	Success SettingOperationUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    settingOperationUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*SettingOperationUpdateResponseEnvelope) UnmarshalJSON

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

type SettingOperationUpdateResponseEnvelopeSuccess

type SettingOperationUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SettingOperationUpdateResponseEnvelopeSuccessTrue SettingOperationUpdateResponseEnvelopeSuccess = true
)

func (SettingOperationUpdateResponseEnvelopeSuccess) IsKnown

type SettingOperationUpdateResponseMitigationAction

type SettingOperationUpdateResponseMitigationAction string

When set, this applies a mitigation action to this operation which supersedes a global schema validation setting just for 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
const (
	SettingOperationUpdateResponseMitigationActionLog   SettingOperationUpdateResponseMitigationAction = "log"
	SettingOperationUpdateResponseMitigationActionBlock SettingOperationUpdateResponseMitigationAction = "block"
	SettingOperationUpdateResponseMitigationActionNone  SettingOperationUpdateResponseMitigationAction = "none"
)

func (SettingOperationUpdateResponseMitigationAction) IsKnown

type SettingService

type SettingService struct {
	Options    []option.RequestOption
	Operations *SettingOperationService
}

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.

func (*SettingService) Edit

Edit global schema validation settings

func (*SettingService) Get

Get global schema validation settings

func (*SettingService) Update

Update global schema validation settings

type SettingUpdateParams

type SettingUpdateParams struct {
	// Identifier.
	ZoneID param.Field[string] `path:"zone_id,required"`
	// The default mitigation action used 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
	// - `"none"` - skip running schema validation
	ValidationDefaultMitigationAction param.Field[SettingUpdateParamsValidationDefaultMitigationAction] `json:"validation_default_mitigation_action,required"`
	// When set, this overrides both zone level and operation level mitigation actions.
	//
	// - `"none"` - skip running schema validation entirely for the request
	// - `null` - clears any existing override
	ValidationOverrideMitigationAction param.Field[SettingUpdateParamsValidationOverrideMitigationAction] `json:"validation_override_mitigation_action"`
}

func (SettingUpdateParams) MarshalJSON

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

type SettingUpdateParamsValidationDefaultMitigationAction

type SettingUpdateParamsValidationDefaultMitigationAction string

The default mitigation action used 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 - `"none"` - skip running schema validation

const (
	SettingUpdateParamsValidationDefaultMitigationActionNone  SettingUpdateParamsValidationDefaultMitigationAction = "none"
	SettingUpdateParamsValidationDefaultMitigationActionLog   SettingUpdateParamsValidationDefaultMitigationAction = "log"
	SettingUpdateParamsValidationDefaultMitigationActionBlock SettingUpdateParamsValidationDefaultMitigationAction = "block"
)

func (SettingUpdateParamsValidationDefaultMitigationAction) IsKnown

type SettingUpdateParamsValidationOverrideMitigationAction

type SettingUpdateParamsValidationOverrideMitigationAction string

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

- `"none"` - skip running schema validation entirely for the request - `null` - clears any existing override

const (
	SettingUpdateParamsValidationOverrideMitigationActionNone SettingUpdateParamsValidationOverrideMitigationAction = "none"
)

func (SettingUpdateParamsValidationOverrideMitigationAction) IsKnown

type SettingUpdateResponse

type SettingUpdateResponse struct {
	// The default mitigation action used
	//
	// 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
	// - `none` - skip running schema validation
	ValidationDefaultMitigationAction SettingUpdateResponseValidationDefaultMitigationAction `json:"validation_default_mitigation_action,required"`
	// When not null, this overrides global both zone level and operation level
	// mitigation actions. This can serve as a quick way to disable schema validation
	// for the whole zone.
	//
	// - `"none"` will skip running schema validation entirely for the request
	ValidationOverrideMitigationAction SettingUpdateResponseValidationOverrideMitigationAction `json:"validation_override_mitigation_action"`
	JSON                               settingUpdateResponseJSON                               `json:"-"`
}

func (*SettingUpdateResponse) UnmarshalJSON

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

type SettingUpdateResponseEnvelope

type SettingUpdateResponseEnvelope struct {
	Errors   api_gateway.Message   `json:"errors,required"`
	Messages api_gateway.Message   `json:"messages,required"`
	Result   SettingUpdateResponse `json:"result,required"`
	// Whether the API call was successful.
	Success SettingUpdateResponseEnvelopeSuccess `json:"success,required"`
	JSON    settingUpdateResponseEnvelopeJSON    `json:"-"`
}

func (*SettingUpdateResponseEnvelope) UnmarshalJSON

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

type SettingUpdateResponseEnvelopeSuccess

type SettingUpdateResponseEnvelopeSuccess bool

Whether the API call was successful.

const (
	SettingUpdateResponseEnvelopeSuccessTrue SettingUpdateResponseEnvelopeSuccess = true
)

func (SettingUpdateResponseEnvelopeSuccess) IsKnown

type SettingUpdateResponseValidationDefaultMitigationAction

type SettingUpdateResponseValidationDefaultMitigationAction string

The default mitigation action used

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 - `none` - skip running schema validation

const (
	SettingUpdateResponseValidationDefaultMitigationActionNone  SettingUpdateResponseValidationDefaultMitigationAction = "none"
	SettingUpdateResponseValidationDefaultMitigationActionLog   SettingUpdateResponseValidationDefaultMitigationAction = "log"
	SettingUpdateResponseValidationDefaultMitigationActionBlock SettingUpdateResponseValidationDefaultMitigationAction = "block"
)

func (SettingUpdateResponseValidationDefaultMitigationAction) IsKnown

type SettingUpdateResponseValidationOverrideMitigationAction

type SettingUpdateResponseValidationOverrideMitigationAction string

When not null, this overrides global both zone level and operation level mitigation actions. This can serve as a quick way to disable schema validation for the whole zone.

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

const (
	SettingUpdateResponseValidationOverrideMitigationActionNone SettingUpdateResponseValidationOverrideMitigationAction = "none"
)

func (SettingUpdateResponseValidationOverrideMitigationAction) 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 Token

type Token = shared.Token

This is an alias to an internal type.

type TokenCondition

type TokenCondition = shared.TokenCondition

This is an alias to an internal type.

type TokenConditionCIDRList

type TokenConditionCIDRList = shared.TokenConditionCIDRList

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionCIDRListParam

type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam

IPv4/IPv6 CIDR.

This is an alias to an internal type.

type TokenConditionParam

type TokenConditionParam = shared.TokenConditionParam

This is an alias to an internal type.

type TokenConditionRequestIP

type TokenConditionRequestIP = shared.TokenConditionRequestIP

Client IP restrictions.

This is an alias to an internal type.

type TokenConditionRequestIPParam

type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam

Client IP restrictions.

This is an alias to an internal type.

type TokenParam

type TokenParam = shared.TokenParam

This is an alias to an internal type.

type TokenPolicy

type TokenPolicy = shared.TokenPolicy

This is an alias to an internal type.

type TokenPolicyEffect

type TokenPolicyEffect = shared.TokenPolicyEffect

Allow or deny operations against the resources.

This is an alias to an internal type.

type TokenPolicyParam

type TokenPolicyParam = shared.TokenPolicyParam

This is an alias to an internal type.

type TokenPolicyPermissionGroup

type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupParam

type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam

A named group of permissions that map to a group of operations against resources.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMeta

type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyPermissionGroupsMetaParam

type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam

Attributes associated to the permission group.

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNested

type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam

Map of nested resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectString

type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam

type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam

Map of simple string resource permissions

This is an alias to an internal type.

type TokenPolicyResourcesUnion

type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenPolicyResourcesUnionParam

type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam

A list of resource names that the policy applies to.

This is an alias to an internal type.

type TokenStatus

type TokenStatus = shared.TokenStatus

Status of the token.

This is an alias to an internal type.

type TokenValue

type TokenValue = shared.TokenValue

The token value.

This is an alias to an internal type.

Jump to

Keyboard shortcuts

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