Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConfigSrc
- type CloudflareTunnelConnection
- type CloudflareTunnelStatus
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type ErrorDataSource
- type Member
- type MemberPoliciesAccess
- type MemberPoliciesPermissionGroup
- type MemberPoliciesPermissionGroupsMeta
- type MemberPoliciesResourceGroup
- type MemberPoliciesResourceGroupsMeta
- type MemberPoliciesResourceGroupsScope
- type MemberPoliciesResourceGroupsScopeObject
- type MemberPolicy
- type MemberStatus
- type MemberUser
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type PublicSchema
- type PublicSchemaKind
- type RatePlan
- type RatePlanID
- type RatePlanParam
- type ResponseInfo
- type ResponseInfoSource
- type Role
- type RoleParam
- type RolePermissions
- type RolePermissionsParam
- type SchemaDeleteParams
- type SchemaDeleteResponse
- type SchemaDeleteResponseEnvelope
- type SchemaDeleteResponseEnvelopeSuccess
- type SchemaEditParams
- type SchemaEditResponseEnvelope
- type SchemaEditResponseEnvelopeSuccess
- type SchemaGetParams
- type SchemaGetResponseEnvelope
- type SchemaGetResponseEnvelopeSuccess
- type SchemaListParams
- type SchemaNewParams
- type SchemaNewParamsKind
- type SchemaNewResponseEnvelope
- type SchemaNewResponseEnvelopeErrors
- type SchemaNewResponseEnvelopeErrorsSource
- type SchemaNewResponseEnvelopeMessages
- type SchemaNewResponseEnvelopeMessagesSource
- type SchemaNewResponseEnvelopeSuccess
- type SchemaService
- func (r *SchemaService) Delete(ctx context.Context, schemaID string, body SchemaDeleteParams, ...) (res *SchemaDeleteResponse, err error)
- func (r *SchemaService) Edit(ctx context.Context, schemaID string, params SchemaEditParams, ...) (res *PublicSchema, err error)
- func (r *SchemaService) Get(ctx context.Context, schemaID string, params SchemaGetParams, ...) (res *PublicSchema, err error)
- func (r *SchemaService) List(ctx context.Context, params SchemaListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[PublicSchema], err error)
- func (r *SchemaService) ListAutoPaging(ctx context.Context, params SchemaListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[PublicSchema]
- func (r *SchemaService) New(ctx context.Context, params SchemaNewParams, opts ...option.RequestOption) (res *PublicSchema, err error)
- type SchemaValidationService
- type SettingEditParams
- type SettingEditParamsValidationDefaultMitigationAction
- type SettingEditParamsValidationOverrideMitigationAction
- type SettingEditResponse
- type SettingEditResponseEnvelope
- type SettingEditResponseEnvelopeSuccess
- type SettingEditResponseValidationDefaultMitigationAction
- type SettingEditResponseValidationOverrideMitigationAction
- type SettingGetParams
- type SettingGetResponse
- type SettingGetResponseEnvelope
- type SettingGetResponseEnvelopeSuccess
- type SettingGetResponseValidationDefaultMitigationAction
- type SettingGetResponseValidationOverrideMitigationAction
- type SettingOperationBulkEditParams
- type SettingOperationBulkEditParamsBody
- type SettingOperationBulkEditParamsBodyMitigationAction
- type SettingOperationBulkEditResponse
- type SettingOperationBulkEditResponseEnvelope
- type SettingOperationBulkEditResponseEnvelopeSuccess
- type SettingOperationBulkEditResponseItem
- type SettingOperationBulkEditResponseItemMitigationAction
- type SettingOperationDeleteParams
- type SettingOperationDeleteResponse
- type SettingOperationDeleteResponseEnvelope
- type SettingOperationDeleteResponseEnvelopeSuccess
- type SettingOperationGetParams
- type SettingOperationGetResponse
- type SettingOperationGetResponseEnvelope
- type SettingOperationGetResponseEnvelopeSuccess
- type SettingOperationGetResponseMitigationAction
- type SettingOperationListParams
- type SettingOperationListResponse
- type SettingOperationListResponseMitigationAction
- type SettingOperationService
- func (r *SettingOperationService) BulkEdit(ctx context.Context, params SettingOperationBulkEditParams, ...) (res *SettingOperationBulkEditResponse, err error)
- func (r *SettingOperationService) Delete(ctx context.Context, operationID string, body SettingOperationDeleteParams, ...) (res *SettingOperationDeleteResponse, err error)
- func (r *SettingOperationService) Get(ctx context.Context, operationID string, query SettingOperationGetParams, ...) (res *SettingOperationGetResponse, err error)
- func (r *SettingOperationService) List(ctx context.Context, params SettingOperationListParams, ...) (res *pagination.V4PagePaginationArray[SettingOperationListResponse], err error)
- func (r *SettingOperationService) ListAutoPaging(ctx context.Context, params SettingOperationListParams, ...) *pagination.V4PagePaginationArrayAutoPager[SettingOperationListResponse]
- func (r *SettingOperationService) Update(ctx context.Context, operationID string, params SettingOperationUpdateParams, ...) (res *SettingOperationUpdateResponse, err error)
- type SettingOperationUpdateParams
- type SettingOperationUpdateParamsMitigationAction
- type SettingOperationUpdateResponse
- type SettingOperationUpdateResponseEnvelope
- type SettingOperationUpdateResponseEnvelopeSuccess
- type SettingOperationUpdateResponseMitigationAction
- type SettingService
- func (r *SettingService) Edit(ctx context.Context, params SettingEditParams, opts ...option.RequestOption) (res *SettingEditResponse, err error)
- func (r *SettingService) Get(ctx context.Context, query SettingGetParams, opts ...option.RequestOption) (res *SettingGetResponse, err error)
- func (r *SettingService) Update(ctx context.Context, params SettingUpdateParams, opts ...option.RequestOption) (res *SettingUpdateResponse, err error)
- type SettingUpdateParams
- type SettingUpdateParamsValidationDefaultMitigationAction
- type SettingUpdateParamsValidationOverrideMitigationAction
- type SettingUpdateResponse
- type SettingUpdateResponseEnvelope
- type SettingUpdateResponseEnvelopeSuccess
- type SettingUpdateResponseValidationDefaultMitigationAction
- type SettingUpdateResponseValidationOverrideMitigationAction
- type SortDirection
- type Subscription
- type SubscriptionFrequency
- type SubscriptionParam
- type SubscriptionState
- type Token
- type TokenCondition
- type TokenConditionCIDRList
- type TokenConditionCIDRListParam
- type TokenConditionParam
- type TokenConditionRequestIP
- type TokenConditionRequestIPParam
- type TokenParam
- type TokenPolicy
- type TokenPolicyEffect
- type TokenPolicyParam
- type TokenPolicyPermissionGroup
- type TokenPolicyPermissionGroupParam
- type TokenPolicyPermissionGroupsMeta
- type TokenPolicyPermissionGroupsMetaParam
- type TokenPolicyResourcesIAMResourcesTypeObjectNested
- type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
- type TokenPolicyResourcesIAMResourcesTypeObjectString
- type TokenPolicyResourcesIAMResourcesTypeObjectStringParam
- type TokenPolicyResourcesUnion
- type TokenPolicyResourcesUnionParam
- type TokenStatus
- type TokenValue
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateCASSLCom = shared.CertificateCASSLCom
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelConfigSrcCloudflare = shared.CloudflareTunnelConfigSrcCloudflare
This is an alias to an internal value.
const CloudflareTunnelConfigSrcLocal = shared.CloudflareTunnelConfigSrcLocal
This is an alias to an internal value.
const CloudflareTunnelStatusDegraded = shared.CloudflareTunnelStatusDegraded
This is an alias to an internal value.
const CloudflareTunnelStatusDown = shared.CloudflareTunnelStatusDown
This is an alias to an internal value.
const CloudflareTunnelStatusHealthy = shared.CloudflareTunnelStatusHealthy
This is an alias to an internal value.
const CloudflareTunnelStatusInactive = shared.CloudflareTunnelStatusInactive
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeMagic = shared.CloudflareTunnelTunTypeMagic
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARP = shared.CloudflareTunnelTunTypeWARP
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const MemberPoliciesAccessAllow = shared.MemberPoliciesAccessAllow
This is an alias to an internal value.
const MemberPoliciesAccessDeny = shared.MemberPoliciesAccessDeny
This is an alias to an internal value.
const MemberStatusAccepted = shared.MemberStatusAccepted
This is an alias to an internal value.
const MemberStatusPending = shared.MemberStatusPending
This is an alias to an internal value.
const RatePlanIDBusiness = shared.RatePlanIDBusiness
This is an alias to an internal value.
const RatePlanIDEnterprise = shared.RatePlanIDEnterprise
This is an alias to an internal value.
const RatePlanIDFree = shared.RatePlanIDFree
This is an alias to an internal value.
const RatePlanIDLite = shared.RatePlanIDLite
This is an alias to an internal value.
const RatePlanIDPartnersBusiness = shared.RatePlanIDPartnersBusiness
This is an alias to an internal value.
const RatePlanIDPartnersEnterprise = shared.RatePlanIDPartnersEnterprise
This is an alias to an internal value.
const RatePlanIDPartnersFree = shared.RatePlanIDPartnersFree
This is an alias to an internal value.
const RatePlanIDPartnersPro = shared.RatePlanIDPartnersPro
This is an alias to an internal value.
const RatePlanIDPro = shared.RatePlanIDPro
This is an alias to an internal value.
const RatePlanIDProPlus = shared.RatePlanIDProPlus
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
const SubscriptionFrequencyMonthly = shared.SubscriptionFrequencyMonthly
This is an alias to an internal value.
const SubscriptionFrequencyQuarterly = shared.SubscriptionFrequencyQuarterly
This is an alias to an internal value.
const SubscriptionFrequencyWeekly = shared.SubscriptionFrequencyWeekly
This is an alias to an internal value.
const SubscriptionFrequencyYearly = shared.SubscriptionFrequencyYearly
This is an alias to an internal value.
const SubscriptionStateAwaitingPayment = shared.SubscriptionStateAwaitingPayment
This is an alias to an internal value.
const SubscriptionStateCancelled = shared.SubscriptionStateCancelled
This is an alias to an internal value.
const SubscriptionStateExpired = shared.SubscriptionStateExpired
This is an alias to an internal value.
const SubscriptionStateFailed = shared.SubscriptionStateFailed
This is an alias to an internal value.
const SubscriptionStatePaid = shared.SubscriptionStatePaid
This is an alias to an internal value.
const SubscriptionStateProvisioned = shared.SubscriptionStateProvisioned
This is an alias to an internal value.
const SubscriptionStateTrial = shared.SubscriptionStateTrial
This is an alias to an internal value.
const TokenPolicyEffectAllow = shared.TokenPolicyEffectAllow
This is an alias to an internal value.
const TokenPolicyEffectDeny = shared.TokenPolicyEffectDeny
This is an alias to an internal value.
const TokenStatusActive = shared.TokenStatusActive
This is an alias to an internal value.
const TokenStatusDisabled = shared.TokenStatusDisabled
This is an alias to an internal value.
const TokenStatusExpired = shared.TokenStatusExpired
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type 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 ErrorDataSource ¶
type ErrorDataSource = shared.ErrorDataSource
This is an alias to an internal type.
type MemberPoliciesAccess ¶
type MemberPoliciesAccess = shared.MemberPoliciesAccess
Allow or deny operations against the resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroup ¶
type MemberPoliciesPermissionGroup = shared.MemberPoliciesPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type MemberPoliciesPermissionGroupsMeta ¶
type MemberPoliciesPermissionGroupsMeta = shared.MemberPoliciesPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type MemberPoliciesResourceGroup ¶
type MemberPoliciesResourceGroup = shared.MemberPoliciesResourceGroup
A group of scoped resources.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsMeta ¶
type MemberPoliciesResourceGroupsMeta = shared.MemberPoliciesResourceGroupsMeta
Attributes associated to the resource group.
This is an alias to an internal type.
type MemberPoliciesResourceGroupsScope ¶
type MemberPoliciesResourceGroupsScope = shared.MemberPoliciesResourceGroupsScope
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 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 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 RatePlanID ¶
type RatePlanID = shared.RatePlanID
The ID of the rate plan.
This is an alias to an internal type.
type RatePlanParam ¶
type RatePlanParam = shared.RatePlanParam
The rate plan applied to the subscription.
This is an alias to an internal type.
type ResponseInfoSource ¶
type ResponseInfoSource = shared.ResponseInfoSource
This is an alias to an internal type.
type RolePermissions ¶
type RolePermissions = shared.RolePermissions
This is an alias to an internal type.
type RolePermissionsParam ¶
type RolePermissionsParam = shared.RolePermissionsParam
This is an alias to an internal type.
type SchemaDeleteParams ¶
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 ¶
func (r SchemaDeleteResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SchemaEditResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SchemaGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SchemaNewResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r *SchemaService) List(ctx context.Context, params SchemaListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[PublicSchema], err error)
List all uploaded schemas
func (*SchemaService) ListAutoPaging ¶
func (r *SchemaService) ListAutoPaging(ctx context.Context, params SchemaListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[PublicSchema]
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 ¶
func (r SettingEditParamsValidationDefaultMitigationAction) IsKnown() bool
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 ¶
func (r SettingEditParamsValidationOverrideMitigationAction) IsKnown() bool
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 ¶
func (r SettingEditResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SettingEditResponseValidationDefaultMitigationAction) IsKnown() bool
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 ¶
func (r SettingEditResponseValidationOverrideMitigationAction) IsKnown() bool
type SettingGetParams ¶
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 ¶
func (r SettingGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SettingGetResponseValidationDefaultMitigationAction) IsKnown() bool
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 ¶
func (r SettingGetResponseValidationOverrideMitigationAction) IsKnown() bool
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 ¶
func (r SettingOperationBulkEditParamsBodyMitigationAction) IsKnown() bool
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 ¶
func (r SettingOperationBulkEditResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SettingOperationBulkEditResponseItemMitigationAction) IsKnown() bool
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 ¶
func (r SettingOperationDeleteResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SettingOperationGetResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SettingOperationGetResponseMitigationAction) IsKnown() bool
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 ¶
func (r SettingOperationListResponseMitigationAction) IsKnown() bool
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 ¶
func (r *SettingOperationService) BulkEdit(ctx context.Context, params SettingOperationBulkEditParams, opts ...option.RequestOption) (res *SettingOperationBulkEditResponse, err error)
Bulk edit per-operation schema validation settings
func (*SettingOperationService) Delete ¶
func (r *SettingOperationService) Delete(ctx context.Context, operationID string, body SettingOperationDeleteParams, opts ...option.RequestOption) (res *SettingOperationDeleteResponse, err error)
Delete per-operation schema validation setting
func (*SettingOperationService) Get ¶
func (r *SettingOperationService) Get(ctx context.Context, operationID string, query SettingOperationGetParams, opts ...option.RequestOption) (res *SettingOperationGetResponse, err error)
Get per-operation schema validation setting
func (*SettingOperationService) List ¶
func (r *SettingOperationService) List(ctx context.Context, params SettingOperationListParams, opts ...option.RequestOption) (res *pagination.V4PagePaginationArray[SettingOperationListResponse], err error)
List per-operation schema validation settings
func (*SettingOperationService) ListAutoPaging ¶
func (r *SettingOperationService) ListAutoPaging(ctx context.Context, params SettingOperationListParams, opts ...option.RequestOption) *pagination.V4PagePaginationArrayAutoPager[SettingOperationListResponse]
List per-operation schema validation settings
func (*SettingOperationService) Update ¶
func (r *SettingOperationService) Update(ctx context.Context, operationID string, params SettingOperationUpdateParams, opts ...option.RequestOption) (res *SettingOperationUpdateResponse, err error)
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 ¶
func (r SettingOperationUpdateParamsMitigationAction) IsKnown() bool
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 ¶
func (r SettingOperationUpdateResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SettingOperationUpdateResponseMitigationAction) IsKnown() bool
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 ¶
func (r *SettingService) Edit(ctx context.Context, params SettingEditParams, opts ...option.RequestOption) (res *SettingEditResponse, err error)
Edit global schema validation settings
func (*SettingService) Get ¶
func (r *SettingService) Get(ctx context.Context, query SettingGetParams, opts ...option.RequestOption) (res *SettingGetResponse, err error)
Get global schema validation settings
func (*SettingService) Update ¶
func (r *SettingService) Update(ctx context.Context, params SettingUpdateParams, opts ...option.RequestOption) (res *SettingUpdateResponse, err error)
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 ¶
func (r SettingUpdateParamsValidationDefaultMitigationAction) IsKnown() bool
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 ¶
func (r SettingUpdateParamsValidationOverrideMitigationAction) IsKnown() bool
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 ¶
func (r SettingUpdateResponseEnvelopeSuccess) IsKnown() bool
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 ¶
func (r SettingUpdateResponseValidationDefaultMitigationAction) IsKnown() bool
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 ¶
func (r SettingUpdateResponseValidationOverrideMitigationAction) IsKnown() bool
type SortDirection ¶
type SortDirection = shared.SortDirection
Direction to order DNS records in.
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 TokenCondition ¶
type TokenCondition = shared.TokenCondition
This is an alias to an internal type.
type TokenConditionCIDRList ¶
type TokenConditionCIDRList = shared.TokenConditionCIDRList
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionCIDRListParam ¶
type TokenConditionCIDRListParam = shared.TokenConditionCIDRListParam
IPv4/IPv6 CIDR.
This is an alias to an internal type.
type TokenConditionParam ¶
type TokenConditionParam = shared.TokenConditionParam
This is an alias to an internal type.
type TokenConditionRequestIP ¶
type TokenConditionRequestIP = shared.TokenConditionRequestIP
Client IP restrictions.
This is an alias to an internal type.
type TokenConditionRequestIPParam ¶
type TokenConditionRequestIPParam = shared.TokenConditionRequestIPParam
Client IP restrictions.
This is an alias to an internal type.
type TokenPolicyEffect ¶
type TokenPolicyEffect = shared.TokenPolicyEffect
Allow or deny operations against the resources.
This is an alias to an internal type.
type TokenPolicyParam ¶
type TokenPolicyParam = shared.TokenPolicyParam
This is an alias to an internal type.
type TokenPolicyPermissionGroup ¶
type TokenPolicyPermissionGroup = shared.TokenPolicyPermissionGroup
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupParam ¶
type TokenPolicyPermissionGroupParam = shared.TokenPolicyPermissionGroupParam
A named group of permissions that map to a group of operations against resources.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMeta ¶
type TokenPolicyPermissionGroupsMeta = shared.TokenPolicyPermissionGroupsMeta
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyPermissionGroupsMetaParam ¶
type TokenPolicyPermissionGroupsMetaParam = shared.TokenPolicyPermissionGroupsMetaParam
Attributes associated to the permission group.
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNested ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNested = shared.TokenPolicyResourcesIAMResourcesTypeObjectNested
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectNestedParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectNestedParam
Map of nested resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectString ¶
type TokenPolicyResourcesIAMResourcesTypeObjectString = shared.TokenPolicyResourcesIAMResourcesTypeObjectString
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam ¶
type TokenPolicyResourcesIAMResourcesTypeObjectStringParam = shared.TokenPolicyResourcesIAMResourcesTypeObjectStringParam
Map of simple string resource permissions
This is an alias to an internal type.
type TokenPolicyResourcesUnion ¶
type TokenPolicyResourcesUnion = shared.TokenPolicyResourcesUnion
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenPolicyResourcesUnionParam ¶
type TokenPolicyResourcesUnionParam = shared.TokenPolicyResourcesUnionParam
A list of resource names that the policy applies to.
This is an alias to an internal type.
type TokenStatus ¶
type TokenStatus = shared.TokenStatus
Status of the token.
This is an alias to an internal type.
type TokenValue ¶
type TokenValue = shared.TokenValue
The token value.
This is an alias to an internal type.