Documentation ¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type BlockRule
- type BlockRuleAction
- type BlockRuleActionParameters
- type BlockRuleActionParametersParam
- type BlockRuleActionParametersResponse
- type BlockRuleActionParametersResponseParam
- type BlockRuleParam
- type ChallengeRule
- type ChallengeRuleAction
- type ChallengeRuleParam
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelTunType
- type CompressResponseRule
- type CompressResponseRuleAction
- type CompressResponseRuleActionParameters
- type CompressResponseRuleActionParametersAlgorithm
- type CompressResponseRuleActionParametersAlgorithmParam
- type CompressResponseRuleActionParametersAlgorithmsName
- type CompressResponseRuleActionParametersParam
- type CompressResponseRuleParam
- type Error
- type ErrorData
- type ExecuteRule
- type ExecuteRuleAction
- type ExecuteRuleActionParameters
- type ExecuteRuleActionParametersMatchedData
- type ExecuteRuleActionParametersMatchedDataParam
- type ExecuteRuleActionParametersOverrides
- type ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel
- type ExecuteRuleActionParametersOverridesCategory
- type ExecuteRuleActionParametersOverridesCategoryParam
- type ExecuteRuleActionParametersOverridesParam
- type ExecuteRuleActionParametersOverridesRule
- type ExecuteRuleActionParametersOverridesRuleParam
- type ExecuteRuleActionParametersOverridesRulesSensitivityLevel
- type ExecuteRuleActionParametersOverridesSensitivityLevel
- type ExecuteRuleActionParametersParam
- type ExecuteRuleParam
- type JSChallengeRule
- type JSChallengeRuleAction
- type JSChallengeRuleParam
- type LogRule
- type LogRuleAction
- type LogRuleParam
- type Logging
- type LoggingParam
- type ManagedChallengeRule
- type ManagedChallengeRuleAction
- type ManagedChallengeRuleParam
- type Member
- type MemberParam
- type MemberRole
- type MemberRoleParam
- type MemberRolesPermissions
- type MemberRolesPermissionsParam
- type MemberUser
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type PhaseGetParams
- type PhaseGetParamsRulesetPhase
- type PhaseGetResponse
- type PhaseGetResponseEnvelope
- type PhaseGetResponseEnvelopeErrors
- type PhaseGetResponseEnvelopeErrorsSource
- type PhaseGetResponseEnvelopeMessages
- type PhaseGetResponseEnvelopeMessagesSource
- type PhaseGetResponseEnvelopeSuccess
- type PhaseGetResponseKind
- type PhaseGetResponsePhase
- type PhaseGetResponseRule
- type PhaseGetResponseRulesAction
- type PhaseGetResponseRulesUnion
- type PhaseService
- type PhaseUpdateParams
- type PhaseUpdateParamsKind
- type PhaseUpdateParamsPhase
- type PhaseUpdateParamsRule
- type PhaseUpdateParamsRuleUnion
- type PhaseUpdateParamsRulesAction
- type PhaseUpdateParamsRulesetPhase
- type PhaseUpdateResponse
- type PhaseUpdateResponseEnvelope
- type PhaseUpdateResponseEnvelopeErrors
- type PhaseUpdateResponseEnvelopeErrorsSource
- type PhaseUpdateResponseEnvelopeMessages
- type PhaseUpdateResponseEnvelopeMessagesSource
- type PhaseUpdateResponseEnvelopeSuccess
- type PhaseUpdateResponseKind
- type PhaseUpdateResponsePhase
- type PhaseUpdateResponseRule
- type PhaseUpdateResponseRulesAction
- type PhaseUpdateResponseRulesUnion
- type PhaseVersionGetParams
- type PhaseVersionGetParamsRulesetPhase
- type PhaseVersionGetResponse
- type PhaseVersionGetResponseEnvelope
- type PhaseVersionGetResponseEnvelopeErrors
- type PhaseVersionGetResponseEnvelopeErrorsSource
- type PhaseVersionGetResponseEnvelopeMessages
- type PhaseVersionGetResponseEnvelopeMessagesSource
- type PhaseVersionGetResponseEnvelopeSuccess
- type PhaseVersionGetResponseKind
- type PhaseVersionGetResponsePhase
- type PhaseVersionGetResponseRule
- type PhaseVersionGetResponseRulesAction
- type PhaseVersionGetResponseRulesUnion
- type PhaseVersionListParams
- type PhaseVersionListParamsRulesetPhase
- type PhaseVersionService
- func (r *PhaseVersionService) Get(ctx context.Context, rulesetPhase PhaseVersionGetParamsRulesetPhase, ...) (res *PhaseVersionGetResponse, err error)
- func (r *PhaseVersionService) List(ctx context.Context, rulesetPhase PhaseVersionListParamsRulesetPhase, ...) (res *pagination.SinglePage[Ruleset], err error)
- func (r *PhaseVersionService) ListAutoPaging(ctx context.Context, rulesetPhase PhaseVersionListParamsRulesetPhase, ...) *pagination.SinglePageAutoPager[Ruleset]
- type RedirectRule
- type RedirectRuleAction
- type RedirectRuleActionParameters
- type RedirectRuleActionParametersFromList
- type RedirectRuleActionParametersFromListParam
- type RedirectRuleActionParametersFromValue
- type RedirectRuleActionParametersFromValueParam
- type RedirectRuleActionParametersFromValueStatusCode
- type RedirectRuleActionParametersFromValueTargetURL
- type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect
- type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam
- type RedirectRuleActionParametersFromValueTargetURLParam
- type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect
- type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam
- type RedirectRuleActionParametersFromValueTargetURLUnion
- type RedirectRuleActionParametersFromValueTargetURLUnionParam
- type RedirectRuleActionParametersParam
- type RedirectRuleParam
- type ResponseInfo
- type RewriteRule
- type RewriteRuleAction
- type RewriteRuleActionParameters
- type RewriteRuleActionParametersHeader
- type RewriteRuleActionParametersHeaderParam
- type RewriteRuleActionParametersHeadersDynamicHeader
- type RewriteRuleActionParametersHeadersDynamicHeaderOperation
- type RewriteRuleActionParametersHeadersDynamicHeaderParam
- type RewriteRuleActionParametersHeadersOperation
- type RewriteRuleActionParametersHeadersRemoveHeader
- type RewriteRuleActionParametersHeadersRemoveHeaderOperation
- type RewriteRuleActionParametersHeadersRemoveHeaderParam
- type RewriteRuleActionParametersHeadersStaticHeader
- type RewriteRuleActionParametersHeadersStaticHeaderOperation
- type RewriteRuleActionParametersHeadersStaticHeaderParam
- type RewriteRuleActionParametersHeadersUnion
- type RewriteRuleActionParametersHeadersUnionParam
- type RewriteRuleActionParametersParam
- type RewriteRuleActionParametersURI
- type RewriteRuleActionParametersURIParam
- type RewriteRuleParam
- type RewriteURIPart
- type RewriteURIPartDynamicValue
- type RewriteURIPartDynamicValueParam
- type RewriteURIPartParam
- type RewriteURIPartStaticValue
- type RewriteURIPartStaticValueParam
- type RewriteURIPartUnion
- type RewriteURIPartUnionParam
- type Role
- type RouteRule
- type RouteRuleAction
- type RouteRuleActionParameters
- type RouteRuleActionParametersOrigin
- type RouteRuleActionParametersOriginParam
- type RouteRuleActionParametersParam
- type RouteRuleActionParametersSni
- type RouteRuleActionParametersSniParam
- type RouteRuleParam
- type RuleDeleteParams
- type RuleDeleteResponse
- type RuleDeleteResponseEnvelope
- type RuleDeleteResponseEnvelopeErrors
- type RuleDeleteResponseEnvelopeErrorsSource
- type RuleDeleteResponseEnvelopeMessages
- type RuleDeleteResponseEnvelopeMessagesSource
- type RuleDeleteResponseEnvelopeSuccess
- type RuleDeleteResponseKind
- type RuleDeleteResponsePhase
- type RuleDeleteResponseRule
- type RuleDeleteResponseRulesAction
- type RuleDeleteResponseRulesUnion
- type RuleEditParams
- type RuleEditParamsPosition
- type RuleEditParamsPositionAfterPosition
- type RuleEditParamsPositionBeforePosition
- type RuleEditParamsPositionIndexPosition
- type RuleEditParamsPositionUnion
- type RuleEditResponse
- type RuleEditResponseEnvelope
- type RuleEditResponseEnvelopeErrors
- type RuleEditResponseEnvelopeErrorsSource
- type RuleEditResponseEnvelopeMessages
- type RuleEditResponseEnvelopeMessagesSource
- type RuleEditResponseEnvelopeSuccess
- type RuleEditResponseKind
- type RuleEditResponsePhase
- type RuleEditResponseRule
- type RuleEditResponseRulesAction
- type RuleEditResponseRulesUnion
- type RuleNewParams
- type RuleNewParamsPosition
- type RuleNewParamsPositionAfterPosition
- type RuleNewParamsPositionBeforePosition
- type RuleNewParamsPositionIndexPosition
- type RuleNewParamsPositionUnion
- type RuleNewResponse
- type RuleNewResponseEnvelope
- type RuleNewResponseEnvelopeErrors
- type RuleNewResponseEnvelopeErrorsSource
- type RuleNewResponseEnvelopeMessages
- type RuleNewResponseEnvelopeMessagesSource
- type RuleNewResponseEnvelopeSuccess
- type RuleNewResponseKind
- type RuleNewResponsePhase
- type RuleNewResponseRule
- type RuleNewResponseRulesAction
- type RuleNewResponseRulesUnion
- type RuleService
- func (r *RuleService) Delete(ctx context.Context, rulesetID string, ruleID string, body RuleDeleteParams, ...) (res *RuleDeleteResponse, err error)
- func (r *RuleService) Edit(ctx context.Context, rulesetID string, ruleID string, params RuleEditParams, ...) (res *RuleEditResponse, err error)
- func (r *RuleService) New(ctx context.Context, rulesetID string, params RuleNewParams, ...) (res *RuleNewResponse, err error)
- type Ruleset
- type RulesetDeleteParams
- type RulesetGetParams
- type RulesetGetResponse
- type RulesetGetResponseEnvelope
- type RulesetGetResponseEnvelopeErrors
- type RulesetGetResponseEnvelopeErrorsSource
- type RulesetGetResponseEnvelopeMessages
- type RulesetGetResponseEnvelopeMessagesSource
- type RulesetGetResponseEnvelopeSuccess
- type RulesetGetResponseKind
- type RulesetGetResponsePhase
- type RulesetGetResponseRule
- type RulesetGetResponseRulesAction
- type RulesetGetResponseRulesUnion
- type RulesetKind
- type RulesetListParams
- type RulesetNewParams
- type RulesetNewParamsKind
- type RulesetNewParamsPhase
- type RulesetNewParamsRule
- type RulesetNewParamsRuleUnion
- type RulesetNewParamsRulesAction
- type RulesetNewResponse
- type RulesetNewResponseEnvelope
- type RulesetNewResponseEnvelopeErrors
- type RulesetNewResponseEnvelopeErrorsSource
- type RulesetNewResponseEnvelopeMessages
- type RulesetNewResponseEnvelopeMessagesSource
- type RulesetNewResponseEnvelopeSuccess
- type RulesetNewResponseKind
- type RulesetNewResponsePhase
- type RulesetNewResponseRule
- type RulesetNewResponseRulesAction
- type RulesetNewResponseRulesUnion
- type RulesetPhase
- type RulesetService
- func (r *RulesetService) Delete(ctx context.Context, rulesetID string, body RulesetDeleteParams, ...) (err error)
- func (r *RulesetService) Get(ctx context.Context, rulesetID string, query RulesetGetParams, ...) (res *RulesetGetResponse, err error)
- func (r *RulesetService) List(ctx context.Context, query RulesetListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Ruleset], err error)
- func (r *RulesetService) ListAutoPaging(ctx context.Context, query RulesetListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Ruleset]
- func (r *RulesetService) New(ctx context.Context, params RulesetNewParams, opts ...option.RequestOption) (res *RulesetNewResponse, err error)
- func (r *RulesetService) Update(ctx context.Context, rulesetID string, params RulesetUpdateParams, ...) (res *RulesetUpdateResponse, err error)
- type RulesetUpdateParams
- type RulesetUpdateParamsKind
- type RulesetUpdateParamsPhase
- type RulesetUpdateParamsRule
- type RulesetUpdateParamsRuleUnion
- type RulesetUpdateParamsRulesAction
- type RulesetUpdateResponse
- type RulesetUpdateResponseEnvelope
- type RulesetUpdateResponseEnvelopeErrors
- type RulesetUpdateResponseEnvelopeErrorsSource
- type RulesetUpdateResponseEnvelopeMessages
- type RulesetUpdateResponseEnvelopeMessagesSource
- type RulesetUpdateResponseEnvelopeSuccess
- type RulesetUpdateResponseKind
- type RulesetUpdateResponsePhase
- type RulesetUpdateResponseRule
- type RulesetUpdateResponseRulesAction
- type RulesetUpdateResponseRulesUnion
- type ScoreRule
- type ScoreRuleAction
- type ScoreRuleActionParameters
- type ScoreRuleActionParametersParam
- type ScoreRuleParam
- type ServeErrorRule
- type ServeErrorRuleAction
- type ServeErrorRuleActionParameters
- type ServeErrorRuleActionParametersContentType
- type ServeErrorRuleActionParametersParam
- type ServeErrorRuleParam
- type SetCacheSettingsRule
- type SetCacheSettingsRuleAction
- type SetCacheSettingsRuleActionParameters
- type SetCacheSettingsRuleActionParametersBrowserTTL
- type SetCacheSettingsRuleActionParametersBrowserTTLMode
- type SetCacheSettingsRuleActionParametersBrowserTTLParam
- type SetCacheSettingsRuleActionParametersCacheKey
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKey
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser
- type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam
- type SetCacheSettingsRuleActionParametersCacheKeyParam
- type SetCacheSettingsRuleActionParametersCacheReserve
- type SetCacheSettingsRuleActionParametersCacheReserveParam
- type SetCacheSettingsRuleActionParametersEdgeTTL
- type SetCacheSettingsRuleActionParametersEdgeTTLMode
- type SetCacheSettingsRuleActionParametersEdgeTTLParam
- type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL
- type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam
- type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange
- type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam
- type SetCacheSettingsRuleActionParametersParam
- type SetCacheSettingsRuleActionParametersServeStale
- type SetCacheSettingsRuleActionParametersServeStaleParam
- type SetCacheSettingsRuleParam
- type SetConfigRule
- type SetConfigRuleAction
- type SetConfigRuleActionParameters
- type SetConfigRuleActionParametersAutominify
- type SetConfigRuleActionParametersAutominifyParam
- type SetConfigRuleActionParametersParam
- type SetConfigRuleActionParametersPolish
- type SetConfigRuleActionParametersSSL
- type SetConfigRuleActionParametersSecurityLevel
- type SetConfigRuleParam
- type SkipRule
- type SkipRuleAction
- type SkipRuleActionParameters
- type SkipRuleActionParametersParam
- type SkipRuleActionParametersPhase
- type SkipRuleActionParametersProduct
- type SkipRuleActionParametersRuleset
- type SkipRuleParam
- type VersionByTagGetParams
- type VersionByTagGetResponse
- type VersionByTagGetResponseEnvelope
- type VersionByTagGetResponseEnvelopeErrors
- type VersionByTagGetResponseEnvelopeErrorsSource
- type VersionByTagGetResponseEnvelopeMessages
- type VersionByTagGetResponseEnvelopeMessagesSource
- type VersionByTagGetResponseEnvelopeSuccess
- type VersionByTagGetResponseKind
- type VersionByTagGetResponsePhase
- type VersionByTagGetResponseRule
- type VersionByTagGetResponseRulesAction
- type VersionByTagGetResponseRulesUnion
- type VersionByTagService
- type VersionDeleteParams
- type VersionGetParams
- type VersionGetResponse
- type VersionGetResponseEnvelope
- type VersionGetResponseEnvelopeErrors
- type VersionGetResponseEnvelopeErrorsSource
- type VersionGetResponseEnvelopeMessages
- type VersionGetResponseEnvelopeMessagesSource
- type VersionGetResponseEnvelopeSuccess
- type VersionGetResponseKind
- type VersionGetResponsePhase
- type VersionGetResponseRule
- type VersionGetResponseRulesAction
- type VersionGetResponseRulesUnion
- type VersionListParams
- type VersionService
- func (r *VersionService) Delete(ctx context.Context, rulesetID string, rulesetVersion string, ...) (err error)
- func (r *VersionService) Get(ctx context.Context, rulesetID string, rulesetVersion string, ...) (res *VersionGetResponse, err error)
- func (r *VersionService) List(ctx context.Context, rulesetID string, query VersionListParams, ...) (res *pagination.SinglePage[Ruleset], err error)
- func (r *VersionService) ListAutoPaging(ctx context.Context, rulesetID string, query VersionListParams, ...) *pagination.SinglePageAutoPager[Ruleset]
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 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 CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
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 BlockRule ¶
type BlockRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action BlockRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters BlockRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON blockRuleJSON `json:"-"` }
func (*BlockRule) UnmarshalJSON ¶
type BlockRuleAction ¶
type BlockRuleAction string
The action to perform when the rule matches.
const (
BlockRuleActionBlock BlockRuleAction = "block"
)
func (BlockRuleAction) IsKnown ¶
func (r BlockRuleAction) IsKnown() bool
type BlockRuleActionParameters ¶
type BlockRuleActionParameters struct { // The response to show when the block is applied. Response BlockRuleActionParametersResponse `json:"response"` JSON blockRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*BlockRuleActionParameters) UnmarshalJSON ¶
func (r *BlockRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type BlockRuleActionParametersParam ¶
type BlockRuleActionParametersParam struct { // The response to show when the block is applied. Response param.Field[BlockRuleActionParametersResponseParam] `json:"response"` }
The parameters configuring the rule's action.
func (BlockRuleActionParametersParam) MarshalJSON ¶
func (r BlockRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type BlockRuleActionParametersResponse ¶
type BlockRuleActionParametersResponse struct { // The content to return. Content string `json:"content,required"` // The type of the content to return. ContentType string `json:"content_type,required"` // The status code to return. StatusCode int64 `json:"status_code,required"` JSON blockRuleActionParametersResponseJSON `json:"-"` }
The response to show when the block is applied.
func (*BlockRuleActionParametersResponse) UnmarshalJSON ¶
func (r *BlockRuleActionParametersResponse) UnmarshalJSON(data []byte) (err error)
type BlockRuleActionParametersResponseParam ¶
type BlockRuleActionParametersResponseParam struct { // The content to return. Content param.Field[string] `json:"content,required"` // The type of the content to return. ContentType param.Field[string] `json:"content_type,required"` // The status code to return. StatusCode param.Field[int64] `json:"status_code,required"` }
The response to show when the block is applied.
func (BlockRuleActionParametersResponseParam) MarshalJSON ¶
func (r BlockRuleActionParametersResponseParam) MarshalJSON() (data []byte, err error)
type BlockRuleParam ¶
type BlockRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[BlockRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[BlockRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (BlockRuleParam) MarshalJSON ¶
func (r BlockRuleParam) MarshalJSON() (data []byte, err error)
type ChallengeRule ¶
type ChallengeRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action ChallengeRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters interface{} `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON challengeRuleJSON `json:"-"` }
func (*ChallengeRule) UnmarshalJSON ¶
func (r *ChallengeRule) UnmarshalJSON(data []byte) (err error)
type ChallengeRuleAction ¶
type ChallengeRuleAction string
The action to perform when the rule matches.
const (
ChallengeRuleActionChallenge ChallengeRuleAction = "challenge"
)
func (ChallengeRuleAction) IsKnown ¶
func (r ChallengeRuleAction) IsKnown() bool
type ChallengeRuleParam ¶
type ChallengeRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[ChallengeRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[interface{}] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (ChallengeRuleParam) MarshalJSON ¶
func (r ChallengeRuleParam) MarshalJSON() (data []byte, err error)
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type CompressResponseRule ¶
type CompressResponseRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action CompressResponseRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters CompressResponseRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON compressResponseRuleJSON `json:"-"` }
func (*CompressResponseRule) UnmarshalJSON ¶
func (r *CompressResponseRule) UnmarshalJSON(data []byte) (err error)
type CompressResponseRuleAction ¶
type CompressResponseRuleAction string
The action to perform when the rule matches.
const (
CompressResponseRuleActionCompressResponse CompressResponseRuleAction = "compress_response"
)
func (CompressResponseRuleAction) IsKnown ¶
func (r CompressResponseRuleAction) IsKnown() bool
type CompressResponseRuleActionParameters ¶
type CompressResponseRuleActionParameters struct { // Custom order for compression algorithms. Algorithms []CompressResponseRuleActionParametersAlgorithm `json:"algorithms"` JSON compressResponseRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*CompressResponseRuleActionParameters) UnmarshalJSON ¶
func (r *CompressResponseRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type CompressResponseRuleActionParametersAlgorithm ¶
type CompressResponseRuleActionParametersAlgorithm struct { // Name of compression algorithm to enable. Name CompressResponseRuleActionParametersAlgorithmsName `json:"name"` JSON compressResponseRuleActionParametersAlgorithmJSON `json:"-"` }
Compression algorithm to enable.
func (*CompressResponseRuleActionParametersAlgorithm) UnmarshalJSON ¶
func (r *CompressResponseRuleActionParametersAlgorithm) UnmarshalJSON(data []byte) (err error)
type CompressResponseRuleActionParametersAlgorithmParam ¶
type CompressResponseRuleActionParametersAlgorithmParam struct { // Name of compression algorithm to enable. Name param.Field[CompressResponseRuleActionParametersAlgorithmsName] `json:"name"` }
Compression algorithm to enable.
func (CompressResponseRuleActionParametersAlgorithmParam) MarshalJSON ¶
func (r CompressResponseRuleActionParametersAlgorithmParam) MarshalJSON() (data []byte, err error)
type CompressResponseRuleActionParametersAlgorithmsName ¶
type CompressResponseRuleActionParametersAlgorithmsName string
Name of compression algorithm to enable.
const ( CompressResponseRuleActionParametersAlgorithmsNameNone CompressResponseRuleActionParametersAlgorithmsName = "none" CompressResponseRuleActionParametersAlgorithmsNameAuto CompressResponseRuleActionParametersAlgorithmsName = "auto" CompressResponseRuleActionParametersAlgorithmsNameDefault CompressResponseRuleActionParametersAlgorithmsName = "default" CompressResponseRuleActionParametersAlgorithmsNameGzip CompressResponseRuleActionParametersAlgorithmsName = "gzip" CompressResponseRuleActionParametersAlgorithmsNameBrotli CompressResponseRuleActionParametersAlgorithmsName = "brotli" )
func (CompressResponseRuleActionParametersAlgorithmsName) IsKnown ¶
func (r CompressResponseRuleActionParametersAlgorithmsName) IsKnown() bool
type CompressResponseRuleActionParametersParam ¶
type CompressResponseRuleActionParametersParam struct { // Custom order for compression algorithms. Algorithms param.Field[[]CompressResponseRuleActionParametersAlgorithmParam] `json:"algorithms"` }
The parameters configuring the rule's action.
func (CompressResponseRuleActionParametersParam) MarshalJSON ¶
func (r CompressResponseRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type CompressResponseRuleParam ¶
type CompressResponseRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[CompressResponseRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[CompressResponseRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (CompressResponseRuleParam) MarshalJSON ¶
func (r CompressResponseRuleParam) MarshalJSON() (data []byte, err error)
type ExecuteRule ¶
type ExecuteRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action ExecuteRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters ExecuteRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON executeRuleJSON `json:"-"` }
func (*ExecuteRule) UnmarshalJSON ¶
func (r *ExecuteRule) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleAction ¶
type ExecuteRuleAction string
The action to perform when the rule matches.
const (
ExecuteRuleActionExecute ExecuteRuleAction = "execute"
)
func (ExecuteRuleAction) IsKnown ¶
func (r ExecuteRuleAction) IsKnown() bool
type ExecuteRuleActionParameters ¶
type ExecuteRuleActionParameters struct { // The ID of the ruleset to execute. ID string `json:"id,required"` // The configuration to use for matched data logging. MatchedData ExecuteRuleActionParametersMatchedData `json:"matched_data"` // A set of overrides to apply to the target ruleset. Overrides ExecuteRuleActionParametersOverrides `json:"overrides"` JSON executeRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*ExecuteRuleActionParameters) UnmarshalJSON ¶
func (r *ExecuteRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersMatchedData ¶
type ExecuteRuleActionParametersMatchedData struct { // The public key to encrypt matched data logs with. PublicKey string `json:"public_key,required"` JSON executeRuleActionParametersMatchedDataJSON `json:"-"` }
The configuration to use for matched data logging.
func (*ExecuteRuleActionParametersMatchedData) UnmarshalJSON ¶
func (r *ExecuteRuleActionParametersMatchedData) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersMatchedDataParam ¶
type ExecuteRuleActionParametersMatchedDataParam struct { // The public key to encrypt matched data logs with. PublicKey param.Field[string] `json:"public_key,required"` }
The configuration to use for matched data logging.
func (ExecuteRuleActionParametersMatchedDataParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersMatchedDataParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleActionParametersOverrides ¶
type ExecuteRuleActionParametersOverrides struct { // An action to override all rules with. This option has lower precedence than rule // and category overrides. Action string `json:"action"` // A list of category-level overrides. This option has the second-highest // precedence after rule-level overrides. Categories []ExecuteRuleActionParametersOverridesCategory `json:"categories"` // Whether to enable execution of all rules. This option has lower precedence than // rule and category overrides. Enabled bool `json:"enabled"` // A list of rule-level overrides. This option has the highest precedence. Rules []ExecuteRuleActionParametersOverridesRule `json:"rules"` // A sensitivity level to set for all rules. This option has lower precedence than // rule and category overrides and is only applicable for DDoS phases. SensitivityLevel ExecuteRuleActionParametersOverridesSensitivityLevel `json:"sensitivity_level"` JSON executeRuleActionParametersOverridesJSON `json:"-"` }
A set of overrides to apply to the target ruleset.
func (*ExecuteRuleActionParametersOverrides) UnmarshalJSON ¶
func (r *ExecuteRuleActionParametersOverrides) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel ¶
type ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel string
The sensitivity level to use for rules in the category.
const ( ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelDefault ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "default" ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelMedium ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "medium" ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelLow ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "low" ExecuteRuleActionParametersOverridesCategoriesSensitivityLevelEoff ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel = "eoff" )
func (ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown ¶
func (r ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel) IsKnown() bool
type ExecuteRuleActionParametersOverridesCategory ¶
type ExecuteRuleActionParametersOverridesCategory struct { // The name of the category to override. Category string `json:"category,required"` // The action to override rules in the category with. Action string `json:"action"` // Whether to enable execution of rules in the category. Enabled bool `json:"enabled"` // The sensitivity level to use for rules in the category. SensitivityLevel ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel `json:"sensitivity_level"` JSON executeRuleActionParametersOverridesCategoryJSON `json:"-"` }
A category-level override
func (*ExecuteRuleActionParametersOverridesCategory) UnmarshalJSON ¶
func (r *ExecuteRuleActionParametersOverridesCategory) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersOverridesCategoryParam ¶
type ExecuteRuleActionParametersOverridesCategoryParam struct { // The name of the category to override. Category param.Field[string] `json:"category,required"` // The action to override rules in the category with. Action param.Field[string] `json:"action"` // Whether to enable execution of rules in the category. Enabled param.Field[bool] `json:"enabled"` // The sensitivity level to use for rules in the category. SensitivityLevel param.Field[ExecuteRuleActionParametersOverridesCategoriesSensitivityLevel] `json:"sensitivity_level"` }
A category-level override
func (ExecuteRuleActionParametersOverridesCategoryParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersOverridesCategoryParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleActionParametersOverridesParam ¶
type ExecuteRuleActionParametersOverridesParam struct { // An action to override all rules with. This option has lower precedence than rule // and category overrides. Action param.Field[string] `json:"action"` // A list of category-level overrides. This option has the second-highest // precedence after rule-level overrides. Categories param.Field[[]ExecuteRuleActionParametersOverridesCategoryParam] `json:"categories"` // Whether to enable execution of all rules. This option has lower precedence than // rule and category overrides. Enabled param.Field[bool] `json:"enabled"` // A list of rule-level overrides. This option has the highest precedence. Rules param.Field[[]ExecuteRuleActionParametersOverridesRuleParam] `json:"rules"` // A sensitivity level to set for all rules. This option has lower precedence than // rule and category overrides and is only applicable for DDoS phases. SensitivityLevel param.Field[ExecuteRuleActionParametersOverridesSensitivityLevel] `json:"sensitivity_level"` }
A set of overrides to apply to the target ruleset.
func (ExecuteRuleActionParametersOverridesParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersOverridesParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleActionParametersOverridesRule ¶
type ExecuteRuleActionParametersOverridesRule struct { // The ID of the rule to override. ID string `json:"id,required"` // The action to override the rule with. Action string `json:"action"` // Whether to enable execution of the rule. Enabled bool `json:"enabled"` // The score threshold to use for the rule. ScoreThreshold int64 `json:"score_threshold"` // The sensitivity level to use for the rule. SensitivityLevel ExecuteRuleActionParametersOverridesRulesSensitivityLevel `json:"sensitivity_level"` JSON executeRuleActionParametersOverridesRuleJSON `json:"-"` }
A rule-level override
func (*ExecuteRuleActionParametersOverridesRule) UnmarshalJSON ¶
func (r *ExecuteRuleActionParametersOverridesRule) UnmarshalJSON(data []byte) (err error)
type ExecuteRuleActionParametersOverridesRuleParam ¶
type ExecuteRuleActionParametersOverridesRuleParam struct { // The ID of the rule to override. ID param.Field[string] `json:"id,required"` // The action to override the rule with. Action param.Field[string] `json:"action"` // Whether to enable execution of the rule. Enabled param.Field[bool] `json:"enabled"` // The score threshold to use for the rule. ScoreThreshold param.Field[int64] `json:"score_threshold"` // The sensitivity level to use for the rule. SensitivityLevel param.Field[ExecuteRuleActionParametersOverridesRulesSensitivityLevel] `json:"sensitivity_level"` }
A rule-level override
func (ExecuteRuleActionParametersOverridesRuleParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersOverridesRuleParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleActionParametersOverridesRulesSensitivityLevel ¶
type ExecuteRuleActionParametersOverridesRulesSensitivityLevel string
The sensitivity level to use for the rule.
const ( ExecuteRuleActionParametersOverridesRulesSensitivityLevelDefault ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "default" ExecuteRuleActionParametersOverridesRulesSensitivityLevelMedium ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "medium" ExecuteRuleActionParametersOverridesRulesSensitivityLevelLow ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "low" ExecuteRuleActionParametersOverridesRulesSensitivityLevelEoff ExecuteRuleActionParametersOverridesRulesSensitivityLevel = "eoff" )
func (ExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown ¶
func (r ExecuteRuleActionParametersOverridesRulesSensitivityLevel) IsKnown() bool
type ExecuteRuleActionParametersOverridesSensitivityLevel ¶
type ExecuteRuleActionParametersOverridesSensitivityLevel string
A sensitivity level to set for all rules. This option has lower precedence than rule and category overrides and is only applicable for DDoS phases.
const ( ExecuteRuleActionParametersOverridesSensitivityLevelDefault ExecuteRuleActionParametersOverridesSensitivityLevel = "default" ExecuteRuleActionParametersOverridesSensitivityLevelMedium ExecuteRuleActionParametersOverridesSensitivityLevel = "medium" ExecuteRuleActionParametersOverridesSensitivityLevelLow ExecuteRuleActionParametersOverridesSensitivityLevel = "low" ExecuteRuleActionParametersOverridesSensitivityLevelEoff ExecuteRuleActionParametersOverridesSensitivityLevel = "eoff" )
func (ExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown ¶
func (r ExecuteRuleActionParametersOverridesSensitivityLevel) IsKnown() bool
type ExecuteRuleActionParametersParam ¶
type ExecuteRuleActionParametersParam struct { // The ID of the ruleset to execute. ID param.Field[string] `json:"id,required"` // The configuration to use for matched data logging. MatchedData param.Field[ExecuteRuleActionParametersMatchedDataParam] `json:"matched_data"` // A set of overrides to apply to the target ruleset. Overrides param.Field[ExecuteRuleActionParametersOverridesParam] `json:"overrides"` }
The parameters configuring the rule's action.
func (ExecuteRuleActionParametersParam) MarshalJSON ¶
func (r ExecuteRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type ExecuteRuleParam ¶
type ExecuteRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[ExecuteRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[ExecuteRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (ExecuteRuleParam) MarshalJSON ¶
func (r ExecuteRuleParam) MarshalJSON() (data []byte, err error)
type JSChallengeRule ¶
type JSChallengeRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action JSChallengeRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters interface{} `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON jsChallengeRuleJSON `json:"-"` }
func (*JSChallengeRule) UnmarshalJSON ¶
func (r *JSChallengeRule) UnmarshalJSON(data []byte) (err error)
type JSChallengeRuleAction ¶
type JSChallengeRuleAction string
The action to perform when the rule matches.
const (
JSChallengeRuleActionJSChallenge JSChallengeRuleAction = "js_challenge"
)
func (JSChallengeRuleAction) IsKnown ¶
func (r JSChallengeRuleAction) IsKnown() bool
type JSChallengeRuleParam ¶
type JSChallengeRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[JSChallengeRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[interface{}] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (JSChallengeRuleParam) MarshalJSON ¶
func (r JSChallengeRuleParam) MarshalJSON() (data []byte, err error)
type LogRule ¶
type LogRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action LogRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters interface{} `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON logRuleJSON `json:"-"` }
func (*LogRule) UnmarshalJSON ¶
type LogRuleAction ¶
type LogRuleAction string
The action to perform when the rule matches.
const (
LogRuleActionLog LogRuleAction = "log"
)
func (LogRuleAction) IsKnown ¶
func (r LogRuleAction) IsKnown() bool
type LogRuleParam ¶
type LogRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[LogRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[interface{}] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (LogRuleParam) MarshalJSON ¶
func (r LogRuleParam) MarshalJSON() (data []byte, err error)
type Logging ¶
type Logging struct { // Whether to generate a log when the rule matches. Enabled bool `json:"enabled,required"` JSON loggingJSON `json:"-"` }
An object configuring the rule's logging behavior.
func (*Logging) UnmarshalJSON ¶
type LoggingParam ¶
type LoggingParam struct { // Whether to generate a log when the rule matches. Enabled param.Field[bool] `json:"enabled,required"` }
An object configuring the rule's logging behavior.
func (LoggingParam) MarshalJSON ¶
func (r LoggingParam) MarshalJSON() (data []byte, err error)
type ManagedChallengeRule ¶
type ManagedChallengeRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action ManagedChallengeRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters interface{} `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON managedChallengeRuleJSON `json:"-"` }
func (*ManagedChallengeRule) UnmarshalJSON ¶
func (r *ManagedChallengeRule) UnmarshalJSON(data []byte) (err error)
type ManagedChallengeRuleAction ¶
type ManagedChallengeRuleAction string
The action to perform when the rule matches.
const (
ManagedChallengeRuleActionManagedChallenge ManagedChallengeRuleAction = "managed_challenge"
)
func (ManagedChallengeRuleAction) IsKnown ¶
func (r ManagedChallengeRuleAction) IsKnown() bool
type ManagedChallengeRuleParam ¶
type ManagedChallengeRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[ManagedChallengeRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[interface{}] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (ManagedChallengeRuleParam) MarshalJSON ¶
func (r ManagedChallengeRuleParam) MarshalJSON() (data []byte, err error)
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRole ¶ added in v2.1.0
type MemberRole = shared.MemberRole
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissions ¶ added in v2.1.0
type MemberRolesPermissions = shared.MemberRolesPermissions
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberUser ¶ added in v2.1.0
type MemberUser = shared.MemberUser
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
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 PhaseGetParams ¶
type PhaseGetParamsRulesetPhase ¶
type PhaseGetParamsRulesetPhase string
The phase of the ruleset.
const ( PhaseGetParamsRulesetPhaseDDoSL4 PhaseGetParamsRulesetPhase = "ddos_l4" PhaseGetParamsRulesetPhaseDDoSL7 PhaseGetParamsRulesetPhase = "ddos_l7" PhaseGetParamsRulesetPhaseHTTPConfigSettings PhaseGetParamsRulesetPhase = "http_config_settings" PhaseGetParamsRulesetPhaseHTTPCustomErrors PhaseGetParamsRulesetPhase = "http_custom_errors" PhaseGetParamsRulesetPhaseHTTPLogCustomFields PhaseGetParamsRulesetPhase = "http_log_custom_fields" PhaseGetParamsRulesetPhaseHTTPRatelimit PhaseGetParamsRulesetPhase = "http_ratelimit" PhaseGetParamsRulesetPhaseHTTPRequestCacheSettings PhaseGetParamsRulesetPhase = "http_request_cache_settings" PhaseGetParamsRulesetPhaseHTTPRequestDynamicRedirect PhaseGetParamsRulesetPhase = "http_request_dynamic_redirect" PhaseGetParamsRulesetPhaseHTTPRequestFirewallCustom PhaseGetParamsRulesetPhase = "http_request_firewall_custom" PhaseGetParamsRulesetPhaseHTTPRequestFirewallManaged PhaseGetParamsRulesetPhase = "http_request_firewall_managed" PhaseGetParamsRulesetPhaseHTTPRequestLateTransform PhaseGetParamsRulesetPhase = "http_request_late_transform" PhaseGetParamsRulesetPhaseHTTPRequestOrigin PhaseGetParamsRulesetPhase = "http_request_origin" PhaseGetParamsRulesetPhaseHTTPRequestRedirect PhaseGetParamsRulesetPhase = "http_request_redirect" PhaseGetParamsRulesetPhaseHTTPRequestSanitize PhaseGetParamsRulesetPhase = "http_request_sanitize" PhaseGetParamsRulesetPhaseHTTPRequestSBFM PhaseGetParamsRulesetPhase = "http_request_sbfm" PhaseGetParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseGetParamsRulesetPhase = "http_request_select_configuration" PhaseGetParamsRulesetPhaseHTTPRequestTransform PhaseGetParamsRulesetPhase = "http_request_transform" PhaseGetParamsRulesetPhaseHTTPResponseCompression PhaseGetParamsRulesetPhase = "http_response_compression" PhaseGetParamsRulesetPhaseHTTPResponseFirewallManaged PhaseGetParamsRulesetPhase = "http_response_firewall_managed" PhaseGetParamsRulesetPhaseHTTPResponseHeadersTransform PhaseGetParamsRulesetPhase = "http_response_headers_transform" PhaseGetParamsRulesetPhaseMagicTransit PhaseGetParamsRulesetPhase = "magic_transit" PhaseGetParamsRulesetPhaseMagicTransitIDsManaged PhaseGetParamsRulesetPhase = "magic_transit_ids_managed" PhaseGetParamsRulesetPhaseMagicTransitManaged PhaseGetParamsRulesetPhase = "magic_transit_managed" )
func (PhaseGetParamsRulesetPhase) IsKnown ¶
func (r PhaseGetParamsRulesetPhase) IsKnown() bool
type PhaseGetResponse ¶
type PhaseGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind PhaseGetResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase PhaseGetResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []PhaseGetResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON phaseGetResponseJSON `json:"-"` }
A ruleset object.
func (*PhaseGetResponse) UnmarshalJSON ¶
func (r *PhaseGetResponse) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseEnvelope ¶
type PhaseGetResponseEnvelope struct { // A list of error messages. Errors []PhaseGetResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []PhaseGetResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result PhaseGetResponse `json:"result,required"` // Whether the API call was successful. Success PhaseGetResponseEnvelopeSuccess `json:"success,required"` JSON phaseGetResponseEnvelopeJSON `json:"-"` }
A response object.
func (*PhaseGetResponseEnvelope) UnmarshalJSON ¶
func (r *PhaseGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseEnvelopeErrors ¶
type PhaseGetResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source PhaseGetResponseEnvelopeErrorsSource `json:"source"` JSON phaseGetResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*PhaseGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *PhaseGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseEnvelopeErrorsSource ¶
type PhaseGetResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON phaseGetResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*PhaseGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *PhaseGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseEnvelopeMessages ¶
type PhaseGetResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source PhaseGetResponseEnvelopeMessagesSource `json:"source"` JSON phaseGetResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*PhaseGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *PhaseGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseEnvelopeMessagesSource ¶
type PhaseGetResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON phaseGetResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*PhaseGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *PhaseGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseEnvelopeSuccess ¶
type PhaseGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
PhaseGetResponseEnvelopeSuccessTrue PhaseGetResponseEnvelopeSuccess = true
)
func (PhaseGetResponseEnvelopeSuccess) IsKnown ¶
func (r PhaseGetResponseEnvelopeSuccess) IsKnown() bool
type PhaseGetResponseKind ¶
type PhaseGetResponseKind string
The kind of the ruleset.
const ( PhaseGetResponseKindManaged PhaseGetResponseKind = "managed" PhaseGetResponseKindCustom PhaseGetResponseKind = "custom" PhaseGetResponseKindRoot PhaseGetResponseKind = "root" PhaseGetResponseKindZone PhaseGetResponseKind = "zone" )
func (PhaseGetResponseKind) IsKnown ¶
func (r PhaseGetResponseKind) IsKnown() bool
type PhaseGetResponsePhase ¶
type PhaseGetResponsePhase string
The phase of the ruleset.
const ( PhaseGetResponsePhaseDDoSL4 PhaseGetResponsePhase = "ddos_l4" PhaseGetResponsePhaseDDoSL7 PhaseGetResponsePhase = "ddos_l7" PhaseGetResponsePhaseHTTPConfigSettings PhaseGetResponsePhase = "http_config_settings" PhaseGetResponsePhaseHTTPCustomErrors PhaseGetResponsePhase = "http_custom_errors" PhaseGetResponsePhaseHTTPLogCustomFields PhaseGetResponsePhase = "http_log_custom_fields" PhaseGetResponsePhaseHTTPRatelimit PhaseGetResponsePhase = "http_ratelimit" PhaseGetResponsePhaseHTTPRequestCacheSettings PhaseGetResponsePhase = "http_request_cache_settings" PhaseGetResponsePhaseHTTPRequestDynamicRedirect PhaseGetResponsePhase = "http_request_dynamic_redirect" PhaseGetResponsePhaseHTTPRequestFirewallCustom PhaseGetResponsePhase = "http_request_firewall_custom" PhaseGetResponsePhaseHTTPRequestFirewallManaged PhaseGetResponsePhase = "http_request_firewall_managed" PhaseGetResponsePhaseHTTPRequestLateTransform PhaseGetResponsePhase = "http_request_late_transform" PhaseGetResponsePhaseHTTPRequestOrigin PhaseGetResponsePhase = "http_request_origin" PhaseGetResponsePhaseHTTPRequestRedirect PhaseGetResponsePhase = "http_request_redirect" PhaseGetResponsePhaseHTTPRequestSanitize PhaseGetResponsePhase = "http_request_sanitize" PhaseGetResponsePhaseHTTPRequestSBFM PhaseGetResponsePhase = "http_request_sbfm" PhaseGetResponsePhaseHTTPRequestSelectConfiguration PhaseGetResponsePhase = "http_request_select_configuration" PhaseGetResponsePhaseHTTPRequestTransform PhaseGetResponsePhase = "http_request_transform" PhaseGetResponsePhaseHTTPResponseCompression PhaseGetResponsePhase = "http_response_compression" PhaseGetResponsePhaseHTTPResponseFirewallManaged PhaseGetResponsePhase = "http_response_firewall_managed" PhaseGetResponsePhaseHTTPResponseHeadersTransform PhaseGetResponsePhase = "http_response_headers_transform" PhaseGetResponsePhaseMagicTransit PhaseGetResponsePhase = "magic_transit" PhaseGetResponsePhaseMagicTransitIDsManaged PhaseGetResponsePhase = "magic_transit_ids_managed" PhaseGetResponsePhaseMagicTransitManaged PhaseGetResponsePhase = "magic_transit_managed" )
func (PhaseGetResponsePhase) IsKnown ¶
func (r PhaseGetResponsePhase) IsKnown() bool
type PhaseGetResponseRule ¶
type PhaseGetResponseRule struct { // The action to perform when the rule matches. Action PhaseGetResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON phaseGetResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (PhaseGetResponseRule) AsUnion ¶
func (r PhaseGetResponseRule) AsUnion() PhaseGetResponseRulesUnion
func (*PhaseGetResponseRule) UnmarshalJSON ¶
func (r *PhaseGetResponseRule) UnmarshalJSON(data []byte) (err error)
type PhaseGetResponseRulesAction ¶
type PhaseGetResponseRulesAction string
The action to perform when the rule matches.
const ( PhaseGetResponseRulesActionBlock PhaseGetResponseRulesAction = "block" PhaseGetResponseRulesActionChallenge PhaseGetResponseRulesAction = "challenge" PhaseGetResponseRulesActionCompressResponse PhaseGetResponseRulesAction = "compress_response" PhaseGetResponseRulesActionExecute PhaseGetResponseRulesAction = "execute" PhaseGetResponseRulesActionJSChallenge PhaseGetResponseRulesAction = "js_challenge" PhaseGetResponseRulesActionLog PhaseGetResponseRulesAction = "log" PhaseGetResponseRulesActionManagedChallenge PhaseGetResponseRulesAction = "managed_challenge" PhaseGetResponseRulesActionRedirect PhaseGetResponseRulesAction = "redirect" PhaseGetResponseRulesActionRewrite PhaseGetResponseRulesAction = "rewrite" PhaseGetResponseRulesActionRoute PhaseGetResponseRulesAction = "route" PhaseGetResponseRulesActionScore PhaseGetResponseRulesAction = "score" PhaseGetResponseRulesActionServeError PhaseGetResponseRulesAction = "serve_error" PhaseGetResponseRulesActionSetConfig PhaseGetResponseRulesAction = "set_config" PhaseGetResponseRulesActionSkip PhaseGetResponseRulesAction = "skip" PhaseGetResponseRulesActionSetCacheSettings PhaseGetResponseRulesAction = "set_cache_settings" )
func (PhaseGetResponseRulesAction) IsKnown ¶
func (r PhaseGetResponseRulesAction) IsKnown() bool
type PhaseGetResponseRulesUnion ¶
type PhaseGetResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type PhaseService ¶
type PhaseService struct { Options []option.RequestOption Versions *PhaseVersionService }
PhaseService 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 NewPhaseService method instead.
func NewPhaseService ¶
func NewPhaseService(opts ...option.RequestOption) (r *PhaseService)
NewPhaseService 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 (*PhaseService) Get ¶
func (r *PhaseService) Get(ctx context.Context, rulesetPhase PhaseGetParamsRulesetPhase, query PhaseGetParams, opts ...option.RequestOption) (res *PhaseGetResponse, err error)
Fetches the latest version of the account or zone entry point ruleset for a given phase.
func (*PhaseService) Update ¶
func (r *PhaseService) Update(ctx context.Context, rulesetPhase PhaseUpdateParamsRulesetPhase, params PhaseUpdateParams, opts ...option.RequestOption) (res *PhaseUpdateResponse, err error)
Updates an account or zone entry point ruleset, creating a new version.
type PhaseUpdateParams ¶
type PhaseUpdateParams struct { // The list of rules in the ruleset. Rules param.Field[[]PhaseUpdateParamsRuleUnion] `json:"rules,required"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` // An informative description of the ruleset. Description param.Field[string] `json:"description"` // The kind of the ruleset. Kind param.Field[PhaseUpdateParamsKind] `json:"kind"` // The human-readable name of the ruleset. Name param.Field[string] `json:"name"` // The phase of the ruleset. Phase param.Field[PhaseUpdateParamsPhase] `json:"phase"` }
func (PhaseUpdateParams) MarshalJSON ¶
func (r PhaseUpdateParams) MarshalJSON() (data []byte, err error)
type PhaseUpdateParamsKind ¶
type PhaseUpdateParamsKind string
The kind of the ruleset.
const ( PhaseUpdateParamsKindManaged PhaseUpdateParamsKind = "managed" PhaseUpdateParamsKindCustom PhaseUpdateParamsKind = "custom" PhaseUpdateParamsKindRoot PhaseUpdateParamsKind = "root" PhaseUpdateParamsKindZone PhaseUpdateParamsKind = "zone" )
func (PhaseUpdateParamsKind) IsKnown ¶
func (r PhaseUpdateParamsKind) IsKnown() bool
type PhaseUpdateParamsPhase ¶
type PhaseUpdateParamsPhase string
The phase of the ruleset.
const ( PhaseUpdateParamsPhaseDDoSL4 PhaseUpdateParamsPhase = "ddos_l4" PhaseUpdateParamsPhaseDDoSL7 PhaseUpdateParamsPhase = "ddos_l7" PhaseUpdateParamsPhaseHTTPConfigSettings PhaseUpdateParamsPhase = "http_config_settings" PhaseUpdateParamsPhaseHTTPCustomErrors PhaseUpdateParamsPhase = "http_custom_errors" PhaseUpdateParamsPhaseHTTPLogCustomFields PhaseUpdateParamsPhase = "http_log_custom_fields" PhaseUpdateParamsPhaseHTTPRatelimit PhaseUpdateParamsPhase = "http_ratelimit" PhaseUpdateParamsPhaseHTTPRequestCacheSettings PhaseUpdateParamsPhase = "http_request_cache_settings" PhaseUpdateParamsPhaseHTTPRequestDynamicRedirect PhaseUpdateParamsPhase = "http_request_dynamic_redirect" PhaseUpdateParamsPhaseHTTPRequestFirewallCustom PhaseUpdateParamsPhase = "http_request_firewall_custom" PhaseUpdateParamsPhaseHTTPRequestFirewallManaged PhaseUpdateParamsPhase = "http_request_firewall_managed" PhaseUpdateParamsPhaseHTTPRequestLateTransform PhaseUpdateParamsPhase = "http_request_late_transform" PhaseUpdateParamsPhaseHTTPRequestOrigin PhaseUpdateParamsPhase = "http_request_origin" PhaseUpdateParamsPhaseHTTPRequestRedirect PhaseUpdateParamsPhase = "http_request_redirect" PhaseUpdateParamsPhaseHTTPRequestSanitize PhaseUpdateParamsPhase = "http_request_sanitize" PhaseUpdateParamsPhaseHTTPRequestSBFM PhaseUpdateParamsPhase = "http_request_sbfm" PhaseUpdateParamsPhaseHTTPRequestSelectConfiguration PhaseUpdateParamsPhase = "http_request_select_configuration" PhaseUpdateParamsPhaseHTTPRequestTransform PhaseUpdateParamsPhase = "http_request_transform" PhaseUpdateParamsPhaseHTTPResponseCompression PhaseUpdateParamsPhase = "http_response_compression" PhaseUpdateParamsPhaseHTTPResponseFirewallManaged PhaseUpdateParamsPhase = "http_response_firewall_managed" PhaseUpdateParamsPhaseHTTPResponseHeadersTransform PhaseUpdateParamsPhase = "http_response_headers_transform" PhaseUpdateParamsPhaseMagicTransit PhaseUpdateParamsPhase = "magic_transit" PhaseUpdateParamsPhaseMagicTransitIDsManaged PhaseUpdateParamsPhase = "magic_transit_ids_managed" PhaseUpdateParamsPhaseMagicTransitManaged PhaseUpdateParamsPhase = "magic_transit_managed" )
func (PhaseUpdateParamsPhase) IsKnown ¶
func (r PhaseUpdateParamsPhase) IsKnown() bool
type PhaseUpdateParamsRule ¶
type PhaseUpdateParamsRule struct { // The action to perform when the rule matches. Action param.Field[PhaseUpdateParamsRulesAction] `json:"action"` ActionParameters param.Field[interface{}] `json:"action_parameters,required"` Categories param.Field[interface{}] `json:"categories,required"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // The unique ID of the rule. ID param.Field[string] `json:"id"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (PhaseUpdateParamsRule) MarshalJSON ¶
func (r PhaseUpdateParamsRule) MarshalJSON() (data []byte, err error)
type PhaseUpdateParamsRuleUnion ¶
type PhaseUpdateParamsRuleUnion interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.BlockRuleParam, rulesets.ChallengeRuleParam, rulesets.CompressResponseRuleParam, rulesets.ExecuteRuleParam, rulesets.JSChallengeRuleParam, rulesets.LogRuleParam, rulesets.ManagedChallengeRuleParam, rulesets.RedirectRuleParam, rulesets.RewriteRuleParam, rulesets.RouteRuleParam, rulesets.ScoreRuleParam, rulesets.ServeErrorRuleParam, rulesets.SetConfigRuleParam, rulesets.SkipRuleParam, rulesets.SetCacheSettingsRuleParam, PhaseUpdateParamsRule.
type PhaseUpdateParamsRulesAction ¶
type PhaseUpdateParamsRulesAction string
The action to perform when the rule matches.
const ( PhaseUpdateParamsRulesActionBlock PhaseUpdateParamsRulesAction = "block" PhaseUpdateParamsRulesActionChallenge PhaseUpdateParamsRulesAction = "challenge" PhaseUpdateParamsRulesActionCompressResponse PhaseUpdateParamsRulesAction = "compress_response" PhaseUpdateParamsRulesActionExecute PhaseUpdateParamsRulesAction = "execute" PhaseUpdateParamsRulesActionJSChallenge PhaseUpdateParamsRulesAction = "js_challenge" PhaseUpdateParamsRulesActionLog PhaseUpdateParamsRulesAction = "log" PhaseUpdateParamsRulesActionManagedChallenge PhaseUpdateParamsRulesAction = "managed_challenge" PhaseUpdateParamsRulesActionRedirect PhaseUpdateParamsRulesAction = "redirect" PhaseUpdateParamsRulesActionRewrite PhaseUpdateParamsRulesAction = "rewrite" PhaseUpdateParamsRulesActionRoute PhaseUpdateParamsRulesAction = "route" PhaseUpdateParamsRulesActionScore PhaseUpdateParamsRulesAction = "score" PhaseUpdateParamsRulesActionServeError PhaseUpdateParamsRulesAction = "serve_error" PhaseUpdateParamsRulesActionSetConfig PhaseUpdateParamsRulesAction = "set_config" PhaseUpdateParamsRulesActionSkip PhaseUpdateParamsRulesAction = "skip" PhaseUpdateParamsRulesActionSetCacheSettings PhaseUpdateParamsRulesAction = "set_cache_settings" )
func (PhaseUpdateParamsRulesAction) IsKnown ¶
func (r PhaseUpdateParamsRulesAction) IsKnown() bool
type PhaseUpdateParamsRulesetPhase ¶
type PhaseUpdateParamsRulesetPhase string
The phase of the ruleset.
const ( PhaseUpdateParamsRulesetPhaseDDoSL4 PhaseUpdateParamsRulesetPhase = "ddos_l4" PhaseUpdateParamsRulesetPhaseDDoSL7 PhaseUpdateParamsRulesetPhase = "ddos_l7" PhaseUpdateParamsRulesetPhaseHTTPConfigSettings PhaseUpdateParamsRulesetPhase = "http_config_settings" PhaseUpdateParamsRulesetPhaseHTTPCustomErrors PhaseUpdateParamsRulesetPhase = "http_custom_errors" PhaseUpdateParamsRulesetPhaseHTTPLogCustomFields PhaseUpdateParamsRulesetPhase = "http_log_custom_fields" PhaseUpdateParamsRulesetPhaseHTTPRatelimit PhaseUpdateParamsRulesetPhase = "http_ratelimit" PhaseUpdateParamsRulesetPhaseHTTPRequestCacheSettings PhaseUpdateParamsRulesetPhase = "http_request_cache_settings" PhaseUpdateParamsRulesetPhaseHTTPRequestDynamicRedirect PhaseUpdateParamsRulesetPhase = "http_request_dynamic_redirect" PhaseUpdateParamsRulesetPhaseHTTPRequestFirewallCustom PhaseUpdateParamsRulesetPhase = "http_request_firewall_custom" PhaseUpdateParamsRulesetPhaseHTTPRequestFirewallManaged PhaseUpdateParamsRulesetPhase = "http_request_firewall_managed" PhaseUpdateParamsRulesetPhaseHTTPRequestLateTransform PhaseUpdateParamsRulesetPhase = "http_request_late_transform" PhaseUpdateParamsRulesetPhaseHTTPRequestOrigin PhaseUpdateParamsRulesetPhase = "http_request_origin" PhaseUpdateParamsRulesetPhaseHTTPRequestRedirect PhaseUpdateParamsRulesetPhase = "http_request_redirect" PhaseUpdateParamsRulesetPhaseHTTPRequestSanitize PhaseUpdateParamsRulesetPhase = "http_request_sanitize" PhaseUpdateParamsRulesetPhaseHTTPRequestSBFM PhaseUpdateParamsRulesetPhase = "http_request_sbfm" PhaseUpdateParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseUpdateParamsRulesetPhase = "http_request_select_configuration" PhaseUpdateParamsRulesetPhaseHTTPRequestTransform PhaseUpdateParamsRulesetPhase = "http_request_transform" PhaseUpdateParamsRulesetPhaseHTTPResponseCompression PhaseUpdateParamsRulesetPhase = "http_response_compression" PhaseUpdateParamsRulesetPhaseHTTPResponseFirewallManaged PhaseUpdateParamsRulesetPhase = "http_response_firewall_managed" PhaseUpdateParamsRulesetPhaseHTTPResponseHeadersTransform PhaseUpdateParamsRulesetPhase = "http_response_headers_transform" PhaseUpdateParamsRulesetPhaseMagicTransit PhaseUpdateParamsRulesetPhase = "magic_transit" PhaseUpdateParamsRulesetPhaseMagicTransitIDsManaged PhaseUpdateParamsRulesetPhase = "magic_transit_ids_managed" PhaseUpdateParamsRulesetPhaseMagicTransitManaged PhaseUpdateParamsRulesetPhase = "magic_transit_managed" )
func (PhaseUpdateParamsRulesetPhase) IsKnown ¶
func (r PhaseUpdateParamsRulesetPhase) IsKnown() bool
type PhaseUpdateResponse ¶
type PhaseUpdateResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind PhaseUpdateResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase PhaseUpdateResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []PhaseUpdateResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON phaseUpdateResponseJSON `json:"-"` }
A ruleset object.
func (*PhaseUpdateResponse) UnmarshalJSON ¶
func (r *PhaseUpdateResponse) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseEnvelope ¶
type PhaseUpdateResponseEnvelope struct { // A list of error messages. Errors []PhaseUpdateResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []PhaseUpdateResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result PhaseUpdateResponse `json:"result,required"` // Whether the API call was successful. Success PhaseUpdateResponseEnvelopeSuccess `json:"success,required"` JSON phaseUpdateResponseEnvelopeJSON `json:"-"` }
A response object.
func (*PhaseUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *PhaseUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseEnvelopeErrors ¶
type PhaseUpdateResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source PhaseUpdateResponseEnvelopeErrorsSource `json:"source"` JSON phaseUpdateResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*PhaseUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *PhaseUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseEnvelopeErrorsSource ¶
type PhaseUpdateResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON phaseUpdateResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*PhaseUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *PhaseUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseEnvelopeMessages ¶
type PhaseUpdateResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source PhaseUpdateResponseEnvelopeMessagesSource `json:"source"` JSON phaseUpdateResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*PhaseUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *PhaseUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseEnvelopeMessagesSource ¶
type PhaseUpdateResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON phaseUpdateResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*PhaseUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *PhaseUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseEnvelopeSuccess ¶
type PhaseUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
PhaseUpdateResponseEnvelopeSuccessTrue PhaseUpdateResponseEnvelopeSuccess = true
)
func (PhaseUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r PhaseUpdateResponseEnvelopeSuccess) IsKnown() bool
type PhaseUpdateResponseKind ¶
type PhaseUpdateResponseKind string
The kind of the ruleset.
const ( PhaseUpdateResponseKindManaged PhaseUpdateResponseKind = "managed" PhaseUpdateResponseKindCustom PhaseUpdateResponseKind = "custom" PhaseUpdateResponseKindRoot PhaseUpdateResponseKind = "root" PhaseUpdateResponseKindZone PhaseUpdateResponseKind = "zone" )
func (PhaseUpdateResponseKind) IsKnown ¶
func (r PhaseUpdateResponseKind) IsKnown() bool
type PhaseUpdateResponsePhase ¶
type PhaseUpdateResponsePhase string
The phase of the ruleset.
const ( PhaseUpdateResponsePhaseDDoSL4 PhaseUpdateResponsePhase = "ddos_l4" PhaseUpdateResponsePhaseDDoSL7 PhaseUpdateResponsePhase = "ddos_l7" PhaseUpdateResponsePhaseHTTPConfigSettings PhaseUpdateResponsePhase = "http_config_settings" PhaseUpdateResponsePhaseHTTPCustomErrors PhaseUpdateResponsePhase = "http_custom_errors" PhaseUpdateResponsePhaseHTTPLogCustomFields PhaseUpdateResponsePhase = "http_log_custom_fields" PhaseUpdateResponsePhaseHTTPRatelimit PhaseUpdateResponsePhase = "http_ratelimit" PhaseUpdateResponsePhaseHTTPRequestCacheSettings PhaseUpdateResponsePhase = "http_request_cache_settings" PhaseUpdateResponsePhaseHTTPRequestDynamicRedirect PhaseUpdateResponsePhase = "http_request_dynamic_redirect" PhaseUpdateResponsePhaseHTTPRequestFirewallCustom PhaseUpdateResponsePhase = "http_request_firewall_custom" PhaseUpdateResponsePhaseHTTPRequestFirewallManaged PhaseUpdateResponsePhase = "http_request_firewall_managed" PhaseUpdateResponsePhaseHTTPRequestLateTransform PhaseUpdateResponsePhase = "http_request_late_transform" PhaseUpdateResponsePhaseHTTPRequestOrigin PhaseUpdateResponsePhase = "http_request_origin" PhaseUpdateResponsePhaseHTTPRequestRedirect PhaseUpdateResponsePhase = "http_request_redirect" PhaseUpdateResponsePhaseHTTPRequestSanitize PhaseUpdateResponsePhase = "http_request_sanitize" PhaseUpdateResponsePhaseHTTPRequestSBFM PhaseUpdateResponsePhase = "http_request_sbfm" PhaseUpdateResponsePhaseHTTPRequestSelectConfiguration PhaseUpdateResponsePhase = "http_request_select_configuration" PhaseUpdateResponsePhaseHTTPRequestTransform PhaseUpdateResponsePhase = "http_request_transform" PhaseUpdateResponsePhaseHTTPResponseCompression PhaseUpdateResponsePhase = "http_response_compression" PhaseUpdateResponsePhaseHTTPResponseFirewallManaged PhaseUpdateResponsePhase = "http_response_firewall_managed" PhaseUpdateResponsePhaseHTTPResponseHeadersTransform PhaseUpdateResponsePhase = "http_response_headers_transform" PhaseUpdateResponsePhaseMagicTransit PhaseUpdateResponsePhase = "magic_transit" PhaseUpdateResponsePhaseMagicTransitIDsManaged PhaseUpdateResponsePhase = "magic_transit_ids_managed" PhaseUpdateResponsePhaseMagicTransitManaged PhaseUpdateResponsePhase = "magic_transit_managed" )
func (PhaseUpdateResponsePhase) IsKnown ¶
func (r PhaseUpdateResponsePhase) IsKnown() bool
type PhaseUpdateResponseRule ¶
type PhaseUpdateResponseRule struct { // The action to perform when the rule matches. Action PhaseUpdateResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON phaseUpdateResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (PhaseUpdateResponseRule) AsUnion ¶
func (r PhaseUpdateResponseRule) AsUnion() PhaseUpdateResponseRulesUnion
func (*PhaseUpdateResponseRule) UnmarshalJSON ¶
func (r *PhaseUpdateResponseRule) UnmarshalJSON(data []byte) (err error)
type PhaseUpdateResponseRulesAction ¶
type PhaseUpdateResponseRulesAction string
The action to perform when the rule matches.
const ( PhaseUpdateResponseRulesActionBlock PhaseUpdateResponseRulesAction = "block" PhaseUpdateResponseRulesActionChallenge PhaseUpdateResponseRulesAction = "challenge" PhaseUpdateResponseRulesActionCompressResponse PhaseUpdateResponseRulesAction = "compress_response" PhaseUpdateResponseRulesActionExecute PhaseUpdateResponseRulesAction = "execute" PhaseUpdateResponseRulesActionJSChallenge PhaseUpdateResponseRulesAction = "js_challenge" PhaseUpdateResponseRulesActionLog PhaseUpdateResponseRulesAction = "log" PhaseUpdateResponseRulesActionManagedChallenge PhaseUpdateResponseRulesAction = "managed_challenge" PhaseUpdateResponseRulesActionRedirect PhaseUpdateResponseRulesAction = "redirect" PhaseUpdateResponseRulesActionRewrite PhaseUpdateResponseRulesAction = "rewrite" PhaseUpdateResponseRulesActionRoute PhaseUpdateResponseRulesAction = "route" PhaseUpdateResponseRulesActionScore PhaseUpdateResponseRulesAction = "score" PhaseUpdateResponseRulesActionServeError PhaseUpdateResponseRulesAction = "serve_error" PhaseUpdateResponseRulesActionSetConfig PhaseUpdateResponseRulesAction = "set_config" PhaseUpdateResponseRulesActionSkip PhaseUpdateResponseRulesAction = "skip" PhaseUpdateResponseRulesActionSetCacheSettings PhaseUpdateResponseRulesAction = "set_cache_settings" )
func (PhaseUpdateResponseRulesAction) IsKnown ¶
func (r PhaseUpdateResponseRulesAction) IsKnown() bool
type PhaseUpdateResponseRulesUnion ¶
type PhaseUpdateResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type PhaseVersionGetParams ¶
type PhaseVersionGetParamsRulesetPhase ¶
type PhaseVersionGetParamsRulesetPhase string
The phase of the ruleset.
const ( PhaseVersionGetParamsRulesetPhaseDDoSL4 PhaseVersionGetParamsRulesetPhase = "ddos_l4" PhaseVersionGetParamsRulesetPhaseDDoSL7 PhaseVersionGetParamsRulesetPhase = "ddos_l7" PhaseVersionGetParamsRulesetPhaseHTTPConfigSettings PhaseVersionGetParamsRulesetPhase = "http_config_settings" PhaseVersionGetParamsRulesetPhaseHTTPCustomErrors PhaseVersionGetParamsRulesetPhase = "http_custom_errors" PhaseVersionGetParamsRulesetPhaseHTTPLogCustomFields PhaseVersionGetParamsRulesetPhase = "http_log_custom_fields" PhaseVersionGetParamsRulesetPhaseHTTPRatelimit PhaseVersionGetParamsRulesetPhase = "http_ratelimit" PhaseVersionGetParamsRulesetPhaseHTTPRequestCacheSettings PhaseVersionGetParamsRulesetPhase = "http_request_cache_settings" PhaseVersionGetParamsRulesetPhaseHTTPRequestDynamicRedirect PhaseVersionGetParamsRulesetPhase = "http_request_dynamic_redirect" PhaseVersionGetParamsRulesetPhaseHTTPRequestFirewallCustom PhaseVersionGetParamsRulesetPhase = "http_request_firewall_custom" PhaseVersionGetParamsRulesetPhaseHTTPRequestFirewallManaged PhaseVersionGetParamsRulesetPhase = "http_request_firewall_managed" PhaseVersionGetParamsRulesetPhaseHTTPRequestLateTransform PhaseVersionGetParamsRulesetPhase = "http_request_late_transform" PhaseVersionGetParamsRulesetPhaseHTTPRequestOrigin PhaseVersionGetParamsRulesetPhase = "http_request_origin" PhaseVersionGetParamsRulesetPhaseHTTPRequestRedirect PhaseVersionGetParamsRulesetPhase = "http_request_redirect" PhaseVersionGetParamsRulesetPhaseHTTPRequestSanitize PhaseVersionGetParamsRulesetPhase = "http_request_sanitize" PhaseVersionGetParamsRulesetPhaseHTTPRequestSBFM PhaseVersionGetParamsRulesetPhase = "http_request_sbfm" PhaseVersionGetParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseVersionGetParamsRulesetPhase = "http_request_select_configuration" PhaseVersionGetParamsRulesetPhaseHTTPRequestTransform PhaseVersionGetParamsRulesetPhase = "http_request_transform" PhaseVersionGetParamsRulesetPhaseHTTPResponseCompression PhaseVersionGetParamsRulesetPhase = "http_response_compression" PhaseVersionGetParamsRulesetPhaseHTTPResponseFirewallManaged PhaseVersionGetParamsRulesetPhase = "http_response_firewall_managed" PhaseVersionGetParamsRulesetPhaseHTTPResponseHeadersTransform PhaseVersionGetParamsRulesetPhase = "http_response_headers_transform" PhaseVersionGetParamsRulesetPhaseMagicTransit PhaseVersionGetParamsRulesetPhase = "magic_transit" PhaseVersionGetParamsRulesetPhaseMagicTransitIDsManaged PhaseVersionGetParamsRulesetPhase = "magic_transit_ids_managed" PhaseVersionGetParamsRulesetPhaseMagicTransitManaged PhaseVersionGetParamsRulesetPhase = "magic_transit_managed" )
func (PhaseVersionGetParamsRulesetPhase) IsKnown ¶
func (r PhaseVersionGetParamsRulesetPhase) IsKnown() bool
type PhaseVersionGetResponse ¶
type PhaseVersionGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind PhaseVersionGetResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase PhaseVersionGetResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []PhaseVersionGetResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON phaseVersionGetResponseJSON `json:"-"` }
A ruleset object.
func (*PhaseVersionGetResponse) UnmarshalJSON ¶
func (r *PhaseVersionGetResponse) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseEnvelope ¶
type PhaseVersionGetResponseEnvelope struct { // A list of error messages. Errors []PhaseVersionGetResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []PhaseVersionGetResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result PhaseVersionGetResponse `json:"result,required"` // Whether the API call was successful. Success PhaseVersionGetResponseEnvelopeSuccess `json:"success,required"` JSON phaseVersionGetResponseEnvelopeJSON `json:"-"` }
A response object.
func (*PhaseVersionGetResponseEnvelope) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseEnvelopeErrors ¶
type PhaseVersionGetResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source PhaseVersionGetResponseEnvelopeErrorsSource `json:"source"` JSON phaseVersionGetResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*PhaseVersionGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseEnvelopeErrorsSource ¶
type PhaseVersionGetResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON phaseVersionGetResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*PhaseVersionGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseEnvelopeMessages ¶
type PhaseVersionGetResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source PhaseVersionGetResponseEnvelopeMessagesSource `json:"source"` JSON phaseVersionGetResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*PhaseVersionGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseEnvelopeMessagesSource ¶
type PhaseVersionGetResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON phaseVersionGetResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*PhaseVersionGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseEnvelopeSuccess ¶
type PhaseVersionGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
PhaseVersionGetResponseEnvelopeSuccessTrue PhaseVersionGetResponseEnvelopeSuccess = true
)
func (PhaseVersionGetResponseEnvelopeSuccess) IsKnown ¶
func (r PhaseVersionGetResponseEnvelopeSuccess) IsKnown() bool
type PhaseVersionGetResponseKind ¶
type PhaseVersionGetResponseKind string
The kind of the ruleset.
const ( PhaseVersionGetResponseKindManaged PhaseVersionGetResponseKind = "managed" PhaseVersionGetResponseKindCustom PhaseVersionGetResponseKind = "custom" PhaseVersionGetResponseKindRoot PhaseVersionGetResponseKind = "root" PhaseVersionGetResponseKindZone PhaseVersionGetResponseKind = "zone" )
func (PhaseVersionGetResponseKind) IsKnown ¶
func (r PhaseVersionGetResponseKind) IsKnown() bool
type PhaseVersionGetResponsePhase ¶
type PhaseVersionGetResponsePhase string
The phase of the ruleset.
const ( PhaseVersionGetResponsePhaseDDoSL4 PhaseVersionGetResponsePhase = "ddos_l4" PhaseVersionGetResponsePhaseDDoSL7 PhaseVersionGetResponsePhase = "ddos_l7" PhaseVersionGetResponsePhaseHTTPConfigSettings PhaseVersionGetResponsePhase = "http_config_settings" PhaseVersionGetResponsePhaseHTTPCustomErrors PhaseVersionGetResponsePhase = "http_custom_errors" PhaseVersionGetResponsePhaseHTTPLogCustomFields PhaseVersionGetResponsePhase = "http_log_custom_fields" PhaseVersionGetResponsePhaseHTTPRatelimit PhaseVersionGetResponsePhase = "http_ratelimit" PhaseVersionGetResponsePhaseHTTPRequestCacheSettings PhaseVersionGetResponsePhase = "http_request_cache_settings" PhaseVersionGetResponsePhaseHTTPRequestDynamicRedirect PhaseVersionGetResponsePhase = "http_request_dynamic_redirect" PhaseVersionGetResponsePhaseHTTPRequestFirewallCustom PhaseVersionGetResponsePhase = "http_request_firewall_custom" PhaseVersionGetResponsePhaseHTTPRequestFirewallManaged PhaseVersionGetResponsePhase = "http_request_firewall_managed" PhaseVersionGetResponsePhaseHTTPRequestLateTransform PhaseVersionGetResponsePhase = "http_request_late_transform" PhaseVersionGetResponsePhaseHTTPRequestOrigin PhaseVersionGetResponsePhase = "http_request_origin" PhaseVersionGetResponsePhaseHTTPRequestRedirect PhaseVersionGetResponsePhase = "http_request_redirect" PhaseVersionGetResponsePhaseHTTPRequestSanitize PhaseVersionGetResponsePhase = "http_request_sanitize" PhaseVersionGetResponsePhaseHTTPRequestSBFM PhaseVersionGetResponsePhase = "http_request_sbfm" PhaseVersionGetResponsePhaseHTTPRequestSelectConfiguration PhaseVersionGetResponsePhase = "http_request_select_configuration" PhaseVersionGetResponsePhaseHTTPRequestTransform PhaseVersionGetResponsePhase = "http_request_transform" PhaseVersionGetResponsePhaseHTTPResponseCompression PhaseVersionGetResponsePhase = "http_response_compression" PhaseVersionGetResponsePhaseHTTPResponseFirewallManaged PhaseVersionGetResponsePhase = "http_response_firewall_managed" PhaseVersionGetResponsePhaseHTTPResponseHeadersTransform PhaseVersionGetResponsePhase = "http_response_headers_transform" PhaseVersionGetResponsePhaseMagicTransit PhaseVersionGetResponsePhase = "magic_transit" PhaseVersionGetResponsePhaseMagicTransitIDsManaged PhaseVersionGetResponsePhase = "magic_transit_ids_managed" PhaseVersionGetResponsePhaseMagicTransitManaged PhaseVersionGetResponsePhase = "magic_transit_managed" )
func (PhaseVersionGetResponsePhase) IsKnown ¶
func (r PhaseVersionGetResponsePhase) IsKnown() bool
type PhaseVersionGetResponseRule ¶
type PhaseVersionGetResponseRule struct { // The action to perform when the rule matches. Action PhaseVersionGetResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON phaseVersionGetResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (PhaseVersionGetResponseRule) AsUnion ¶
func (r PhaseVersionGetResponseRule) AsUnion() PhaseVersionGetResponseRulesUnion
func (*PhaseVersionGetResponseRule) UnmarshalJSON ¶
func (r *PhaseVersionGetResponseRule) UnmarshalJSON(data []byte) (err error)
type PhaseVersionGetResponseRulesAction ¶
type PhaseVersionGetResponseRulesAction string
The action to perform when the rule matches.
const ( PhaseVersionGetResponseRulesActionBlock PhaseVersionGetResponseRulesAction = "block" PhaseVersionGetResponseRulesActionChallenge PhaseVersionGetResponseRulesAction = "challenge" PhaseVersionGetResponseRulesActionCompressResponse PhaseVersionGetResponseRulesAction = "compress_response" PhaseVersionGetResponseRulesActionExecute PhaseVersionGetResponseRulesAction = "execute" PhaseVersionGetResponseRulesActionJSChallenge PhaseVersionGetResponseRulesAction = "js_challenge" PhaseVersionGetResponseRulesActionLog PhaseVersionGetResponseRulesAction = "log" PhaseVersionGetResponseRulesActionManagedChallenge PhaseVersionGetResponseRulesAction = "managed_challenge" PhaseVersionGetResponseRulesActionRedirect PhaseVersionGetResponseRulesAction = "redirect" PhaseVersionGetResponseRulesActionRewrite PhaseVersionGetResponseRulesAction = "rewrite" PhaseVersionGetResponseRulesActionRoute PhaseVersionGetResponseRulesAction = "route" PhaseVersionGetResponseRulesActionScore PhaseVersionGetResponseRulesAction = "score" PhaseVersionGetResponseRulesActionServeError PhaseVersionGetResponseRulesAction = "serve_error" PhaseVersionGetResponseRulesActionSetConfig PhaseVersionGetResponseRulesAction = "set_config" PhaseVersionGetResponseRulesActionSkip PhaseVersionGetResponseRulesAction = "skip" PhaseVersionGetResponseRulesActionSetCacheSettings PhaseVersionGetResponseRulesAction = "set_cache_settings" )
func (PhaseVersionGetResponseRulesAction) IsKnown ¶
func (r PhaseVersionGetResponseRulesAction) IsKnown() bool
type PhaseVersionGetResponseRulesUnion ¶
type PhaseVersionGetResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type PhaseVersionListParams ¶
type PhaseVersionListParamsRulesetPhase ¶
type PhaseVersionListParamsRulesetPhase string
The phase of the ruleset.
const ( PhaseVersionListParamsRulesetPhaseDDoSL4 PhaseVersionListParamsRulesetPhase = "ddos_l4" PhaseVersionListParamsRulesetPhaseDDoSL7 PhaseVersionListParamsRulesetPhase = "ddos_l7" PhaseVersionListParamsRulesetPhaseHTTPConfigSettings PhaseVersionListParamsRulesetPhase = "http_config_settings" PhaseVersionListParamsRulesetPhaseHTTPCustomErrors PhaseVersionListParamsRulesetPhase = "http_custom_errors" PhaseVersionListParamsRulesetPhaseHTTPLogCustomFields PhaseVersionListParamsRulesetPhase = "http_log_custom_fields" PhaseVersionListParamsRulesetPhaseHTTPRatelimit PhaseVersionListParamsRulesetPhase = "http_ratelimit" PhaseVersionListParamsRulesetPhaseHTTPRequestCacheSettings PhaseVersionListParamsRulesetPhase = "http_request_cache_settings" PhaseVersionListParamsRulesetPhaseHTTPRequestDynamicRedirect PhaseVersionListParamsRulesetPhase = "http_request_dynamic_redirect" PhaseVersionListParamsRulesetPhaseHTTPRequestFirewallCustom PhaseVersionListParamsRulesetPhase = "http_request_firewall_custom" PhaseVersionListParamsRulesetPhaseHTTPRequestFirewallManaged PhaseVersionListParamsRulesetPhase = "http_request_firewall_managed" PhaseVersionListParamsRulesetPhaseHTTPRequestLateTransform PhaseVersionListParamsRulesetPhase = "http_request_late_transform" PhaseVersionListParamsRulesetPhaseHTTPRequestOrigin PhaseVersionListParamsRulesetPhase = "http_request_origin" PhaseVersionListParamsRulesetPhaseHTTPRequestRedirect PhaseVersionListParamsRulesetPhase = "http_request_redirect" PhaseVersionListParamsRulesetPhaseHTTPRequestSanitize PhaseVersionListParamsRulesetPhase = "http_request_sanitize" PhaseVersionListParamsRulesetPhaseHTTPRequestSBFM PhaseVersionListParamsRulesetPhase = "http_request_sbfm" PhaseVersionListParamsRulesetPhaseHTTPRequestSelectConfiguration PhaseVersionListParamsRulesetPhase = "http_request_select_configuration" PhaseVersionListParamsRulesetPhaseHTTPRequestTransform PhaseVersionListParamsRulesetPhase = "http_request_transform" PhaseVersionListParamsRulesetPhaseHTTPResponseCompression PhaseVersionListParamsRulesetPhase = "http_response_compression" PhaseVersionListParamsRulesetPhaseHTTPResponseFirewallManaged PhaseVersionListParamsRulesetPhase = "http_response_firewall_managed" PhaseVersionListParamsRulesetPhaseHTTPResponseHeadersTransform PhaseVersionListParamsRulesetPhase = "http_response_headers_transform" PhaseVersionListParamsRulesetPhaseMagicTransit PhaseVersionListParamsRulesetPhase = "magic_transit" PhaseVersionListParamsRulesetPhaseMagicTransitIDsManaged PhaseVersionListParamsRulesetPhase = "magic_transit_ids_managed" PhaseVersionListParamsRulesetPhaseMagicTransitManaged PhaseVersionListParamsRulesetPhase = "magic_transit_managed" )
func (PhaseVersionListParamsRulesetPhase) IsKnown ¶
func (r PhaseVersionListParamsRulesetPhase) IsKnown() bool
type PhaseVersionService ¶
type PhaseVersionService struct {
Options []option.RequestOption
}
PhaseVersionService 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 NewPhaseVersionService method instead.
func NewPhaseVersionService ¶
func NewPhaseVersionService(opts ...option.RequestOption) (r *PhaseVersionService)
NewPhaseVersionService 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 (*PhaseVersionService) Get ¶
func (r *PhaseVersionService) Get(ctx context.Context, rulesetPhase PhaseVersionGetParamsRulesetPhase, rulesetVersion string, query PhaseVersionGetParams, opts ...option.RequestOption) (res *PhaseVersionGetResponse, err error)
Fetches a specific version of an account or zone entry point ruleset.
func (*PhaseVersionService) List ¶
func (r *PhaseVersionService) List(ctx context.Context, rulesetPhase PhaseVersionListParamsRulesetPhase, query PhaseVersionListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Ruleset], err error)
Fetches the versions of an account or zone entry point ruleset.
func (*PhaseVersionService) ListAutoPaging ¶
func (r *PhaseVersionService) ListAutoPaging(ctx context.Context, rulesetPhase PhaseVersionListParamsRulesetPhase, query PhaseVersionListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Ruleset]
Fetches the versions of an account or zone entry point ruleset.
type RedirectRule ¶
type RedirectRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action RedirectRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters RedirectRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON redirectRuleJSON `json:"-"` }
func (*RedirectRule) UnmarshalJSON ¶
func (r *RedirectRule) UnmarshalJSON(data []byte) (err error)
type RedirectRuleAction ¶
type RedirectRuleAction string
The action to perform when the rule matches.
const (
RedirectRuleActionRedirect RedirectRuleAction = "redirect"
)
func (RedirectRuleAction) IsKnown ¶
func (r RedirectRuleAction) IsKnown() bool
type RedirectRuleActionParameters ¶
type RedirectRuleActionParameters struct { // Serve a redirect based on a bulk list lookup. FromList RedirectRuleActionParametersFromList `json:"from_list"` // Serve a redirect based on the request properties. FromValue RedirectRuleActionParametersFromValue `json:"from_value"` JSON redirectRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*RedirectRuleActionParameters) UnmarshalJSON ¶
func (r *RedirectRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromList ¶
type RedirectRuleActionParametersFromList struct { // Expression that evaluates to the list lookup key. Key string `json:"key"` // The name of the list to match against. Name string `json:"name"` JSON redirectRuleActionParametersFromListJSON `json:"-"` }
Serve a redirect based on a bulk list lookup.
func (*RedirectRuleActionParametersFromList) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromList) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromListParam ¶
type RedirectRuleActionParametersFromListParam struct { // Expression that evaluates to the list lookup key. Key param.Field[string] `json:"key"` // The name of the list to match against. Name param.Field[string] `json:"name"` }
Serve a redirect based on a bulk list lookup.
func (RedirectRuleActionParametersFromListParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromListParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValue ¶
type RedirectRuleActionParametersFromValue struct { // Keep the query string of the original request. PreserveQueryString bool `json:"preserve_query_string"` // The status code to be used for the redirect. StatusCode RedirectRuleActionParametersFromValueStatusCode `json:"status_code"` // The URL to redirect the request to. TargetURL RedirectRuleActionParametersFromValueTargetURL `json:"target_url"` JSON redirectRuleActionParametersFromValueJSON `json:"-"` }
Serve a redirect based on the request properties.
func (*RedirectRuleActionParametersFromValue) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromValue) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromValueParam ¶
type RedirectRuleActionParametersFromValueParam struct { // Keep the query string of the original request. PreserveQueryString param.Field[bool] `json:"preserve_query_string"` // The status code to be used for the redirect. StatusCode param.Field[RedirectRuleActionParametersFromValueStatusCode] `json:"status_code"` // The URL to redirect the request to. TargetURL param.Field[RedirectRuleActionParametersFromValueTargetURLUnionParam] `json:"target_url"` }
Serve a redirect based on the request properties.
func (RedirectRuleActionParametersFromValueParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromValueParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValueStatusCode ¶
type RedirectRuleActionParametersFromValueStatusCode float64
The status code to be used for the redirect.
const ( RedirectRuleActionParametersFromValueStatusCode301 RedirectRuleActionParametersFromValueStatusCode = 301 RedirectRuleActionParametersFromValueStatusCode302 RedirectRuleActionParametersFromValueStatusCode = 302 RedirectRuleActionParametersFromValueStatusCode303 RedirectRuleActionParametersFromValueStatusCode = 303 RedirectRuleActionParametersFromValueStatusCode307 RedirectRuleActionParametersFromValueStatusCode = 307 RedirectRuleActionParametersFromValueStatusCode308 RedirectRuleActionParametersFromValueStatusCode = 308 )
func (RedirectRuleActionParametersFromValueStatusCode) IsKnown ¶
func (r RedirectRuleActionParametersFromValueStatusCode) IsKnown() bool
type RedirectRuleActionParametersFromValueTargetURL ¶
type RedirectRuleActionParametersFromValueTargetURL struct { // The URL to redirect the request to. Value string `json:"value"` // An expression to evaluate to get the URL to redirect the request to. Expression string `json:"expression"` JSON redirectRuleActionParametersFromValueTargetURLJSON `json:"-"` // contains filtered or unexported fields }
The URL to redirect the request to.
func (*RedirectRuleActionParametersFromValueTargetURL) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromValueTargetURL) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect ¶
type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect struct { // An expression to evaluate to get the URL to redirect the request to. Expression string `json:"expression"` JSON redirectRuleActionParametersFromValueTargetURLDynamicURLRedirectJSON `json:"-"` }
func (*RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam ¶
type RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam struct { // An expression to evaluate to get the URL to redirect the request to. Expression param.Field[string] `json:"expression"` }
func (RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValueTargetURLParam ¶
type RedirectRuleActionParametersFromValueTargetURLParam struct { // The URL to redirect the request to. Value param.Field[string] `json:"value"` // An expression to evaluate to get the URL to redirect the request to. Expression param.Field[string] `json:"expression"` }
The URL to redirect the request to.
func (RedirectRuleActionParametersFromValueTargetURLParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromValueTargetURLParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect ¶
type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect struct { // The URL to redirect the request to. Value string `json:"value"` JSON redirectRuleActionParametersFromValueTargetURLStaticURLRedirectJSON `json:"-"` }
func (*RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect) UnmarshalJSON ¶
func (r *RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect) UnmarshalJSON(data []byte) (err error)
type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam ¶
type RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam struct { // The URL to redirect the request to. Value param.Field[string] `json:"value"` }
func (RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam) MarshalJSON ¶
func (r RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam) MarshalJSON() (data []byte, err error)
type RedirectRuleActionParametersFromValueTargetURLUnion ¶
type RedirectRuleActionParametersFromValueTargetURLUnion interface {
// contains filtered or unexported methods
}
The URL to redirect the request to.
Union satisfied by rulesets.RedirectRuleActionParametersFromValueTargetURLStaticURLRedirect or rulesets.RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirect.
type RedirectRuleActionParametersFromValueTargetURLUnionParam ¶
type RedirectRuleActionParametersFromValueTargetURLUnionParam interface {
// contains filtered or unexported methods
}
The URL to redirect the request to.
Satisfied by rulesets.RedirectRuleActionParametersFromValueTargetURLStaticURLRedirectParam, rulesets.RedirectRuleActionParametersFromValueTargetURLDynamicURLRedirectParam, RedirectRuleActionParametersFromValueTargetURLParam.
type RedirectRuleActionParametersParam ¶
type RedirectRuleActionParametersParam struct { // Serve a redirect based on a bulk list lookup. FromList param.Field[RedirectRuleActionParametersFromListParam] `json:"from_list"` // Serve a redirect based on the request properties. FromValue param.Field[RedirectRuleActionParametersFromValueParam] `json:"from_value"` }
The parameters configuring the rule's action.
func (RedirectRuleActionParametersParam) MarshalJSON ¶
func (r RedirectRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type RedirectRuleParam ¶
type RedirectRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[RedirectRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[RedirectRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (RedirectRuleParam) MarshalJSON ¶
func (r RedirectRuleParam) MarshalJSON() (data []byte, err error)
type RewriteRule ¶
type RewriteRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action RewriteRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters RewriteRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON rewriteRuleJSON `json:"-"` }
func (*RewriteRule) UnmarshalJSON ¶
func (r *RewriteRule) UnmarshalJSON(data []byte) (err error)
type RewriteRuleAction ¶
type RewriteRuleAction string
The action to perform when the rule matches.
const (
RewriteRuleActionRewrite RewriteRuleAction = "rewrite"
)
func (RewriteRuleAction) IsKnown ¶
func (r RewriteRuleAction) IsKnown() bool
type RewriteRuleActionParameters ¶
type RewriteRuleActionParameters struct { // Map of request headers to modify. Headers map[string]RewriteRuleActionParametersHeader `json:"headers"` // URI to rewrite the request to. URI RewriteRuleActionParametersURI `json:"uri"` JSON rewriteRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*RewriteRuleActionParameters) UnmarshalJSON ¶
func (r *RewriteRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeader ¶
type RewriteRuleActionParametersHeader struct { Operation RewriteRuleActionParametersHeadersOperation `json:"operation,required"` // Static value for the header. Value string `json:"value"` // Expression for the header value. Expression string `json:"expression"` JSON rewriteRuleActionParametersHeaderJSON `json:"-"` // contains filtered or unexported fields }
Remove the header from the request.
func (RewriteRuleActionParametersHeader) AsUnion ¶
func (r RewriteRuleActionParametersHeader) AsUnion() RewriteRuleActionParametersHeadersUnion
func (*RewriteRuleActionParametersHeader) UnmarshalJSON ¶
func (r *RewriteRuleActionParametersHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeaderParam ¶
type RewriteRuleActionParametersHeaderParam struct { Operation param.Field[RewriteRuleActionParametersHeadersOperation] `json:"operation,required"` // Static value for the header. Value param.Field[string] `json:"value"` // Expression for the header value. Expression param.Field[string] `json:"expression"` }
Remove the header from the request.
func (RewriteRuleActionParametersHeaderParam) MarshalJSON ¶
func (r RewriteRuleActionParametersHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersDynamicHeader ¶
type RewriteRuleActionParametersHeadersDynamicHeader struct { // Expression for the header value. Expression string `json:"expression,required"` Operation RewriteRuleActionParametersHeadersDynamicHeaderOperation `json:"operation,required"` JSON rewriteRuleActionParametersHeadersDynamicHeaderJSON `json:"-"` }
Set a request header with a dynamic value.
func (*RewriteRuleActionParametersHeadersDynamicHeader) UnmarshalJSON ¶
func (r *RewriteRuleActionParametersHeadersDynamicHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeadersDynamicHeaderOperation ¶
type RewriteRuleActionParametersHeadersDynamicHeaderOperation string
const (
RewriteRuleActionParametersHeadersDynamicHeaderOperationSet RewriteRuleActionParametersHeadersDynamicHeaderOperation = "set"
)
func (RewriteRuleActionParametersHeadersDynamicHeaderOperation) IsKnown ¶
func (r RewriteRuleActionParametersHeadersDynamicHeaderOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersDynamicHeaderParam ¶
type RewriteRuleActionParametersHeadersDynamicHeaderParam struct { // Expression for the header value. Expression param.Field[string] `json:"expression,required"` Operation param.Field[RewriteRuleActionParametersHeadersDynamicHeaderOperation] `json:"operation,required"` }
Set a request header with a dynamic value.
func (RewriteRuleActionParametersHeadersDynamicHeaderParam) MarshalJSON ¶
func (r RewriteRuleActionParametersHeadersDynamicHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersOperation ¶
type RewriteRuleActionParametersHeadersOperation string
const ( RewriteRuleActionParametersHeadersOperationRemove RewriteRuleActionParametersHeadersOperation = "remove" RewriteRuleActionParametersHeadersOperationSet RewriteRuleActionParametersHeadersOperation = "set" )
func (RewriteRuleActionParametersHeadersOperation) IsKnown ¶
func (r RewriteRuleActionParametersHeadersOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersRemoveHeader ¶
type RewriteRuleActionParametersHeadersRemoveHeader struct { Operation RewriteRuleActionParametersHeadersRemoveHeaderOperation `json:"operation,required"` JSON rewriteRuleActionParametersHeadersRemoveHeaderJSON `json:"-"` }
Remove the header from the request.
func (*RewriteRuleActionParametersHeadersRemoveHeader) UnmarshalJSON ¶
func (r *RewriteRuleActionParametersHeadersRemoveHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeadersRemoveHeaderOperation ¶
type RewriteRuleActionParametersHeadersRemoveHeaderOperation string
const (
RewriteRuleActionParametersHeadersRemoveHeaderOperationRemove RewriteRuleActionParametersHeadersRemoveHeaderOperation = "remove"
)
func (RewriteRuleActionParametersHeadersRemoveHeaderOperation) IsKnown ¶
func (r RewriteRuleActionParametersHeadersRemoveHeaderOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersRemoveHeaderParam ¶
type RewriteRuleActionParametersHeadersRemoveHeaderParam struct {
Operation param.Field[RewriteRuleActionParametersHeadersRemoveHeaderOperation] `json:"operation,required"`
}
Remove the header from the request.
func (RewriteRuleActionParametersHeadersRemoveHeaderParam) MarshalJSON ¶
func (r RewriteRuleActionParametersHeadersRemoveHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersStaticHeader ¶
type RewriteRuleActionParametersHeadersStaticHeader struct { Operation RewriteRuleActionParametersHeadersStaticHeaderOperation `json:"operation,required"` // Static value for the header. Value string `json:"value,required"` JSON rewriteRuleActionParametersHeadersStaticHeaderJSON `json:"-"` }
Set a request header with a static value.
func (*RewriteRuleActionParametersHeadersStaticHeader) UnmarshalJSON ¶
func (r *RewriteRuleActionParametersHeadersStaticHeader) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersHeadersStaticHeaderOperation ¶
type RewriteRuleActionParametersHeadersStaticHeaderOperation string
const (
RewriteRuleActionParametersHeadersStaticHeaderOperationSet RewriteRuleActionParametersHeadersStaticHeaderOperation = "set"
)
func (RewriteRuleActionParametersHeadersStaticHeaderOperation) IsKnown ¶
func (r RewriteRuleActionParametersHeadersStaticHeaderOperation) IsKnown() bool
type RewriteRuleActionParametersHeadersStaticHeaderParam ¶
type RewriteRuleActionParametersHeadersStaticHeaderParam struct { Operation param.Field[RewriteRuleActionParametersHeadersStaticHeaderOperation] `json:"operation,required"` // Static value for the header. Value param.Field[string] `json:"value,required"` }
Set a request header with a static value.
func (RewriteRuleActionParametersHeadersStaticHeaderParam) MarshalJSON ¶
func (r RewriteRuleActionParametersHeadersStaticHeaderParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersHeadersUnion ¶
type RewriteRuleActionParametersHeadersUnion interface {
// contains filtered or unexported methods
}
Remove the header from the request.
Union satisfied by rulesets.RewriteRuleActionParametersHeadersRemoveHeader, rulesets.RewriteRuleActionParametersHeadersStaticHeader or rulesets.RewriteRuleActionParametersHeadersDynamicHeader.
type RewriteRuleActionParametersHeadersUnionParam ¶
type RewriteRuleActionParametersHeadersUnionParam interface {
// contains filtered or unexported methods
}
Remove the header from the request.
Satisfied by rulesets.RewriteRuleActionParametersHeadersRemoveHeaderParam, rulesets.RewriteRuleActionParametersHeadersStaticHeaderParam, rulesets.RewriteRuleActionParametersHeadersDynamicHeaderParam, RewriteRuleActionParametersHeaderParam.
type RewriteRuleActionParametersParam ¶
type RewriteRuleActionParametersParam struct { // Map of request headers to modify. Headers param.Field[map[string]RewriteRuleActionParametersHeadersUnionParam] `json:"headers"` // URI to rewrite the request to. URI param.Field[RewriteRuleActionParametersURIParam] `json:"uri"` }
The parameters configuring the rule's action.
func (RewriteRuleActionParametersParam) MarshalJSON ¶
func (r RewriteRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type RewriteRuleActionParametersURI ¶
type RewriteRuleActionParametersURI struct { // Path portion rewrite. Path RewriteURIPart `json:"path"` // Query portion rewrite. Query RewriteURIPart `json:"query"` JSON rewriteRuleActionParametersURIJSON `json:"-"` }
URI to rewrite the request to.
func (*RewriteRuleActionParametersURI) UnmarshalJSON ¶
func (r *RewriteRuleActionParametersURI) UnmarshalJSON(data []byte) (err error)
type RewriteRuleActionParametersURIParam ¶
type RewriteRuleActionParametersURIParam struct { // Path portion rewrite. Path param.Field[RewriteURIPartUnionParam] `json:"path"` // Query portion rewrite. Query param.Field[RewriteURIPartUnionParam] `json:"query"` }
URI to rewrite the request to.
func (RewriteRuleActionParametersURIParam) MarshalJSON ¶
func (r RewriteRuleActionParametersURIParam) MarshalJSON() (data []byte, err error)
type RewriteRuleParam ¶
type RewriteRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[RewriteRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[RewriteRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (RewriteRuleParam) MarshalJSON ¶
func (r RewriteRuleParam) MarshalJSON() (data []byte, err error)
type RewriteURIPart ¶
type RewriteURIPart struct { // Predefined replacement value. Value string `json:"value"` // Expression to evaluate for the replacement value. Expression string `json:"expression"` JSON rewriteURIPartJSON `json:"-"` // contains filtered or unexported fields }
func (RewriteURIPart) AsUnion ¶
func (r RewriteURIPart) AsUnion() RewriteURIPartUnion
func (*RewriteURIPart) UnmarshalJSON ¶
func (r *RewriteURIPart) UnmarshalJSON(data []byte) (err error)
type RewriteURIPartDynamicValue ¶
type RewriteURIPartDynamicValue struct { // Expression to evaluate for the replacement value. Expression string `json:"expression,required"` JSON rewriteURIPartDynamicValueJSON `json:"-"` }
func (*RewriteURIPartDynamicValue) UnmarshalJSON ¶
func (r *RewriteURIPartDynamicValue) UnmarshalJSON(data []byte) (err error)
type RewriteURIPartDynamicValueParam ¶
type RewriteURIPartDynamicValueParam struct { // Expression to evaluate for the replacement value. Expression param.Field[string] `json:"expression,required"` }
func (RewriteURIPartDynamicValueParam) MarshalJSON ¶
func (r RewriteURIPartDynamicValueParam) MarshalJSON() (data []byte, err error)
type RewriteURIPartParam ¶
type RewriteURIPartParam struct { // Predefined replacement value. Value param.Field[string] `json:"value"` // Expression to evaluate for the replacement value. Expression param.Field[string] `json:"expression"` }
func (RewriteURIPartParam) MarshalJSON ¶
func (r RewriteURIPartParam) MarshalJSON() (data []byte, err error)
type RewriteURIPartStaticValue ¶
type RewriteURIPartStaticValue struct { // Predefined replacement value. Value string `json:"value,required"` JSON rewriteURIPartStaticValueJSON `json:"-"` }
func (*RewriteURIPartStaticValue) UnmarshalJSON ¶
func (r *RewriteURIPartStaticValue) UnmarshalJSON(data []byte) (err error)
type RewriteURIPartStaticValueParam ¶
type RewriteURIPartStaticValueParam struct { // Predefined replacement value. Value param.Field[string] `json:"value,required"` }
func (RewriteURIPartStaticValueParam) MarshalJSON ¶
func (r RewriteURIPartStaticValueParam) MarshalJSON() (data []byte, err error)
type RewriteURIPartUnion ¶
type RewriteURIPartUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.RewriteURIPartStaticValue or rulesets.RewriteURIPartDynamicValue.
type RewriteURIPartUnionParam ¶
type RewriteURIPartUnionParam interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.RewriteURIPartStaticValueParam, rulesets.RewriteURIPartDynamicValueParam, RewriteURIPartParam.
type RouteRule ¶
type RouteRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action RouteRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters RouteRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON routeRuleJSON `json:"-"` }
func (*RouteRule) UnmarshalJSON ¶
type RouteRuleAction ¶
type RouteRuleAction string
The action to perform when the rule matches.
const (
RouteRuleActionRoute RouteRuleAction = "route"
)
func (RouteRuleAction) IsKnown ¶
func (r RouteRuleAction) IsKnown() bool
type RouteRuleActionParameters ¶
type RouteRuleActionParameters struct { // Rewrite the HTTP Host header. HostHeader string `json:"host_header"` // Override the IP/TCP destination. Origin RouteRuleActionParametersOrigin `json:"origin"` // Override the Server Name Indication (SNI). Sni RouteRuleActionParametersSni `json:"sni"` JSON routeRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*RouteRuleActionParameters) UnmarshalJSON ¶
func (r *RouteRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type RouteRuleActionParametersOrigin ¶
type RouteRuleActionParametersOrigin struct { // Override the resolved hostname. Host string `json:"host"` // Override the destination port. Port float64 `json:"port"` JSON routeRuleActionParametersOriginJSON `json:"-"` }
Override the IP/TCP destination.
func (*RouteRuleActionParametersOrigin) UnmarshalJSON ¶
func (r *RouteRuleActionParametersOrigin) UnmarshalJSON(data []byte) (err error)
type RouteRuleActionParametersOriginParam ¶
type RouteRuleActionParametersOriginParam struct { // Override the resolved hostname. Host param.Field[string] `json:"host"` // Override the destination port. Port param.Field[float64] `json:"port"` }
Override the IP/TCP destination.
func (RouteRuleActionParametersOriginParam) MarshalJSON ¶
func (r RouteRuleActionParametersOriginParam) MarshalJSON() (data []byte, err error)
type RouteRuleActionParametersParam ¶
type RouteRuleActionParametersParam struct { // Rewrite the HTTP Host header. HostHeader param.Field[string] `json:"host_header"` // Override the IP/TCP destination. Origin param.Field[RouteRuleActionParametersOriginParam] `json:"origin"` // Override the Server Name Indication (SNI). Sni param.Field[RouteRuleActionParametersSniParam] `json:"sni"` }
The parameters configuring the rule's action.
func (RouteRuleActionParametersParam) MarshalJSON ¶
func (r RouteRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type RouteRuleActionParametersSni ¶
type RouteRuleActionParametersSni struct { // The SNI override. Value string `json:"value,required"` JSON routeRuleActionParametersSniJSON `json:"-"` }
Override the Server Name Indication (SNI).
func (*RouteRuleActionParametersSni) UnmarshalJSON ¶
func (r *RouteRuleActionParametersSni) UnmarshalJSON(data []byte) (err error)
type RouteRuleActionParametersSniParam ¶
type RouteRuleActionParametersSniParam struct { // The SNI override. Value param.Field[string] `json:"value,required"` }
Override the Server Name Indication (SNI).
func (RouteRuleActionParametersSniParam) MarshalJSON ¶
func (r RouteRuleActionParametersSniParam) MarshalJSON() (data []byte, err error)
type RouteRuleParam ¶
type RouteRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[RouteRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[RouteRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (RouteRuleParam) MarshalJSON ¶
func (r RouteRuleParam) MarshalJSON() (data []byte, err error)
type RuleDeleteParams ¶
type RuleDeleteResponse ¶
type RuleDeleteResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind RuleDeleteResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase RuleDeleteResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []RuleDeleteResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON ruleDeleteResponseJSON `json:"-"` }
A ruleset object.
func (*RuleDeleteResponse) UnmarshalJSON ¶
func (r *RuleDeleteResponse) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelope ¶
type RuleDeleteResponseEnvelope struct { // A list of error messages. Errors []RuleDeleteResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []RuleDeleteResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result RuleDeleteResponse `json:"result,required"` // Whether the API call was successful. Success RuleDeleteResponseEnvelopeSuccess `json:"success,required"` JSON ruleDeleteResponseEnvelopeJSON `json:"-"` }
A response object.
func (*RuleDeleteResponseEnvelope) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeErrors ¶
type RuleDeleteResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RuleDeleteResponseEnvelopeErrorsSource `json:"source"` JSON ruleDeleteResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*RuleDeleteResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeErrorsSource ¶
type RuleDeleteResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON ruleDeleteResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*RuleDeleteResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeMessages ¶
type RuleDeleteResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RuleDeleteResponseEnvelopeMessagesSource `json:"source"` JSON ruleDeleteResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*RuleDeleteResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeMessagesSource ¶
type RuleDeleteResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON ruleDeleteResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*RuleDeleteResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *RuleDeleteResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseEnvelopeSuccess ¶
type RuleDeleteResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
RuleDeleteResponseEnvelopeSuccessTrue RuleDeleteResponseEnvelopeSuccess = true
)
func (RuleDeleteResponseEnvelopeSuccess) IsKnown ¶
func (r RuleDeleteResponseEnvelopeSuccess) IsKnown() bool
type RuleDeleteResponseKind ¶
type RuleDeleteResponseKind string
The kind of the ruleset.
const ( RuleDeleteResponseKindManaged RuleDeleteResponseKind = "managed" RuleDeleteResponseKindCustom RuleDeleteResponseKind = "custom" RuleDeleteResponseKindRoot RuleDeleteResponseKind = "root" RuleDeleteResponseKindZone RuleDeleteResponseKind = "zone" )
func (RuleDeleteResponseKind) IsKnown ¶
func (r RuleDeleteResponseKind) IsKnown() bool
type RuleDeleteResponsePhase ¶
type RuleDeleteResponsePhase string
The phase of the ruleset.
const ( RuleDeleteResponsePhaseDDoSL4 RuleDeleteResponsePhase = "ddos_l4" RuleDeleteResponsePhaseDDoSL7 RuleDeleteResponsePhase = "ddos_l7" RuleDeleteResponsePhaseHTTPConfigSettings RuleDeleteResponsePhase = "http_config_settings" RuleDeleteResponsePhaseHTTPCustomErrors RuleDeleteResponsePhase = "http_custom_errors" RuleDeleteResponsePhaseHTTPLogCustomFields RuleDeleteResponsePhase = "http_log_custom_fields" RuleDeleteResponsePhaseHTTPRatelimit RuleDeleteResponsePhase = "http_ratelimit" RuleDeleteResponsePhaseHTTPRequestCacheSettings RuleDeleteResponsePhase = "http_request_cache_settings" RuleDeleteResponsePhaseHTTPRequestDynamicRedirect RuleDeleteResponsePhase = "http_request_dynamic_redirect" RuleDeleteResponsePhaseHTTPRequestFirewallCustom RuleDeleteResponsePhase = "http_request_firewall_custom" RuleDeleteResponsePhaseHTTPRequestFirewallManaged RuleDeleteResponsePhase = "http_request_firewall_managed" RuleDeleteResponsePhaseHTTPRequestLateTransform RuleDeleteResponsePhase = "http_request_late_transform" RuleDeleteResponsePhaseHTTPRequestOrigin RuleDeleteResponsePhase = "http_request_origin" RuleDeleteResponsePhaseHTTPRequestRedirect RuleDeleteResponsePhase = "http_request_redirect" RuleDeleteResponsePhaseHTTPRequestSanitize RuleDeleteResponsePhase = "http_request_sanitize" RuleDeleteResponsePhaseHTTPRequestSBFM RuleDeleteResponsePhase = "http_request_sbfm" RuleDeleteResponsePhaseHTTPRequestSelectConfiguration RuleDeleteResponsePhase = "http_request_select_configuration" RuleDeleteResponsePhaseHTTPRequestTransform RuleDeleteResponsePhase = "http_request_transform" RuleDeleteResponsePhaseHTTPResponseCompression RuleDeleteResponsePhase = "http_response_compression" RuleDeleteResponsePhaseHTTPResponseFirewallManaged RuleDeleteResponsePhase = "http_response_firewall_managed" RuleDeleteResponsePhaseHTTPResponseHeadersTransform RuleDeleteResponsePhase = "http_response_headers_transform" RuleDeleteResponsePhaseMagicTransit RuleDeleteResponsePhase = "magic_transit" RuleDeleteResponsePhaseMagicTransitIDsManaged RuleDeleteResponsePhase = "magic_transit_ids_managed" RuleDeleteResponsePhaseMagicTransitManaged RuleDeleteResponsePhase = "magic_transit_managed" )
func (RuleDeleteResponsePhase) IsKnown ¶
func (r RuleDeleteResponsePhase) IsKnown() bool
type RuleDeleteResponseRule ¶
type RuleDeleteResponseRule struct { // The action to perform when the rule matches. Action RuleDeleteResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON ruleDeleteResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (RuleDeleteResponseRule) AsUnion ¶
func (r RuleDeleteResponseRule) AsUnion() RuleDeleteResponseRulesUnion
func (*RuleDeleteResponseRule) UnmarshalJSON ¶
func (r *RuleDeleteResponseRule) UnmarshalJSON(data []byte) (err error)
type RuleDeleteResponseRulesAction ¶
type RuleDeleteResponseRulesAction string
The action to perform when the rule matches.
const ( RuleDeleteResponseRulesActionBlock RuleDeleteResponseRulesAction = "block" RuleDeleteResponseRulesActionChallenge RuleDeleteResponseRulesAction = "challenge" RuleDeleteResponseRulesActionCompressResponse RuleDeleteResponseRulesAction = "compress_response" RuleDeleteResponseRulesActionExecute RuleDeleteResponseRulesAction = "execute" RuleDeleteResponseRulesActionJSChallenge RuleDeleteResponseRulesAction = "js_challenge" RuleDeleteResponseRulesActionLog RuleDeleteResponseRulesAction = "log" RuleDeleteResponseRulesActionManagedChallenge RuleDeleteResponseRulesAction = "managed_challenge" RuleDeleteResponseRulesActionRedirect RuleDeleteResponseRulesAction = "redirect" RuleDeleteResponseRulesActionRewrite RuleDeleteResponseRulesAction = "rewrite" RuleDeleteResponseRulesActionRoute RuleDeleteResponseRulesAction = "route" RuleDeleteResponseRulesActionScore RuleDeleteResponseRulesAction = "score" RuleDeleteResponseRulesActionServeError RuleDeleteResponseRulesAction = "serve_error" RuleDeleteResponseRulesActionSetConfig RuleDeleteResponseRulesAction = "set_config" RuleDeleteResponseRulesActionSkip RuleDeleteResponseRulesAction = "skip" RuleDeleteResponseRulesActionSetCacheSettings RuleDeleteResponseRulesAction = "set_cache_settings" )
func (RuleDeleteResponseRulesAction) IsKnown ¶
func (r RuleDeleteResponseRulesAction) IsKnown() bool
type RuleDeleteResponseRulesUnion ¶
type RuleDeleteResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type RuleEditParams ¶
type RuleEditParams struct { // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` // An object configuring where the rule will be placed. Position param.Field[RuleEditParamsPositionUnion] `json:"position"` }
func (RuleEditParams) MarshalJSON ¶
func (r RuleEditParams) MarshalJSON() (data []byte, err error)
type RuleEditParamsPosition ¶
type RuleEditParamsPosition struct { // The ID of another rule to place the rule before. An empty value causes the rule // to be placed at the top. Before param.Field[string] `json:"before"` // The ID of another rule to place the rule after. An empty value causes the rule // to be placed at the bottom. After param.Field[string] `json:"after"` // An index at which to place the rule, where index 1 is the first rule. Index param.Field[float64] `json:"index"` }
An object configuring where the rule will be placed.
func (RuleEditParamsPosition) MarshalJSON ¶
func (r RuleEditParamsPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsPositionAfterPosition ¶
type RuleEditParamsPositionAfterPosition struct { // The ID of another rule to place the rule after. An empty value causes the rule // to be placed at the bottom. After param.Field[string] `json:"after"` }
An object configuring where the rule will be placed.
func (RuleEditParamsPositionAfterPosition) MarshalJSON ¶
func (r RuleEditParamsPositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsPositionBeforePosition ¶
type RuleEditParamsPositionBeforePosition struct { // The ID of another rule to place the rule before. An empty value causes the rule // to be placed at the top. Before param.Field[string] `json:"before"` }
An object configuring where the rule will be placed.
func (RuleEditParamsPositionBeforePosition) MarshalJSON ¶
func (r RuleEditParamsPositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsPositionIndexPosition ¶
type RuleEditParamsPositionIndexPosition struct { // An index at which to place the rule, where index 1 is the first rule. Index param.Field[float64] `json:"index"` }
An object configuring where the rule will be placed.
func (RuleEditParamsPositionIndexPosition) MarshalJSON ¶
func (r RuleEditParamsPositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleEditParamsPositionUnion ¶
type RuleEditParamsPositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleEditParamsPositionBeforePosition, rulesets.RuleEditParamsPositionAfterPosition, rulesets.RuleEditParamsPositionIndexPosition, RuleEditParamsPosition.
type RuleEditResponse ¶
type RuleEditResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind RuleEditResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase RuleEditResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []RuleEditResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON ruleEditResponseJSON `json:"-"` }
A ruleset object.
func (*RuleEditResponse) UnmarshalJSON ¶
func (r *RuleEditResponse) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelope ¶
type RuleEditResponseEnvelope struct { // A list of error messages. Errors []RuleEditResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []RuleEditResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result RuleEditResponse `json:"result,required"` // Whether the API call was successful. Success RuleEditResponseEnvelopeSuccess `json:"success,required"` JSON ruleEditResponseEnvelopeJSON `json:"-"` }
A response object.
func (*RuleEditResponseEnvelope) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeErrors ¶
type RuleEditResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RuleEditResponseEnvelopeErrorsSource `json:"source"` JSON ruleEditResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*RuleEditResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeErrorsSource ¶
type RuleEditResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON ruleEditResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*RuleEditResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeMessages ¶
type RuleEditResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RuleEditResponseEnvelopeMessagesSource `json:"source"` JSON ruleEditResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*RuleEditResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeMessagesSource ¶
type RuleEditResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON ruleEditResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*RuleEditResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *RuleEditResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseEnvelopeSuccess ¶
type RuleEditResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
RuleEditResponseEnvelopeSuccessTrue RuleEditResponseEnvelopeSuccess = true
)
func (RuleEditResponseEnvelopeSuccess) IsKnown ¶
func (r RuleEditResponseEnvelopeSuccess) IsKnown() bool
type RuleEditResponseKind ¶
type RuleEditResponseKind string
The kind of the ruleset.
const ( RuleEditResponseKindManaged RuleEditResponseKind = "managed" RuleEditResponseKindCustom RuleEditResponseKind = "custom" RuleEditResponseKindRoot RuleEditResponseKind = "root" RuleEditResponseKindZone RuleEditResponseKind = "zone" )
func (RuleEditResponseKind) IsKnown ¶
func (r RuleEditResponseKind) IsKnown() bool
type RuleEditResponsePhase ¶
type RuleEditResponsePhase string
The phase of the ruleset.
const ( RuleEditResponsePhaseDDoSL4 RuleEditResponsePhase = "ddos_l4" RuleEditResponsePhaseDDoSL7 RuleEditResponsePhase = "ddos_l7" RuleEditResponsePhaseHTTPConfigSettings RuleEditResponsePhase = "http_config_settings" RuleEditResponsePhaseHTTPCustomErrors RuleEditResponsePhase = "http_custom_errors" RuleEditResponsePhaseHTTPLogCustomFields RuleEditResponsePhase = "http_log_custom_fields" RuleEditResponsePhaseHTTPRatelimit RuleEditResponsePhase = "http_ratelimit" RuleEditResponsePhaseHTTPRequestCacheSettings RuleEditResponsePhase = "http_request_cache_settings" RuleEditResponsePhaseHTTPRequestDynamicRedirect RuleEditResponsePhase = "http_request_dynamic_redirect" RuleEditResponsePhaseHTTPRequestFirewallCustom RuleEditResponsePhase = "http_request_firewall_custom" RuleEditResponsePhaseHTTPRequestFirewallManaged RuleEditResponsePhase = "http_request_firewall_managed" RuleEditResponsePhaseHTTPRequestLateTransform RuleEditResponsePhase = "http_request_late_transform" RuleEditResponsePhaseHTTPRequestOrigin RuleEditResponsePhase = "http_request_origin" RuleEditResponsePhaseHTTPRequestRedirect RuleEditResponsePhase = "http_request_redirect" RuleEditResponsePhaseHTTPRequestSanitize RuleEditResponsePhase = "http_request_sanitize" RuleEditResponsePhaseHTTPRequestSBFM RuleEditResponsePhase = "http_request_sbfm" RuleEditResponsePhaseHTTPRequestSelectConfiguration RuleEditResponsePhase = "http_request_select_configuration" RuleEditResponsePhaseHTTPRequestTransform RuleEditResponsePhase = "http_request_transform" RuleEditResponsePhaseHTTPResponseCompression RuleEditResponsePhase = "http_response_compression" RuleEditResponsePhaseHTTPResponseFirewallManaged RuleEditResponsePhase = "http_response_firewall_managed" RuleEditResponsePhaseHTTPResponseHeadersTransform RuleEditResponsePhase = "http_response_headers_transform" RuleEditResponsePhaseMagicTransit RuleEditResponsePhase = "magic_transit" RuleEditResponsePhaseMagicTransitIDsManaged RuleEditResponsePhase = "magic_transit_ids_managed" RuleEditResponsePhaseMagicTransitManaged RuleEditResponsePhase = "magic_transit_managed" )
func (RuleEditResponsePhase) IsKnown ¶
func (r RuleEditResponsePhase) IsKnown() bool
type RuleEditResponseRule ¶
type RuleEditResponseRule struct { // The action to perform when the rule matches. Action RuleEditResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON ruleEditResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (RuleEditResponseRule) AsUnion ¶
func (r RuleEditResponseRule) AsUnion() RuleEditResponseRulesUnion
func (*RuleEditResponseRule) UnmarshalJSON ¶
func (r *RuleEditResponseRule) UnmarshalJSON(data []byte) (err error)
type RuleEditResponseRulesAction ¶
type RuleEditResponseRulesAction string
The action to perform when the rule matches.
const ( RuleEditResponseRulesActionBlock RuleEditResponseRulesAction = "block" RuleEditResponseRulesActionChallenge RuleEditResponseRulesAction = "challenge" RuleEditResponseRulesActionCompressResponse RuleEditResponseRulesAction = "compress_response" RuleEditResponseRulesActionExecute RuleEditResponseRulesAction = "execute" RuleEditResponseRulesActionJSChallenge RuleEditResponseRulesAction = "js_challenge" RuleEditResponseRulesActionLog RuleEditResponseRulesAction = "log" RuleEditResponseRulesActionManagedChallenge RuleEditResponseRulesAction = "managed_challenge" RuleEditResponseRulesActionRedirect RuleEditResponseRulesAction = "redirect" RuleEditResponseRulesActionRewrite RuleEditResponseRulesAction = "rewrite" RuleEditResponseRulesActionRoute RuleEditResponseRulesAction = "route" RuleEditResponseRulesActionScore RuleEditResponseRulesAction = "score" RuleEditResponseRulesActionServeError RuleEditResponseRulesAction = "serve_error" RuleEditResponseRulesActionSetConfig RuleEditResponseRulesAction = "set_config" RuleEditResponseRulesActionSkip RuleEditResponseRulesAction = "skip" RuleEditResponseRulesActionSetCacheSettings RuleEditResponseRulesAction = "set_cache_settings" )
func (RuleEditResponseRulesAction) IsKnown ¶
func (r RuleEditResponseRulesAction) IsKnown() bool
type RuleEditResponseRulesUnion ¶
type RuleEditResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type RuleNewParams ¶
type RuleNewParams struct { // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` // An object configuring where the rule will be placed. Position param.Field[RuleNewParamsPositionUnion] `json:"position"` }
func (RuleNewParams) MarshalJSON ¶
func (r RuleNewParams) MarshalJSON() (data []byte, err error)
type RuleNewParamsPosition ¶
type RuleNewParamsPosition struct { // The ID of another rule to place the rule before. An empty value causes the rule // to be placed at the top. Before param.Field[string] `json:"before"` // The ID of another rule to place the rule after. An empty value causes the rule // to be placed at the bottom. After param.Field[string] `json:"after"` // An index at which to place the rule, where index 1 is the first rule. Index param.Field[float64] `json:"index"` }
An object configuring where the rule will be placed.
func (RuleNewParamsPosition) MarshalJSON ¶
func (r RuleNewParamsPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsPositionAfterPosition ¶
type RuleNewParamsPositionAfterPosition struct { // The ID of another rule to place the rule after. An empty value causes the rule // to be placed at the bottom. After param.Field[string] `json:"after"` }
An object configuring where the rule will be placed.
func (RuleNewParamsPositionAfterPosition) MarshalJSON ¶
func (r RuleNewParamsPositionAfterPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsPositionBeforePosition ¶
type RuleNewParamsPositionBeforePosition struct { // The ID of another rule to place the rule before. An empty value causes the rule // to be placed at the top. Before param.Field[string] `json:"before"` }
An object configuring where the rule will be placed.
func (RuleNewParamsPositionBeforePosition) MarshalJSON ¶
func (r RuleNewParamsPositionBeforePosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsPositionIndexPosition ¶
type RuleNewParamsPositionIndexPosition struct { // An index at which to place the rule, where index 1 is the first rule. Index param.Field[float64] `json:"index"` }
An object configuring where the rule will be placed.
func (RuleNewParamsPositionIndexPosition) MarshalJSON ¶
func (r RuleNewParamsPositionIndexPosition) MarshalJSON() (data []byte, err error)
type RuleNewParamsPositionUnion ¶
type RuleNewParamsPositionUnion interface {
// contains filtered or unexported methods
}
An object configuring where the rule will be placed.
Satisfied by rulesets.RuleNewParamsPositionBeforePosition, rulesets.RuleNewParamsPositionAfterPosition, rulesets.RuleNewParamsPositionIndexPosition, RuleNewParamsPosition.
type RuleNewResponse ¶
type RuleNewResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind RuleNewResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase RuleNewResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []RuleNewResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON ruleNewResponseJSON `json:"-"` }
A ruleset object.
func (*RuleNewResponse) UnmarshalJSON ¶
func (r *RuleNewResponse) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelope ¶
type RuleNewResponseEnvelope struct { // A list of error messages. Errors []RuleNewResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []RuleNewResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result RuleNewResponse `json:"result,required"` // Whether the API call was successful. Success RuleNewResponseEnvelopeSuccess `json:"success,required"` JSON ruleNewResponseEnvelopeJSON `json:"-"` }
A response object.
func (*RuleNewResponseEnvelope) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeErrors ¶
type RuleNewResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RuleNewResponseEnvelopeErrorsSource `json:"source"` JSON ruleNewResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*RuleNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeErrorsSource ¶
type RuleNewResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON ruleNewResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*RuleNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeMessages ¶
type RuleNewResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RuleNewResponseEnvelopeMessagesSource `json:"source"` JSON ruleNewResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*RuleNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeMessagesSource ¶
type RuleNewResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON ruleNewResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*RuleNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *RuleNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseEnvelopeSuccess ¶
type RuleNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
RuleNewResponseEnvelopeSuccessTrue RuleNewResponseEnvelopeSuccess = true
)
func (RuleNewResponseEnvelopeSuccess) IsKnown ¶
func (r RuleNewResponseEnvelopeSuccess) IsKnown() bool
type RuleNewResponseKind ¶
type RuleNewResponseKind string
The kind of the ruleset.
const ( RuleNewResponseKindManaged RuleNewResponseKind = "managed" RuleNewResponseKindCustom RuleNewResponseKind = "custom" RuleNewResponseKindRoot RuleNewResponseKind = "root" RuleNewResponseKindZone RuleNewResponseKind = "zone" )
func (RuleNewResponseKind) IsKnown ¶
func (r RuleNewResponseKind) IsKnown() bool
type RuleNewResponsePhase ¶
type RuleNewResponsePhase string
The phase of the ruleset.
const ( RuleNewResponsePhaseDDoSL4 RuleNewResponsePhase = "ddos_l4" RuleNewResponsePhaseDDoSL7 RuleNewResponsePhase = "ddos_l7" RuleNewResponsePhaseHTTPConfigSettings RuleNewResponsePhase = "http_config_settings" RuleNewResponsePhaseHTTPCustomErrors RuleNewResponsePhase = "http_custom_errors" RuleNewResponsePhaseHTTPLogCustomFields RuleNewResponsePhase = "http_log_custom_fields" RuleNewResponsePhaseHTTPRatelimit RuleNewResponsePhase = "http_ratelimit" RuleNewResponsePhaseHTTPRequestCacheSettings RuleNewResponsePhase = "http_request_cache_settings" RuleNewResponsePhaseHTTPRequestDynamicRedirect RuleNewResponsePhase = "http_request_dynamic_redirect" RuleNewResponsePhaseHTTPRequestFirewallCustom RuleNewResponsePhase = "http_request_firewall_custom" RuleNewResponsePhaseHTTPRequestFirewallManaged RuleNewResponsePhase = "http_request_firewall_managed" RuleNewResponsePhaseHTTPRequestLateTransform RuleNewResponsePhase = "http_request_late_transform" RuleNewResponsePhaseHTTPRequestOrigin RuleNewResponsePhase = "http_request_origin" RuleNewResponsePhaseHTTPRequestRedirect RuleNewResponsePhase = "http_request_redirect" RuleNewResponsePhaseHTTPRequestSanitize RuleNewResponsePhase = "http_request_sanitize" RuleNewResponsePhaseHTTPRequestSBFM RuleNewResponsePhase = "http_request_sbfm" RuleNewResponsePhaseHTTPRequestSelectConfiguration RuleNewResponsePhase = "http_request_select_configuration" RuleNewResponsePhaseHTTPRequestTransform RuleNewResponsePhase = "http_request_transform" RuleNewResponsePhaseHTTPResponseCompression RuleNewResponsePhase = "http_response_compression" RuleNewResponsePhaseHTTPResponseFirewallManaged RuleNewResponsePhase = "http_response_firewall_managed" RuleNewResponsePhaseHTTPResponseHeadersTransform RuleNewResponsePhase = "http_response_headers_transform" RuleNewResponsePhaseMagicTransit RuleNewResponsePhase = "magic_transit" RuleNewResponsePhaseMagicTransitIDsManaged RuleNewResponsePhase = "magic_transit_ids_managed" RuleNewResponsePhaseMagicTransitManaged RuleNewResponsePhase = "magic_transit_managed" )
func (RuleNewResponsePhase) IsKnown ¶
func (r RuleNewResponsePhase) IsKnown() bool
type RuleNewResponseRule ¶
type RuleNewResponseRule struct { // The action to perform when the rule matches. Action RuleNewResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON ruleNewResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (RuleNewResponseRule) AsUnion ¶
func (r RuleNewResponseRule) AsUnion() RuleNewResponseRulesUnion
func (*RuleNewResponseRule) UnmarshalJSON ¶
func (r *RuleNewResponseRule) UnmarshalJSON(data []byte) (err error)
type RuleNewResponseRulesAction ¶
type RuleNewResponseRulesAction string
The action to perform when the rule matches.
const ( RuleNewResponseRulesActionBlock RuleNewResponseRulesAction = "block" RuleNewResponseRulesActionChallenge RuleNewResponseRulesAction = "challenge" RuleNewResponseRulesActionCompressResponse RuleNewResponseRulesAction = "compress_response" RuleNewResponseRulesActionExecute RuleNewResponseRulesAction = "execute" RuleNewResponseRulesActionJSChallenge RuleNewResponseRulesAction = "js_challenge" RuleNewResponseRulesActionLog RuleNewResponseRulesAction = "log" RuleNewResponseRulesActionManagedChallenge RuleNewResponseRulesAction = "managed_challenge" RuleNewResponseRulesActionRedirect RuleNewResponseRulesAction = "redirect" RuleNewResponseRulesActionRewrite RuleNewResponseRulesAction = "rewrite" RuleNewResponseRulesActionRoute RuleNewResponseRulesAction = "route" RuleNewResponseRulesActionScore RuleNewResponseRulesAction = "score" RuleNewResponseRulesActionServeError RuleNewResponseRulesAction = "serve_error" RuleNewResponseRulesActionSetConfig RuleNewResponseRulesAction = "set_config" RuleNewResponseRulesActionSkip RuleNewResponseRulesAction = "skip" RuleNewResponseRulesActionSetCacheSettings RuleNewResponseRulesAction = "set_cache_settings" )
func (RuleNewResponseRulesAction) IsKnown ¶
func (r RuleNewResponseRulesAction) IsKnown() bool
type RuleNewResponseRulesUnion ¶
type RuleNewResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type RuleService ¶
type RuleService struct {
Options []option.RequestOption
}
RuleService 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 NewRuleService method instead.
func NewRuleService ¶
func NewRuleService(opts ...option.RequestOption) (r *RuleService)
NewRuleService 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 (*RuleService) Delete ¶
func (r *RuleService) Delete(ctx context.Context, rulesetID string, ruleID string, body RuleDeleteParams, opts ...option.RequestOption) (res *RuleDeleteResponse, err error)
Deletes an existing rule from an account or zone ruleset.
func (*RuleService) Edit ¶
func (r *RuleService) Edit(ctx context.Context, rulesetID string, ruleID string, params RuleEditParams, opts ...option.RequestOption) (res *RuleEditResponse, err error)
Updates an existing rule in an account or zone ruleset.
func (*RuleService) New ¶
func (r *RuleService) New(ctx context.Context, rulesetID string, params RuleNewParams, opts ...option.RequestOption) (res *RuleNewResponse, err error)
Adds a new rule to an account or zone ruleset. The rule will be added to the end of the existing list of rules in the ruleset by default.
type Ruleset ¶
type Ruleset struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` // The kind of the ruleset. Kind RulesetKind `json:"kind"` // The human-readable name of the ruleset. Name string `json:"name"` // The phase of the ruleset. Phase RulesetPhase `json:"phase"` JSON rulesetJSON `json:"-"` }
A ruleset object.
func (*Ruleset) UnmarshalJSON ¶
type RulesetDeleteParams ¶
type RulesetGetParams ¶
type RulesetGetResponse ¶
type RulesetGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind RulesetGetResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase RulesetGetResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []RulesetGetResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON rulesetGetResponseJSON `json:"-"` }
A ruleset object.
func (*RulesetGetResponse) UnmarshalJSON ¶
func (r *RulesetGetResponse) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseEnvelope ¶
type RulesetGetResponseEnvelope struct { // A list of error messages. Errors []RulesetGetResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []RulesetGetResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result RulesetGetResponse `json:"result,required"` // Whether the API call was successful. Success RulesetGetResponseEnvelopeSuccess `json:"success,required"` JSON rulesetGetResponseEnvelopeJSON `json:"-"` }
A response object.
func (*RulesetGetResponseEnvelope) UnmarshalJSON ¶
func (r *RulesetGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseEnvelopeErrors ¶
type RulesetGetResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RulesetGetResponseEnvelopeErrorsSource `json:"source"` JSON rulesetGetResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*RulesetGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RulesetGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseEnvelopeErrorsSource ¶
type RulesetGetResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON rulesetGetResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*RulesetGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *RulesetGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseEnvelopeMessages ¶
type RulesetGetResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RulesetGetResponseEnvelopeMessagesSource `json:"source"` JSON rulesetGetResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*RulesetGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RulesetGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseEnvelopeMessagesSource ¶
type RulesetGetResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON rulesetGetResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*RulesetGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *RulesetGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseEnvelopeSuccess ¶
type RulesetGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
RulesetGetResponseEnvelopeSuccessTrue RulesetGetResponseEnvelopeSuccess = true
)
func (RulesetGetResponseEnvelopeSuccess) IsKnown ¶
func (r RulesetGetResponseEnvelopeSuccess) IsKnown() bool
type RulesetGetResponseKind ¶
type RulesetGetResponseKind string
The kind of the ruleset.
const ( RulesetGetResponseKindManaged RulesetGetResponseKind = "managed" RulesetGetResponseKindCustom RulesetGetResponseKind = "custom" RulesetGetResponseKindRoot RulesetGetResponseKind = "root" RulesetGetResponseKindZone RulesetGetResponseKind = "zone" )
func (RulesetGetResponseKind) IsKnown ¶
func (r RulesetGetResponseKind) IsKnown() bool
type RulesetGetResponsePhase ¶
type RulesetGetResponsePhase string
The phase of the ruleset.
const ( RulesetGetResponsePhaseDDoSL4 RulesetGetResponsePhase = "ddos_l4" RulesetGetResponsePhaseDDoSL7 RulesetGetResponsePhase = "ddos_l7" RulesetGetResponsePhaseHTTPConfigSettings RulesetGetResponsePhase = "http_config_settings" RulesetGetResponsePhaseHTTPCustomErrors RulesetGetResponsePhase = "http_custom_errors" RulesetGetResponsePhaseHTTPLogCustomFields RulesetGetResponsePhase = "http_log_custom_fields" RulesetGetResponsePhaseHTTPRatelimit RulesetGetResponsePhase = "http_ratelimit" RulesetGetResponsePhaseHTTPRequestCacheSettings RulesetGetResponsePhase = "http_request_cache_settings" RulesetGetResponsePhaseHTTPRequestDynamicRedirect RulesetGetResponsePhase = "http_request_dynamic_redirect" RulesetGetResponsePhaseHTTPRequestFirewallCustom RulesetGetResponsePhase = "http_request_firewall_custom" RulesetGetResponsePhaseHTTPRequestFirewallManaged RulesetGetResponsePhase = "http_request_firewall_managed" RulesetGetResponsePhaseHTTPRequestLateTransform RulesetGetResponsePhase = "http_request_late_transform" RulesetGetResponsePhaseHTTPRequestOrigin RulesetGetResponsePhase = "http_request_origin" RulesetGetResponsePhaseHTTPRequestRedirect RulesetGetResponsePhase = "http_request_redirect" RulesetGetResponsePhaseHTTPRequestSanitize RulesetGetResponsePhase = "http_request_sanitize" RulesetGetResponsePhaseHTTPRequestSBFM RulesetGetResponsePhase = "http_request_sbfm" RulesetGetResponsePhaseHTTPRequestSelectConfiguration RulesetGetResponsePhase = "http_request_select_configuration" RulesetGetResponsePhaseHTTPRequestTransform RulesetGetResponsePhase = "http_request_transform" RulesetGetResponsePhaseHTTPResponseCompression RulesetGetResponsePhase = "http_response_compression" RulesetGetResponsePhaseHTTPResponseFirewallManaged RulesetGetResponsePhase = "http_response_firewall_managed" RulesetGetResponsePhaseHTTPResponseHeadersTransform RulesetGetResponsePhase = "http_response_headers_transform" RulesetGetResponsePhaseMagicTransit RulesetGetResponsePhase = "magic_transit" RulesetGetResponsePhaseMagicTransitIDsManaged RulesetGetResponsePhase = "magic_transit_ids_managed" RulesetGetResponsePhaseMagicTransitManaged RulesetGetResponsePhase = "magic_transit_managed" )
func (RulesetGetResponsePhase) IsKnown ¶
func (r RulesetGetResponsePhase) IsKnown() bool
type RulesetGetResponseRule ¶
type RulesetGetResponseRule struct { // The action to perform when the rule matches. Action RulesetGetResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON rulesetGetResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (RulesetGetResponseRule) AsUnion ¶
func (r RulesetGetResponseRule) AsUnion() RulesetGetResponseRulesUnion
func (*RulesetGetResponseRule) UnmarshalJSON ¶
func (r *RulesetGetResponseRule) UnmarshalJSON(data []byte) (err error)
type RulesetGetResponseRulesAction ¶
type RulesetGetResponseRulesAction string
The action to perform when the rule matches.
const ( RulesetGetResponseRulesActionBlock RulesetGetResponseRulesAction = "block" RulesetGetResponseRulesActionChallenge RulesetGetResponseRulesAction = "challenge" RulesetGetResponseRulesActionCompressResponse RulesetGetResponseRulesAction = "compress_response" RulesetGetResponseRulesActionExecute RulesetGetResponseRulesAction = "execute" RulesetGetResponseRulesActionJSChallenge RulesetGetResponseRulesAction = "js_challenge" RulesetGetResponseRulesActionLog RulesetGetResponseRulesAction = "log" RulesetGetResponseRulesActionManagedChallenge RulesetGetResponseRulesAction = "managed_challenge" RulesetGetResponseRulesActionRedirect RulesetGetResponseRulesAction = "redirect" RulesetGetResponseRulesActionRewrite RulesetGetResponseRulesAction = "rewrite" RulesetGetResponseRulesActionRoute RulesetGetResponseRulesAction = "route" RulesetGetResponseRulesActionScore RulesetGetResponseRulesAction = "score" RulesetGetResponseRulesActionServeError RulesetGetResponseRulesAction = "serve_error" RulesetGetResponseRulesActionSetConfig RulesetGetResponseRulesAction = "set_config" RulesetGetResponseRulesActionSkip RulesetGetResponseRulesAction = "skip" RulesetGetResponseRulesActionSetCacheSettings RulesetGetResponseRulesAction = "set_cache_settings" )
func (RulesetGetResponseRulesAction) IsKnown ¶
func (r RulesetGetResponseRulesAction) IsKnown() bool
type RulesetGetResponseRulesUnion ¶
type RulesetGetResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type RulesetKind ¶
type RulesetKind string
The kind of the ruleset.
const ( RulesetKindManaged RulesetKind = "managed" RulesetKindCustom RulesetKind = "custom" RulesetKindRoot RulesetKind = "root" RulesetKindZone RulesetKind = "zone" )
func (RulesetKind) IsKnown ¶
func (r RulesetKind) IsKnown() bool
type RulesetListParams ¶
type RulesetNewParams ¶
type RulesetNewParams struct { // The kind of the ruleset. Kind param.Field[RulesetNewParamsKind] `json:"kind,required"` // The human-readable name of the ruleset. Name param.Field[string] `json:"name,required"` // The phase of the ruleset. Phase param.Field[RulesetNewParamsPhase] `json:"phase,required"` // The list of rules in the ruleset. Rules param.Field[[]RulesetNewParamsRuleUnion] `json:"rules,required"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` // An informative description of the ruleset. Description param.Field[string] `json:"description"` }
func (RulesetNewParams) MarshalJSON ¶
func (r RulesetNewParams) MarshalJSON() (data []byte, err error)
type RulesetNewParamsKind ¶
type RulesetNewParamsKind string
The kind of the ruleset.
const ( RulesetNewParamsKindManaged RulesetNewParamsKind = "managed" RulesetNewParamsKindCustom RulesetNewParamsKind = "custom" RulesetNewParamsKindRoot RulesetNewParamsKind = "root" RulesetNewParamsKindZone RulesetNewParamsKind = "zone" )
func (RulesetNewParamsKind) IsKnown ¶
func (r RulesetNewParamsKind) IsKnown() bool
type RulesetNewParamsPhase ¶
type RulesetNewParamsPhase string
The phase of the ruleset.
const ( RulesetNewParamsPhaseDDoSL4 RulesetNewParamsPhase = "ddos_l4" RulesetNewParamsPhaseDDoSL7 RulesetNewParamsPhase = "ddos_l7" RulesetNewParamsPhaseHTTPConfigSettings RulesetNewParamsPhase = "http_config_settings" RulesetNewParamsPhaseHTTPCustomErrors RulesetNewParamsPhase = "http_custom_errors" RulesetNewParamsPhaseHTTPLogCustomFields RulesetNewParamsPhase = "http_log_custom_fields" RulesetNewParamsPhaseHTTPRatelimit RulesetNewParamsPhase = "http_ratelimit" RulesetNewParamsPhaseHTTPRequestCacheSettings RulesetNewParamsPhase = "http_request_cache_settings" RulesetNewParamsPhaseHTTPRequestDynamicRedirect RulesetNewParamsPhase = "http_request_dynamic_redirect" RulesetNewParamsPhaseHTTPRequestFirewallCustom RulesetNewParamsPhase = "http_request_firewall_custom" RulesetNewParamsPhaseHTTPRequestFirewallManaged RulesetNewParamsPhase = "http_request_firewall_managed" RulesetNewParamsPhaseHTTPRequestLateTransform RulesetNewParamsPhase = "http_request_late_transform" RulesetNewParamsPhaseHTTPRequestOrigin RulesetNewParamsPhase = "http_request_origin" RulesetNewParamsPhaseHTTPRequestRedirect RulesetNewParamsPhase = "http_request_redirect" RulesetNewParamsPhaseHTTPRequestSanitize RulesetNewParamsPhase = "http_request_sanitize" RulesetNewParamsPhaseHTTPRequestSBFM RulesetNewParamsPhase = "http_request_sbfm" RulesetNewParamsPhaseHTTPRequestSelectConfiguration RulesetNewParamsPhase = "http_request_select_configuration" RulesetNewParamsPhaseHTTPRequestTransform RulesetNewParamsPhase = "http_request_transform" RulesetNewParamsPhaseHTTPResponseCompression RulesetNewParamsPhase = "http_response_compression" RulesetNewParamsPhaseHTTPResponseFirewallManaged RulesetNewParamsPhase = "http_response_firewall_managed" RulesetNewParamsPhaseHTTPResponseHeadersTransform RulesetNewParamsPhase = "http_response_headers_transform" RulesetNewParamsPhaseMagicTransit RulesetNewParamsPhase = "magic_transit" RulesetNewParamsPhaseMagicTransitIDsManaged RulesetNewParamsPhase = "magic_transit_ids_managed" RulesetNewParamsPhaseMagicTransitManaged RulesetNewParamsPhase = "magic_transit_managed" )
func (RulesetNewParamsPhase) IsKnown ¶
func (r RulesetNewParamsPhase) IsKnown() bool
type RulesetNewParamsRule ¶
type RulesetNewParamsRule struct { // The action to perform when the rule matches. Action param.Field[RulesetNewParamsRulesAction] `json:"action"` ActionParameters param.Field[interface{}] `json:"action_parameters,required"` Categories param.Field[interface{}] `json:"categories,required"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // The unique ID of the rule. ID param.Field[string] `json:"id"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (RulesetNewParamsRule) MarshalJSON ¶
func (r RulesetNewParamsRule) MarshalJSON() (data []byte, err error)
type RulesetNewParamsRuleUnion ¶
type RulesetNewParamsRuleUnion interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.BlockRuleParam, rulesets.ChallengeRuleParam, rulesets.CompressResponseRuleParam, rulesets.ExecuteRuleParam, rulesets.JSChallengeRuleParam, rulesets.LogRuleParam, rulesets.ManagedChallengeRuleParam, rulesets.RedirectRuleParam, rulesets.RewriteRuleParam, rulesets.RouteRuleParam, rulesets.ScoreRuleParam, rulesets.ServeErrorRuleParam, rulesets.SetConfigRuleParam, rulesets.SkipRuleParam, rulesets.SetCacheSettingsRuleParam, RulesetNewParamsRule.
type RulesetNewParamsRulesAction ¶
type RulesetNewParamsRulesAction string
The action to perform when the rule matches.
const ( RulesetNewParamsRulesActionBlock RulesetNewParamsRulesAction = "block" RulesetNewParamsRulesActionChallenge RulesetNewParamsRulesAction = "challenge" RulesetNewParamsRulesActionCompressResponse RulesetNewParamsRulesAction = "compress_response" RulesetNewParamsRulesActionExecute RulesetNewParamsRulesAction = "execute" RulesetNewParamsRulesActionJSChallenge RulesetNewParamsRulesAction = "js_challenge" RulesetNewParamsRulesActionLog RulesetNewParamsRulesAction = "log" RulesetNewParamsRulesActionManagedChallenge RulesetNewParamsRulesAction = "managed_challenge" RulesetNewParamsRulesActionRedirect RulesetNewParamsRulesAction = "redirect" RulesetNewParamsRulesActionRewrite RulesetNewParamsRulesAction = "rewrite" RulesetNewParamsRulesActionRoute RulesetNewParamsRulesAction = "route" RulesetNewParamsRulesActionScore RulesetNewParamsRulesAction = "score" RulesetNewParamsRulesActionServeError RulesetNewParamsRulesAction = "serve_error" RulesetNewParamsRulesActionSetConfig RulesetNewParamsRulesAction = "set_config" RulesetNewParamsRulesActionSkip RulesetNewParamsRulesAction = "skip" RulesetNewParamsRulesActionSetCacheSettings RulesetNewParamsRulesAction = "set_cache_settings" )
func (RulesetNewParamsRulesAction) IsKnown ¶
func (r RulesetNewParamsRulesAction) IsKnown() bool
type RulesetNewResponse ¶
type RulesetNewResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind RulesetNewResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase RulesetNewResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []RulesetNewResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON rulesetNewResponseJSON `json:"-"` }
A ruleset object.
func (*RulesetNewResponse) UnmarshalJSON ¶
func (r *RulesetNewResponse) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseEnvelope ¶
type RulesetNewResponseEnvelope struct { // A list of error messages. Errors []RulesetNewResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []RulesetNewResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result RulesetNewResponse `json:"result,required"` // Whether the API call was successful. Success RulesetNewResponseEnvelopeSuccess `json:"success,required"` JSON rulesetNewResponseEnvelopeJSON `json:"-"` }
A response object.
func (*RulesetNewResponseEnvelope) UnmarshalJSON ¶
func (r *RulesetNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseEnvelopeErrors ¶
type RulesetNewResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RulesetNewResponseEnvelopeErrorsSource `json:"source"` JSON rulesetNewResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*RulesetNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RulesetNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseEnvelopeErrorsSource ¶
type RulesetNewResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON rulesetNewResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*RulesetNewResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *RulesetNewResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseEnvelopeMessages ¶
type RulesetNewResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RulesetNewResponseEnvelopeMessagesSource `json:"source"` JSON rulesetNewResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*RulesetNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RulesetNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseEnvelopeMessagesSource ¶
type RulesetNewResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON rulesetNewResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*RulesetNewResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *RulesetNewResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseEnvelopeSuccess ¶
type RulesetNewResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
RulesetNewResponseEnvelopeSuccessTrue RulesetNewResponseEnvelopeSuccess = true
)
func (RulesetNewResponseEnvelopeSuccess) IsKnown ¶
func (r RulesetNewResponseEnvelopeSuccess) IsKnown() bool
type RulesetNewResponseKind ¶
type RulesetNewResponseKind string
The kind of the ruleset.
const ( RulesetNewResponseKindManaged RulesetNewResponseKind = "managed" RulesetNewResponseKindCustom RulesetNewResponseKind = "custom" RulesetNewResponseKindRoot RulesetNewResponseKind = "root" RulesetNewResponseKindZone RulesetNewResponseKind = "zone" )
func (RulesetNewResponseKind) IsKnown ¶
func (r RulesetNewResponseKind) IsKnown() bool
type RulesetNewResponsePhase ¶
type RulesetNewResponsePhase string
The phase of the ruleset.
const ( RulesetNewResponsePhaseDDoSL4 RulesetNewResponsePhase = "ddos_l4" RulesetNewResponsePhaseDDoSL7 RulesetNewResponsePhase = "ddos_l7" RulesetNewResponsePhaseHTTPConfigSettings RulesetNewResponsePhase = "http_config_settings" RulesetNewResponsePhaseHTTPCustomErrors RulesetNewResponsePhase = "http_custom_errors" RulesetNewResponsePhaseHTTPLogCustomFields RulesetNewResponsePhase = "http_log_custom_fields" RulesetNewResponsePhaseHTTPRatelimit RulesetNewResponsePhase = "http_ratelimit" RulesetNewResponsePhaseHTTPRequestCacheSettings RulesetNewResponsePhase = "http_request_cache_settings" RulesetNewResponsePhaseHTTPRequestDynamicRedirect RulesetNewResponsePhase = "http_request_dynamic_redirect" RulesetNewResponsePhaseHTTPRequestFirewallCustom RulesetNewResponsePhase = "http_request_firewall_custom" RulesetNewResponsePhaseHTTPRequestFirewallManaged RulesetNewResponsePhase = "http_request_firewall_managed" RulesetNewResponsePhaseHTTPRequestLateTransform RulesetNewResponsePhase = "http_request_late_transform" RulesetNewResponsePhaseHTTPRequestOrigin RulesetNewResponsePhase = "http_request_origin" RulesetNewResponsePhaseHTTPRequestRedirect RulesetNewResponsePhase = "http_request_redirect" RulesetNewResponsePhaseHTTPRequestSanitize RulesetNewResponsePhase = "http_request_sanitize" RulesetNewResponsePhaseHTTPRequestSBFM RulesetNewResponsePhase = "http_request_sbfm" RulesetNewResponsePhaseHTTPRequestSelectConfiguration RulesetNewResponsePhase = "http_request_select_configuration" RulesetNewResponsePhaseHTTPRequestTransform RulesetNewResponsePhase = "http_request_transform" RulesetNewResponsePhaseHTTPResponseCompression RulesetNewResponsePhase = "http_response_compression" RulesetNewResponsePhaseHTTPResponseFirewallManaged RulesetNewResponsePhase = "http_response_firewall_managed" RulesetNewResponsePhaseHTTPResponseHeadersTransform RulesetNewResponsePhase = "http_response_headers_transform" RulesetNewResponsePhaseMagicTransit RulesetNewResponsePhase = "magic_transit" RulesetNewResponsePhaseMagicTransitIDsManaged RulesetNewResponsePhase = "magic_transit_ids_managed" RulesetNewResponsePhaseMagicTransitManaged RulesetNewResponsePhase = "magic_transit_managed" )
func (RulesetNewResponsePhase) IsKnown ¶
func (r RulesetNewResponsePhase) IsKnown() bool
type RulesetNewResponseRule ¶
type RulesetNewResponseRule struct { // The action to perform when the rule matches. Action RulesetNewResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON rulesetNewResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (RulesetNewResponseRule) AsUnion ¶
func (r RulesetNewResponseRule) AsUnion() RulesetNewResponseRulesUnion
func (*RulesetNewResponseRule) UnmarshalJSON ¶
func (r *RulesetNewResponseRule) UnmarshalJSON(data []byte) (err error)
type RulesetNewResponseRulesAction ¶
type RulesetNewResponseRulesAction string
The action to perform when the rule matches.
const ( RulesetNewResponseRulesActionBlock RulesetNewResponseRulesAction = "block" RulesetNewResponseRulesActionChallenge RulesetNewResponseRulesAction = "challenge" RulesetNewResponseRulesActionCompressResponse RulesetNewResponseRulesAction = "compress_response" RulesetNewResponseRulesActionExecute RulesetNewResponseRulesAction = "execute" RulesetNewResponseRulesActionJSChallenge RulesetNewResponseRulesAction = "js_challenge" RulesetNewResponseRulesActionLog RulesetNewResponseRulesAction = "log" RulesetNewResponseRulesActionManagedChallenge RulesetNewResponseRulesAction = "managed_challenge" RulesetNewResponseRulesActionRedirect RulesetNewResponseRulesAction = "redirect" RulesetNewResponseRulesActionRewrite RulesetNewResponseRulesAction = "rewrite" RulesetNewResponseRulesActionRoute RulesetNewResponseRulesAction = "route" RulesetNewResponseRulesActionScore RulesetNewResponseRulesAction = "score" RulesetNewResponseRulesActionServeError RulesetNewResponseRulesAction = "serve_error" RulesetNewResponseRulesActionSetConfig RulesetNewResponseRulesAction = "set_config" RulesetNewResponseRulesActionSkip RulesetNewResponseRulesAction = "skip" RulesetNewResponseRulesActionSetCacheSettings RulesetNewResponseRulesAction = "set_cache_settings" )
func (RulesetNewResponseRulesAction) IsKnown ¶
func (r RulesetNewResponseRulesAction) IsKnown() bool
type RulesetNewResponseRulesUnion ¶
type RulesetNewResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type RulesetPhase ¶
type RulesetPhase string
The phase of the ruleset.
const ( RulesetPhaseDDoSL4 RulesetPhase = "ddos_l4" RulesetPhaseDDoSL7 RulesetPhase = "ddos_l7" RulesetPhaseHTTPConfigSettings RulesetPhase = "http_config_settings" RulesetPhaseHTTPCustomErrors RulesetPhase = "http_custom_errors" RulesetPhaseHTTPLogCustomFields RulesetPhase = "http_log_custom_fields" RulesetPhaseHTTPRatelimit RulesetPhase = "http_ratelimit" RulesetPhaseHTTPRequestCacheSettings RulesetPhase = "http_request_cache_settings" RulesetPhaseHTTPRequestDynamicRedirect RulesetPhase = "http_request_dynamic_redirect" RulesetPhaseHTTPRequestFirewallCustom RulesetPhase = "http_request_firewall_custom" RulesetPhaseHTTPRequestFirewallManaged RulesetPhase = "http_request_firewall_managed" RulesetPhaseHTTPRequestLateTransform RulesetPhase = "http_request_late_transform" RulesetPhaseHTTPRequestOrigin RulesetPhase = "http_request_origin" RulesetPhaseHTTPRequestRedirect RulesetPhase = "http_request_redirect" RulesetPhaseHTTPRequestSanitize RulesetPhase = "http_request_sanitize" RulesetPhaseHTTPRequestSBFM RulesetPhase = "http_request_sbfm" RulesetPhaseHTTPRequestSelectConfiguration RulesetPhase = "http_request_select_configuration" RulesetPhaseHTTPRequestTransform RulesetPhase = "http_request_transform" RulesetPhaseHTTPResponseCompression RulesetPhase = "http_response_compression" RulesetPhaseHTTPResponseFirewallManaged RulesetPhase = "http_response_firewall_managed" RulesetPhaseHTTPResponseHeadersTransform RulesetPhase = "http_response_headers_transform" RulesetPhaseMagicTransit RulesetPhase = "magic_transit" RulesetPhaseMagicTransitIDsManaged RulesetPhase = "magic_transit_ids_managed" RulesetPhaseMagicTransitManaged RulesetPhase = "magic_transit_managed" )
func (RulesetPhase) IsKnown ¶
func (r RulesetPhase) IsKnown() bool
type RulesetService ¶
type RulesetService struct { Options []option.RequestOption Phases *PhaseService Rules *RuleService Versions *VersionService }
RulesetService 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 NewRulesetService method instead.
func NewRulesetService ¶
func NewRulesetService(opts ...option.RequestOption) (r *RulesetService)
NewRulesetService 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 (*RulesetService) Delete ¶
func (r *RulesetService) Delete(ctx context.Context, rulesetID string, body RulesetDeleteParams, opts ...option.RequestOption) (err error)
Deletes all versions of an existing account or zone ruleset.
func (*RulesetService) Get ¶
func (r *RulesetService) Get(ctx context.Context, rulesetID string, query RulesetGetParams, opts ...option.RequestOption) (res *RulesetGetResponse, err error)
Fetches the latest version of an account or zone ruleset.
func (*RulesetService) List ¶
func (r *RulesetService) List(ctx context.Context, query RulesetListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Ruleset], err error)
Fetches all rulesets.
func (*RulesetService) ListAutoPaging ¶
func (r *RulesetService) ListAutoPaging(ctx context.Context, query RulesetListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Ruleset]
Fetches all rulesets.
func (*RulesetService) New ¶
func (r *RulesetService) New(ctx context.Context, params RulesetNewParams, opts ...option.RequestOption) (res *RulesetNewResponse, err error)
Creates a ruleset.
func (*RulesetService) Update ¶
func (r *RulesetService) Update(ctx context.Context, rulesetID string, params RulesetUpdateParams, opts ...option.RequestOption) (res *RulesetUpdateResponse, err error)
Updates an account or zone ruleset, creating a new version.
type RulesetUpdateParams ¶
type RulesetUpdateParams struct { // The list of rules in the ruleset. Rules param.Field[[]RulesetUpdateParamsRuleUnion] `json:"rules,required"` // The Account ID to use for this endpoint. Mutually exclusive with the Zone ID. AccountID param.Field[string] `path:"account_id"` // The Zone ID to use for this endpoint. Mutually exclusive with the Account ID. ZoneID param.Field[string] `path:"zone_id"` // An informative description of the ruleset. Description param.Field[string] `json:"description"` // The kind of the ruleset. Kind param.Field[RulesetUpdateParamsKind] `json:"kind"` // The human-readable name of the ruleset. Name param.Field[string] `json:"name"` // The phase of the ruleset. Phase param.Field[RulesetUpdateParamsPhase] `json:"phase"` }
func (RulesetUpdateParams) MarshalJSON ¶
func (r RulesetUpdateParams) MarshalJSON() (data []byte, err error)
type RulesetUpdateParamsKind ¶
type RulesetUpdateParamsKind string
The kind of the ruleset.
const ( RulesetUpdateParamsKindManaged RulesetUpdateParamsKind = "managed" RulesetUpdateParamsKindCustom RulesetUpdateParamsKind = "custom" RulesetUpdateParamsKindRoot RulesetUpdateParamsKind = "root" RulesetUpdateParamsKindZone RulesetUpdateParamsKind = "zone" )
func (RulesetUpdateParamsKind) IsKnown ¶
func (r RulesetUpdateParamsKind) IsKnown() bool
type RulesetUpdateParamsPhase ¶
type RulesetUpdateParamsPhase string
The phase of the ruleset.
const ( RulesetUpdateParamsPhaseDDoSL4 RulesetUpdateParamsPhase = "ddos_l4" RulesetUpdateParamsPhaseDDoSL7 RulesetUpdateParamsPhase = "ddos_l7" RulesetUpdateParamsPhaseHTTPConfigSettings RulesetUpdateParamsPhase = "http_config_settings" RulesetUpdateParamsPhaseHTTPCustomErrors RulesetUpdateParamsPhase = "http_custom_errors" RulesetUpdateParamsPhaseHTTPLogCustomFields RulesetUpdateParamsPhase = "http_log_custom_fields" RulesetUpdateParamsPhaseHTTPRatelimit RulesetUpdateParamsPhase = "http_ratelimit" RulesetUpdateParamsPhaseHTTPRequestCacheSettings RulesetUpdateParamsPhase = "http_request_cache_settings" RulesetUpdateParamsPhaseHTTPRequestDynamicRedirect RulesetUpdateParamsPhase = "http_request_dynamic_redirect" RulesetUpdateParamsPhaseHTTPRequestFirewallCustom RulesetUpdateParamsPhase = "http_request_firewall_custom" RulesetUpdateParamsPhaseHTTPRequestFirewallManaged RulesetUpdateParamsPhase = "http_request_firewall_managed" RulesetUpdateParamsPhaseHTTPRequestLateTransform RulesetUpdateParamsPhase = "http_request_late_transform" RulesetUpdateParamsPhaseHTTPRequestOrigin RulesetUpdateParamsPhase = "http_request_origin" RulesetUpdateParamsPhaseHTTPRequestRedirect RulesetUpdateParamsPhase = "http_request_redirect" RulesetUpdateParamsPhaseHTTPRequestSanitize RulesetUpdateParamsPhase = "http_request_sanitize" RulesetUpdateParamsPhaseHTTPRequestSBFM RulesetUpdateParamsPhase = "http_request_sbfm" RulesetUpdateParamsPhaseHTTPRequestSelectConfiguration RulesetUpdateParamsPhase = "http_request_select_configuration" RulesetUpdateParamsPhaseHTTPRequestTransform RulesetUpdateParamsPhase = "http_request_transform" RulesetUpdateParamsPhaseHTTPResponseCompression RulesetUpdateParamsPhase = "http_response_compression" RulesetUpdateParamsPhaseHTTPResponseFirewallManaged RulesetUpdateParamsPhase = "http_response_firewall_managed" RulesetUpdateParamsPhaseHTTPResponseHeadersTransform RulesetUpdateParamsPhase = "http_response_headers_transform" RulesetUpdateParamsPhaseMagicTransit RulesetUpdateParamsPhase = "magic_transit" RulesetUpdateParamsPhaseMagicTransitIDsManaged RulesetUpdateParamsPhase = "magic_transit_ids_managed" RulesetUpdateParamsPhaseMagicTransitManaged RulesetUpdateParamsPhase = "magic_transit_managed" )
func (RulesetUpdateParamsPhase) IsKnown ¶
func (r RulesetUpdateParamsPhase) IsKnown() bool
type RulesetUpdateParamsRule ¶
type RulesetUpdateParamsRule struct { // The action to perform when the rule matches. Action param.Field[RulesetUpdateParamsRulesAction] `json:"action"` ActionParameters param.Field[interface{}] `json:"action_parameters,required"` Categories param.Field[interface{}] `json:"categories,required"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // The unique ID of the rule. ID param.Field[string] `json:"id"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (RulesetUpdateParamsRule) MarshalJSON ¶
func (r RulesetUpdateParamsRule) MarshalJSON() (data []byte, err error)
type RulesetUpdateParamsRuleUnion ¶
type RulesetUpdateParamsRuleUnion interface {
// contains filtered or unexported methods
}
Satisfied by rulesets.BlockRuleParam, rulesets.ChallengeRuleParam, rulesets.CompressResponseRuleParam, rulesets.ExecuteRuleParam, rulesets.JSChallengeRuleParam, rulesets.LogRuleParam, rulesets.ManagedChallengeRuleParam, rulesets.RedirectRuleParam, rulesets.RewriteRuleParam, rulesets.RouteRuleParam, rulesets.ScoreRuleParam, rulesets.ServeErrorRuleParam, rulesets.SetConfigRuleParam, rulesets.SkipRuleParam, rulesets.SetCacheSettingsRuleParam, RulesetUpdateParamsRule.
type RulesetUpdateParamsRulesAction ¶
type RulesetUpdateParamsRulesAction string
The action to perform when the rule matches.
const ( RulesetUpdateParamsRulesActionBlock RulesetUpdateParamsRulesAction = "block" RulesetUpdateParamsRulesActionChallenge RulesetUpdateParamsRulesAction = "challenge" RulesetUpdateParamsRulesActionCompressResponse RulesetUpdateParamsRulesAction = "compress_response" RulesetUpdateParamsRulesActionExecute RulesetUpdateParamsRulesAction = "execute" RulesetUpdateParamsRulesActionJSChallenge RulesetUpdateParamsRulesAction = "js_challenge" RulesetUpdateParamsRulesActionLog RulesetUpdateParamsRulesAction = "log" RulesetUpdateParamsRulesActionManagedChallenge RulesetUpdateParamsRulesAction = "managed_challenge" RulesetUpdateParamsRulesActionRedirect RulesetUpdateParamsRulesAction = "redirect" RulesetUpdateParamsRulesActionRewrite RulesetUpdateParamsRulesAction = "rewrite" RulesetUpdateParamsRulesActionRoute RulesetUpdateParamsRulesAction = "route" RulesetUpdateParamsRulesActionScore RulesetUpdateParamsRulesAction = "score" RulesetUpdateParamsRulesActionServeError RulesetUpdateParamsRulesAction = "serve_error" RulesetUpdateParamsRulesActionSetConfig RulesetUpdateParamsRulesAction = "set_config" RulesetUpdateParamsRulesActionSkip RulesetUpdateParamsRulesAction = "skip" RulesetUpdateParamsRulesActionSetCacheSettings RulesetUpdateParamsRulesAction = "set_cache_settings" )
func (RulesetUpdateParamsRulesAction) IsKnown ¶
func (r RulesetUpdateParamsRulesAction) IsKnown() bool
type RulesetUpdateResponse ¶
type RulesetUpdateResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind RulesetUpdateResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase RulesetUpdateResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []RulesetUpdateResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON rulesetUpdateResponseJSON `json:"-"` }
A ruleset object.
func (*RulesetUpdateResponse) UnmarshalJSON ¶
func (r *RulesetUpdateResponse) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseEnvelope ¶
type RulesetUpdateResponseEnvelope struct { // A list of error messages. Errors []RulesetUpdateResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []RulesetUpdateResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result RulesetUpdateResponse `json:"result,required"` // Whether the API call was successful. Success RulesetUpdateResponseEnvelopeSuccess `json:"success,required"` JSON rulesetUpdateResponseEnvelopeJSON `json:"-"` }
A response object.
func (*RulesetUpdateResponseEnvelope) UnmarshalJSON ¶
func (r *RulesetUpdateResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseEnvelopeErrors ¶
type RulesetUpdateResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RulesetUpdateResponseEnvelopeErrorsSource `json:"source"` JSON rulesetUpdateResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*RulesetUpdateResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *RulesetUpdateResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseEnvelopeErrorsSource ¶
type RulesetUpdateResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON rulesetUpdateResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*RulesetUpdateResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *RulesetUpdateResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseEnvelopeMessages ¶
type RulesetUpdateResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source RulesetUpdateResponseEnvelopeMessagesSource `json:"source"` JSON rulesetUpdateResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*RulesetUpdateResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *RulesetUpdateResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseEnvelopeMessagesSource ¶
type RulesetUpdateResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON rulesetUpdateResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*RulesetUpdateResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *RulesetUpdateResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseEnvelopeSuccess ¶
type RulesetUpdateResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
RulesetUpdateResponseEnvelopeSuccessTrue RulesetUpdateResponseEnvelopeSuccess = true
)
func (RulesetUpdateResponseEnvelopeSuccess) IsKnown ¶
func (r RulesetUpdateResponseEnvelopeSuccess) IsKnown() bool
type RulesetUpdateResponseKind ¶
type RulesetUpdateResponseKind string
The kind of the ruleset.
const ( RulesetUpdateResponseKindManaged RulesetUpdateResponseKind = "managed" RulesetUpdateResponseKindCustom RulesetUpdateResponseKind = "custom" RulesetUpdateResponseKindRoot RulesetUpdateResponseKind = "root" RulesetUpdateResponseKindZone RulesetUpdateResponseKind = "zone" )
func (RulesetUpdateResponseKind) IsKnown ¶
func (r RulesetUpdateResponseKind) IsKnown() bool
type RulesetUpdateResponsePhase ¶
type RulesetUpdateResponsePhase string
The phase of the ruleset.
const ( RulesetUpdateResponsePhaseDDoSL4 RulesetUpdateResponsePhase = "ddos_l4" RulesetUpdateResponsePhaseDDoSL7 RulesetUpdateResponsePhase = "ddos_l7" RulesetUpdateResponsePhaseHTTPConfigSettings RulesetUpdateResponsePhase = "http_config_settings" RulesetUpdateResponsePhaseHTTPCustomErrors RulesetUpdateResponsePhase = "http_custom_errors" RulesetUpdateResponsePhaseHTTPLogCustomFields RulesetUpdateResponsePhase = "http_log_custom_fields" RulesetUpdateResponsePhaseHTTPRatelimit RulesetUpdateResponsePhase = "http_ratelimit" RulesetUpdateResponsePhaseHTTPRequestCacheSettings RulesetUpdateResponsePhase = "http_request_cache_settings" RulesetUpdateResponsePhaseHTTPRequestDynamicRedirect RulesetUpdateResponsePhase = "http_request_dynamic_redirect" RulesetUpdateResponsePhaseHTTPRequestFirewallCustom RulesetUpdateResponsePhase = "http_request_firewall_custom" RulesetUpdateResponsePhaseHTTPRequestFirewallManaged RulesetUpdateResponsePhase = "http_request_firewall_managed" RulesetUpdateResponsePhaseHTTPRequestLateTransform RulesetUpdateResponsePhase = "http_request_late_transform" RulesetUpdateResponsePhaseHTTPRequestOrigin RulesetUpdateResponsePhase = "http_request_origin" RulesetUpdateResponsePhaseHTTPRequestRedirect RulesetUpdateResponsePhase = "http_request_redirect" RulesetUpdateResponsePhaseHTTPRequestSanitize RulesetUpdateResponsePhase = "http_request_sanitize" RulesetUpdateResponsePhaseHTTPRequestSBFM RulesetUpdateResponsePhase = "http_request_sbfm" RulesetUpdateResponsePhaseHTTPRequestSelectConfiguration RulesetUpdateResponsePhase = "http_request_select_configuration" RulesetUpdateResponsePhaseHTTPRequestTransform RulesetUpdateResponsePhase = "http_request_transform" RulesetUpdateResponsePhaseHTTPResponseCompression RulesetUpdateResponsePhase = "http_response_compression" RulesetUpdateResponsePhaseHTTPResponseFirewallManaged RulesetUpdateResponsePhase = "http_response_firewall_managed" RulesetUpdateResponsePhaseHTTPResponseHeadersTransform RulesetUpdateResponsePhase = "http_response_headers_transform" RulesetUpdateResponsePhaseMagicTransit RulesetUpdateResponsePhase = "magic_transit" RulesetUpdateResponsePhaseMagicTransitIDsManaged RulesetUpdateResponsePhase = "magic_transit_ids_managed" RulesetUpdateResponsePhaseMagicTransitManaged RulesetUpdateResponsePhase = "magic_transit_managed" )
func (RulesetUpdateResponsePhase) IsKnown ¶
func (r RulesetUpdateResponsePhase) IsKnown() bool
type RulesetUpdateResponseRule ¶
type RulesetUpdateResponseRule struct { // The action to perform when the rule matches. Action RulesetUpdateResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON rulesetUpdateResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (RulesetUpdateResponseRule) AsUnion ¶
func (r RulesetUpdateResponseRule) AsUnion() RulesetUpdateResponseRulesUnion
func (*RulesetUpdateResponseRule) UnmarshalJSON ¶
func (r *RulesetUpdateResponseRule) UnmarshalJSON(data []byte) (err error)
type RulesetUpdateResponseRulesAction ¶
type RulesetUpdateResponseRulesAction string
The action to perform when the rule matches.
const ( RulesetUpdateResponseRulesActionBlock RulesetUpdateResponseRulesAction = "block" RulesetUpdateResponseRulesActionChallenge RulesetUpdateResponseRulesAction = "challenge" RulesetUpdateResponseRulesActionCompressResponse RulesetUpdateResponseRulesAction = "compress_response" RulesetUpdateResponseRulesActionExecute RulesetUpdateResponseRulesAction = "execute" RulesetUpdateResponseRulesActionJSChallenge RulesetUpdateResponseRulesAction = "js_challenge" RulesetUpdateResponseRulesActionLog RulesetUpdateResponseRulesAction = "log" RulesetUpdateResponseRulesActionManagedChallenge RulesetUpdateResponseRulesAction = "managed_challenge" RulesetUpdateResponseRulesActionRedirect RulesetUpdateResponseRulesAction = "redirect" RulesetUpdateResponseRulesActionRewrite RulesetUpdateResponseRulesAction = "rewrite" RulesetUpdateResponseRulesActionRoute RulesetUpdateResponseRulesAction = "route" RulesetUpdateResponseRulesActionScore RulesetUpdateResponseRulesAction = "score" RulesetUpdateResponseRulesActionServeError RulesetUpdateResponseRulesAction = "serve_error" RulesetUpdateResponseRulesActionSetConfig RulesetUpdateResponseRulesAction = "set_config" RulesetUpdateResponseRulesActionSkip RulesetUpdateResponseRulesAction = "skip" RulesetUpdateResponseRulesActionSetCacheSettings RulesetUpdateResponseRulesAction = "set_cache_settings" )
func (RulesetUpdateResponseRulesAction) IsKnown ¶
func (r RulesetUpdateResponseRulesAction) IsKnown() bool
type RulesetUpdateResponseRulesUnion ¶
type RulesetUpdateResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type ScoreRule ¶
type ScoreRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action ScoreRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters ScoreRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON scoreRuleJSON `json:"-"` }
func (*ScoreRule) UnmarshalJSON ¶
type ScoreRuleAction ¶
type ScoreRuleAction string
The action to perform when the rule matches.
const (
ScoreRuleActionScore ScoreRuleAction = "score"
)
func (ScoreRuleAction) IsKnown ¶
func (r ScoreRuleAction) IsKnown() bool
type ScoreRuleActionParameters ¶
type ScoreRuleActionParameters struct { // Increment contains the delta to change the score and can be either positive or // negative. Increment int64 `json:"increment"` JSON scoreRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*ScoreRuleActionParameters) UnmarshalJSON ¶
func (r *ScoreRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type ScoreRuleActionParametersParam ¶
type ScoreRuleActionParametersParam struct { // Increment contains the delta to change the score and can be either positive or // negative. Increment param.Field[int64] `json:"increment"` }
The parameters configuring the rule's action.
func (ScoreRuleActionParametersParam) MarshalJSON ¶
func (r ScoreRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type ScoreRuleParam ¶
type ScoreRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[ScoreRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[ScoreRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (ScoreRuleParam) MarshalJSON ¶
func (r ScoreRuleParam) MarshalJSON() (data []byte, err error)
type ServeErrorRule ¶
type ServeErrorRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action ServeErrorRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters ServeErrorRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON serveErrorRuleJSON `json:"-"` }
func (*ServeErrorRule) UnmarshalJSON ¶
func (r *ServeErrorRule) UnmarshalJSON(data []byte) (err error)
type ServeErrorRuleAction ¶
type ServeErrorRuleAction string
The action to perform when the rule matches.
const (
ServeErrorRuleActionServeError ServeErrorRuleAction = "serve_error"
)
func (ServeErrorRuleAction) IsKnown ¶
func (r ServeErrorRuleAction) IsKnown() bool
type ServeErrorRuleActionParameters ¶
type ServeErrorRuleActionParameters struct { // Error response content. Content string `json:"content"` // Content-type header to set with the response. ContentType ServeErrorRuleActionParametersContentType `json:"content_type"` // The status code to use for the error. StatusCode float64 `json:"status_code"` JSON serveErrorRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*ServeErrorRuleActionParameters) UnmarshalJSON ¶
func (r *ServeErrorRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type ServeErrorRuleActionParametersContentType ¶
type ServeErrorRuleActionParametersContentType string
Content-type header to set with the response.
const ( ServeErrorRuleActionParametersContentTypeApplicationJson ServeErrorRuleActionParametersContentType = "application/json" ServeErrorRuleActionParametersContentTypeTextXml ServeErrorRuleActionParametersContentType = "text/xml" ServeErrorRuleActionParametersContentTypeTextPlain ServeErrorRuleActionParametersContentType = "text/plain" ServeErrorRuleActionParametersContentTypeTextHTML ServeErrorRuleActionParametersContentType = "text/html" )
func (ServeErrorRuleActionParametersContentType) IsKnown ¶
func (r ServeErrorRuleActionParametersContentType) IsKnown() bool
type ServeErrorRuleActionParametersParam ¶
type ServeErrorRuleActionParametersParam struct { // Error response content. Content param.Field[string] `json:"content"` // Content-type header to set with the response. ContentType param.Field[ServeErrorRuleActionParametersContentType] `json:"content_type"` // The status code to use for the error. StatusCode param.Field[float64] `json:"status_code"` }
The parameters configuring the rule's action.
func (ServeErrorRuleActionParametersParam) MarshalJSON ¶
func (r ServeErrorRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type ServeErrorRuleParam ¶
type ServeErrorRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[ServeErrorRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[ServeErrorRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (ServeErrorRuleParam) MarshalJSON ¶
func (r ServeErrorRuleParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRule ¶
type SetCacheSettingsRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action SetCacheSettingsRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters SetCacheSettingsRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON setCacheSettingsRuleJSON `json:"-"` }
func (*SetCacheSettingsRule) UnmarshalJSON ¶
func (r *SetCacheSettingsRule) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleAction ¶
type SetCacheSettingsRuleAction string
The action to perform when the rule matches.
const (
SetCacheSettingsRuleActionSetCacheSettings SetCacheSettingsRuleAction = "set_cache_settings"
)
func (SetCacheSettingsRuleAction) IsKnown ¶
func (r SetCacheSettingsRuleAction) IsKnown() bool
type SetCacheSettingsRuleActionParameters ¶
type SetCacheSettingsRuleActionParameters struct { // List of additional ports that caching can be enabled on. AdditionalCacheablePorts []int64 `json:"additional_cacheable_ports"` // Specify how long client browsers should cache the response. Cloudflare cache // purge will not purge content cached on client browsers, so high browser TTLs may // lead to stale content. BrowserTTL SetCacheSettingsRuleActionParametersBrowserTTL `json:"browser_ttl"` // Mark whether the request’s response from origin is eligible for caching. Caching // itself will still depend on the cache-control header and your other caching // configurations. Cache bool `json:"cache"` // Define which components of the request are included or excluded from the cache // key Cloudflare uses to store the response in cache. CacheKey SetCacheSettingsRuleActionParametersCacheKey `json:"cache_key"` // Mark whether the request's response from origin is eligible for Cache Reserve // (requires a Cache Reserve add-on plan). CacheReserve SetCacheSettingsRuleActionParametersCacheReserve `json:"cache_reserve"` // TTL (Time to Live) specifies the maximum time to cache a resource in the // Cloudflare edge network. EdgeTTL SetCacheSettingsRuleActionParametersEdgeTTL `json:"edge_ttl"` // When enabled, Cloudflare will aim to strictly adhere to RFC 7234. OriginCacheControl bool `json:"origin_cache_control"` // Generate Cloudflare error pages from issues sent from the origin server. When // on, error pages will trigger for issues from the origin OriginErrorPagePassthru bool `json:"origin_error_page_passthru"` // Define a timeout value between two successive read operations to your origin // server. Historically, the timeout value between two read options from Cloudflare // to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 // errors because of timeouts from an origin server, try increasing this timeout // value. ReadTimeout int64 `json:"read_timeout"` // headers. When off, Cloudflare converts strong ETag headers to weak ETag headers. RespectStrongEtags bool `json:"respect_strong_etags"` // Define if Cloudflare should serve stale content while getting the latest content // from the origin. If on, Cloudflare will not serve stale content while getting // the latest content from the origin. ServeStale SetCacheSettingsRuleActionParametersServeStale `json:"serve_stale"` JSON setCacheSettingsRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*SetCacheSettingsRuleActionParameters) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersBrowserTTL ¶
type SetCacheSettingsRuleActionParametersBrowserTTL struct { // Determines which browser ttl mode to use. Mode SetCacheSettingsRuleActionParametersBrowserTTLMode `json:"mode,required"` // The TTL (in seconds) if you choose override_origin mode. Default int64 `json:"default"` JSON setCacheSettingsRuleActionParametersBrowserTTLJSON `json:"-"` }
Specify how long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content.
func (*SetCacheSettingsRuleActionParametersBrowserTTL) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersBrowserTTL) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersBrowserTTLMode ¶
type SetCacheSettingsRuleActionParametersBrowserTTLMode string
Determines which browser ttl mode to use.
const ( SetCacheSettingsRuleActionParametersBrowserTTLModeRespectOrigin SetCacheSettingsRuleActionParametersBrowserTTLMode = "respect_origin" SetCacheSettingsRuleActionParametersBrowserTTLModeBypassByDefault SetCacheSettingsRuleActionParametersBrowserTTLMode = "bypass_by_default" SetCacheSettingsRuleActionParametersBrowserTTLModeOverrideOrigin SetCacheSettingsRuleActionParametersBrowserTTLMode = "override_origin" )
func (SetCacheSettingsRuleActionParametersBrowserTTLMode) IsKnown ¶
func (r SetCacheSettingsRuleActionParametersBrowserTTLMode) IsKnown() bool
type SetCacheSettingsRuleActionParametersBrowserTTLParam ¶
type SetCacheSettingsRuleActionParametersBrowserTTLParam struct { // Determines which browser ttl mode to use. Mode param.Field[SetCacheSettingsRuleActionParametersBrowserTTLMode] `json:"mode,required"` // The TTL (in seconds) if you choose override_origin mode. Default param.Field[int64] `json:"default"` }
Specify how long client browsers should cache the response. Cloudflare cache purge will not purge content cached on client browsers, so high browser TTLs may lead to stale content.
func (SetCacheSettingsRuleActionParametersBrowserTTLParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersBrowserTTLParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKey ¶
type SetCacheSettingsRuleActionParametersCacheKey struct { // Separate cached content based on the visitor’s device type CacheByDeviceType bool `json:"cache_by_device_type"` // Protect from web cache deception attacks while allowing static assets to be // cached CacheDeceptionArmor bool `json:"cache_deception_armor"` // Customize which components of the request are included or excluded from the // cache key. CustomKey SetCacheSettingsRuleActionParametersCacheKeyCustomKey `json:"custom_key"` // Treat requests with the same query parameters the same, regardless of the order // those query parameters are in. A value of true ignores the query strings' order. IgnoreQueryStringsOrder bool `json:"ignore_query_strings_order"` JSON setCacheSettingsRuleActionParametersCacheKeyJSON `json:"-"` }
Define which components of the request are included or excluded from the cache key Cloudflare uses to store the response in cache.
func (*SetCacheSettingsRuleActionParametersCacheKey) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKey) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKey ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKey struct { // The cookies to include in building the cache key. Cookie SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie `json:"cookie"` // The header names and values to include in building the cache key. Header SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader `json:"header"` // Whether to use the original host or the resolved host in the cache key. Host SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost `json:"host"` // Use the presence or absence of parameters in the query string to build the cache // key. QueryString SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString `json:"query_string"` // Characteristics of the request user agent used in building the cache key. User SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser `json:"user"` JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyJSON `json:"-"` }
Customize which components of the request are included or excluded from the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKey) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKey) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie struct { // Checks for the presence of these cookie names. The presence of these cookies is // used in building the cache key. CheckPresence []string `json:"check_presence"` // Include these cookies' names and their values. Include []string `json:"include"` JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieJSON `json:"-"` }
The cookies to include in building the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookie) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam struct { // Checks for the presence of these cookie names. The presence of these cookies is // used in building the cache key. CheckPresence param.Field[[]string] `json:"check_presence"` // Include these cookies' names and their values. Include param.Field[[]string] `json:"include"` }
The cookies to include in building the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader struct { // Checks for the presence of these header names. The presence of these headers is // used in building the cache key. CheckPresence []string `json:"check_presence"` // Whether or not to include the origin header. A value of true will exclude the // origin header in the cache key. ExcludeOrigin bool `json:"exclude_origin"` // Include these headers' names and their values. Include []string `json:"include"` JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderJSON `json:"-"` }
The header names and values to include in building the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeader) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam struct { // Checks for the presence of these header names. The presence of these headers is // used in building the cache key. CheckPresence param.Field[[]string] `json:"check_presence"` // Whether or not to include the origin header. A value of true will exclude the // origin header in the cache key. ExcludeOrigin param.Field[bool] `json:"exclude_origin"` // Include these headers' names and their values. Include param.Field[[]string] `json:"include"` }
The header names and values to include in building the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost struct { // Use the resolved host in the cache key. A value of true will use the resolved // host, while a value or false will use the original host. Resolved bool `json:"resolved"` JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyHostJSON `json:"-"` }
Whether to use the original host or the resolved host in the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHost) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam struct { // Use the resolved host in the cache key. A value of true will use the resolved // host, while a value or false will use the original host. Resolved param.Field[bool] `json:"resolved"` }
Whether to use the original host or the resolved host in the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam struct { // The cookies to include in building the cache key. Cookie param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyCookieParam] `json:"cookie"` // The header names and values to include in building the cache key. Header param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHeaderParam] `json:"header"` // Whether to use the original host or the resolved host in the cache key. Host param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyHostParam] `json:"host"` // Use the presence or absence of parameters in the query string to build the cache // key. QueryString param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam] `json:"query_string"` // Characteristics of the request user agent used in building the cache key. User param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam] `json:"user"` }
Customize which components of the request are included or excluded from the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString struct { // build the cache key using all query string parameters EXCECPT these excluded // parameters Exclude SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude `json:"exclude"` // build the cache key using a list of query string parameters that ARE in the // request. Include SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude `json:"include"` JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringJSON `json:"-"` }
Use the presence or absence of parameters in the query string to build the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryString) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude struct { // Exclude all query string parameters from use in building the cache key. All bool `json:"all"` // A list of query string parameters NOT used to build the cache key. All // parameters present in the request but missing in this list will be used to build // the cache key. List []string `json:"list"` JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeJSON `json:"-"` }
build the cache key using all query string parameters EXCECPT these excluded parameters
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExclude) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeParam struct { // Exclude all query string parameters from use in building the cache key. All param.Field[bool] `json:"all"` // A list of query string parameters NOT used to build the cache key. All // parameters present in the request but missing in this list will be used to build // the cache key. List param.Field[[]string] `json:"list"` }
build the cache key using all query string parameters EXCECPT these excluded parameters
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude struct { // Use all query string parameters in the cache key. All bool `json:"all"` // A list of query string parameters used to build the cache key. List []string `json:"list"` JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeJSON `json:"-"` }
build the cache key using a list of query string parameters that ARE in the request.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringInclude) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeParam struct { // Use all query string parameters in the cache key. All param.Field[bool] `json:"all"` // A list of query string parameters used to build the cache key. List param.Field[[]string] `json:"list"` }
build the cache key using a list of query string parameters that ARE in the request.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam struct { // build the cache key using all query string parameters EXCECPT these excluded // parameters Exclude param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringExcludeParam] `json:"exclude"` // build the cache key using a list of query string parameters that ARE in the // request. Include param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringIncludeParam] `json:"include"` }
Use the presence or absence of parameters in the query string to build the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyQueryStringParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser struct { // Use the user agent's device type in the cache key. DeviceType bool `json:"device_type"` // Use the user agents's country in the cache key. Geo bool `json:"geo"` // Use the user agent's language in the cache key. Lang bool `json:"lang"` JSON setCacheSettingsRuleActionParametersCacheKeyCustomKeyUserJSON `json:"-"` }
Characteristics of the request user agent used in building the cache key.
func (*SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUser) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam struct { // Use the user agent's device type in the cache key. DeviceType param.Field[bool] `json:"device_type"` // Use the user agents's country in the cache key. Geo param.Field[bool] `json:"geo"` // Use the user agent's language in the cache key. Lang param.Field[bool] `json:"lang"` }
Characteristics of the request user agent used in building the cache key.
func (SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyCustomKeyUserParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheKeyParam ¶
type SetCacheSettingsRuleActionParametersCacheKeyParam struct { // Separate cached content based on the visitor’s device type CacheByDeviceType param.Field[bool] `json:"cache_by_device_type"` // Protect from web cache deception attacks while allowing static assets to be // cached CacheDeceptionArmor param.Field[bool] `json:"cache_deception_armor"` // Customize which components of the request are included or excluded from the // cache key. CustomKey param.Field[SetCacheSettingsRuleActionParametersCacheKeyCustomKeyParam] `json:"custom_key"` // Treat requests with the same query parameters the same, regardless of the order // those query parameters are in. A value of true ignores the query strings' order. IgnoreQueryStringsOrder param.Field[bool] `json:"ignore_query_strings_order"` }
Define which components of the request are included or excluded from the cache key Cloudflare uses to store the response in cache.
func (SetCacheSettingsRuleActionParametersCacheKeyParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheKeyParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersCacheReserve ¶
type SetCacheSettingsRuleActionParametersCacheReserve struct { // Determines whether cache reserve is enabled. If this is true and a request meets // eligibility criteria, Cloudflare will write the resource to cache reserve. Eligible bool `json:"eligible,required"` // The minimum file size eligible for store in cache reserve. MinFileSize int64 `json:"min_file_size,required"` JSON setCacheSettingsRuleActionParametersCacheReserveJSON `json:"-"` }
Mark whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan).
func (*SetCacheSettingsRuleActionParametersCacheReserve) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersCacheReserve) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersCacheReserveParam ¶
type SetCacheSettingsRuleActionParametersCacheReserveParam struct { // Determines whether cache reserve is enabled. If this is true and a request meets // eligibility criteria, Cloudflare will write the resource to cache reserve. Eligible param.Field[bool] `json:"eligible,required"` // The minimum file size eligible for store in cache reserve. MinFileSize param.Field[int64] `json:"min_file_size,required"` }
Mark whether the request's response from origin is eligible for Cache Reserve (requires a Cache Reserve add-on plan).
func (SetCacheSettingsRuleActionParametersCacheReserveParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersCacheReserveParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersEdgeTTL ¶
type SetCacheSettingsRuleActionParametersEdgeTTL struct { // The TTL (in seconds) if you choose override_origin mode. Default int64 `json:"default,required"` // edge ttl options Mode SetCacheSettingsRuleActionParametersEdgeTTLMode `json:"mode,required"` // List of single status codes, or status code ranges to apply the selected mode StatusCodeTTL []SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL `json:"status_code_ttl,required"` JSON setCacheSettingsRuleActionParametersEdgeTTLJSON `json:"-"` }
TTL (Time to Live) specifies the maximum time to cache a resource in the Cloudflare edge network.
func (*SetCacheSettingsRuleActionParametersEdgeTTL) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersEdgeTTL) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersEdgeTTLMode ¶
type SetCacheSettingsRuleActionParametersEdgeTTLMode string
edge ttl options
const ( SetCacheSettingsRuleActionParametersEdgeTTLModeRespectOrigin SetCacheSettingsRuleActionParametersEdgeTTLMode = "respect_origin" SetCacheSettingsRuleActionParametersEdgeTTLModeBypassByDefault SetCacheSettingsRuleActionParametersEdgeTTLMode = "bypass_by_default" SetCacheSettingsRuleActionParametersEdgeTTLModeOverrideOrigin SetCacheSettingsRuleActionParametersEdgeTTLMode = "override_origin" )
func (SetCacheSettingsRuleActionParametersEdgeTTLMode) IsKnown ¶
func (r SetCacheSettingsRuleActionParametersEdgeTTLMode) IsKnown() bool
type SetCacheSettingsRuleActionParametersEdgeTTLParam ¶
type SetCacheSettingsRuleActionParametersEdgeTTLParam struct { // The TTL (in seconds) if you choose override_origin mode. Default param.Field[int64] `json:"default,required"` // edge ttl options Mode param.Field[SetCacheSettingsRuleActionParametersEdgeTTLMode] `json:"mode,required"` // List of single status codes, or status code ranges to apply the selected mode StatusCodeTTL param.Field[[]SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam] `json:"status_code_ttl,required"` }
TTL (Time to Live) specifies the maximum time to cache a resource in the Cloudflare edge network.
func (SetCacheSettingsRuleActionParametersEdgeTTLParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersEdgeTTLParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL ¶
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL struct { // Time to cache a response (in seconds). A value of 0 is equivalent to setting the // Cache-Control header with the value "no-cache". A value of -1 is equivalent to // setting Cache-Control header with the value of "no-store". Value int64 `json:"value,required"` // The range of status codes used to apply the selected mode. StatusCodeRange SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange `json:"status_code_range"` // Set the ttl for responses with this specific status code StatusCodeValue int64 `json:"status_code_value"` JSON setCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLJSON `json:"-"` }
Specify how long Cloudflare should cache the response based on the status code from the origin. Can be a single status code or a range or status codes
func (*SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTL) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam ¶
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam struct { // Time to cache a response (in seconds). A value of 0 is equivalent to setting the // Cache-Control header with the value "no-cache". A value of -1 is equivalent to // setting Cache-Control header with the value of "no-store". Value param.Field[int64] `json:"value,required"` // The range of status codes used to apply the selected mode. StatusCodeRange param.Field[SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam] `json:"status_code_range"` // Set the ttl for responses with this specific status code StatusCodeValue param.Field[int64] `json:"status_code_value"` }
Specify how long Cloudflare should cache the response based on the status code from the origin. Can be a single status code or a range or status codes
func (SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange ¶
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange struct { // response status code lower bound From int64 `json:"from,required"` // response status code upper bound To int64 `json:"to,required"` JSON setCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeJSON `json:"-"` }
The range of status codes used to apply the selected mode.
func (*SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRange) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam ¶
type SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam struct { // response status code lower bound From param.Field[int64] `json:"from,required"` // response status code upper bound To param.Field[int64] `json:"to,required"` }
The range of status codes used to apply the selected mode.
func (SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersEdgeTTLStatusCodeTTLStatusCodeRangeParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersParam ¶
type SetCacheSettingsRuleActionParametersParam struct { // List of additional ports that caching can be enabled on. AdditionalCacheablePorts param.Field[[]int64] `json:"additional_cacheable_ports"` // Specify how long client browsers should cache the response. Cloudflare cache // purge will not purge content cached on client browsers, so high browser TTLs may // lead to stale content. BrowserTTL param.Field[SetCacheSettingsRuleActionParametersBrowserTTLParam] `json:"browser_ttl"` // Mark whether the request’s response from origin is eligible for caching. Caching // itself will still depend on the cache-control header and your other caching // configurations. Cache param.Field[bool] `json:"cache"` // Define which components of the request are included or excluded from the cache // key Cloudflare uses to store the response in cache. CacheKey param.Field[SetCacheSettingsRuleActionParametersCacheKeyParam] `json:"cache_key"` // Mark whether the request's response from origin is eligible for Cache Reserve // (requires a Cache Reserve add-on plan). CacheReserve param.Field[SetCacheSettingsRuleActionParametersCacheReserveParam] `json:"cache_reserve"` // TTL (Time to Live) specifies the maximum time to cache a resource in the // Cloudflare edge network. EdgeTTL param.Field[SetCacheSettingsRuleActionParametersEdgeTTLParam] `json:"edge_ttl"` // When enabled, Cloudflare will aim to strictly adhere to RFC 7234. OriginCacheControl param.Field[bool] `json:"origin_cache_control"` // Generate Cloudflare error pages from issues sent from the origin server. When // on, error pages will trigger for issues from the origin OriginErrorPagePassthru param.Field[bool] `json:"origin_error_page_passthru"` // Define a timeout value between two successive read operations to your origin // server. Historically, the timeout value between two read options from Cloudflare // to an origin server is 100 seconds. If you are attempting to reduce HTTP 524 // errors because of timeouts from an origin server, try increasing this timeout // value. ReadTimeout param.Field[int64] `json:"read_timeout"` // headers. When off, Cloudflare converts strong ETag headers to weak ETag headers. RespectStrongEtags param.Field[bool] `json:"respect_strong_etags"` // Define if Cloudflare should serve stale content while getting the latest content // from the origin. If on, Cloudflare will not serve stale content while getting // the latest content from the origin. ServeStale param.Field[SetCacheSettingsRuleActionParametersServeStaleParam] `json:"serve_stale"` }
The parameters configuring the rule's action.
func (SetCacheSettingsRuleActionParametersParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleActionParametersServeStale ¶
type SetCacheSettingsRuleActionParametersServeStale struct { // Defines whether Cloudflare should serve stale content while updating. If true, // Cloudflare will not serve stale content while getting the latest content from // the origin. DisableStaleWhileUpdating bool `json:"disable_stale_while_updating,required"` JSON setCacheSettingsRuleActionParametersServeStaleJSON `json:"-"` }
Define if Cloudflare should serve stale content while getting the latest content from the origin. If on, Cloudflare will not serve stale content while getting the latest content from the origin.
func (*SetCacheSettingsRuleActionParametersServeStale) UnmarshalJSON ¶
func (r *SetCacheSettingsRuleActionParametersServeStale) UnmarshalJSON(data []byte) (err error)
type SetCacheSettingsRuleActionParametersServeStaleParam ¶
type SetCacheSettingsRuleActionParametersServeStaleParam struct { // Defines whether Cloudflare should serve stale content while updating. If true, // Cloudflare will not serve stale content while getting the latest content from // the origin. DisableStaleWhileUpdating param.Field[bool] `json:"disable_stale_while_updating,required"` }
Define if Cloudflare should serve stale content while getting the latest content from the origin. If on, Cloudflare will not serve stale content while getting the latest content from the origin.
func (SetCacheSettingsRuleActionParametersServeStaleParam) MarshalJSON ¶
func (r SetCacheSettingsRuleActionParametersServeStaleParam) MarshalJSON() (data []byte, err error)
type SetCacheSettingsRuleParam ¶
type SetCacheSettingsRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[SetCacheSettingsRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[SetCacheSettingsRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (SetCacheSettingsRuleParam) MarshalJSON ¶
func (r SetCacheSettingsRuleParam) MarshalJSON() (data []byte, err error)
type SetConfigRule ¶
type SetConfigRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action SetConfigRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters SetConfigRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON setConfigRuleJSON `json:"-"` }
func (*SetConfigRule) UnmarshalJSON ¶
func (r *SetConfigRule) UnmarshalJSON(data []byte) (err error)
type SetConfigRuleAction ¶
type SetConfigRuleAction string
The action to perform when the rule matches.
const (
SetConfigRuleActionSetConfig SetConfigRuleAction = "set_config"
)
func (SetConfigRuleAction) IsKnown ¶
func (r SetConfigRuleAction) IsKnown() bool
type SetConfigRuleActionParameters ¶
type SetConfigRuleActionParameters struct { // Turn on or off Automatic HTTPS Rewrites. AutomaticHTTPSRewrites bool `json:"automatic_https_rewrites"` // Select which file extensions to minify automatically. Autominify SetConfigRuleActionParametersAutominify `json:"autominify"` // Turn on or off Browser Integrity Check. Bic bool `json:"bic"` // Turn off all active Cloudflare Apps. DisableApps bool `json:"disable_apps"` // Turn off Zaraz. DisableZaraz bool `json:"disable_zaraz"` // Turn on or off Email Obfuscation. EmailObfuscation bool `json:"email_obfuscation"` // Turn on or off the Hotlink Protection. HotlinkProtection bool `json:"hotlink_protection"` // Turn on or off Mirage. Mirage bool `json:"mirage"` // Turn on or off Opportunistic Encryption. OpportunisticEncryption bool `json:"opportunistic_encryption"` // Configure the Polish level. Polish SetConfigRuleActionParametersPolish `json:"polish"` // Turn on or off Rocket Loader RocketLoader bool `json:"rocket_loader"` // Configure the Security Level. SecurityLevel SetConfigRuleActionParametersSecurityLevel `json:"security_level"` // Turn on or off Server Side Excludes. ServerSideExcludes bool `json:"server_side_excludes"` // Configure the SSL level. SSL SetConfigRuleActionParametersSSL `json:"ssl"` // Turn on or off Signed Exchanges (SXG). Sxg bool `json:"sxg"` JSON setConfigRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*SetConfigRuleActionParameters) UnmarshalJSON ¶
func (r *SetConfigRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type SetConfigRuleActionParametersAutominify ¶
type SetConfigRuleActionParametersAutominify struct { // Minify CSS files. Css bool `json:"css"` // Minify HTML files. HTML bool `json:"html"` // Minify JS files. JS bool `json:"js"` JSON setConfigRuleActionParametersAutominifyJSON `json:"-"` }
Select which file extensions to minify automatically.
func (*SetConfigRuleActionParametersAutominify) UnmarshalJSON ¶
func (r *SetConfigRuleActionParametersAutominify) UnmarshalJSON(data []byte) (err error)
type SetConfigRuleActionParametersAutominifyParam ¶
type SetConfigRuleActionParametersAutominifyParam struct { // Minify CSS files. Css param.Field[bool] `json:"css"` // Minify HTML files. HTML param.Field[bool] `json:"html"` // Minify JS files. JS param.Field[bool] `json:"js"` }
Select which file extensions to minify automatically.
func (SetConfigRuleActionParametersAutominifyParam) MarshalJSON ¶
func (r SetConfigRuleActionParametersAutominifyParam) MarshalJSON() (data []byte, err error)
type SetConfigRuleActionParametersParam ¶
type SetConfigRuleActionParametersParam struct { // Turn on or off Automatic HTTPS Rewrites. AutomaticHTTPSRewrites param.Field[bool] `json:"automatic_https_rewrites"` // Select which file extensions to minify automatically. Autominify param.Field[SetConfigRuleActionParametersAutominifyParam] `json:"autominify"` // Turn on or off Browser Integrity Check. Bic param.Field[bool] `json:"bic"` // Turn off all active Cloudflare Apps. DisableApps param.Field[bool] `json:"disable_apps"` // Turn off Zaraz. DisableZaraz param.Field[bool] `json:"disable_zaraz"` // Turn on or off Email Obfuscation. EmailObfuscation param.Field[bool] `json:"email_obfuscation"` // Turn on or off the Hotlink Protection. HotlinkProtection param.Field[bool] `json:"hotlink_protection"` // Turn on or off Mirage. Mirage param.Field[bool] `json:"mirage"` // Turn on or off Opportunistic Encryption. OpportunisticEncryption param.Field[bool] `json:"opportunistic_encryption"` // Configure the Polish level. Polish param.Field[SetConfigRuleActionParametersPolish] `json:"polish"` // Turn on or off Rocket Loader RocketLoader param.Field[bool] `json:"rocket_loader"` // Configure the Security Level. SecurityLevel param.Field[SetConfigRuleActionParametersSecurityLevel] `json:"security_level"` // Turn on or off Server Side Excludes. ServerSideExcludes param.Field[bool] `json:"server_side_excludes"` // Configure the SSL level. SSL param.Field[SetConfigRuleActionParametersSSL] `json:"ssl"` // Turn on or off Signed Exchanges (SXG). Sxg param.Field[bool] `json:"sxg"` }
The parameters configuring the rule's action.
func (SetConfigRuleActionParametersParam) MarshalJSON ¶
func (r SetConfigRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type SetConfigRuleActionParametersPolish ¶
type SetConfigRuleActionParametersPolish string
Configure the Polish level.
const ( SetConfigRuleActionParametersPolishOff SetConfigRuleActionParametersPolish = "off" SetConfigRuleActionParametersPolishLossless SetConfigRuleActionParametersPolish = "lossless" SetConfigRuleActionParametersPolishLossy SetConfigRuleActionParametersPolish = "lossy" )
func (SetConfigRuleActionParametersPolish) IsKnown ¶
func (r SetConfigRuleActionParametersPolish) IsKnown() bool
type SetConfigRuleActionParametersSSL ¶
type SetConfigRuleActionParametersSSL string
Configure the SSL level.
const ( SetConfigRuleActionParametersSSLOff SetConfigRuleActionParametersSSL = "off" SetConfigRuleActionParametersSSLFlexible SetConfigRuleActionParametersSSL = "flexible" SetConfigRuleActionParametersSSLFull SetConfigRuleActionParametersSSL = "full" SetConfigRuleActionParametersSSLStrict SetConfigRuleActionParametersSSL = "strict" SetConfigRuleActionParametersSSLOriginPull SetConfigRuleActionParametersSSL = "origin_pull" )
func (SetConfigRuleActionParametersSSL) IsKnown ¶
func (r SetConfigRuleActionParametersSSL) IsKnown() bool
type SetConfigRuleActionParametersSecurityLevel ¶
type SetConfigRuleActionParametersSecurityLevel string
Configure the Security Level.
const ( SetConfigRuleActionParametersSecurityLevelOff SetConfigRuleActionParametersSecurityLevel = "off" SetConfigRuleActionParametersSecurityLevelEssentiallyOff SetConfigRuleActionParametersSecurityLevel = "essentially_off" SetConfigRuleActionParametersSecurityLevelLow SetConfigRuleActionParametersSecurityLevel = "low" SetConfigRuleActionParametersSecurityLevelMedium SetConfigRuleActionParametersSecurityLevel = "medium" SetConfigRuleActionParametersSecurityLevelHigh SetConfigRuleActionParametersSecurityLevel = "high" SetConfigRuleActionParametersSecurityLevelUnderAttack SetConfigRuleActionParametersSecurityLevel = "under_attack" )
func (SetConfigRuleActionParametersSecurityLevel) IsKnown ¶
func (r SetConfigRuleActionParametersSecurityLevel) IsKnown() bool
type SetConfigRuleParam ¶
type SetConfigRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[SetConfigRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[SetConfigRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (SetConfigRuleParam) MarshalJSON ¶
func (r SetConfigRuleParam) MarshalJSON() (data []byte, err error)
type SkipRule ¶
type SkipRule struct { // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The version of the rule. Version string `json:"version,required"` // The unique ID of the rule. ID string `json:"id"` // The action to perform when the rule matches. Action SkipRuleAction `json:"action"` // The parameters configuring the rule's action. ActionParameters SkipRuleActionParameters `json:"action_parameters"` // The categories of the rule. Categories []string `json:"categories"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` JSON skipRuleJSON `json:"-"` }
func (*SkipRule) UnmarshalJSON ¶
type SkipRuleAction ¶
type SkipRuleAction string
The action to perform when the rule matches.
const (
SkipRuleActionSkip SkipRuleAction = "skip"
)
func (SkipRuleAction) IsKnown ¶
func (r SkipRuleAction) IsKnown() bool
type SkipRuleActionParameters ¶
type SkipRuleActionParameters struct { // A list of phases to skip the execution of. This option is incompatible with the // ruleset and rulesets options. Phases []SkipRuleActionParametersPhase `json:"phases"` // A list of legacy security products to skip the execution of. Products []SkipRuleActionParametersProduct `json:"products"` // A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the // execution of. This option is incompatible with the ruleset option. Rules map[string][]string `json:"rules"` // A ruleset to skip the execution of. This option is incompatible with the // rulesets, rules and phases options. Ruleset SkipRuleActionParametersRuleset `json:"ruleset"` // A list of ruleset IDs to skip the execution of. This option is incompatible with // the ruleset and phases options. Rulesets []string `json:"rulesets"` JSON skipRuleActionParametersJSON `json:"-"` }
The parameters configuring the rule's action.
func (*SkipRuleActionParameters) UnmarshalJSON ¶
func (r *SkipRuleActionParameters) UnmarshalJSON(data []byte) (err error)
type SkipRuleActionParametersParam ¶
type SkipRuleActionParametersParam struct { // A list of phases to skip the execution of. This option is incompatible with the // ruleset and rulesets options. Phases param.Field[[]SkipRuleActionParametersPhase] `json:"phases"` // A list of legacy security products to skip the execution of. Products param.Field[[]SkipRuleActionParametersProduct] `json:"products"` // A mapping of ruleset IDs to a list of rule IDs in that ruleset to skip the // execution of. This option is incompatible with the ruleset option. Rules param.Field[map[string][]string] `json:"rules"` // A ruleset to skip the execution of. This option is incompatible with the // rulesets, rules and phases options. Ruleset param.Field[SkipRuleActionParametersRuleset] `json:"ruleset"` // A list of ruleset IDs to skip the execution of. This option is incompatible with // the ruleset and phases options. Rulesets param.Field[[]string] `json:"rulesets"` }
The parameters configuring the rule's action.
func (SkipRuleActionParametersParam) MarshalJSON ¶
func (r SkipRuleActionParametersParam) MarshalJSON() (data []byte, err error)
type SkipRuleActionParametersPhase ¶
type SkipRuleActionParametersPhase string
A phase to skip the execution of.
const ( SkipRuleActionParametersPhaseDDoSL4 SkipRuleActionParametersPhase = "ddos_l4" SkipRuleActionParametersPhaseDDoSL7 SkipRuleActionParametersPhase = "ddos_l7" SkipRuleActionParametersPhaseHTTPConfigSettings SkipRuleActionParametersPhase = "http_config_settings" SkipRuleActionParametersPhaseHTTPCustomErrors SkipRuleActionParametersPhase = "http_custom_errors" SkipRuleActionParametersPhaseHTTPLogCustomFields SkipRuleActionParametersPhase = "http_log_custom_fields" SkipRuleActionParametersPhaseHTTPRatelimit SkipRuleActionParametersPhase = "http_ratelimit" SkipRuleActionParametersPhaseHTTPRequestCacheSettings SkipRuleActionParametersPhase = "http_request_cache_settings" SkipRuleActionParametersPhaseHTTPRequestDynamicRedirect SkipRuleActionParametersPhase = "http_request_dynamic_redirect" SkipRuleActionParametersPhaseHTTPRequestFirewallCustom SkipRuleActionParametersPhase = "http_request_firewall_custom" SkipRuleActionParametersPhaseHTTPRequestFirewallManaged SkipRuleActionParametersPhase = "http_request_firewall_managed" SkipRuleActionParametersPhaseHTTPRequestLateTransform SkipRuleActionParametersPhase = "http_request_late_transform" SkipRuleActionParametersPhaseHTTPRequestOrigin SkipRuleActionParametersPhase = "http_request_origin" SkipRuleActionParametersPhaseHTTPRequestRedirect SkipRuleActionParametersPhase = "http_request_redirect" SkipRuleActionParametersPhaseHTTPRequestSanitize SkipRuleActionParametersPhase = "http_request_sanitize" SkipRuleActionParametersPhaseHTTPRequestSBFM SkipRuleActionParametersPhase = "http_request_sbfm" SkipRuleActionParametersPhaseHTTPRequestSelectConfiguration SkipRuleActionParametersPhase = "http_request_select_configuration" SkipRuleActionParametersPhaseHTTPRequestTransform SkipRuleActionParametersPhase = "http_request_transform" SkipRuleActionParametersPhaseHTTPResponseCompression SkipRuleActionParametersPhase = "http_response_compression" SkipRuleActionParametersPhaseHTTPResponseFirewallManaged SkipRuleActionParametersPhase = "http_response_firewall_managed" SkipRuleActionParametersPhaseHTTPResponseHeadersTransform SkipRuleActionParametersPhase = "http_response_headers_transform" SkipRuleActionParametersPhaseMagicTransit SkipRuleActionParametersPhase = "magic_transit" SkipRuleActionParametersPhaseMagicTransitIDsManaged SkipRuleActionParametersPhase = "magic_transit_ids_managed" SkipRuleActionParametersPhaseMagicTransitManaged SkipRuleActionParametersPhase = "magic_transit_managed" )
func (SkipRuleActionParametersPhase) IsKnown ¶
func (r SkipRuleActionParametersPhase) IsKnown() bool
type SkipRuleActionParametersProduct ¶
type SkipRuleActionParametersProduct string
The name of a legacy security product to skip the execution of.
const ( SkipRuleActionParametersProductBic SkipRuleActionParametersProduct = "bic" SkipRuleActionParametersProductHot SkipRuleActionParametersProduct = "hot" SkipRuleActionParametersProductRateLimit SkipRuleActionParametersProduct = "rateLimit" SkipRuleActionParametersProductSecurityLevel SkipRuleActionParametersProduct = "securityLevel" SkipRuleActionParametersProductUABlock SkipRuleActionParametersProduct = "uaBlock" SkipRuleActionParametersProductWAF SkipRuleActionParametersProduct = "waf" SkipRuleActionParametersProductZoneLockdown SkipRuleActionParametersProduct = "zoneLockdown" )
func (SkipRuleActionParametersProduct) IsKnown ¶
func (r SkipRuleActionParametersProduct) IsKnown() bool
type SkipRuleActionParametersRuleset ¶
type SkipRuleActionParametersRuleset string
A ruleset to skip the execution of. This option is incompatible with the rulesets, rules and phases options.
const (
SkipRuleActionParametersRulesetCurrent SkipRuleActionParametersRuleset = "current"
)
func (SkipRuleActionParametersRuleset) IsKnown ¶
func (r SkipRuleActionParametersRuleset) IsKnown() bool
type SkipRuleParam ¶
type SkipRuleParam struct { // The unique ID of the rule. ID param.Field[string] `json:"id"` // The action to perform when the rule matches. Action param.Field[SkipRuleAction] `json:"action"` // The parameters configuring the rule's action. ActionParameters param.Field[SkipRuleActionParametersParam] `json:"action_parameters"` // An informative description of the rule. Description param.Field[string] `json:"description"` // Whether the rule should be executed. Enabled param.Field[bool] `json:"enabled"` // The expression defining which traffic will match the rule. Expression param.Field[string] `json:"expression"` // An object configuring the rule's logging behavior. Logging param.Field[LoggingParam] `json:"logging"` // The reference of the rule (the rule ID by default). Ref param.Field[string] `json:"ref"` }
func (SkipRuleParam) MarshalJSON ¶
func (r SkipRuleParam) MarshalJSON() (data []byte, err error)
type VersionByTagGetParams ¶
type VersionByTagGetResponse ¶
type VersionByTagGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind VersionByTagGetResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase VersionByTagGetResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []VersionByTagGetResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON versionByTagGetResponseJSON `json:"-"` }
A ruleset object.
func (*VersionByTagGetResponse) UnmarshalJSON ¶
func (r *VersionByTagGetResponse) UnmarshalJSON(data []byte) (err error)
type VersionByTagGetResponseEnvelope ¶
type VersionByTagGetResponseEnvelope struct { // A list of error messages. Errors []VersionByTagGetResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []VersionByTagGetResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result VersionByTagGetResponse `json:"result,required"` // Whether the API call was successful. Success VersionByTagGetResponseEnvelopeSuccess `json:"success,required"` JSON versionByTagGetResponseEnvelopeJSON `json:"-"` }
A response object.
func (*VersionByTagGetResponseEnvelope) UnmarshalJSON ¶
func (r *VersionByTagGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type VersionByTagGetResponseEnvelopeErrors ¶
type VersionByTagGetResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source VersionByTagGetResponseEnvelopeErrorsSource `json:"source"` JSON versionByTagGetResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*VersionByTagGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *VersionByTagGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type VersionByTagGetResponseEnvelopeErrorsSource ¶
type VersionByTagGetResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON versionByTagGetResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*VersionByTagGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *VersionByTagGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type VersionByTagGetResponseEnvelopeMessages ¶
type VersionByTagGetResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source VersionByTagGetResponseEnvelopeMessagesSource `json:"source"` JSON versionByTagGetResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*VersionByTagGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *VersionByTagGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type VersionByTagGetResponseEnvelopeMessagesSource ¶
type VersionByTagGetResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON versionByTagGetResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*VersionByTagGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *VersionByTagGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type VersionByTagGetResponseEnvelopeSuccess ¶
type VersionByTagGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
VersionByTagGetResponseEnvelopeSuccessTrue VersionByTagGetResponseEnvelopeSuccess = true
)
func (VersionByTagGetResponseEnvelopeSuccess) IsKnown ¶
func (r VersionByTagGetResponseEnvelopeSuccess) IsKnown() bool
type VersionByTagGetResponseKind ¶
type VersionByTagGetResponseKind string
The kind of the ruleset.
const ( VersionByTagGetResponseKindManaged VersionByTagGetResponseKind = "managed" VersionByTagGetResponseKindCustom VersionByTagGetResponseKind = "custom" VersionByTagGetResponseKindRoot VersionByTagGetResponseKind = "root" VersionByTagGetResponseKindZone VersionByTagGetResponseKind = "zone" )
func (VersionByTagGetResponseKind) IsKnown ¶
func (r VersionByTagGetResponseKind) IsKnown() bool
type VersionByTagGetResponsePhase ¶
type VersionByTagGetResponsePhase string
The phase of the ruleset.
const ( VersionByTagGetResponsePhaseDDoSL4 VersionByTagGetResponsePhase = "ddos_l4" VersionByTagGetResponsePhaseDDoSL7 VersionByTagGetResponsePhase = "ddos_l7" VersionByTagGetResponsePhaseHTTPConfigSettings VersionByTagGetResponsePhase = "http_config_settings" VersionByTagGetResponsePhaseHTTPCustomErrors VersionByTagGetResponsePhase = "http_custom_errors" VersionByTagGetResponsePhaseHTTPLogCustomFields VersionByTagGetResponsePhase = "http_log_custom_fields" VersionByTagGetResponsePhaseHTTPRatelimit VersionByTagGetResponsePhase = "http_ratelimit" VersionByTagGetResponsePhaseHTTPRequestCacheSettings VersionByTagGetResponsePhase = "http_request_cache_settings" VersionByTagGetResponsePhaseHTTPRequestDynamicRedirect VersionByTagGetResponsePhase = "http_request_dynamic_redirect" VersionByTagGetResponsePhaseHTTPRequestFirewallCustom VersionByTagGetResponsePhase = "http_request_firewall_custom" VersionByTagGetResponsePhaseHTTPRequestFirewallManaged VersionByTagGetResponsePhase = "http_request_firewall_managed" VersionByTagGetResponsePhaseHTTPRequestLateTransform VersionByTagGetResponsePhase = "http_request_late_transform" VersionByTagGetResponsePhaseHTTPRequestOrigin VersionByTagGetResponsePhase = "http_request_origin" VersionByTagGetResponsePhaseHTTPRequestRedirect VersionByTagGetResponsePhase = "http_request_redirect" VersionByTagGetResponsePhaseHTTPRequestSanitize VersionByTagGetResponsePhase = "http_request_sanitize" VersionByTagGetResponsePhaseHTTPRequestSBFM VersionByTagGetResponsePhase = "http_request_sbfm" VersionByTagGetResponsePhaseHTTPRequestSelectConfiguration VersionByTagGetResponsePhase = "http_request_select_configuration" VersionByTagGetResponsePhaseHTTPRequestTransform VersionByTagGetResponsePhase = "http_request_transform" VersionByTagGetResponsePhaseHTTPResponseCompression VersionByTagGetResponsePhase = "http_response_compression" VersionByTagGetResponsePhaseHTTPResponseFirewallManaged VersionByTagGetResponsePhase = "http_response_firewall_managed" VersionByTagGetResponsePhaseHTTPResponseHeadersTransform VersionByTagGetResponsePhase = "http_response_headers_transform" VersionByTagGetResponsePhaseMagicTransit VersionByTagGetResponsePhase = "magic_transit" VersionByTagGetResponsePhaseMagicTransitIDsManaged VersionByTagGetResponsePhase = "magic_transit_ids_managed" VersionByTagGetResponsePhaseMagicTransitManaged VersionByTagGetResponsePhase = "magic_transit_managed" )
func (VersionByTagGetResponsePhase) IsKnown ¶
func (r VersionByTagGetResponsePhase) IsKnown() bool
type VersionByTagGetResponseRule ¶
type VersionByTagGetResponseRule struct { // The action to perform when the rule matches. Action VersionByTagGetResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON versionByTagGetResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (VersionByTagGetResponseRule) AsUnion ¶
func (r VersionByTagGetResponseRule) AsUnion() VersionByTagGetResponseRulesUnion
func (*VersionByTagGetResponseRule) UnmarshalJSON ¶
func (r *VersionByTagGetResponseRule) UnmarshalJSON(data []byte) (err error)
type VersionByTagGetResponseRulesAction ¶
type VersionByTagGetResponseRulesAction string
The action to perform when the rule matches.
const ( VersionByTagGetResponseRulesActionBlock VersionByTagGetResponseRulesAction = "block" VersionByTagGetResponseRulesActionChallenge VersionByTagGetResponseRulesAction = "challenge" VersionByTagGetResponseRulesActionCompressResponse VersionByTagGetResponseRulesAction = "compress_response" VersionByTagGetResponseRulesActionExecute VersionByTagGetResponseRulesAction = "execute" VersionByTagGetResponseRulesActionJSChallenge VersionByTagGetResponseRulesAction = "js_challenge" VersionByTagGetResponseRulesActionLog VersionByTagGetResponseRulesAction = "log" VersionByTagGetResponseRulesActionManagedChallenge VersionByTagGetResponseRulesAction = "managed_challenge" VersionByTagGetResponseRulesActionRedirect VersionByTagGetResponseRulesAction = "redirect" VersionByTagGetResponseRulesActionRewrite VersionByTagGetResponseRulesAction = "rewrite" VersionByTagGetResponseRulesActionRoute VersionByTagGetResponseRulesAction = "route" VersionByTagGetResponseRulesActionScore VersionByTagGetResponseRulesAction = "score" VersionByTagGetResponseRulesActionServeError VersionByTagGetResponseRulesAction = "serve_error" VersionByTagGetResponseRulesActionSetConfig VersionByTagGetResponseRulesAction = "set_config" VersionByTagGetResponseRulesActionSkip VersionByTagGetResponseRulesAction = "skip" VersionByTagGetResponseRulesActionSetCacheSettings VersionByTagGetResponseRulesAction = "set_cache_settings" )
func (VersionByTagGetResponseRulesAction) IsKnown ¶
func (r VersionByTagGetResponseRulesAction) IsKnown() bool
type VersionByTagGetResponseRulesUnion ¶
type VersionByTagGetResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type VersionByTagService ¶
type VersionByTagService struct {
Options []option.RequestOption
}
VersionByTagService 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 NewVersionByTagService method instead.
func NewVersionByTagService ¶
func NewVersionByTagService(opts ...option.RequestOption) (r *VersionByTagService)
NewVersionByTagService 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 (*VersionByTagService) Get ¶
func (r *VersionByTagService) Get(ctx context.Context, rulesetID string, rulesetVersion string, ruleTag string, query VersionByTagGetParams, opts ...option.RequestOption) (res *VersionByTagGetResponse, err error)
Fetches the rules of a managed account ruleset version for a given tag.
type VersionDeleteParams ¶
type VersionGetParams ¶
type VersionGetResponse ¶
type VersionGetResponse struct { // The unique ID of the ruleset. ID string `json:"id,required"` // The kind of the ruleset. Kind VersionGetResponseKind `json:"kind,required"` // The timestamp of when the ruleset was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // The human-readable name of the ruleset. Name string `json:"name,required"` // The phase of the ruleset. Phase VersionGetResponsePhase `json:"phase,required"` // The list of rules in the ruleset. Rules []VersionGetResponseRule `json:"rules,required"` // The version of the ruleset. Version string `json:"version,required"` // An informative description of the ruleset. Description string `json:"description"` JSON versionGetResponseJSON `json:"-"` }
A ruleset object.
func (*VersionGetResponse) UnmarshalJSON ¶
func (r *VersionGetResponse) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseEnvelope ¶
type VersionGetResponseEnvelope struct { // A list of error messages. Errors []VersionGetResponseEnvelopeErrors `json:"errors,required"` // A list of warning messages. Messages []VersionGetResponseEnvelopeMessages `json:"messages,required"` // A ruleset object. Result VersionGetResponse `json:"result,required"` // Whether the API call was successful. Success VersionGetResponseEnvelopeSuccess `json:"success,required"` JSON versionGetResponseEnvelopeJSON `json:"-"` }
A response object.
func (*VersionGetResponseEnvelope) UnmarshalJSON ¶
func (r *VersionGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseEnvelopeErrors ¶
type VersionGetResponseEnvelopeErrors struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source VersionGetResponseEnvelopeErrorsSource `json:"source"` JSON versionGetResponseEnvelopeErrorsJSON `json:"-"` }
A message.
func (*VersionGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *VersionGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseEnvelopeErrorsSource ¶
type VersionGetResponseEnvelopeErrorsSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON versionGetResponseEnvelopeErrorsSourceJSON `json:"-"` }
The source of this message.
func (*VersionGetResponseEnvelopeErrorsSource) UnmarshalJSON ¶
func (r *VersionGetResponseEnvelopeErrorsSource) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseEnvelopeMessages ¶
type VersionGetResponseEnvelopeMessages struct { // A text description of this message. Message string `json:"message,required"` // A unique code for this message. Code int64 `json:"code"` // The source of this message. Source VersionGetResponseEnvelopeMessagesSource `json:"source"` JSON versionGetResponseEnvelopeMessagesJSON `json:"-"` }
A message.
func (*VersionGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *VersionGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseEnvelopeMessagesSource ¶
type VersionGetResponseEnvelopeMessagesSource struct { // A JSON pointer to the field that is the source of the message. Pointer string `json:"pointer,required"` JSON versionGetResponseEnvelopeMessagesSourceJSON `json:"-"` }
The source of this message.
func (*VersionGetResponseEnvelopeMessagesSource) UnmarshalJSON ¶
func (r *VersionGetResponseEnvelopeMessagesSource) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseEnvelopeSuccess ¶
type VersionGetResponseEnvelopeSuccess bool
Whether the API call was successful.
const (
VersionGetResponseEnvelopeSuccessTrue VersionGetResponseEnvelopeSuccess = true
)
func (VersionGetResponseEnvelopeSuccess) IsKnown ¶
func (r VersionGetResponseEnvelopeSuccess) IsKnown() bool
type VersionGetResponseKind ¶
type VersionGetResponseKind string
The kind of the ruleset.
const ( VersionGetResponseKindManaged VersionGetResponseKind = "managed" VersionGetResponseKindCustom VersionGetResponseKind = "custom" VersionGetResponseKindRoot VersionGetResponseKind = "root" VersionGetResponseKindZone VersionGetResponseKind = "zone" )
func (VersionGetResponseKind) IsKnown ¶
func (r VersionGetResponseKind) IsKnown() bool
type VersionGetResponsePhase ¶
type VersionGetResponsePhase string
The phase of the ruleset.
const ( VersionGetResponsePhaseDDoSL4 VersionGetResponsePhase = "ddos_l4" VersionGetResponsePhaseDDoSL7 VersionGetResponsePhase = "ddos_l7" VersionGetResponsePhaseHTTPConfigSettings VersionGetResponsePhase = "http_config_settings" VersionGetResponsePhaseHTTPCustomErrors VersionGetResponsePhase = "http_custom_errors" VersionGetResponsePhaseHTTPLogCustomFields VersionGetResponsePhase = "http_log_custom_fields" VersionGetResponsePhaseHTTPRatelimit VersionGetResponsePhase = "http_ratelimit" VersionGetResponsePhaseHTTPRequestCacheSettings VersionGetResponsePhase = "http_request_cache_settings" VersionGetResponsePhaseHTTPRequestDynamicRedirect VersionGetResponsePhase = "http_request_dynamic_redirect" VersionGetResponsePhaseHTTPRequestFirewallCustom VersionGetResponsePhase = "http_request_firewall_custom" VersionGetResponsePhaseHTTPRequestFirewallManaged VersionGetResponsePhase = "http_request_firewall_managed" VersionGetResponsePhaseHTTPRequestLateTransform VersionGetResponsePhase = "http_request_late_transform" VersionGetResponsePhaseHTTPRequestOrigin VersionGetResponsePhase = "http_request_origin" VersionGetResponsePhaseHTTPRequestRedirect VersionGetResponsePhase = "http_request_redirect" VersionGetResponsePhaseHTTPRequestSanitize VersionGetResponsePhase = "http_request_sanitize" VersionGetResponsePhaseHTTPRequestSBFM VersionGetResponsePhase = "http_request_sbfm" VersionGetResponsePhaseHTTPRequestSelectConfiguration VersionGetResponsePhase = "http_request_select_configuration" VersionGetResponsePhaseHTTPRequestTransform VersionGetResponsePhase = "http_request_transform" VersionGetResponsePhaseHTTPResponseCompression VersionGetResponsePhase = "http_response_compression" VersionGetResponsePhaseHTTPResponseFirewallManaged VersionGetResponsePhase = "http_response_firewall_managed" VersionGetResponsePhaseHTTPResponseHeadersTransform VersionGetResponsePhase = "http_response_headers_transform" VersionGetResponsePhaseMagicTransit VersionGetResponsePhase = "magic_transit" VersionGetResponsePhaseMagicTransitIDsManaged VersionGetResponsePhase = "magic_transit_ids_managed" VersionGetResponsePhaseMagicTransitManaged VersionGetResponsePhase = "magic_transit_managed" )
func (VersionGetResponsePhase) IsKnown ¶
func (r VersionGetResponsePhase) IsKnown() bool
type VersionGetResponseRule ¶
type VersionGetResponseRule struct { // The action to perform when the rule matches. Action VersionGetResponseRulesAction `json:"action"` ActionParameters interface{} `json:"action_parameters,required"` Categories interface{} `json:"categories,required"` // An informative description of the rule. Description string `json:"description"` // Whether the rule should be executed. Enabled bool `json:"enabled"` // The expression defining which traffic will match the rule. Expression string `json:"expression"` // The unique ID of the rule. ID string `json:"id"` // The timestamp of when the rule was last modified. LastUpdated time.Time `json:"last_updated,required" format:"date-time"` // An object configuring the rule's logging behavior. Logging Logging `json:"logging"` // The reference of the rule (the rule ID by default). Ref string `json:"ref"` // The version of the rule. Version string `json:"version,required"` JSON versionGetResponseRuleJSON `json:"-"` // contains filtered or unexported fields }
func (VersionGetResponseRule) AsUnion ¶
func (r VersionGetResponseRule) AsUnion() VersionGetResponseRulesUnion
func (*VersionGetResponseRule) UnmarshalJSON ¶
func (r *VersionGetResponseRule) UnmarshalJSON(data []byte) (err error)
type VersionGetResponseRulesAction ¶
type VersionGetResponseRulesAction string
The action to perform when the rule matches.
const ( VersionGetResponseRulesActionBlock VersionGetResponseRulesAction = "block" VersionGetResponseRulesActionChallenge VersionGetResponseRulesAction = "challenge" VersionGetResponseRulesActionCompressResponse VersionGetResponseRulesAction = "compress_response" VersionGetResponseRulesActionExecute VersionGetResponseRulesAction = "execute" VersionGetResponseRulesActionJSChallenge VersionGetResponseRulesAction = "js_challenge" VersionGetResponseRulesActionLog VersionGetResponseRulesAction = "log" VersionGetResponseRulesActionManagedChallenge VersionGetResponseRulesAction = "managed_challenge" VersionGetResponseRulesActionRedirect VersionGetResponseRulesAction = "redirect" VersionGetResponseRulesActionRewrite VersionGetResponseRulesAction = "rewrite" VersionGetResponseRulesActionRoute VersionGetResponseRulesAction = "route" VersionGetResponseRulesActionScore VersionGetResponseRulesAction = "score" VersionGetResponseRulesActionServeError VersionGetResponseRulesAction = "serve_error" VersionGetResponseRulesActionSetConfig VersionGetResponseRulesAction = "set_config" VersionGetResponseRulesActionSkip VersionGetResponseRulesAction = "skip" VersionGetResponseRulesActionSetCacheSettings VersionGetResponseRulesAction = "set_cache_settings" )
func (VersionGetResponseRulesAction) IsKnown ¶
func (r VersionGetResponseRulesAction) IsKnown() bool
type VersionGetResponseRulesUnion ¶
type VersionGetResponseRulesUnion interface {
// contains filtered or unexported methods
}
Union satisfied by rulesets.BlockRule, rulesets.ChallengeRule, rulesets.CompressResponseRule, rulesets.ExecuteRule, rulesets.JSChallengeRule, rulesets.LogRule, rulesets.ManagedChallengeRule, rulesets.RedirectRule, rulesets.RewriteRule, rulesets.RouteRule, rulesets.ScoreRule, rulesets.ServeErrorRule, rulesets.SetConfigRule, rulesets.SkipRule or rulesets.SetCacheSettingsRule.
type VersionListParams ¶
type VersionService ¶
type VersionService struct { Options []option.RequestOption ByTag *VersionByTagService }
VersionService 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 NewVersionService method instead.
func NewVersionService ¶
func NewVersionService(opts ...option.RequestOption) (r *VersionService)
NewVersionService 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 (*VersionService) Delete ¶
func (r *VersionService) Delete(ctx context.Context, rulesetID string, rulesetVersion string, body VersionDeleteParams, opts ...option.RequestOption) (err error)
Deletes an existing version of an account or zone ruleset.
func (*VersionService) Get ¶
func (r *VersionService) Get(ctx context.Context, rulesetID string, rulesetVersion string, query VersionGetParams, opts ...option.RequestOption) (res *VersionGetResponse, err error)
Fetches a specific version of an account or zone ruleset.
func (*VersionService) List ¶
func (r *VersionService) List(ctx context.Context, rulesetID string, query VersionListParams, opts ...option.RequestOption) (res *pagination.SinglePage[Ruleset], err error)
Fetches the versions of an account or zone ruleset.
func (*VersionService) ListAutoPaging ¶
func (r *VersionService) ListAutoPaging(ctx context.Context, rulesetID string, query VersionListParams, opts ...option.RequestOption) *pagination.SinglePageAutoPager[Ruleset]
Fetches the versions of an account or zone ruleset.