Documentation
¶
Index ¶
- type APIPathGroupList
- type AdvancedRuleService
- type CustomPageSetListParams
- type CustomPageSetListParamsOrdering
- type CustomPageSetNewParams
- type CustomPageSetNewParamsBlock
- type CustomPageSetNewParamsBlockCsrf
- type CustomPageSetNewParamsCaptcha
- type CustomPageSetNewParamsCookieDisabled
- type CustomPageSetNewParamsHandshake
- type CustomPageSetNewParamsJavascriptDisabled
- type CustomPageSetPreviewParams
- type CustomPageSetPreviewParamsPageType
- type CustomPageSetService
- func (r *CustomPageSetService) Delete(ctx context.Context, setID int64, opts ...option.RequestOption) (err error)
- func (r *CustomPageSetService) Get(ctx context.Context, setID int64, opts ...option.RequestOption) (res *WaapCustomPageSet, err error)
- func (r *CustomPageSetService) List(ctx context.Context, query CustomPageSetListParams, ...) (res *pagination.OffsetPage[WaapCustomPageSet], err error)
- func (r *CustomPageSetService) ListAutoPaging(ctx context.Context, query CustomPageSetListParams, ...) *pagination.OffsetPageAutoPager[WaapCustomPageSet]
- func (r *CustomPageSetService) New(ctx context.Context, body CustomPageSetNewParams, opts ...option.RequestOption) (res *WaapCustomPageSet, err error)
- func (r *CustomPageSetService) Preview(ctx context.Context, params CustomPageSetPreviewParams, ...) (res *WaapCustomPagePreview, err error)
- func (r *CustomPageSetService) Update(ctx context.Context, setID int64, body CustomPageSetUpdateParams, ...) (err error)
- type CustomPageSetUpdateParams
- type CustomPageSetUpdateParamsBlock
- type CustomPageSetUpdateParamsBlockCsrf
- type CustomPageSetUpdateParamsCaptcha
- type CustomPageSetUpdateParamsCookieDisabled
- type CustomPageSetUpdateParamsHandshake
- type CustomPageSetUpdateParamsJavascriptDisabled
- type DomainAPIDiscoveryGetScanResultParams
- type DomainAPIDiscoveryListScanResultsParams
- type DomainAPIDiscoveryListScanResultsParamsOrdering
- type DomainAPIDiscoveryListScanResultsParamsStatus
- type DomainAPIDiscoveryListScanResultsParamsType
- type DomainAPIDiscoveryService
- func (r *DomainAPIDiscoveryService) GetScanResult(ctx context.Context, scanID string, ...) (res *WaapAPIScanResult, err error)
- func (r *DomainAPIDiscoveryService) GetSettings(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *WaapAPIDiscoverySettings, err error)
- func (r *DomainAPIDiscoveryService) ListScanResults(ctx context.Context, domainID int64, ...) (res *pagination.OffsetPage[WaapAPIScanResult], err error)
- func (r *DomainAPIDiscoveryService) ListScanResultsAutoPaging(ctx context.Context, domainID int64, ...) *pagination.OffsetPageAutoPager[WaapAPIScanResult]
- func (r *DomainAPIDiscoveryService) ScanOpenAPI(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *WaapTaskID, err error)
- func (r *DomainAPIDiscoveryService) UpdateSettings(ctx context.Context, domainID int64, ...) (res *WaapAPIDiscoverySettings, err error)
- func (r *DomainAPIDiscoveryService) UploadOpenAPI(ctx context.Context, domainID int64, ...) (res *WaapTaskID, err error)
- type DomainAPIDiscoveryUpdateSettingsParams
- type DomainAPIDiscoveryUploadOpenAPIParams
- type DomainAPIPathDeleteParams
- type DomainAPIPathGetParams
- type DomainAPIPathGroupService
- type DomainAPIPathListParams
- type DomainAPIPathListParamsHTTPScheme
- type DomainAPIPathListParamsMethod
- type DomainAPIPathListParamsOrdering
- type DomainAPIPathListParamsSource
- type DomainAPIPathNewParams
- type DomainAPIPathNewParamsHTTPScheme
- type DomainAPIPathNewParamsMethod
- type DomainAPIPathService
- func (r *DomainAPIPathService) Delete(ctx context.Context, pathID string, body DomainAPIPathDeleteParams, ...) (err error)
- func (r *DomainAPIPathService) Get(ctx context.Context, pathID string, query DomainAPIPathGetParams, ...) (res *WaapAPIPath, err error)
- func (r *DomainAPIPathService) List(ctx context.Context, domainID int64, query DomainAPIPathListParams, ...) (res *pagination.OffsetPage[WaapAPIPath], err error)
- func (r *DomainAPIPathService) ListAutoPaging(ctx context.Context, domainID int64, query DomainAPIPathListParams, ...) *pagination.OffsetPageAutoPager[WaapAPIPath]
- func (r *DomainAPIPathService) New(ctx context.Context, domainID int64, body DomainAPIPathNewParams, ...) (res *WaapAPIPath, err error)
- func (r *DomainAPIPathService) Update(ctx context.Context, pathID string, params DomainAPIPathUpdateParams, ...) (err error)
- type DomainAPIPathUpdateParams
- type DomainAPIPathUpdateParamsStatus
- type DomainAdvancedRuleDeleteParams
- type DomainAdvancedRuleGetParams
- type DomainAdvancedRuleListParams
- type DomainAdvancedRuleListParamsAction
- type DomainAdvancedRuleListParamsOrdering
- type DomainAdvancedRuleListParamsPhase
- type DomainAdvancedRuleNewParams
- type DomainAdvancedRuleNewParamsAction
- type DomainAdvancedRuleNewParamsActionBlock
- type DomainAdvancedRuleNewParamsActionTag
- type DomainAdvancedRuleNewParamsPhase
- type DomainAdvancedRuleService
- func (r *DomainAdvancedRuleService) Delete(ctx context.Context, ruleID int64, body DomainAdvancedRuleDeleteParams, ...) (err error)
- func (r *DomainAdvancedRuleService) Get(ctx context.Context, ruleID int64, query DomainAdvancedRuleGetParams, ...) (res *WaapAdvancedRule, err error)
- func (r *DomainAdvancedRuleService) List(ctx context.Context, domainID int64, query DomainAdvancedRuleListParams, ...) (res *pagination.OffsetPage[WaapAdvancedRule], err error)
- func (r *DomainAdvancedRuleService) ListAutoPaging(ctx context.Context, domainID int64, query DomainAdvancedRuleListParams, ...) *pagination.OffsetPageAutoPager[WaapAdvancedRule]
- func (r *DomainAdvancedRuleService) New(ctx context.Context, domainID int64, body DomainAdvancedRuleNewParams, ...) (res *WaapAdvancedRule, err error)
- func (r *DomainAdvancedRuleService) Toggle(ctx context.Context, action DomainAdvancedRuleToggleParamsAction, ...) (err error)
- func (r *DomainAdvancedRuleService) Update(ctx context.Context, ruleID int64, params DomainAdvancedRuleUpdateParams, ...) (err error)
- type DomainAdvancedRuleToggleParams
- type DomainAdvancedRuleToggleParamsAction
- type DomainAdvancedRuleUpdateParams
- type DomainAdvancedRuleUpdateParamsAction
- type DomainAdvancedRuleUpdateParamsActionBlock
- type DomainAdvancedRuleUpdateParamsActionTag
- type DomainAdvancedRuleUpdateParamsPhase
- type DomainCustomRuleDeleteMultipleParams
- type DomainCustomRuleDeleteParams
- type DomainCustomRuleGetParams
- type DomainCustomRuleListParams
- type DomainCustomRuleListParamsAction
- type DomainCustomRuleListParamsOrdering
- type DomainCustomRuleNewParams
- type DomainCustomRuleNewParamsAction
- type DomainCustomRuleNewParamsActionBlock
- type DomainCustomRuleNewParamsActionTag
- type DomainCustomRuleNewParamsCondition
- type DomainCustomRuleNewParamsConditionContentType
- type DomainCustomRuleNewParamsConditionCountry
- type DomainCustomRuleNewParamsConditionFileExtension
- type DomainCustomRuleNewParamsConditionHTTPMethod
- type DomainCustomRuleNewParamsConditionHeader
- type DomainCustomRuleNewParamsConditionHeaderExists
- type DomainCustomRuleNewParamsConditionIP
- type DomainCustomRuleNewParamsConditionIPRange
- type DomainCustomRuleNewParamsConditionOrganization
- type DomainCustomRuleNewParamsConditionOwnerTypes
- type DomainCustomRuleNewParamsConditionRequestRate
- type DomainCustomRuleNewParamsConditionResponseHeader
- type DomainCustomRuleNewParamsConditionResponseHeaderExists
- type DomainCustomRuleNewParamsConditionSessionRequestCount
- type DomainCustomRuleNewParamsConditionTags
- type DomainCustomRuleNewParamsConditionURL
- type DomainCustomRuleNewParamsConditionUserAgent
- type DomainCustomRuleNewParamsConditionUserDefinedTags
- type DomainCustomRuleService
- func (r *DomainCustomRuleService) Delete(ctx context.Context, ruleID int64, body DomainCustomRuleDeleteParams, ...) (err error)
- func (r *DomainCustomRuleService) DeleteMultiple(ctx context.Context, domainID int64, body DomainCustomRuleDeleteMultipleParams, ...) (err error)
- func (r *DomainCustomRuleService) Get(ctx context.Context, ruleID int64, query DomainCustomRuleGetParams, ...) (res *WaapCustomRule, err error)
- func (r *DomainCustomRuleService) List(ctx context.Context, domainID int64, query DomainCustomRuleListParams, ...) (res *pagination.OffsetPage[WaapCustomRule], err error)
- func (r *DomainCustomRuleService) ListAutoPaging(ctx context.Context, domainID int64, query DomainCustomRuleListParams, ...) *pagination.OffsetPageAutoPager[WaapCustomRule]
- func (r *DomainCustomRuleService) New(ctx context.Context, domainID int64, body DomainCustomRuleNewParams, ...) (res *WaapCustomRule, err error)
- func (r *DomainCustomRuleService) Toggle(ctx context.Context, action DomainCustomRuleToggleParamsAction, ...) (err error)
- func (r *DomainCustomRuleService) Update(ctx context.Context, ruleID int64, params DomainCustomRuleUpdateParams, ...) (err error)
- type DomainCustomRuleToggleParams
- type DomainCustomRuleToggleParamsAction
- type DomainCustomRuleUpdateParams
- type DomainCustomRuleUpdateParamsAction
- type DomainCustomRuleUpdateParamsActionBlock
- type DomainCustomRuleUpdateParamsActionTag
- type DomainCustomRuleUpdateParamsCondition
- type DomainCustomRuleUpdateParamsConditionContentType
- type DomainCustomRuleUpdateParamsConditionCountry
- type DomainCustomRuleUpdateParamsConditionFileExtension
- type DomainCustomRuleUpdateParamsConditionHTTPMethod
- type DomainCustomRuleUpdateParamsConditionHeader
- type DomainCustomRuleUpdateParamsConditionHeaderExists
- type DomainCustomRuleUpdateParamsConditionIP
- type DomainCustomRuleUpdateParamsConditionIPRange
- type DomainCustomRuleUpdateParamsConditionOrganization
- type DomainCustomRuleUpdateParamsConditionOwnerTypes
- type DomainCustomRuleUpdateParamsConditionRequestRate
- type DomainCustomRuleUpdateParamsConditionResponseHeader
- type DomainCustomRuleUpdateParamsConditionResponseHeaderExists
- type DomainCustomRuleUpdateParamsConditionSessionRequestCount
- type DomainCustomRuleUpdateParamsConditionTags
- type DomainCustomRuleUpdateParamsConditionURL
- type DomainCustomRuleUpdateParamsConditionUserAgent
- type DomainCustomRuleUpdateParamsConditionUserDefinedTags
- type DomainFirewallRuleDeleteMultipleParams
- type DomainFirewallRuleDeleteParams
- type DomainFirewallRuleGetParams
- type DomainFirewallRuleListParams
- type DomainFirewallRuleListParamsAction
- type DomainFirewallRuleListParamsOrdering
- type DomainFirewallRuleNewParams
- type DomainFirewallRuleNewParamsAction
- type DomainFirewallRuleNewParamsActionBlock
- type DomainFirewallRuleNewParamsCondition
- type DomainFirewallRuleNewParamsConditionIP
- type DomainFirewallRuleNewParamsConditionIPRange
- type DomainFirewallRuleService
- func (r *DomainFirewallRuleService) Delete(ctx context.Context, ruleID int64, body DomainFirewallRuleDeleteParams, ...) (err error)
- func (r *DomainFirewallRuleService) DeleteMultiple(ctx context.Context, domainID int64, ...) (err error)
- func (r *DomainFirewallRuleService) Get(ctx context.Context, ruleID int64, query DomainFirewallRuleGetParams, ...) (res *WaapFirewallRule, err error)
- func (r *DomainFirewallRuleService) List(ctx context.Context, domainID int64, query DomainFirewallRuleListParams, ...) (res *pagination.OffsetPage[WaapFirewallRule], err error)
- func (r *DomainFirewallRuleService) ListAutoPaging(ctx context.Context, domainID int64, query DomainFirewallRuleListParams, ...) *pagination.OffsetPageAutoPager[WaapFirewallRule]
- func (r *DomainFirewallRuleService) New(ctx context.Context, domainID int64, body DomainFirewallRuleNewParams, ...) (res *WaapFirewallRule, err error)
- func (r *DomainFirewallRuleService) Toggle(ctx context.Context, action DomainFirewallRuleToggleParamsAction, ...) (err error)
- func (r *DomainFirewallRuleService) Update(ctx context.Context, ruleID int64, params DomainFirewallRuleUpdateParams, ...) (err error)
- type DomainFirewallRuleToggleParams
- type DomainFirewallRuleToggleParamsAction
- type DomainFirewallRuleUpdateParams
- type DomainFirewallRuleUpdateParamsAction
- type DomainFirewallRuleUpdateParamsActionBlock
- type DomainFirewallRuleUpdateParamsCondition
- type DomainFirewallRuleUpdateParamsConditionIP
- type DomainFirewallRuleUpdateParamsConditionIPRange
- type DomainInsightGetParams
- type DomainInsightListParams
- type DomainInsightListParamsOrdering
- type DomainInsightReplaceParams
- type DomainInsightReplaceParamsStatus
- type DomainInsightService
- func (r *DomainInsightService) Get(ctx context.Context, insightID string, query DomainInsightGetParams, ...) (res *WaapInsight, err error)
- func (r *DomainInsightService) List(ctx context.Context, domainID int64, query DomainInsightListParams, ...) (res *pagination.OffsetPage[WaapInsight], err error)
- func (r *DomainInsightService) ListAutoPaging(ctx context.Context, domainID int64, query DomainInsightListParams, ...) *pagination.OffsetPageAutoPager[WaapInsight]
- func (r *DomainInsightService) Replace(ctx context.Context, insightID string, params DomainInsightReplaceParams, ...) (res *WaapInsight, err error)
- type DomainInsightSilenceDeleteParams
- type DomainInsightSilenceGetParams
- type DomainInsightSilenceListParams
- type DomainInsightSilenceListParamsOrdering
- type DomainInsightSilenceNewParams
- type DomainInsightSilenceService
- func (r *DomainInsightSilenceService) Delete(ctx context.Context, silenceID string, body DomainInsightSilenceDeleteParams, ...) (err error)
- func (r *DomainInsightSilenceService) Get(ctx context.Context, silenceID string, query DomainInsightSilenceGetParams, ...) (res *WaapInsightSilence, err error)
- func (r *DomainInsightSilenceService) List(ctx context.Context, domainID int64, query DomainInsightSilenceListParams, ...) (res *pagination.OffsetPage[WaapInsightSilence], err error)
- func (r *DomainInsightSilenceService) ListAutoPaging(ctx context.Context, domainID int64, query DomainInsightSilenceListParams, ...) *pagination.OffsetPageAutoPager[WaapInsightSilence]
- func (r *DomainInsightSilenceService) New(ctx context.Context, domainID int64, body DomainInsightSilenceNewParams, ...) (res *WaapInsightSilence, err error)
- func (r *DomainInsightSilenceService) Update(ctx context.Context, silenceID string, params DomainInsightSilenceUpdateParams, ...) (res *WaapInsightSilence, err error)
- type DomainInsightSilenceUpdateParams
- type DomainListParams
- type DomainListParamsOrdering
- type DomainListParamsStatus
- type DomainService
- func (r *DomainService) Delete(ctx context.Context, domainID int64, opts ...option.RequestOption) (err error)
- func (r *DomainService) Get(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *WaapDetailedDomain, err error)
- func (r *DomainService) List(ctx context.Context, query DomainListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapSummaryDomain], err error)
- func (r *DomainService) ListAutoPaging(ctx context.Context, query DomainListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapSummaryDomain]
- func (r *DomainService) ListRuleSets(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *[]WaapRuleSet, err error)
- func (r *DomainService) TogglePolicy(ctx context.Context, policyID string, body DomainTogglePolicyParams, ...) (res *WaapPolicyMode, err error)
- func (r *DomainService) Update(ctx context.Context, domainID int64, body DomainUpdateParams, ...) (err error)
- type DomainSettingService
- type DomainSettingUpdateParams
- type DomainSettingUpdateParamsAPI
- type DomainSettingUpdateParamsDDOS
- type DomainStatisticGetDDOSAttacksParams
- type DomainStatisticGetDDOSAttacksParamsOrdering
- type DomainStatisticGetDDOSInfoParams
- type DomainStatisticGetDDOSInfoParamsGroupBy
- type DomainStatisticGetEventsAggregatedParams
- type DomainStatisticGetRequestDetailsParams
- type DomainStatisticGetRequestsSeriesParams
- type DomainStatisticGetTrafficSeriesParams
- type DomainStatisticGetTrafficSeriesParamsResolution
- type DomainStatisticService
- func (r *DomainStatisticService) GetDDOSAttacks(ctx context.Context, domainID int64, query DomainStatisticGetDDOSAttacksParams, ...) (res *pagination.OffsetPage[WaapDDOSAttack], err error)
- func (r *DomainStatisticService) GetDDOSAttacksAutoPaging(ctx context.Context, domainID int64, query DomainStatisticGetDDOSAttacksParams, ...) *pagination.OffsetPageAutoPager[WaapDDOSAttack]
- func (r *DomainStatisticService) GetDDOSInfo(ctx context.Context, domainID int64, query DomainStatisticGetDDOSInfoParams, ...) (res *pagination.OffsetPage[WaapDDOSInfo], err error)
- func (r *DomainStatisticService) GetDDOSInfoAutoPaging(ctx context.Context, domainID int64, query DomainStatisticGetDDOSInfoParams, ...) *pagination.OffsetPageAutoPager[WaapDDOSInfo]
- func (r *DomainStatisticService) GetEventsAggregated(ctx context.Context, domainID int64, ...) (res *WaapEventStatistics, err error)
- func (r *DomainStatisticService) GetRequestDetails(ctx context.Context, requestID string, ...) (res *WaapRequestDetails, err error)
- func (r *DomainStatisticService) GetRequestsSeries(ctx context.Context, domainID int64, ...) (res *pagination.OffsetPage[WaapRequestSummary], err error)
- func (r *DomainStatisticService) GetRequestsSeriesAutoPaging(ctx context.Context, domainID int64, ...) *pagination.OffsetPageAutoPager[WaapRequestSummary]
- func (r *DomainStatisticService) GetTrafficSeries(ctx context.Context, domainID int64, ...) (res *[]WaapTrafficMetrics, err error)
- type DomainTogglePolicyParams
- type DomainUpdateParams
- type DomainUpdateParamsStatus
- type Error
- type IPInfoGetAttackTimeSeriesParams
- type IPInfoGetBlockedRequestsParams
- type IPInfoGetDDOSAttackSeriesParams
- type IPInfoGetIPInfoParams
- type IPInfoGetTopURLsParams
- type IPInfoGetTopUserAgentsParams
- type IPInfoGetTopUserSessionsParams
- type IPInfoListAttackedCountriesParams
- type IPInfoMetricListParams
- type IPInfoMetricService
- type IPInfoService
- func (r *IPInfoService) GetAttackTimeSeries(ctx context.Context, query IPInfoGetAttackTimeSeriesParams, ...) (res *[]WaapTimeSeriesAttack, err error)
- func (r *IPInfoService) GetBlockedRequests(ctx context.Context, query IPInfoGetBlockedRequestsParams, ...) (res *[]WaapRuleBlockedRequests, err error)
- func (r *IPInfoService) GetDDOSAttackSeries(ctx context.Context, query IPInfoGetDDOSAttackSeriesParams, ...) (res *WaapIPDDOSInfoModel, err error)
- func (r *IPInfoService) GetIPInfo(ctx context.Context, query IPInfoGetIPInfoParams, opts ...option.RequestOption) (res *WaapIPInfo, err error)
- func (r *IPInfoService) GetTopURLs(ctx context.Context, query IPInfoGetTopURLsParams, ...) (res *[]WaapTopURL, err error)
- func (r *IPInfoService) GetTopUserAgents(ctx context.Context, query IPInfoGetTopUserAgentsParams, ...) (res *[]WaapTopUserAgent, err error)
- func (r *IPInfoService) GetTopUserSessions(ctx context.Context, query IPInfoGetTopUserSessionsParams, ...) (res *[]WaapTopSession, err error)
- func (r *IPInfoService) ListAttackedCountries(ctx context.Context, query IPInfoListAttackedCountriesParams, ...) (res *[]WaapIPCountryAttack, err error)
- type InsightListTypesParams
- type InsightListTypesParamsOrdering
- type InsightService
- type OrganizationListParams
- type OrganizationListParamsOrdering
- type OrganizationService
- type StatisticGetUsageSeriesParams
- type StatisticGetUsageSeriesParamsGranularity
- type StatisticService
- type TagListParams
- type TagListParamsOrdering
- type TagService
- type WaapAPIDiscoverySettings
- type WaapAPIPath
- type WaapAPIPathHTTPScheme
- type WaapAPIPathMethod
- type WaapAPIPathSource
- type WaapAPIPathStatus
- type WaapAPIScanResult
- type WaapAPIScanResultStatus
- type WaapAPIScanResultType
- type WaapAdvancedRule
- type WaapAdvancedRuleAction
- type WaapAdvancedRuleActionBlock
- type WaapAdvancedRuleActionTag
- type WaapAdvancedRuleDescriptor
- type WaapAdvancedRuleDescriptorAttr
- type WaapAdvancedRuleDescriptorAttrArg
- type WaapAdvancedRuleDescriptorList
- type WaapAdvancedRulePhase
- type WaapBlockedStatistics
- type WaapBlockedStatisticsActionUnion
- type WaapBlockedStatisticsCountryUnion
- type WaapBlockedStatisticsOrgUnion
- type WaapBlockedStatisticsRuleNameUnion
- type WaapCountStatistics
- type WaapCountStatisticsActionUnion
- type WaapCountStatisticsCountryUnion
- type WaapCountStatisticsOrgUnion
- type WaapCountStatisticsRuleNameUnion
- type WaapCustomPagePreview
- type WaapCustomPageSet
- type WaapCustomPageSetBlock
- type WaapCustomPageSetBlockCsrf
- type WaapCustomPageSetCaptcha
- type WaapCustomPageSetCookieDisabled
- type WaapCustomPageSetHandshake
- type WaapCustomPageSetJavascriptDisabled
- type WaapCustomRule
- type WaapCustomRuleAction
- type WaapCustomRuleActionBlock
- type WaapCustomRuleActionTag
- type WaapCustomRuleCondition
- type WaapCustomRuleConditionContentType
- type WaapCustomRuleConditionCountry
- type WaapCustomRuleConditionFileExtension
- type WaapCustomRuleConditionHTTPMethod
- type WaapCustomRuleConditionHeader
- type WaapCustomRuleConditionHeaderExists
- type WaapCustomRuleConditionIP
- type WaapCustomRuleConditionIPRange
- type WaapCustomRuleConditionOrganization
- type WaapCustomRuleConditionOwnerTypes
- type WaapCustomRuleConditionRequestRate
- type WaapCustomRuleConditionResponseHeader
- type WaapCustomRuleConditionResponseHeaderExists
- type WaapCustomRuleConditionSessionRequestCount
- type WaapCustomRuleConditionTags
- type WaapCustomRuleConditionURL
- type WaapCustomRuleConditionUserAgent
- type WaapCustomRuleConditionUserDefinedTags
- type WaapDDOSAttack
- type WaapDDOSInfo
- type WaapDDOSInfoType
- type WaapDetailedDomain
- type WaapDetailedDomainQuota
- type WaapDetailedDomainStatus
- type WaapDomainAPISettings
- type WaapDomainDDOSSettings
- type WaapDomainSettingsModel
- type WaapEventStatistics
- type WaapFirewallRule
- type WaapFirewallRuleAction
- type WaapFirewallRuleActionBlock
- type WaapFirewallRuleCondition
- type WaapFirewallRuleConditionIP
- type WaapFirewallRuleConditionIPRange
- type WaapGetAccountOverviewResponse
- type WaapGetAccountOverviewResponseQuota
- type WaapGetAccountOverviewResponseService
- type WaapIPCountryAttack
- type WaapIPDDOSInfoModel
- type WaapIPDDOSInfoModelTimeSeries
- type WaapIPInfo
- type WaapIPInfoCounts
- type WaapIPInfoRiskScore
- type WaapIPInfoWhois
- type WaapInsight
- type WaapInsightSilence
- type WaapInsightStatus
- type WaapInsightType
- type WaapOrganization
- type WaapPolicyMode
- type WaapRequestDetails
- type WaapRequestDetailsCommonTag
- type WaapRequestDetailsNetwork
- type WaapRequestDetailsNetworkOrganization
- type WaapRequestDetailsPatternMatchedTag
- type WaapRequestDetailsResult
- type WaapRequestDetailsUserAgent
- type WaapRequestSummary
- type WaapRequestSummaryResult
- type WaapRuleBlockedRequests
- type WaapRuleSet
- type WaapRuleSetRule
- type WaapRuleSetTag
- type WaapService
- type WaapStatisticItem
- type WaapStatisticsSeries
- type WaapSummaryDomain
- type WaapSummaryDomainStatus
- type WaapTag
- type WaapTaskID
- type WaapTimeSeriesAttack
- type WaapTimeSeriesAttackValue
- type WaapTopSession
- type WaapTopURL
- type WaapTopUserAgent
- type WaapTrafficMetrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIPathGroupList ¶ added in v0.10.0
type APIPathGroupList struct {
// An array of api groups associated with the API path
APIPathGroups []string `json:"api_path_groups,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
APIPathGroups respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response model for the API path groups
func (APIPathGroupList) RawJSON ¶ added in v0.10.0
func (r APIPathGroupList) RawJSON() string
Returns the unmodified JSON received from the API
func (*APIPathGroupList) UnmarshalJSON ¶ added in v0.10.0
func (r *APIPathGroupList) UnmarshalJSON(data []byte) error
type AdvancedRuleService ¶ added in v0.3.0
type AdvancedRuleService struct {
Options []option.RequestOption
}
AdvancedRuleService contains methods and other services that help with interacting with the gcore 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 NewAdvancedRuleService method instead.
func NewAdvancedRuleService ¶ added in v0.3.0
func NewAdvancedRuleService(opts ...option.RequestOption) (r AdvancedRuleService)
NewAdvancedRuleService 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 (*AdvancedRuleService) List ¶ added in v0.3.0
func (r *AdvancedRuleService) List(ctx context.Context, opts ...option.RequestOption) (res *WaapAdvancedRuleDescriptorList, err error)
Retrieve an advanced rules descriptor
type CustomPageSetListParams ¶ added in v0.3.0
type CustomPageSetListParams struct {
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter page sets based on their name. Supports '\*' as a wildcard character
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Filter page sets based on their IDs
IDs []int64 `query:"ids,omitzero" json:"-"`
// Sort the response by given field.
//
// Any of "name", "-name", "id", "-id".
Ordering CustomPageSetListParamsOrdering `query:"ordering,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (CustomPageSetListParams) URLQuery ¶ added in v0.3.0
func (r CustomPageSetListParams) URLQuery() (v url.Values, err error)
URLQuery serializes CustomPageSetListParams's query parameters as `url.Values`.
type CustomPageSetListParamsOrdering ¶ added in v0.3.0
type CustomPageSetListParamsOrdering string
Sort the response by given field.
const ( CustomPageSetListParamsOrderingName CustomPageSetListParamsOrdering = "name" CustomPageSetListParamsOrderingMinusName CustomPageSetListParamsOrdering = "-name" CustomPageSetListParamsOrderingID CustomPageSetListParamsOrdering = "id" CustomPageSetListParamsOrderingMinusID CustomPageSetListParamsOrdering = "-id" )
type CustomPageSetNewParams ¶ added in v0.3.0
type CustomPageSetNewParams struct {
// Name of the custom page set
Name string `json:"name,required"`
Block CustomPageSetNewParamsBlock `json:"block,omitzero"`
BlockCsrf CustomPageSetNewParamsBlockCsrf `json:"block_csrf,omitzero"`
Captcha CustomPageSetNewParamsCaptcha `json:"captcha,omitzero"`
CookieDisabled CustomPageSetNewParamsCookieDisabled `json:"cookie_disabled,omitzero"`
// List of domain IDs that are associated with this page set
Domains []int64 `json:"domains,omitzero"`
Handshake CustomPageSetNewParamsHandshake `json:"handshake,omitzero"`
JavascriptDisabled CustomPageSetNewParamsJavascriptDisabled `json:"javascript_disabled,omitzero"`
// contains filtered or unexported fields
}
func (CustomPageSetNewParams) MarshalJSON ¶ added in v0.3.0
func (r CustomPageSetNewParams) MarshalJSON() (data []byte, err error)
func (*CustomPageSetNewParams) UnmarshalJSON ¶ added in v0.3.0
func (r *CustomPageSetNewParams) UnmarshalJSON(data []byte) error
type CustomPageSetNewParamsBlock ¶ added in v0.10.0
type CustomPageSetNewParamsBlock struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo param.Opt[string] `json:"logo,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// The text to display in the title of the custom page
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetNewParamsBlock) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetNewParamsBlock) MarshalJSON() (data []byte, err error)
func (*CustomPageSetNewParamsBlock) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetNewParamsBlock) UnmarshalJSON(data []byte) error
type CustomPageSetNewParamsBlockCsrf ¶ added in v0.10.0
type CustomPageSetNewParamsBlockCsrf struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo param.Opt[string] `json:"logo,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// The text to display in the title of the custom page
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetNewParamsBlockCsrf) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetNewParamsBlockCsrf) MarshalJSON() (data []byte, err error)
func (*CustomPageSetNewParamsBlockCsrf) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetNewParamsBlockCsrf) UnmarshalJSON(data []byte) error
type CustomPageSetNewParamsCaptcha ¶ added in v0.10.0
type CustomPageSetNewParamsCaptcha struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// Error message
Error param.Opt[string] `json:"error,omitzero"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo param.Opt[string] `json:"logo,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// The text to display in the title of the custom page
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetNewParamsCaptcha) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetNewParamsCaptcha) MarshalJSON() (data []byte, err error)
func (*CustomPageSetNewParamsCaptcha) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetNewParamsCaptcha) UnmarshalJSON(data []byte) error
type CustomPageSetNewParamsCookieDisabled ¶ added in v0.10.0
type CustomPageSetNewParamsCookieDisabled struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetNewParamsCookieDisabled) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetNewParamsCookieDisabled) MarshalJSON() (data []byte, err error)
func (*CustomPageSetNewParamsCookieDisabled) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetNewParamsCookieDisabled) UnmarshalJSON(data []byte) error
type CustomPageSetNewParamsHandshake ¶ added in v0.10.0
type CustomPageSetNewParamsHandshake struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo param.Opt[string] `json:"logo,omitzero"`
// The text to display in the title of the custom page
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetNewParamsHandshake) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetNewParamsHandshake) MarshalJSON() (data []byte, err error)
func (*CustomPageSetNewParamsHandshake) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetNewParamsHandshake) UnmarshalJSON(data []byte) error
type CustomPageSetNewParamsJavascriptDisabled ¶ added in v0.10.0
type CustomPageSetNewParamsJavascriptDisabled struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetNewParamsJavascriptDisabled) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetNewParamsJavascriptDisabled) MarshalJSON() (data []byte, err error)
func (*CustomPageSetNewParamsJavascriptDisabled) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetNewParamsJavascriptDisabled) UnmarshalJSON(data []byte) error
type CustomPageSetPreviewParams ¶ added in v0.3.0
type CustomPageSetPreviewParams struct {
// The type of the custom page
//
// Any of "block.html", "block_csrf.html", "captcha.html", "cookieDisabled.html",
// "handshake.html", "javascriptDisabled.html".
PageType CustomPageSetPreviewParamsPageType `query:"page_type,omitzero,required" json:"-"`
// Error message
Error param.Opt[string] `json:"error,omitzero"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo param.Opt[string] `json:"logo,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// The text to display in the title of the custom page
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
func (CustomPageSetPreviewParams) MarshalJSON ¶ added in v0.3.0
func (r CustomPageSetPreviewParams) MarshalJSON() (data []byte, err error)
func (CustomPageSetPreviewParams) URLQuery ¶ added in v0.3.0
func (r CustomPageSetPreviewParams) URLQuery() (v url.Values, err error)
URLQuery serializes CustomPageSetPreviewParams's query parameters as `url.Values`.
func (*CustomPageSetPreviewParams) UnmarshalJSON ¶ added in v0.3.0
func (r *CustomPageSetPreviewParams) UnmarshalJSON(data []byte) error
type CustomPageSetPreviewParamsPageType ¶ added in v0.10.0
type CustomPageSetPreviewParamsPageType string
The type of the custom page
const ( CustomPageSetPreviewParamsPageTypeBlockHTML CustomPageSetPreviewParamsPageType = "block.html" CustomPageSetPreviewParamsPageTypeBlockCsrfHTML CustomPageSetPreviewParamsPageType = "block_csrf.html" CustomPageSetPreviewParamsPageTypeCaptchaHTML CustomPageSetPreviewParamsPageType = "captcha.html" CustomPageSetPreviewParamsPageTypeCookieDisabledHTML CustomPageSetPreviewParamsPageType = "cookieDisabled.html" CustomPageSetPreviewParamsPageTypeHandshakeHTML CustomPageSetPreviewParamsPageType = "handshake.html" CustomPageSetPreviewParamsPageTypeJavascriptDisabledHTML CustomPageSetPreviewParamsPageType = "javascriptDisabled.html" )
type CustomPageSetService ¶ added in v0.3.0
type CustomPageSetService struct {
Options []option.RequestOption
}
CustomPageSetService contains methods and other services that help with interacting with the gcore 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 NewCustomPageSetService method instead.
func NewCustomPageSetService ¶ added in v0.3.0
func NewCustomPageSetService(opts ...option.RequestOption) (r CustomPageSetService)
NewCustomPageSetService 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 (*CustomPageSetService) Delete ¶ added in v0.3.0
func (r *CustomPageSetService) Delete(ctx context.Context, setID int64, opts ...option.RequestOption) (err error)
Delete a custom page set
func (*CustomPageSetService) Get ¶ added in v0.3.0
func (r *CustomPageSetService) Get(ctx context.Context, setID int64, opts ...option.RequestOption) (res *WaapCustomPageSet, err error)
Retrieve a custom page set based on the provided ID
func (*CustomPageSetService) List ¶ added in v0.3.0
func (r *CustomPageSetService) List(ctx context.Context, query CustomPageSetListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapCustomPageSet], err error)
Retrieve a list of custom page sets available for use
func (*CustomPageSetService) ListAutoPaging ¶ added in v0.3.0
func (r *CustomPageSetService) ListAutoPaging(ctx context.Context, query CustomPageSetListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapCustomPageSet]
Retrieve a list of custom page sets available for use
func (*CustomPageSetService) New ¶ added in v0.3.0
func (r *CustomPageSetService) New(ctx context.Context, body CustomPageSetNewParams, opts ...option.RequestOption) (res *WaapCustomPageSet, err error)
Create a custom page set based on the provided data. For any custom page type (block, `block_csrf`, etc) that is not provided the default page will be used.
func (*CustomPageSetService) Preview ¶ added in v0.3.0
func (r *CustomPageSetService) Preview(ctx context.Context, params CustomPageSetPreviewParams, opts ...option.RequestOption) (res *WaapCustomPagePreview, err error)
Allows to preview a custom page without creating it based on the provided type and data
func (*CustomPageSetService) Update ¶ added in v0.3.0
func (r *CustomPageSetService) Update(ctx context.Context, setID int64, body CustomPageSetUpdateParams, opts ...option.RequestOption) (err error)
Update a custom page set based on the provided parameters. To update a field, provide the field with the new value. To remove a field, provide it as null. To keep a field unaltered, do not include it in the request. Note: `name` cannot be removed. When updating a custom page, include all the fields that you want it to have. Any field not included will be removed.
type CustomPageSetUpdateParams ¶ added in v0.3.0
type CustomPageSetUpdateParams struct {
// Name of the custom page set
Name param.Opt[string] `json:"name,omitzero"`
Block CustomPageSetUpdateParamsBlock `json:"block,omitzero"`
BlockCsrf CustomPageSetUpdateParamsBlockCsrf `json:"block_csrf,omitzero"`
Captcha CustomPageSetUpdateParamsCaptcha `json:"captcha,omitzero"`
CookieDisabled CustomPageSetUpdateParamsCookieDisabled `json:"cookie_disabled,omitzero"`
// List of domain IDs that are associated with this page set
Domains []int64 `json:"domains,omitzero"`
Handshake CustomPageSetUpdateParamsHandshake `json:"handshake,omitzero"`
JavascriptDisabled CustomPageSetUpdateParamsJavascriptDisabled `json:"javascript_disabled,omitzero"`
// contains filtered or unexported fields
}
func (CustomPageSetUpdateParams) MarshalJSON ¶ added in v0.3.0
func (r CustomPageSetUpdateParams) MarshalJSON() (data []byte, err error)
func (*CustomPageSetUpdateParams) UnmarshalJSON ¶ added in v0.3.0
func (r *CustomPageSetUpdateParams) UnmarshalJSON(data []byte) error
type CustomPageSetUpdateParamsBlock ¶ added in v0.10.0
type CustomPageSetUpdateParamsBlock struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo param.Opt[string] `json:"logo,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// The text to display in the title of the custom page
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetUpdateParamsBlock) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetUpdateParamsBlock) MarshalJSON() (data []byte, err error)
func (*CustomPageSetUpdateParamsBlock) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetUpdateParamsBlock) UnmarshalJSON(data []byte) error
type CustomPageSetUpdateParamsBlockCsrf ¶ added in v0.10.0
type CustomPageSetUpdateParamsBlockCsrf struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo param.Opt[string] `json:"logo,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// The text to display in the title of the custom page
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetUpdateParamsBlockCsrf) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetUpdateParamsBlockCsrf) MarshalJSON() (data []byte, err error)
func (*CustomPageSetUpdateParamsBlockCsrf) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetUpdateParamsBlockCsrf) UnmarshalJSON(data []byte) error
type CustomPageSetUpdateParamsCaptcha ¶ added in v0.10.0
type CustomPageSetUpdateParamsCaptcha struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// Error message
Error param.Opt[string] `json:"error,omitzero"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo param.Opt[string] `json:"logo,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// The text to display in the title of the custom page
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetUpdateParamsCaptcha) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetUpdateParamsCaptcha) MarshalJSON() (data []byte, err error)
func (*CustomPageSetUpdateParamsCaptcha) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetUpdateParamsCaptcha) UnmarshalJSON(data []byte) error
type CustomPageSetUpdateParamsCookieDisabled ¶ added in v0.10.0
type CustomPageSetUpdateParamsCookieDisabled struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetUpdateParamsCookieDisabled) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetUpdateParamsCookieDisabled) MarshalJSON() (data []byte, err error)
func (*CustomPageSetUpdateParamsCookieDisabled) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetUpdateParamsCookieDisabled) UnmarshalJSON(data []byte) error
type CustomPageSetUpdateParamsHandshake ¶ added in v0.10.0
type CustomPageSetUpdateParamsHandshake struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo param.Opt[string] `json:"logo,omitzero"`
// The text to display in the title of the custom page
Title param.Opt[string] `json:"title,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetUpdateParamsHandshake) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetUpdateParamsHandshake) MarshalJSON() (data []byte, err error)
func (*CustomPageSetUpdateParamsHandshake) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetUpdateParamsHandshake) UnmarshalJSON(data []byte) error
type CustomPageSetUpdateParamsJavascriptDisabled ¶ added in v0.10.0
type CustomPageSetUpdateParamsJavascriptDisabled struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header param.Opt[string] `json:"header,omitzero"`
// The text to display in the body of the custom page
Text param.Opt[string] `json:"text,omitzero"`
// contains filtered or unexported fields
}
The property Enabled is required.
func (CustomPageSetUpdateParamsJavascriptDisabled) MarshalJSON ¶ added in v0.10.0
func (r CustomPageSetUpdateParamsJavascriptDisabled) MarshalJSON() (data []byte, err error)
func (*CustomPageSetUpdateParamsJavascriptDisabled) UnmarshalJSON ¶ added in v0.10.0
func (r *CustomPageSetUpdateParamsJavascriptDisabled) UnmarshalJSON(data []byte) error
type DomainAPIDiscoveryGetScanResultParams ¶ added in v0.10.0
type DomainAPIDiscoveryGetScanResultParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainAPIDiscoveryListScanResultsParams ¶ added in v0.10.0
type DomainAPIDiscoveryListScanResultsParams struct {
// Filter by the message of the scan. Supports '\*' as a wildcard character
Message param.Opt[string] `query:"message,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// The different statuses a task result can have
//
// Any of "SUCCESS", "FAILURE", "IN_PROGRESS".
Status DomainAPIDiscoveryListScanResultsParamsStatus `query:"status,omitzero" json:"-"`
// The different types of scans that can be performed
//
// Any of "TRAFFIC_SCAN", "API_DESCRIPTION_FILE_SCAN".
Type DomainAPIDiscoveryListScanResultsParamsType `query:"type,omitzero" json:"-"`
// Sort the response by given field.
//
// Any of "id", "type", "start_time", "end_time", "status", "message", "-id",
// "-type", "-start_time", "-end_time", "-status", "-message".
Ordering DomainAPIDiscoveryListScanResultsParamsOrdering `query:"ordering,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainAPIDiscoveryListScanResultsParams) URLQuery ¶ added in v0.10.0
func (r DomainAPIDiscoveryListScanResultsParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainAPIDiscoveryListScanResultsParams's query parameters as `url.Values`.
type DomainAPIDiscoveryListScanResultsParamsOrdering ¶ added in v0.10.0
type DomainAPIDiscoveryListScanResultsParamsOrdering string
Sort the response by given field.
const ( DomainAPIDiscoveryListScanResultsParamsOrderingID DomainAPIDiscoveryListScanResultsParamsOrdering = "id" DomainAPIDiscoveryListScanResultsParamsOrderingType DomainAPIDiscoveryListScanResultsParamsOrdering = "type" DomainAPIDiscoveryListScanResultsParamsOrderingStartTime DomainAPIDiscoveryListScanResultsParamsOrdering = "start_time" DomainAPIDiscoveryListScanResultsParamsOrderingEndTime DomainAPIDiscoveryListScanResultsParamsOrdering = "end_time" DomainAPIDiscoveryListScanResultsParamsOrderingStatus DomainAPIDiscoveryListScanResultsParamsOrdering = "status" DomainAPIDiscoveryListScanResultsParamsOrderingMessage DomainAPIDiscoveryListScanResultsParamsOrdering = "message" DomainAPIDiscoveryListScanResultsParamsOrderingMinusID DomainAPIDiscoveryListScanResultsParamsOrdering = "-id" DomainAPIDiscoveryListScanResultsParamsOrderingMinusType DomainAPIDiscoveryListScanResultsParamsOrdering = "-type" DomainAPIDiscoveryListScanResultsParamsOrderingMinusStartTime DomainAPIDiscoveryListScanResultsParamsOrdering = "-start_time" DomainAPIDiscoveryListScanResultsParamsOrderingMinusEndTime DomainAPIDiscoveryListScanResultsParamsOrdering = "-end_time" DomainAPIDiscoveryListScanResultsParamsOrderingMinusStatus DomainAPIDiscoveryListScanResultsParamsOrdering = "-status" DomainAPIDiscoveryListScanResultsParamsOrderingMinusMessage DomainAPIDiscoveryListScanResultsParamsOrdering = "-message" )
type DomainAPIDiscoveryListScanResultsParamsStatus ¶ added in v0.10.0
type DomainAPIDiscoveryListScanResultsParamsStatus string
The different statuses a task result can have
const ( DomainAPIDiscoveryListScanResultsParamsStatusSuccess DomainAPIDiscoveryListScanResultsParamsStatus = "SUCCESS" DomainAPIDiscoveryListScanResultsParamsStatusFailure DomainAPIDiscoveryListScanResultsParamsStatus = "FAILURE" DomainAPIDiscoveryListScanResultsParamsStatusInProgress DomainAPIDiscoveryListScanResultsParamsStatus = "IN_PROGRESS" )
type DomainAPIDiscoveryListScanResultsParamsType ¶ added in v0.10.0
type DomainAPIDiscoveryListScanResultsParamsType string
The different types of scans that can be performed
const ( DomainAPIDiscoveryListScanResultsParamsTypeTrafficScan DomainAPIDiscoveryListScanResultsParamsType = "TRAFFIC_SCAN" DomainAPIDiscoveryListScanResultsParamsTypeAPIDescriptionFileScan DomainAPIDiscoveryListScanResultsParamsType = "API_DESCRIPTION_FILE_SCAN" )
type DomainAPIDiscoveryService ¶ added in v0.3.0
type DomainAPIDiscoveryService struct {
Options []option.RequestOption
}
DomainAPIDiscoveryService contains methods and other services that help with interacting with the gcore 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 NewDomainAPIDiscoveryService method instead.
func NewDomainAPIDiscoveryService ¶ added in v0.3.0
func NewDomainAPIDiscoveryService(opts ...option.RequestOption) (r DomainAPIDiscoveryService)
NewDomainAPIDiscoveryService 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 (*DomainAPIDiscoveryService) GetScanResult ¶ added in v0.10.0
func (r *DomainAPIDiscoveryService) GetScanResult(ctx context.Context, scanID string, query DomainAPIDiscoveryGetScanResultParams, opts ...option.RequestOption) (res *WaapAPIScanResult, err error)
Get Scan Result
func (*DomainAPIDiscoveryService) GetSettings ¶ added in v0.3.0
func (r *DomainAPIDiscoveryService) GetSettings(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *WaapAPIDiscoverySettings, err error)
Retrieve the API discovery settings for a domain
func (*DomainAPIDiscoveryService) ListScanResults ¶ added in v0.10.0
func (r *DomainAPIDiscoveryService) ListScanResults(ctx context.Context, domainID int64, query DomainAPIDiscoveryListScanResultsParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapAPIScanResult], err error)
Get Scan Results
func (*DomainAPIDiscoveryService) ListScanResultsAutoPaging ¶ added in v0.10.0
func (r *DomainAPIDiscoveryService) ListScanResultsAutoPaging(ctx context.Context, domainID int64, query DomainAPIDiscoveryListScanResultsParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapAPIScanResult]
Get Scan Results
func (*DomainAPIDiscoveryService) ScanOpenAPI ¶ added in v0.3.0
func (r *DomainAPIDiscoveryService) ScanOpenAPI(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *WaapTaskID, err error)
Scan an API description file hosted online. The file must be in YAML or JSON format and adhere to the OpenAPI specification. The location of the API description file should be specified in the API discovery settings.
func (*DomainAPIDiscoveryService) UpdateSettings ¶ added in v0.3.0
func (r *DomainAPIDiscoveryService) UpdateSettings(ctx context.Context, domainID int64, body DomainAPIDiscoveryUpdateSettingsParams, opts ...option.RequestOption) (res *WaapAPIDiscoverySettings, err error)
Update the API discovery settings for a domain
func (*DomainAPIDiscoveryService) UploadOpenAPI ¶ added in v0.3.0
func (r *DomainAPIDiscoveryService) UploadOpenAPI(ctx context.Context, domainID int64, body DomainAPIDiscoveryUploadOpenAPIParams, opts ...option.RequestOption) (res *WaapTaskID, err error)
An API description file must adhere to the OpenAPI specification and be written in YAML or JSON format. The file name should be provided as the value for the `file_name` parameter. The contents of the file must be base64 encoded and supplied as the value for the `file_data` parameter.
type DomainAPIDiscoveryUpdateSettingsParams ¶ added in v0.3.0
type DomainAPIDiscoveryUpdateSettingsParams struct {
// The URL of the API description file. This will be periodically scanned if
// `descriptionFileScanEnabled` is enabled. Supported formats are YAML and JSON,
// and it must adhere to OpenAPI versions 2, 3, or 3.1.
DescriptionFileLocation param.Opt[string] `json:"descriptionFileLocation,omitzero"`
// Indicates if periodic scan of the description file is enabled
DescriptionFileScanEnabled param.Opt[bool] `json:"descriptionFileScanEnabled,omitzero"`
// The interval in hours for scanning the description file
DescriptionFileScanIntervalHours param.Opt[int64] `json:"descriptionFileScanIntervalHours,omitzero"`
// Indicates if traffic scan is enabled
TrafficScanEnabled param.Opt[bool] `json:"trafficScanEnabled,omitzero"`
// The interval in hours for scanning the traffic
TrafficScanIntervalHours param.Opt[int64] `json:"trafficScanIntervalHours,omitzero"`
// contains filtered or unexported fields
}
func (DomainAPIDiscoveryUpdateSettingsParams) MarshalJSON ¶ added in v0.3.0
func (r DomainAPIDiscoveryUpdateSettingsParams) MarshalJSON() (data []byte, err error)
func (*DomainAPIDiscoveryUpdateSettingsParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAPIDiscoveryUpdateSettingsParams) UnmarshalJSON(data []byte) error
type DomainAPIDiscoveryUploadOpenAPIParams ¶ added in v0.3.0
type DomainAPIDiscoveryUploadOpenAPIParams struct {
// Base64 representation of the description file. Supported formats are YAML and
// JSON, and it must adhere to OpenAPI versions 2, 3, or 3.1.
FileData string `json:"file_data,required"`
// The name of the file
FileName string `json:"file_name,required"`
// contains filtered or unexported fields
}
func (DomainAPIDiscoveryUploadOpenAPIParams) MarshalJSON ¶ added in v0.3.0
func (r DomainAPIDiscoveryUploadOpenAPIParams) MarshalJSON() (data []byte, err error)
func (*DomainAPIDiscoveryUploadOpenAPIParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAPIDiscoveryUploadOpenAPIParams) UnmarshalJSON(data []byte) error
type DomainAPIPathDeleteParams ¶ added in v0.3.0
type DomainAPIPathDeleteParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainAPIPathGetParams ¶ added in v0.3.0
type DomainAPIPathGetParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainAPIPathGroupService ¶ added in v0.3.0
type DomainAPIPathGroupService struct {
Options []option.RequestOption
}
DomainAPIPathGroupService contains methods and other services that help with interacting with the gcore 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 NewDomainAPIPathGroupService method instead.
func NewDomainAPIPathGroupService ¶ added in v0.3.0
func NewDomainAPIPathGroupService(opts ...option.RequestOption) (r DomainAPIPathGroupService)
NewDomainAPIPathGroupService 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 (*DomainAPIPathGroupService) List ¶ added in v0.3.0
func (r *DomainAPIPathGroupService) List(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *APIPathGroupList, err error)
Retrieve a list of API path groups for a specific domain
type DomainAPIPathListParams ¶ added in v0.3.0
type DomainAPIPathListParams struct {
// Filter by the API group associated with the API path
APIGroup param.Opt[string] `query:"api_group,omitzero" json:"-"`
// Filter by the API version
APIVersion param.Opt[string] `query:"api_version,omitzero" json:"-"`
// Filter by the path. Supports '\*' as a wildcard character
Path param.Opt[string] `query:"path,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// The different HTTP schemes an API path can have
//
// Any of "HTTP", "HTTPS".
HTTPScheme DomainAPIPathListParamsHTTPScheme `query:"http_scheme,omitzero" json:"-"`
// Filter by the path ID
IDs []string `query:"ids,omitzero" format:"uuid" json:"-"`
// The different methods an API path can have
//
// Any of "GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS".
Method DomainAPIPathListParamsMethod `query:"method,omitzero" json:"-"`
// The different sources an API path can have
//
// Any of "API_DESCRIPTION_FILE", "TRAFFIC_SCAN", "USER_DEFINED".
Source DomainAPIPathListParamsSource `query:"source,omitzero" json:"-"`
// Filter by the status of the discovered API path
//
// Any of "CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API".
Status []string `query:"status,omitzero" json:"-"`
// Sort the response by given field.
//
// Any of "id", "path", "method", "api_version", "http_scheme", "first_detected",
// "last_detected", "status", "source", "-id", "-path", "-method", "-api_version",
// "-http_scheme", "-first_detected", "-last_detected", "-status", "-source".
Ordering DomainAPIPathListParamsOrdering `query:"ordering,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainAPIPathListParams) URLQuery ¶ added in v0.3.0
func (r DomainAPIPathListParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainAPIPathListParams's query parameters as `url.Values`.
type DomainAPIPathListParamsHTTPScheme ¶ added in v0.3.0
type DomainAPIPathListParamsHTTPScheme string
The different HTTP schemes an API path can have
const ( DomainAPIPathListParamsHTTPSchemeHTTP DomainAPIPathListParamsHTTPScheme = "HTTP" DomainAPIPathListParamsHTTPSchemeHTTPS DomainAPIPathListParamsHTTPScheme = "HTTPS" )
type DomainAPIPathListParamsMethod ¶ added in v0.3.0
type DomainAPIPathListParamsMethod string
The different methods an API path can have
const ( DomainAPIPathListParamsMethodGet DomainAPIPathListParamsMethod = "GET" DomainAPIPathListParamsMethodPost DomainAPIPathListParamsMethod = "POST" DomainAPIPathListParamsMethodPut DomainAPIPathListParamsMethod = "PUT" DomainAPIPathListParamsMethodPatch DomainAPIPathListParamsMethod = "PATCH" DomainAPIPathListParamsMethodDelete DomainAPIPathListParamsMethod = "DELETE" DomainAPIPathListParamsMethodTrace DomainAPIPathListParamsMethod = "TRACE" DomainAPIPathListParamsMethodHead DomainAPIPathListParamsMethod = "HEAD" DomainAPIPathListParamsMethodOptions DomainAPIPathListParamsMethod = "OPTIONS" )
type DomainAPIPathListParamsOrdering ¶ added in v0.3.0
type DomainAPIPathListParamsOrdering string
Sort the response by given field.
const ( DomainAPIPathListParamsOrderingID DomainAPIPathListParamsOrdering = "id" DomainAPIPathListParamsOrderingPath DomainAPIPathListParamsOrdering = "path" DomainAPIPathListParamsOrderingMethod DomainAPIPathListParamsOrdering = "method" DomainAPIPathListParamsOrderingAPIVersion DomainAPIPathListParamsOrdering = "api_version" DomainAPIPathListParamsOrderingHTTPScheme DomainAPIPathListParamsOrdering = "http_scheme" DomainAPIPathListParamsOrderingFirstDetected DomainAPIPathListParamsOrdering = "first_detected" DomainAPIPathListParamsOrderingLastDetected DomainAPIPathListParamsOrdering = "last_detected" DomainAPIPathListParamsOrderingStatus DomainAPIPathListParamsOrdering = "status" DomainAPIPathListParamsOrderingSource DomainAPIPathListParamsOrdering = "source" DomainAPIPathListParamsOrderingMinusID DomainAPIPathListParamsOrdering = "-id" DomainAPIPathListParamsOrderingMinusPath DomainAPIPathListParamsOrdering = "-path" DomainAPIPathListParamsOrderingMinusMethod DomainAPIPathListParamsOrdering = "-method" DomainAPIPathListParamsOrderingMinusAPIVersion DomainAPIPathListParamsOrdering = "-api_version" DomainAPIPathListParamsOrderingMinusHTTPScheme DomainAPIPathListParamsOrdering = "-http_scheme" DomainAPIPathListParamsOrderingMinusFirstDetected DomainAPIPathListParamsOrdering = "-first_detected" DomainAPIPathListParamsOrderingMinusLastDetected DomainAPIPathListParamsOrdering = "-last_detected" DomainAPIPathListParamsOrderingMinusStatus DomainAPIPathListParamsOrdering = "-status" DomainAPIPathListParamsOrderingMinusSource DomainAPIPathListParamsOrdering = "-source" )
type DomainAPIPathListParamsSource ¶ added in v0.3.0
type DomainAPIPathListParamsSource string
The different sources an API path can have
const ( DomainAPIPathListParamsSourceAPIDescriptionFile DomainAPIPathListParamsSource = "API_DESCRIPTION_FILE" DomainAPIPathListParamsSourceTrafficScan DomainAPIPathListParamsSource = "TRAFFIC_SCAN" DomainAPIPathListParamsSourceUserDefined DomainAPIPathListParamsSource = "USER_DEFINED" )
type DomainAPIPathNewParams ¶ added in v0.3.0
type DomainAPIPathNewParams struct {
// The different HTTP schemes an API path can have
//
// Any of "HTTP", "HTTPS".
HTTPScheme DomainAPIPathNewParamsHTTPScheme `json:"http_scheme,omitzero,required"`
// The different methods an API path can have
//
// Any of "GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS".
Method DomainAPIPathNewParamsMethod `json:"method,omitzero,required"`
// The API path, locations that are saved for resource IDs will be put in curly
// brackets
Path string `json:"path,required"`
APIVersion param.Opt[string] `json:"api_version,omitzero"`
APIGroups []string `json:"api_groups,omitzero"`
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (DomainAPIPathNewParams) MarshalJSON ¶ added in v0.3.0
func (r DomainAPIPathNewParams) MarshalJSON() (data []byte, err error)
func (*DomainAPIPathNewParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAPIPathNewParams) UnmarshalJSON(data []byte) error
type DomainAPIPathNewParamsHTTPScheme ¶ added in v0.3.0
type DomainAPIPathNewParamsHTTPScheme string
The different HTTP schemes an API path can have
const ( DomainAPIPathNewParamsHTTPSchemeHTTP DomainAPIPathNewParamsHTTPScheme = "HTTP" DomainAPIPathNewParamsHTTPSchemeHTTPS DomainAPIPathNewParamsHTTPScheme = "HTTPS" )
type DomainAPIPathNewParamsMethod ¶ added in v0.3.0
type DomainAPIPathNewParamsMethod string
The different methods an API path can have
const ( DomainAPIPathNewParamsMethodGet DomainAPIPathNewParamsMethod = "GET" DomainAPIPathNewParamsMethodPost DomainAPIPathNewParamsMethod = "POST" DomainAPIPathNewParamsMethodPut DomainAPIPathNewParamsMethod = "PUT" DomainAPIPathNewParamsMethodPatch DomainAPIPathNewParamsMethod = "PATCH" DomainAPIPathNewParamsMethodDelete DomainAPIPathNewParamsMethod = "DELETE" DomainAPIPathNewParamsMethodTrace DomainAPIPathNewParamsMethod = "TRACE" DomainAPIPathNewParamsMethodHead DomainAPIPathNewParamsMethod = "HEAD" DomainAPIPathNewParamsMethodOptions DomainAPIPathNewParamsMethod = "OPTIONS" )
type DomainAPIPathService ¶ added in v0.3.0
type DomainAPIPathService struct {
Options []option.RequestOption
}
DomainAPIPathService contains methods and other services that help with interacting with the gcore 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 NewDomainAPIPathService method instead.
func NewDomainAPIPathService ¶ added in v0.3.0
func NewDomainAPIPathService(opts ...option.RequestOption) (r DomainAPIPathService)
NewDomainAPIPathService 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 (*DomainAPIPathService) Delete ¶ added in v0.3.0
func (r *DomainAPIPathService) Delete(ctx context.Context, pathID string, body DomainAPIPathDeleteParams, opts ...option.RequestOption) (err error)
Delete a specific API path for a domain
func (*DomainAPIPathService) Get ¶ added in v0.3.0
func (r *DomainAPIPathService) Get(ctx context.Context, pathID string, query DomainAPIPathGetParams, opts ...option.RequestOption) (res *WaapAPIPath, err error)
Retrieve a specific API path for a domain
func (*DomainAPIPathService) List ¶ added in v0.3.0
func (r *DomainAPIPathService) List(ctx context.Context, domainID int64, query DomainAPIPathListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapAPIPath], err error)
Retrieve a list of API paths for a specific domain
func (*DomainAPIPathService) ListAutoPaging ¶ added in v0.3.0
func (r *DomainAPIPathService) ListAutoPaging(ctx context.Context, domainID int64, query DomainAPIPathListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapAPIPath]
Retrieve a list of API paths for a specific domain
func (*DomainAPIPathService) New ¶ added in v0.3.0
func (r *DomainAPIPathService) New(ctx context.Context, domainID int64, body DomainAPIPathNewParams, opts ...option.RequestOption) (res *WaapAPIPath, err error)
Create an API path for a domain
func (*DomainAPIPathService) Update ¶ added in v0.3.0
func (r *DomainAPIPathService) Update(ctx context.Context, pathID string, params DomainAPIPathUpdateParams, opts ...option.RequestOption) (err error)
Update a specific API path for a domain
type DomainAPIPathUpdateParams ¶ added in v0.3.0
type DomainAPIPathUpdateParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// The updated API path. When updating the path, variables can be renamed, path
// parts can be converted to variables and vice versa.
Path param.Opt[string] `json:"path,omitzero"`
APIGroups []string `json:"api_groups,omitzero"`
// The different statuses an API path can have
//
// Any of "CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API".
Status DomainAPIPathUpdateParamsStatus `json:"status,omitzero"`
Tags []string `json:"tags,omitzero"`
// contains filtered or unexported fields
}
func (DomainAPIPathUpdateParams) MarshalJSON ¶ added in v0.3.0
func (r DomainAPIPathUpdateParams) MarshalJSON() (data []byte, err error)
func (*DomainAPIPathUpdateParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAPIPathUpdateParams) UnmarshalJSON(data []byte) error
type DomainAPIPathUpdateParamsStatus ¶ added in v0.3.0
type DomainAPIPathUpdateParamsStatus string
The different statuses an API path can have
const ( DomainAPIPathUpdateParamsStatusConfirmedAPI DomainAPIPathUpdateParamsStatus = "CONFIRMED_API" DomainAPIPathUpdateParamsStatusPotentialAPI DomainAPIPathUpdateParamsStatus = "POTENTIAL_API" DomainAPIPathUpdateParamsStatusNotAPI DomainAPIPathUpdateParamsStatus = "NOT_API" DomainAPIPathUpdateParamsStatusDelistedAPI DomainAPIPathUpdateParamsStatus = "DELISTED_API" )
type DomainAdvancedRuleDeleteParams ¶ added in v0.3.0
type DomainAdvancedRuleDeleteParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainAdvancedRuleGetParams ¶ added in v0.3.0
type DomainAdvancedRuleGetParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainAdvancedRuleListParams ¶ added in v0.3.0
type DomainAdvancedRuleListParams struct {
// Filter rules based on their description. Supports '\*' as a wildcard character.
Description param.Opt[string] `query:"description,omitzero" json:"-"`
// Filter rules based on their active status
Enabled param.Opt[bool] `query:"enabled,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter rules based on their name. Supports '\*' as a wildcard character.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Determine the field to order results by
//
// Any of "id", "name", "description", "enabled", "action", "phase", "-id",
// "-name", "-description", "-enabled", "-action", "-phase".
Ordering DomainAdvancedRuleListParamsOrdering `query:"ordering,omitzero" json:"-"`
// Filter to refine results by specific actions
//
// Any of "allow", "block", "captcha", "handshake", "monitor", "tag".
Action DomainAdvancedRuleListParamsAction `query:"action,omitzero" json:"-"`
// Filter rules based on the WAAP request/response phase for applying the rule.
//
// The "access" phase is responsible for modifying the request before it is sent to
// the origin server.
//
// The "header_filter" phase is responsible for modifying the HTTP headers of a
// response before they are sent back to the client.
//
// The "body_filter" phase is responsible for modifying the body of a response
// before it is sent back to the client.
//
// Any of "access", "header_filter", "body_filter".
Phase DomainAdvancedRuleListParamsPhase `query:"phase,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainAdvancedRuleListParams) URLQuery ¶ added in v0.3.0
func (r DomainAdvancedRuleListParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainAdvancedRuleListParams's query parameters as `url.Values`.
type DomainAdvancedRuleListParamsAction ¶ added in v0.10.0
type DomainAdvancedRuleListParamsAction string
Filter to refine results by specific actions
const ( DomainAdvancedRuleListParamsActionAllow DomainAdvancedRuleListParamsAction = "allow" DomainAdvancedRuleListParamsActionBlock DomainAdvancedRuleListParamsAction = "block" DomainAdvancedRuleListParamsActionCaptcha DomainAdvancedRuleListParamsAction = "captcha" DomainAdvancedRuleListParamsActionHandshake DomainAdvancedRuleListParamsAction = "handshake" DomainAdvancedRuleListParamsActionMonitor DomainAdvancedRuleListParamsAction = "monitor" DomainAdvancedRuleListParamsActionTag DomainAdvancedRuleListParamsAction = "tag" )
type DomainAdvancedRuleListParamsOrdering ¶ added in v0.3.0
type DomainAdvancedRuleListParamsOrdering string
Determine the field to order results by
const ( DomainAdvancedRuleListParamsOrderingID DomainAdvancedRuleListParamsOrdering = "id" DomainAdvancedRuleListParamsOrderingName DomainAdvancedRuleListParamsOrdering = "name" DomainAdvancedRuleListParamsOrderingDescription DomainAdvancedRuleListParamsOrdering = "description" DomainAdvancedRuleListParamsOrderingEnabled DomainAdvancedRuleListParamsOrdering = "enabled" DomainAdvancedRuleListParamsOrderingAction DomainAdvancedRuleListParamsOrdering = "action" DomainAdvancedRuleListParamsOrderingPhase DomainAdvancedRuleListParamsOrdering = "phase" DomainAdvancedRuleListParamsOrderingMinusID DomainAdvancedRuleListParamsOrdering = "-id" DomainAdvancedRuleListParamsOrderingMinusName DomainAdvancedRuleListParamsOrdering = "-name" DomainAdvancedRuleListParamsOrderingMinusDescription DomainAdvancedRuleListParamsOrdering = "-description" DomainAdvancedRuleListParamsOrderingMinusEnabled DomainAdvancedRuleListParamsOrdering = "-enabled" DomainAdvancedRuleListParamsOrderingMinusAction DomainAdvancedRuleListParamsOrdering = "-action" DomainAdvancedRuleListParamsOrderingMinusPhase DomainAdvancedRuleListParamsOrdering = "-phase" )
type DomainAdvancedRuleListParamsPhase ¶ added in v0.3.0
type DomainAdvancedRuleListParamsPhase string
Filter rules based on the WAAP request/response phase for applying the rule.
The "access" phase is responsible for modifying the request before it is sent to the origin server.
The "header_filter" phase is responsible for modifying the HTTP headers of a response before they are sent back to the client.
The "body_filter" phase is responsible for modifying the body of a response before it is sent back to the client.
const ( DomainAdvancedRuleListParamsPhaseAccess DomainAdvancedRuleListParamsPhase = "access" DomainAdvancedRuleListParamsPhaseHeaderFilter DomainAdvancedRuleListParamsPhase = "header_filter" DomainAdvancedRuleListParamsPhaseBodyFilter DomainAdvancedRuleListParamsPhase = "body_filter" )
type DomainAdvancedRuleNewParams ¶ added in v0.3.0
type DomainAdvancedRuleNewParams struct {
// The action that the rule takes when triggered. Only one action can be set per
// rule.
Action DomainAdvancedRuleNewParamsAction `json:"action,omitzero,required"`
// Whether or not the rule is enabled
Enabled bool `json:"enabled,required"`
// The name assigned to the rule
Name string `json:"name,required"`
// A CEL syntax expression that contains the rule's conditions. Allowed objects
// are: request, whois, session, response, tags, `user_defined_tags`, `user_agent`,
// `client_data`.
//
// More info can be found here:
// https://gcore.com/docs/waap/waap-rules/advanced-rules
Source string `json:"source,required"`
// The description assigned to the rule
Description param.Opt[string] `json:"description,omitzero"`
// The WAAP request/response phase for applying the rule. Default is "access".
//
// The "access" phase is responsible for modifying the request before it is sent to
// the origin server.
//
// The "header_filter" phase is responsible for modifying the HTTP headers of a
// response before they are sent back to the client.
//
// The "body_filter" phase is responsible for modifying the body of a response
// before it is sent back to the client.
//
// Any of "access", "header_filter", "body_filter".
Phase DomainAdvancedRuleNewParamsPhase `json:"phase,omitzero"`
// contains filtered or unexported fields
}
func (DomainAdvancedRuleNewParams) MarshalJSON ¶ added in v0.3.0
func (r DomainAdvancedRuleNewParams) MarshalJSON() (data []byte, err error)
func (*DomainAdvancedRuleNewParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAdvancedRuleNewParams) UnmarshalJSON(data []byte) error
type DomainAdvancedRuleNewParamsAction ¶ added in v0.3.0
type DomainAdvancedRuleNewParamsAction struct {
// The WAAP allowed the request
Allow any `json:"allow,omitzero"`
// WAAP block action behavior could be configured with response status code and
// action duration.
Block DomainAdvancedRuleNewParamsActionBlock `json:"block,omitzero"`
// The WAAP presented the user with a captcha
Captcha any `json:"captcha,omitzero"`
// The WAAP performed automatic browser validation
Handshake any `json:"handshake,omitzero"`
// The WAAP monitored the request but took no action
Monitor any `json:"monitor,omitzero"`
// WAAP tag action gets a list of tags to tag the request scope with
Tag DomainAdvancedRuleNewParamsActionTag `json:"tag,omitzero"`
// contains filtered or unexported fields
}
The action that the rule takes when triggered. Only one action can be set per rule.
func (DomainAdvancedRuleNewParamsAction) MarshalJSON ¶ added in v0.3.0
func (r DomainAdvancedRuleNewParamsAction) MarshalJSON() (data []byte, err error)
func (*DomainAdvancedRuleNewParamsAction) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAdvancedRuleNewParamsAction) UnmarshalJSON(data []byte) error
type DomainAdvancedRuleNewParamsActionBlock ¶ added in v0.3.0
type DomainAdvancedRuleNewParamsActionBlock struct {
// How long a rule's block action will apply to subsequent requests. Can be
// specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to
// represent time format (seconds, minutes, hours, or days). Empty time intervals
// are not allowed.
ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
// A custom HTTP status code that the WAAP returns if a rule blocks a request
//
// Any of 403, 405, 418, 429.
StatusCode int64 `json:"status_code,omitzero"`
// contains filtered or unexported fields
}
WAAP block action behavior could be configured with response status code and action duration.
func (DomainAdvancedRuleNewParamsActionBlock) MarshalJSON ¶ added in v0.3.0
func (r DomainAdvancedRuleNewParamsActionBlock) MarshalJSON() (data []byte, err error)
func (*DomainAdvancedRuleNewParamsActionBlock) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAdvancedRuleNewParamsActionBlock) UnmarshalJSON(data []byte) error
type DomainAdvancedRuleNewParamsActionTag ¶ added in v0.3.0
type DomainAdvancedRuleNewParamsActionTag struct {
// The list of user defined tags to tag the request with
Tags []string `json:"tags,omitzero,required"`
// contains filtered or unexported fields
}
WAAP tag action gets a list of tags to tag the request scope with
The property Tags is required.
func (DomainAdvancedRuleNewParamsActionTag) MarshalJSON ¶ added in v0.3.0
func (r DomainAdvancedRuleNewParamsActionTag) MarshalJSON() (data []byte, err error)
func (*DomainAdvancedRuleNewParamsActionTag) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAdvancedRuleNewParamsActionTag) UnmarshalJSON(data []byte) error
type DomainAdvancedRuleNewParamsPhase ¶ added in v0.3.0
type DomainAdvancedRuleNewParamsPhase string
The WAAP request/response phase for applying the rule. Default is "access".
The "access" phase is responsible for modifying the request before it is sent to the origin server.
The "header_filter" phase is responsible for modifying the HTTP headers of a response before they are sent back to the client.
The "body_filter" phase is responsible for modifying the body of a response before it is sent back to the client.
const ( DomainAdvancedRuleNewParamsPhaseAccess DomainAdvancedRuleNewParamsPhase = "access" DomainAdvancedRuleNewParamsPhaseHeaderFilter DomainAdvancedRuleNewParamsPhase = "header_filter" DomainAdvancedRuleNewParamsPhaseBodyFilter DomainAdvancedRuleNewParamsPhase = "body_filter" )
type DomainAdvancedRuleService ¶ added in v0.3.0
type DomainAdvancedRuleService struct {
Options []option.RequestOption
}
DomainAdvancedRuleService contains methods and other services that help with interacting with the gcore 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 NewDomainAdvancedRuleService method instead.
func NewDomainAdvancedRuleService ¶ added in v0.3.0
func NewDomainAdvancedRuleService(opts ...option.RequestOption) (r DomainAdvancedRuleService)
NewDomainAdvancedRuleService 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 (*DomainAdvancedRuleService) Delete ¶ added in v0.3.0
func (r *DomainAdvancedRuleService) Delete(ctx context.Context, ruleID int64, body DomainAdvancedRuleDeleteParams, opts ...option.RequestOption) (err error)
Delete an advanced rule
func (*DomainAdvancedRuleService) Get ¶ added in v0.3.0
func (r *DomainAdvancedRuleService) Get(ctx context.Context, ruleID int64, query DomainAdvancedRuleGetParams, opts ...option.RequestOption) (res *WaapAdvancedRule, err error)
Retrieve a specific advanced rule assigned to a domain
func (*DomainAdvancedRuleService) List ¶ added in v0.3.0
func (r *DomainAdvancedRuleService) List(ctx context.Context, domainID int64, query DomainAdvancedRuleListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapAdvancedRule], err error)
Retrieve a list of advanced rules assigned to a domain, offering filter, ordering, and pagination capabilities
func (*DomainAdvancedRuleService) ListAutoPaging ¶ added in v0.3.0
func (r *DomainAdvancedRuleService) ListAutoPaging(ctx context.Context, domainID int64, query DomainAdvancedRuleListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapAdvancedRule]
Retrieve a list of advanced rules assigned to a domain, offering filter, ordering, and pagination capabilities
func (*DomainAdvancedRuleService) New ¶ added in v0.3.0
func (r *DomainAdvancedRuleService) New(ctx context.Context, domainID int64, body DomainAdvancedRuleNewParams, opts ...option.RequestOption) (res *WaapAdvancedRule, err error)
Create an advanced rule
func (*DomainAdvancedRuleService) Toggle ¶ added in v0.3.0
func (r *DomainAdvancedRuleService) Toggle(ctx context.Context, action DomainAdvancedRuleToggleParamsAction, body DomainAdvancedRuleToggleParams, opts ...option.RequestOption) (err error)
Toggle an advanced rule
func (*DomainAdvancedRuleService) Update ¶ added in v0.3.0
func (r *DomainAdvancedRuleService) Update(ctx context.Context, ruleID int64, params DomainAdvancedRuleUpdateParams, opts ...option.RequestOption) (err error)
Only properties present in the request will be updated
type DomainAdvancedRuleToggleParams ¶ added in v0.3.0
type DomainAdvancedRuleToggleParamsAction ¶ added in v0.10.0
type DomainAdvancedRuleToggleParamsAction string
Enable or disable an advanced rule
const ( DomainAdvancedRuleToggleParamsActionEnable DomainAdvancedRuleToggleParamsAction = "enable" DomainAdvancedRuleToggleParamsActionDisable DomainAdvancedRuleToggleParamsAction = "disable" )
type DomainAdvancedRuleUpdateParams ¶ added in v0.3.0
type DomainAdvancedRuleUpdateParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// The description assigned to the rule
Description param.Opt[string] `json:"description,omitzero"`
// Whether or not the rule is enabled
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// The name assigned to the rule
Name param.Opt[string] `json:"name,omitzero"`
// A CEL syntax expression that contains the rule's conditions. Allowed objects
// are: request, whois, session, response, tags, `user_defined_tags`, `user_agent`,
// `client_data`.
//
// More info can be found here:
// https://gcore.com/docs/waap/waap-rules/advanced-rules
Source param.Opt[string] `json:"source,omitzero"`
// The action that a WAAP rule takes when triggered.
Action DomainAdvancedRuleUpdateParamsAction `json:"action,omitzero"`
// The WAAP request/response phase for applying the rule.
//
// The "access" phase is responsible for modifying the request before it is sent to
// the origin server.
//
// The "header_filter" phase is responsible for modifying the HTTP headers of a
// response before they are sent back to the client.
//
// The "body_filter" phase is responsible for modifying the body of a response
// before it is sent back to the client.
//
// Any of "access", "header_filter", "body_filter".
Phase DomainAdvancedRuleUpdateParamsPhase `json:"phase,omitzero"`
// contains filtered or unexported fields
}
func (DomainAdvancedRuleUpdateParams) MarshalJSON ¶ added in v0.3.0
func (r DomainAdvancedRuleUpdateParams) MarshalJSON() (data []byte, err error)
func (*DomainAdvancedRuleUpdateParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAdvancedRuleUpdateParams) UnmarshalJSON(data []byte) error
type DomainAdvancedRuleUpdateParamsAction ¶ added in v0.3.0
type DomainAdvancedRuleUpdateParamsAction struct {
// The WAAP allowed the request
Allow any `json:"allow,omitzero"`
// WAAP block action behavior could be configured with response status code and
// action duration.
Block DomainAdvancedRuleUpdateParamsActionBlock `json:"block,omitzero"`
// The WAAP presented the user with a captcha
Captcha any `json:"captcha,omitzero"`
// The WAAP performed automatic browser validation
Handshake any `json:"handshake,omitzero"`
// The WAAP monitored the request but took no action
Monitor any `json:"monitor,omitzero"`
// WAAP tag action gets a list of tags to tag the request scope with
Tag DomainAdvancedRuleUpdateParamsActionTag `json:"tag,omitzero"`
// contains filtered or unexported fields
}
The action that a WAAP rule takes when triggered.
func (DomainAdvancedRuleUpdateParamsAction) MarshalJSON ¶ added in v0.3.0
func (r DomainAdvancedRuleUpdateParamsAction) MarshalJSON() (data []byte, err error)
func (*DomainAdvancedRuleUpdateParamsAction) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAdvancedRuleUpdateParamsAction) UnmarshalJSON(data []byte) error
type DomainAdvancedRuleUpdateParamsActionBlock ¶ added in v0.3.0
type DomainAdvancedRuleUpdateParamsActionBlock struct {
// How long a rule's block action will apply to subsequent requests. Can be
// specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to
// represent time format (seconds, minutes, hours, or days). Empty time intervals
// are not allowed.
ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
// A custom HTTP status code that the WAAP returns if a rule blocks a request
//
// Any of 403, 405, 418, 429.
StatusCode int64 `json:"status_code,omitzero"`
// contains filtered or unexported fields
}
WAAP block action behavior could be configured with response status code and action duration.
func (DomainAdvancedRuleUpdateParamsActionBlock) MarshalJSON ¶ added in v0.3.0
func (r DomainAdvancedRuleUpdateParamsActionBlock) MarshalJSON() (data []byte, err error)
func (*DomainAdvancedRuleUpdateParamsActionBlock) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAdvancedRuleUpdateParamsActionBlock) UnmarshalJSON(data []byte) error
type DomainAdvancedRuleUpdateParamsActionTag ¶ added in v0.3.0
type DomainAdvancedRuleUpdateParamsActionTag struct {
// The list of user defined tags to tag the request with
Tags []string `json:"tags,omitzero,required"`
// contains filtered or unexported fields
}
WAAP tag action gets a list of tags to tag the request scope with
The property Tags is required.
func (DomainAdvancedRuleUpdateParamsActionTag) MarshalJSON ¶ added in v0.3.0
func (r DomainAdvancedRuleUpdateParamsActionTag) MarshalJSON() (data []byte, err error)
func (*DomainAdvancedRuleUpdateParamsActionTag) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainAdvancedRuleUpdateParamsActionTag) UnmarshalJSON(data []byte) error
type DomainAdvancedRuleUpdateParamsPhase ¶ added in v0.3.0
type DomainAdvancedRuleUpdateParamsPhase string
The WAAP request/response phase for applying the rule.
The "access" phase is responsible for modifying the request before it is sent to the origin server.
The "header_filter" phase is responsible for modifying the HTTP headers of a response before they are sent back to the client.
The "body_filter" phase is responsible for modifying the body of a response before it is sent back to the client.
const ( DomainAdvancedRuleUpdateParamsPhaseAccess DomainAdvancedRuleUpdateParamsPhase = "access" DomainAdvancedRuleUpdateParamsPhaseHeaderFilter DomainAdvancedRuleUpdateParamsPhase = "header_filter" DomainAdvancedRuleUpdateParamsPhaseBodyFilter DomainAdvancedRuleUpdateParamsPhase = "body_filter" )
type DomainCustomRuleDeleteMultipleParams ¶ added in v0.3.0
type DomainCustomRuleDeleteMultipleParams struct {
// The IDs of the rules to delete
RuleIDs []int64 `json:"rule_ids,omitzero,required"`
// contains filtered or unexported fields
}
func (DomainCustomRuleDeleteMultipleParams) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleDeleteMultipleParams) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleDeleteMultipleParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleDeleteMultipleParams) UnmarshalJSON(data []byte) error
type DomainCustomRuleDeleteParams ¶ added in v0.3.0
type DomainCustomRuleDeleteParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainCustomRuleGetParams ¶ added in v0.3.0
type DomainCustomRuleGetParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainCustomRuleListParams ¶ added in v0.3.0
type DomainCustomRuleListParams struct {
// Filter rules based on their description. Supports '\*' as a wildcard character.
Description param.Opt[string] `query:"description,omitzero" json:"-"`
// Filter rules based on their active status
Enabled param.Opt[bool] `query:"enabled,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter rules based on their name. Supports '\*' as a wildcard character.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Determine the field to order results by
//
// Any of "id", "name", "description", "enabled", "action", "-id", "-name",
// "-description", "-enabled", "-action".
Ordering DomainCustomRuleListParamsOrdering `query:"ordering,omitzero" json:"-"`
// Filter to refine results by specific actions
//
// Any of "allow", "block", "captcha", "handshake", "monitor", "tag".
Action DomainCustomRuleListParamsAction `query:"action,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainCustomRuleListParams) URLQuery ¶ added in v0.3.0
func (r DomainCustomRuleListParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainCustomRuleListParams's query parameters as `url.Values`.
type DomainCustomRuleListParamsAction ¶ added in v0.10.0
type DomainCustomRuleListParamsAction string
Filter to refine results by specific actions
const ( DomainCustomRuleListParamsActionAllow DomainCustomRuleListParamsAction = "allow" DomainCustomRuleListParamsActionBlock DomainCustomRuleListParamsAction = "block" DomainCustomRuleListParamsActionCaptcha DomainCustomRuleListParamsAction = "captcha" DomainCustomRuleListParamsActionHandshake DomainCustomRuleListParamsAction = "handshake" DomainCustomRuleListParamsActionMonitor DomainCustomRuleListParamsAction = "monitor" DomainCustomRuleListParamsActionTag DomainCustomRuleListParamsAction = "tag" )
type DomainCustomRuleListParamsOrdering ¶ added in v0.3.0
type DomainCustomRuleListParamsOrdering string
Determine the field to order results by
const ( DomainCustomRuleListParamsOrderingID DomainCustomRuleListParamsOrdering = "id" DomainCustomRuleListParamsOrderingName DomainCustomRuleListParamsOrdering = "name" DomainCustomRuleListParamsOrderingDescription DomainCustomRuleListParamsOrdering = "description" DomainCustomRuleListParamsOrderingEnabled DomainCustomRuleListParamsOrdering = "enabled" DomainCustomRuleListParamsOrderingAction DomainCustomRuleListParamsOrdering = "action" DomainCustomRuleListParamsOrderingMinusID DomainCustomRuleListParamsOrdering = "-id" DomainCustomRuleListParamsOrderingMinusName DomainCustomRuleListParamsOrdering = "-name" DomainCustomRuleListParamsOrderingMinusDescription DomainCustomRuleListParamsOrdering = "-description" DomainCustomRuleListParamsOrderingMinusEnabled DomainCustomRuleListParamsOrdering = "-enabled" DomainCustomRuleListParamsOrderingMinusAction DomainCustomRuleListParamsOrdering = "-action" )
type DomainCustomRuleNewParams ¶ added in v0.3.0
type DomainCustomRuleNewParams struct {
// The action that the rule takes when triggered. Only one action can be set per
// rule.
Action DomainCustomRuleNewParamsAction `json:"action,omitzero,required"`
// The conditions required for the WAAP engine to trigger the rule. Rules may have
// between 1 and 5 conditions. All conditions must pass for the rule to trigger
Conditions []DomainCustomRuleNewParamsCondition `json:"conditions,omitzero,required"`
// Whether or not the rule is enabled
Enabled bool `json:"enabled,required"`
// The name assigned to the rule
Name string `json:"name,required"`
// The description assigned to the rule
Description param.Opt[string] `json:"description,omitzero"`
// contains filtered or unexported fields
}
func (DomainCustomRuleNewParams) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParams) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParams) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsAction ¶ added in v0.3.0
type DomainCustomRuleNewParamsAction struct {
// The WAAP allowed the request
Allow any `json:"allow,omitzero"`
// WAAP block action behavior could be configured with response status code and
// action duration.
Block DomainCustomRuleNewParamsActionBlock `json:"block,omitzero"`
// The WAAP presented the user with a captcha
Captcha any `json:"captcha,omitzero"`
// The WAAP performed automatic browser validation
Handshake any `json:"handshake,omitzero"`
// The WAAP monitored the request but took no action
Monitor any `json:"monitor,omitzero"`
// WAAP tag action gets a list of tags to tag the request scope with
Tag DomainCustomRuleNewParamsActionTag `json:"tag,omitzero"`
// contains filtered or unexported fields
}
The action that the rule takes when triggered. Only one action can be set per rule.
func (DomainCustomRuleNewParamsAction) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsAction) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsAction) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsAction) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsActionBlock ¶ added in v0.3.0
type DomainCustomRuleNewParamsActionBlock struct {
// How long a rule's block action will apply to subsequent requests. Can be
// specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to
// represent time format (seconds, minutes, hours, or days). Empty time intervals
// are not allowed.
ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
// A custom HTTP status code that the WAAP returns if a rule blocks a request
//
// Any of 403, 405, 418, 429.
StatusCode int64 `json:"status_code,omitzero"`
// contains filtered or unexported fields
}
WAAP block action behavior could be configured with response status code and action duration.
func (DomainCustomRuleNewParamsActionBlock) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsActionBlock) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsActionBlock) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsActionBlock) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsActionTag ¶ added in v0.3.0
type DomainCustomRuleNewParamsActionTag struct {
// The list of user defined tags to tag the request with
Tags []string `json:"tags,omitzero,required"`
// contains filtered or unexported fields
}
WAAP tag action gets a list of tags to tag the request scope with
The property Tags is required.
func (DomainCustomRuleNewParamsActionTag) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsActionTag) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsActionTag) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsActionTag) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsCondition ¶ added in v0.3.0
type DomainCustomRuleNewParamsCondition struct {
// Match the requested Content-Type
ContentType DomainCustomRuleNewParamsConditionContentType `json:"content_type,omitzero"`
// Match the country that the request originated from
Country DomainCustomRuleNewParamsConditionCountry `json:"country,omitzero"`
// Match the incoming file extension
FileExtension DomainCustomRuleNewParamsConditionFileExtension `json:"file_extension,omitzero"`
// Match an incoming request header
Header DomainCustomRuleNewParamsConditionHeader `json:"header,omitzero"`
// Match when an incoming request header is present
HeaderExists DomainCustomRuleNewParamsConditionHeaderExists `json:"header_exists,omitzero"`
// Match the incoming HTTP method
HTTPMethod DomainCustomRuleNewParamsConditionHTTPMethod `json:"http_method,omitzero"`
// Match the incoming request against a single IP address
IP DomainCustomRuleNewParamsConditionIP `json:"ip,omitzero"`
// Match the incoming request against an IP range
IPRange DomainCustomRuleNewParamsConditionIPRange `json:"ip_range,omitzero"`
// Match the organization the request originated from, as determined by a WHOIS
// lookup of the requesting IP
Organization DomainCustomRuleNewParamsConditionOrganization `json:"organization,omitzero"`
// Match the type of organization that owns the IP address making an incoming
// request
OwnerTypes DomainCustomRuleNewParamsConditionOwnerTypes `json:"owner_types,omitzero"`
// Match the rate at which requests come in that match certain conditions
RequestRate DomainCustomRuleNewParamsConditionRequestRate `json:"request_rate,omitzero"`
// Match a response header
ResponseHeader DomainCustomRuleNewParamsConditionResponseHeader `json:"response_header,omitzero"`
// Match when a response header is present
ResponseHeaderExists DomainCustomRuleNewParamsConditionResponseHeaderExists `json:"response_header_exists,omitzero"`
// Match the number of dynamic page requests made in a WAAP session
SessionRequestCount DomainCustomRuleNewParamsConditionSessionRequestCount `json:"session_request_count,omitzero"`
// Matches requests based on specified tags
Tags DomainCustomRuleNewParamsConditionTags `json:"tags,omitzero"`
// Match the incoming request URL
URL DomainCustomRuleNewParamsConditionURL `json:"url,omitzero"`
// Match the user agent making the request
UserAgent DomainCustomRuleNewParamsConditionUserAgent `json:"user_agent,omitzero"`
// Matches requests based on user-defined tags
UserDefinedTags DomainCustomRuleNewParamsConditionUserDefinedTags `json:"user_defined_tags,omitzero"`
// contains filtered or unexported fields
}
The criteria of an incoming web request and the models of the various values those criteria can take
func (DomainCustomRuleNewParamsCondition) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsCondition) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsCondition) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsCondition) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionContentType ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionContentType struct {
// The list of content types to match against
ContentType []string `json:"content_type,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the requested Content-Type
The property ContentType is required.
func (DomainCustomRuleNewParamsConditionContentType) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionContentType) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionContentType) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionContentType) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionCountry ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionCountry struct {
// A list of ISO 3166-1 alpha-2 formatted strings representing the countries to
// match against
CountryCode []string `json:"country_code,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the country that the request originated from
The property CountryCode is required.
func (DomainCustomRuleNewParamsConditionCountry) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionCountry) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionCountry) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionCountry) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionFileExtension ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionFileExtension struct {
// The list of file extensions to match against
FileExtension []string `json:"file_extension,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming file extension
The property FileExtension is required.
func (DomainCustomRuleNewParamsConditionFileExtension) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionFileExtension) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionFileExtension) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionFileExtension) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionHTTPMethod ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionHTTPMethod struct {
// HTTP methods of a request
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethod string `json:"http_method,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming HTTP method
The property HTTPMethod is required.
func (DomainCustomRuleNewParamsConditionHTTPMethod) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionHTTPMethod) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionHTTPMethod) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionHTTPMethod) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionHeader ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionHeader struct {
// The request header name
Header string `json:"header,required"`
// The request header value
Value string `json:"value,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// The type of matching condition for header and value.
//
// Any of "Exact", "Contains".
MatchType string `json:"match_type,omitzero"`
// contains filtered or unexported fields
}
Match an incoming request header
The properties Header, Value are required.
func (DomainCustomRuleNewParamsConditionHeader) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionHeader) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionHeader) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionHeader) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionHeaderExists ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionHeaderExists struct {
// The request header name
Header string `json:"header,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match when an incoming request header is present
The property Header is required.
func (DomainCustomRuleNewParamsConditionHeaderExists) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionHeaderExists) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionHeaderExists) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionHeaderExists) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionIP ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionIP struct {
// A single IPv4 or IPv6 address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request against a single IP address
The property IPAddress is required.
func (DomainCustomRuleNewParamsConditionIP) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionIP) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionIP) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionIP) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionIPRange ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionIPRange struct {
// The lower bound IPv4 or IPv6 address to match against
LowerBound string `json:"lower_bound,required" format:"ipvanyaddress"`
// The upper bound IPv4 or IPv6 address to match against
UpperBound string `json:"upper_bound,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request against an IP range
The properties LowerBound, UpperBound are required.
func (DomainCustomRuleNewParamsConditionIPRange) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionIPRange) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionIPRange) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionIPRange) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionOrganization ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionOrganization struct {
// The organization to match against
Organization string `json:"organization,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the organization the request originated from, as determined by a WHOIS lookup of the requesting IP
The property Organization is required.
func (DomainCustomRuleNewParamsConditionOrganization) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionOrganization) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionOrganization) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionOrganization) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionOwnerTypes ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionOwnerTypes struct {
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// Match the type of organization that owns the IP address making an incoming
// request
//
// Any of "COMMERCIAL", "EDUCATIONAL", "GOVERNMENT", "HOSTING_SERVICES", "ISP",
// "MOBILE_NETWORK", "NETWORK", "RESERVED".
OwnerTypes []string `json:"owner_types,omitzero"`
// contains filtered or unexported fields
}
Match the type of organization that owns the IP address making an incoming request
func (DomainCustomRuleNewParamsConditionOwnerTypes) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionOwnerTypes) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionOwnerTypes) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionOwnerTypes) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionRequestRate ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionRequestRate struct {
// A regular expression matching the URL path of the incoming request
PathPattern string `json:"path_pattern,required"`
// The number of incoming requests over the given time that can trigger a request
// rate condition
Requests int64 `json:"requests,required"`
// The number of seconds that the WAAP measures incoming requests over before
// triggering a request rate condition
Time int64 `json:"time,required"`
// A user-defined tag that can be included in incoming requests and used to trigger
// a request rate condition
UserDefinedTag param.Opt[string] `json:"user_defined_tag,omitzero"`
// Possible HTTP request methods that can trigger a request rate condition
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethods []string `json:"http_methods,omitzero"`
// A list of source IPs that can trigger a request rate condition
IPs []string `json:"ips,omitzero" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
Match the rate at which requests come in that match certain conditions
The properties PathPattern, Requests, Time are required.
func (DomainCustomRuleNewParamsConditionRequestRate) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionRequestRate) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionRequestRate) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionRequestRate) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionResponseHeader ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionResponseHeader struct {
// The response header name
Header string `json:"header,required"`
// The response header value
Value string `json:"value,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// The type of matching condition for header and value.
//
// Any of "Exact", "Contains".
MatchType string `json:"match_type,omitzero"`
// contains filtered or unexported fields
}
Match a response header
The properties Header, Value are required.
func (DomainCustomRuleNewParamsConditionResponseHeader) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionResponseHeader) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionResponseHeader) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionResponseHeader) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionResponseHeaderExists ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionResponseHeaderExists struct {
// The response header name
Header string `json:"header,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match when a response header is present
The property Header is required.
func (DomainCustomRuleNewParamsConditionResponseHeaderExists) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionResponseHeaderExists) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionResponseHeaderExists) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionResponseHeaderExists) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionSessionRequestCount ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionSessionRequestCount struct {
// The number of dynamic requests in the session
RequestCount int64 `json:"request_count,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the number of dynamic page requests made in a WAAP session
The property RequestCount is required.
func (DomainCustomRuleNewParamsConditionSessionRequestCount) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionSessionRequestCount) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionSessionRequestCount) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionSessionRequestCount) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionTags ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionTags struct {
// A list of tags to match against the request tags
Tags []string `json:"tags,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Matches requests based on specified tags
The property Tags is required.
func (DomainCustomRuleNewParamsConditionTags) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionTags) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionTags) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionTags) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionURL ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionURL struct {
// The pattern to match against the request URL. Constraints depend on
// `match_type`:
//
// - **Exact/Contains**: plain text matching (e.g., `/admin`, must comply with
// `^[\w!\$~:#\[\]@\(\)*\+,=\/\-\.\%]+$`).
// - **Regex**: a valid regular expression (e.g., `^/upload(/\d+)?/\w+`).
// Lookahead/lookbehind constructs are forbidden.
URL string `json:"url,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// The type of matching condition.
//
// Any of "Exact", "Contains", "Regex".
MatchType string `json:"match_type,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request URL
The property URL is required.
func (DomainCustomRuleNewParamsConditionURL) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionURL) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionURL) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionURL) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionUserAgent ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionUserAgent struct {
// The user agent value to match
UserAgent string `json:"user_agent,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// The type of matching condition.
//
// Any of "Exact", "Contains".
MatchType string `json:"match_type,omitzero"`
// contains filtered or unexported fields
}
Match the user agent making the request
The property UserAgent is required.
func (DomainCustomRuleNewParamsConditionUserAgent) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionUserAgent) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionUserAgent) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionUserAgent) UnmarshalJSON(data []byte) error
type DomainCustomRuleNewParamsConditionUserDefinedTags ¶ added in v0.3.0
type DomainCustomRuleNewParamsConditionUserDefinedTags struct {
// A list of user-defined tags to match against the request tags
Tags []string `json:"tags,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Matches requests based on user-defined tags
The property Tags is required.
func (DomainCustomRuleNewParamsConditionUserDefinedTags) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleNewParamsConditionUserDefinedTags) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleNewParamsConditionUserDefinedTags) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleNewParamsConditionUserDefinedTags) UnmarshalJSON(data []byte) error
type DomainCustomRuleService ¶ added in v0.3.0
type DomainCustomRuleService struct {
Options []option.RequestOption
}
DomainCustomRuleService contains methods and other services that help with interacting with the gcore 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 NewDomainCustomRuleService method instead.
func NewDomainCustomRuleService ¶ added in v0.3.0
func NewDomainCustomRuleService(opts ...option.RequestOption) (r DomainCustomRuleService)
NewDomainCustomRuleService 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 (*DomainCustomRuleService) Delete ¶ added in v0.3.0
func (r *DomainCustomRuleService) Delete(ctx context.Context, ruleID int64, body DomainCustomRuleDeleteParams, opts ...option.RequestOption) (err error)
Delete a custom rule
func (*DomainCustomRuleService) DeleteMultiple ¶ added in v0.3.0
func (r *DomainCustomRuleService) DeleteMultiple(ctx context.Context, domainID int64, body DomainCustomRuleDeleteMultipleParams, opts ...option.RequestOption) (err error)
Delete multiple WAAP rules
func (*DomainCustomRuleService) Get ¶ added in v0.3.0
func (r *DomainCustomRuleService) Get(ctx context.Context, ruleID int64, query DomainCustomRuleGetParams, opts ...option.RequestOption) (res *WaapCustomRule, err error)
Extracts a specific custom rule assigned to a domain
func (*DomainCustomRuleService) List ¶ added in v0.3.0
func (r *DomainCustomRuleService) List(ctx context.Context, domainID int64, query DomainCustomRuleListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapCustomRule], err error)
Extracts a list of custom rules assigned to a domain, offering filter, ordering, and pagination capabilities
func (*DomainCustomRuleService) ListAutoPaging ¶ added in v0.3.0
func (r *DomainCustomRuleService) ListAutoPaging(ctx context.Context, domainID int64, query DomainCustomRuleListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapCustomRule]
Extracts a list of custom rules assigned to a domain, offering filter, ordering, and pagination capabilities
func (*DomainCustomRuleService) New ¶ added in v0.3.0
func (r *DomainCustomRuleService) New(ctx context.Context, domainID int64, body DomainCustomRuleNewParams, opts ...option.RequestOption) (res *WaapCustomRule, err error)
Create a custom rule
func (*DomainCustomRuleService) Toggle ¶ added in v0.3.0
func (r *DomainCustomRuleService) Toggle(ctx context.Context, action DomainCustomRuleToggleParamsAction, body DomainCustomRuleToggleParams, opts ...option.RequestOption) (err error)
Toggle a custom rule
func (*DomainCustomRuleService) Update ¶ added in v0.3.0
func (r *DomainCustomRuleService) Update(ctx context.Context, ruleID int64, params DomainCustomRuleUpdateParams, opts ...option.RequestOption) (err error)
Only properties present in the request will be updated
type DomainCustomRuleToggleParams ¶ added in v0.3.0
type DomainCustomRuleToggleParamsAction ¶ added in v0.10.0
type DomainCustomRuleToggleParamsAction string
Enable or disable a custom rule
const ( DomainCustomRuleToggleParamsActionEnable DomainCustomRuleToggleParamsAction = "enable" DomainCustomRuleToggleParamsActionDisable DomainCustomRuleToggleParamsAction = "disable" )
type DomainCustomRuleUpdateParams ¶ added in v0.3.0
type DomainCustomRuleUpdateParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// The description assigned to the rule
Description param.Opt[string] `json:"description,omitzero"`
// Whether or not the rule is enabled
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// The name assigned to the rule
Name param.Opt[string] `json:"name,omitzero"`
// The action that a WAAP rule takes when triggered.
Action DomainCustomRuleUpdateParamsAction `json:"action,omitzero"`
// The conditions required for the WAAP engine to trigger the rule. Rules may have
// between 1 and 5 conditions. All conditions must pass for the rule to trigger
Conditions []DomainCustomRuleUpdateParamsCondition `json:"conditions,omitzero"`
// contains filtered or unexported fields
}
func (DomainCustomRuleUpdateParams) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParams) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParams) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsAction ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsAction struct {
// The WAAP allowed the request
Allow any `json:"allow,omitzero"`
// WAAP block action behavior could be configured with response status code and
// action duration.
Block DomainCustomRuleUpdateParamsActionBlock `json:"block,omitzero"`
// The WAAP presented the user with a captcha
Captcha any `json:"captcha,omitzero"`
// The WAAP performed automatic browser validation
Handshake any `json:"handshake,omitzero"`
// The WAAP monitored the request but took no action
Monitor any `json:"monitor,omitzero"`
// WAAP tag action gets a list of tags to tag the request scope with
Tag DomainCustomRuleUpdateParamsActionTag `json:"tag,omitzero"`
// contains filtered or unexported fields
}
The action that a WAAP rule takes when triggered.
func (DomainCustomRuleUpdateParamsAction) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsAction) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsAction) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsAction) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsActionBlock ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsActionBlock struct {
// How long a rule's block action will apply to subsequent requests. Can be
// specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to
// represent time format (seconds, minutes, hours, or days). Empty time intervals
// are not allowed.
ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
// A custom HTTP status code that the WAAP returns if a rule blocks a request
//
// Any of 403, 405, 418, 429.
StatusCode int64 `json:"status_code,omitzero"`
// contains filtered or unexported fields
}
WAAP block action behavior could be configured with response status code and action duration.
func (DomainCustomRuleUpdateParamsActionBlock) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsActionBlock) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsActionBlock) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsActionBlock) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsActionTag ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsActionTag struct {
// The list of user defined tags to tag the request with
Tags []string `json:"tags,omitzero,required"`
// contains filtered or unexported fields
}
WAAP tag action gets a list of tags to tag the request scope with
The property Tags is required.
func (DomainCustomRuleUpdateParamsActionTag) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsActionTag) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsActionTag) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsActionTag) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsCondition ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsCondition struct {
// Match the requested Content-Type
ContentType DomainCustomRuleUpdateParamsConditionContentType `json:"content_type,omitzero"`
// Match the country that the request originated from
Country DomainCustomRuleUpdateParamsConditionCountry `json:"country,omitzero"`
// Match the incoming file extension
FileExtension DomainCustomRuleUpdateParamsConditionFileExtension `json:"file_extension,omitzero"`
// Match an incoming request header
Header DomainCustomRuleUpdateParamsConditionHeader `json:"header,omitzero"`
// Match when an incoming request header is present
HeaderExists DomainCustomRuleUpdateParamsConditionHeaderExists `json:"header_exists,omitzero"`
// Match the incoming HTTP method
HTTPMethod DomainCustomRuleUpdateParamsConditionHTTPMethod `json:"http_method,omitzero"`
// Match the incoming request against a single IP address
IP DomainCustomRuleUpdateParamsConditionIP `json:"ip,omitzero"`
// Match the incoming request against an IP range
IPRange DomainCustomRuleUpdateParamsConditionIPRange `json:"ip_range,omitzero"`
// Match the organization the request originated from, as determined by a WHOIS
// lookup of the requesting IP
Organization DomainCustomRuleUpdateParamsConditionOrganization `json:"organization,omitzero"`
// Match the type of organization that owns the IP address making an incoming
// request
OwnerTypes DomainCustomRuleUpdateParamsConditionOwnerTypes `json:"owner_types,omitzero"`
// Match the rate at which requests come in that match certain conditions
RequestRate DomainCustomRuleUpdateParamsConditionRequestRate `json:"request_rate,omitzero"`
// Match a response header
ResponseHeader DomainCustomRuleUpdateParamsConditionResponseHeader `json:"response_header,omitzero"`
// Match when a response header is present
ResponseHeaderExists DomainCustomRuleUpdateParamsConditionResponseHeaderExists `json:"response_header_exists,omitzero"`
// Match the number of dynamic page requests made in a WAAP session
SessionRequestCount DomainCustomRuleUpdateParamsConditionSessionRequestCount `json:"session_request_count,omitzero"`
// Matches requests based on specified tags
Tags DomainCustomRuleUpdateParamsConditionTags `json:"tags,omitzero"`
// Match the incoming request URL
URL DomainCustomRuleUpdateParamsConditionURL `json:"url,omitzero"`
// Match the user agent making the request
UserAgent DomainCustomRuleUpdateParamsConditionUserAgent `json:"user_agent,omitzero"`
// Matches requests based on user-defined tags
UserDefinedTags DomainCustomRuleUpdateParamsConditionUserDefinedTags `json:"user_defined_tags,omitzero"`
// contains filtered or unexported fields
}
The criteria of an incoming web request and the models of the various values those criteria can take
func (DomainCustomRuleUpdateParamsCondition) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsCondition) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsCondition) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsCondition) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionContentType ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionContentType struct {
// The list of content types to match against
ContentType []string `json:"content_type,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the requested Content-Type
The property ContentType is required.
func (DomainCustomRuleUpdateParamsConditionContentType) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionContentType) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionContentType) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionContentType) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionCountry ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionCountry struct {
// A list of ISO 3166-1 alpha-2 formatted strings representing the countries to
// match against
CountryCode []string `json:"country_code,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the country that the request originated from
The property CountryCode is required.
func (DomainCustomRuleUpdateParamsConditionCountry) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionCountry) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionCountry) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionCountry) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionFileExtension ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionFileExtension struct {
// The list of file extensions to match against
FileExtension []string `json:"file_extension,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming file extension
The property FileExtension is required.
func (DomainCustomRuleUpdateParamsConditionFileExtension) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionFileExtension) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionFileExtension) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionFileExtension) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionHTTPMethod ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionHTTPMethod struct {
// HTTP methods of a request
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethod string `json:"http_method,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming HTTP method
The property HTTPMethod is required.
func (DomainCustomRuleUpdateParamsConditionHTTPMethod) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionHTTPMethod) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionHTTPMethod) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionHTTPMethod) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionHeader ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionHeader struct {
// The request header name
Header string `json:"header,required"`
// The request header value
Value string `json:"value,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// The type of matching condition for header and value.
//
// Any of "Exact", "Contains".
MatchType string `json:"match_type,omitzero"`
// contains filtered or unexported fields
}
Match an incoming request header
The properties Header, Value are required.
func (DomainCustomRuleUpdateParamsConditionHeader) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionHeader) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionHeader) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionHeader) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionHeaderExists ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionHeaderExists struct {
// The request header name
Header string `json:"header,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match when an incoming request header is present
The property Header is required.
func (DomainCustomRuleUpdateParamsConditionHeaderExists) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionHeaderExists) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionHeaderExists) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionHeaderExists) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionIP ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionIP struct {
// A single IPv4 or IPv6 address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request against a single IP address
The property IPAddress is required.
func (DomainCustomRuleUpdateParamsConditionIP) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionIP) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionIP) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionIP) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionIPRange ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionIPRange struct {
// The lower bound IPv4 or IPv6 address to match against
LowerBound string `json:"lower_bound,required" format:"ipvanyaddress"`
// The upper bound IPv4 or IPv6 address to match against
UpperBound string `json:"upper_bound,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request against an IP range
The properties LowerBound, UpperBound are required.
func (DomainCustomRuleUpdateParamsConditionIPRange) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionIPRange) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionIPRange) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionIPRange) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionOrganization ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionOrganization struct {
// The organization to match against
Organization string `json:"organization,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the organization the request originated from, as determined by a WHOIS lookup of the requesting IP
The property Organization is required.
func (DomainCustomRuleUpdateParamsConditionOrganization) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionOrganization) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionOrganization) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionOrganization) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionOwnerTypes ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionOwnerTypes struct {
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// Match the type of organization that owns the IP address making an incoming
// request
//
// Any of "COMMERCIAL", "EDUCATIONAL", "GOVERNMENT", "HOSTING_SERVICES", "ISP",
// "MOBILE_NETWORK", "NETWORK", "RESERVED".
OwnerTypes []string `json:"owner_types,omitzero"`
// contains filtered or unexported fields
}
Match the type of organization that owns the IP address making an incoming request
func (DomainCustomRuleUpdateParamsConditionOwnerTypes) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionOwnerTypes) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionOwnerTypes) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionOwnerTypes) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionRequestRate ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionRequestRate struct {
// A regular expression matching the URL path of the incoming request
PathPattern string `json:"path_pattern,required"`
// The number of incoming requests over the given time that can trigger a request
// rate condition
Requests int64 `json:"requests,required"`
// The number of seconds that the WAAP measures incoming requests over before
// triggering a request rate condition
Time int64 `json:"time,required"`
// A user-defined tag that can be included in incoming requests and used to trigger
// a request rate condition
UserDefinedTag param.Opt[string] `json:"user_defined_tag,omitzero"`
// Possible HTTP request methods that can trigger a request rate condition
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethods []string `json:"http_methods,omitzero"`
// A list of source IPs that can trigger a request rate condition
IPs []string `json:"ips,omitzero" format:"ipvanyaddress"`
// contains filtered or unexported fields
}
Match the rate at which requests come in that match certain conditions
The properties PathPattern, Requests, Time are required.
func (DomainCustomRuleUpdateParamsConditionRequestRate) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionRequestRate) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionRequestRate) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionRequestRate) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionResponseHeader ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionResponseHeader struct {
// The response header name
Header string `json:"header,required"`
// The response header value
Value string `json:"value,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// The type of matching condition for header and value.
//
// Any of "Exact", "Contains".
MatchType string `json:"match_type,omitzero"`
// contains filtered or unexported fields
}
Match a response header
The properties Header, Value are required.
func (DomainCustomRuleUpdateParamsConditionResponseHeader) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionResponseHeader) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionResponseHeader) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionResponseHeader) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionResponseHeaderExists ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionResponseHeaderExists struct {
// The response header name
Header string `json:"header,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match when a response header is present
The property Header is required.
func (DomainCustomRuleUpdateParamsConditionResponseHeaderExists) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionResponseHeaderExists) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionResponseHeaderExists) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionResponseHeaderExists) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionSessionRequestCount ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionSessionRequestCount struct {
// The number of dynamic requests in the session
RequestCount int64 `json:"request_count,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the number of dynamic page requests made in a WAAP session
The property RequestCount is required.
func (DomainCustomRuleUpdateParamsConditionSessionRequestCount) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionSessionRequestCount) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionSessionRequestCount) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionSessionRequestCount) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionTags ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionTags struct {
// A list of tags to match against the request tags
Tags []string `json:"tags,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Matches requests based on specified tags
The property Tags is required.
func (DomainCustomRuleUpdateParamsConditionTags) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionTags) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionTags) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionTags) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionURL ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionURL struct {
// The pattern to match against the request URL. Constraints depend on
// `match_type`:
//
// - **Exact/Contains**: plain text matching (e.g., `/admin`, must comply with
// `^[\w!\$~:#\[\]@\(\)*\+,=\/\-\.\%]+$`).
// - **Regex**: a valid regular expression (e.g., `^/upload(/\d+)?/\w+`).
// Lookahead/lookbehind constructs are forbidden.
URL string `json:"url,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// The type of matching condition.
//
// Any of "Exact", "Contains", "Regex".
MatchType string `json:"match_type,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request URL
The property URL is required.
func (DomainCustomRuleUpdateParamsConditionURL) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionURL) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionURL) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionURL) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionUserAgent ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionUserAgent struct {
// The user agent value to match
UserAgent string `json:"user_agent,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// The type of matching condition.
//
// Any of "Exact", "Contains".
MatchType string `json:"match_type,omitzero"`
// contains filtered or unexported fields
}
Match the user agent making the request
The property UserAgent is required.
func (DomainCustomRuleUpdateParamsConditionUserAgent) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionUserAgent) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionUserAgent) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionUserAgent) UnmarshalJSON(data []byte) error
type DomainCustomRuleUpdateParamsConditionUserDefinedTags ¶ added in v0.3.0
type DomainCustomRuleUpdateParamsConditionUserDefinedTags struct {
// A list of user-defined tags to match against the request tags
Tags []string `json:"tags,omitzero,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Matches requests based on user-defined tags
The property Tags is required.
func (DomainCustomRuleUpdateParamsConditionUserDefinedTags) MarshalJSON ¶ added in v0.3.0
func (r DomainCustomRuleUpdateParamsConditionUserDefinedTags) MarshalJSON() (data []byte, err error)
func (*DomainCustomRuleUpdateParamsConditionUserDefinedTags) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainCustomRuleUpdateParamsConditionUserDefinedTags) UnmarshalJSON(data []byte) error
type DomainFirewallRuleDeleteMultipleParams ¶ added in v0.3.0
type DomainFirewallRuleDeleteMultipleParams struct {
// The IDs of the rules to delete
RuleIDs []int64 `json:"rule_ids,omitzero,required"`
// contains filtered or unexported fields
}
func (DomainFirewallRuleDeleteMultipleParams) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleDeleteMultipleParams) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleDeleteMultipleParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleDeleteMultipleParams) UnmarshalJSON(data []byte) error
type DomainFirewallRuleDeleteParams ¶ added in v0.3.0
type DomainFirewallRuleDeleteParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainFirewallRuleGetParams ¶ added in v0.3.0
type DomainFirewallRuleGetParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainFirewallRuleListParams ¶ added in v0.3.0
type DomainFirewallRuleListParams struct {
// Filter rules based on their description. Supports '\*' as a wildcard character.
Description param.Opt[string] `query:"description,omitzero" json:"-"`
// Filter rules based on their active status
Enabled param.Opt[bool] `query:"enabled,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter rules based on their name. Supports '\*' as a wildcard character.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Determine the field to order results by
//
// Any of "id", "name", "description", "enabled", "action", "-id", "-name",
// "-description", "-enabled", "-action".
Ordering DomainFirewallRuleListParamsOrdering `query:"ordering,omitzero" json:"-"`
// Filter to refine results by specific firewall actions
//
// Any of "allow", "block".
Action DomainFirewallRuleListParamsAction `query:"action,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainFirewallRuleListParams) URLQuery ¶ added in v0.3.0
func (r DomainFirewallRuleListParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainFirewallRuleListParams's query parameters as `url.Values`.
type DomainFirewallRuleListParamsAction ¶ added in v0.3.0
type DomainFirewallRuleListParamsAction string
Filter to refine results by specific firewall actions
const ( DomainFirewallRuleListParamsActionAllow DomainFirewallRuleListParamsAction = "allow" DomainFirewallRuleListParamsActionBlock DomainFirewallRuleListParamsAction = "block" )
type DomainFirewallRuleListParamsOrdering ¶ added in v0.3.0
type DomainFirewallRuleListParamsOrdering string
Determine the field to order results by
const ( DomainFirewallRuleListParamsOrderingID DomainFirewallRuleListParamsOrdering = "id" DomainFirewallRuleListParamsOrderingName DomainFirewallRuleListParamsOrdering = "name" DomainFirewallRuleListParamsOrderingDescription DomainFirewallRuleListParamsOrdering = "description" DomainFirewallRuleListParamsOrderingEnabled DomainFirewallRuleListParamsOrdering = "enabled" DomainFirewallRuleListParamsOrderingAction DomainFirewallRuleListParamsOrdering = "action" DomainFirewallRuleListParamsOrderingMinusID DomainFirewallRuleListParamsOrdering = "-id" DomainFirewallRuleListParamsOrderingMinusName DomainFirewallRuleListParamsOrdering = "-name" DomainFirewallRuleListParamsOrderingMinusDescription DomainFirewallRuleListParamsOrdering = "-description" DomainFirewallRuleListParamsOrderingMinusEnabled DomainFirewallRuleListParamsOrdering = "-enabled" DomainFirewallRuleListParamsOrderingMinusAction DomainFirewallRuleListParamsOrdering = "-action" )
type DomainFirewallRuleNewParams ¶ added in v0.3.0
type DomainFirewallRuleNewParams struct {
// The action that the rule takes when triggered
Action DomainFirewallRuleNewParamsAction `json:"action,omitzero,required"`
// The condition required for the WAAP engine to trigger the rule.
Conditions []DomainFirewallRuleNewParamsCondition `json:"conditions,omitzero,required"`
// Whether or not the rule is enabled
Enabled bool `json:"enabled,required"`
// The name assigned to the rule
Name string `json:"name,required"`
// The description assigned to the rule
Description param.Opt[string] `json:"description,omitzero"`
// contains filtered or unexported fields
}
func (DomainFirewallRuleNewParams) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleNewParams) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleNewParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleNewParams) UnmarshalJSON(data []byte) error
type DomainFirewallRuleNewParamsAction ¶ added in v0.3.0
type DomainFirewallRuleNewParamsAction struct {
// The WAAP allowed the request
Allow any `json:"allow,omitzero"`
// WAAP block action behavior could be configured with response status code and
// action duration.
Block DomainFirewallRuleNewParamsActionBlock `json:"block,omitzero"`
// contains filtered or unexported fields
}
The action that the rule takes when triggered
func (DomainFirewallRuleNewParamsAction) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleNewParamsAction) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleNewParamsAction) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleNewParamsAction) UnmarshalJSON(data []byte) error
type DomainFirewallRuleNewParamsActionBlock ¶ added in v0.3.0
type DomainFirewallRuleNewParamsActionBlock struct {
// How long a rule's block action will apply to subsequent requests. Can be
// specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to
// represent time format (seconds, minutes, hours, or days). Empty time intervals
// are not allowed.
ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
// A custom HTTP status code that the WAAP returns if a rule blocks a request
//
// Any of 403, 405, 418, 429.
StatusCode int64 `json:"status_code,omitzero"`
// contains filtered or unexported fields
}
WAAP block action behavior could be configured with response status code and action duration.
func (DomainFirewallRuleNewParamsActionBlock) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleNewParamsActionBlock) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleNewParamsActionBlock) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleNewParamsActionBlock) UnmarshalJSON(data []byte) error
type DomainFirewallRuleNewParamsCondition ¶ added in v0.3.0
type DomainFirewallRuleNewParamsCondition struct {
// Match the incoming request against a single IP address
IP DomainFirewallRuleNewParamsConditionIP `json:"ip,omitzero"`
// Match the incoming request against an IP range
IPRange DomainFirewallRuleNewParamsConditionIPRange `json:"ip_range,omitzero"`
// contains filtered or unexported fields
}
The criteria of an incoming web request and the models of the various values those criteria can take
func (DomainFirewallRuleNewParamsCondition) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleNewParamsCondition) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleNewParamsCondition) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleNewParamsCondition) UnmarshalJSON(data []byte) error
type DomainFirewallRuleNewParamsConditionIP ¶ added in v0.3.0
type DomainFirewallRuleNewParamsConditionIP struct {
// A single IPv4 or IPv6 address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request against a single IP address
The property IPAddress is required.
func (DomainFirewallRuleNewParamsConditionIP) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleNewParamsConditionIP) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleNewParamsConditionIP) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleNewParamsConditionIP) UnmarshalJSON(data []byte) error
type DomainFirewallRuleNewParamsConditionIPRange ¶ added in v0.3.0
type DomainFirewallRuleNewParamsConditionIPRange struct {
// The lower bound IPv4 or IPv6 address to match against
LowerBound string `json:"lower_bound,required" format:"ipvanyaddress"`
// The upper bound IPv4 or IPv6 address to match against
UpperBound string `json:"upper_bound,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request against an IP range
The properties LowerBound, UpperBound are required.
func (DomainFirewallRuleNewParamsConditionIPRange) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleNewParamsConditionIPRange) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleNewParamsConditionIPRange) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleNewParamsConditionIPRange) UnmarshalJSON(data []byte) error
type DomainFirewallRuleService ¶ added in v0.3.0
type DomainFirewallRuleService struct {
Options []option.RequestOption
}
DomainFirewallRuleService contains methods and other services that help with interacting with the gcore 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 NewDomainFirewallRuleService method instead.
func NewDomainFirewallRuleService ¶ added in v0.3.0
func NewDomainFirewallRuleService(opts ...option.RequestOption) (r DomainFirewallRuleService)
NewDomainFirewallRuleService 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 (*DomainFirewallRuleService) Delete ¶ added in v0.3.0
func (r *DomainFirewallRuleService) Delete(ctx context.Context, ruleID int64, body DomainFirewallRuleDeleteParams, opts ...option.RequestOption) (err error)
Delete a firewall rule
func (*DomainFirewallRuleService) DeleteMultiple ¶ added in v0.3.0
func (r *DomainFirewallRuleService) DeleteMultiple(ctx context.Context, domainID int64, body DomainFirewallRuleDeleteMultipleParams, opts ...option.RequestOption) (err error)
Delete multiple WAAP rules
func (*DomainFirewallRuleService) Get ¶ added in v0.3.0
func (r *DomainFirewallRuleService) Get(ctx context.Context, ruleID int64, query DomainFirewallRuleGetParams, opts ...option.RequestOption) (res *WaapFirewallRule, err error)
Extracts a specific firewall rule assigned to a domain
func (*DomainFirewallRuleService) List ¶ added in v0.3.0
func (r *DomainFirewallRuleService) List(ctx context.Context, domainID int64, query DomainFirewallRuleListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapFirewallRule], err error)
Extracts a list of firewall rules assigned to a domain, offering filter, ordering, and pagination capabilities
func (*DomainFirewallRuleService) ListAutoPaging ¶ added in v0.3.0
func (r *DomainFirewallRuleService) ListAutoPaging(ctx context.Context, domainID int64, query DomainFirewallRuleListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapFirewallRule]
Extracts a list of firewall rules assigned to a domain, offering filter, ordering, and pagination capabilities
func (*DomainFirewallRuleService) New ¶ added in v0.3.0
func (r *DomainFirewallRuleService) New(ctx context.Context, domainID int64, body DomainFirewallRuleNewParams, opts ...option.RequestOption) (res *WaapFirewallRule, err error)
Create a firewall rule
func (*DomainFirewallRuleService) Toggle ¶ added in v0.3.0
func (r *DomainFirewallRuleService) Toggle(ctx context.Context, action DomainFirewallRuleToggleParamsAction, body DomainFirewallRuleToggleParams, opts ...option.RequestOption) (err error)
Toggle a firewall rule
func (*DomainFirewallRuleService) Update ¶ added in v0.3.0
func (r *DomainFirewallRuleService) Update(ctx context.Context, ruleID int64, params DomainFirewallRuleUpdateParams, opts ...option.RequestOption) (err error)
Only properties present in the request will be updated
type DomainFirewallRuleToggleParams ¶ added in v0.3.0
type DomainFirewallRuleToggleParamsAction ¶ added in v0.10.0
type DomainFirewallRuleToggleParamsAction string
Enable or disable a firewall rule
const ( DomainFirewallRuleToggleParamsActionEnable DomainFirewallRuleToggleParamsAction = "enable" DomainFirewallRuleToggleParamsActionDisable DomainFirewallRuleToggleParamsAction = "disable" )
type DomainFirewallRuleUpdateParams ¶ added in v0.3.0
type DomainFirewallRuleUpdateParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// The description assigned to the rule
Description param.Opt[string] `json:"description,omitzero"`
// Whether or not the rule is enabled
Enabled param.Opt[bool] `json:"enabled,omitzero"`
// The name assigned to the rule
Name param.Opt[string] `json:"name,omitzero"`
// The action that a firewall rule takes when triggered
Action DomainFirewallRuleUpdateParamsAction `json:"action,omitzero"`
// The condition required for the WAAP engine to trigger the rule.
Conditions []DomainFirewallRuleUpdateParamsCondition `json:"conditions,omitzero"`
// contains filtered or unexported fields
}
func (DomainFirewallRuleUpdateParams) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleUpdateParams) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleUpdateParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleUpdateParams) UnmarshalJSON(data []byte) error
type DomainFirewallRuleUpdateParamsAction ¶ added in v0.3.0
type DomainFirewallRuleUpdateParamsAction struct {
// The WAAP allowed the request
Allow any `json:"allow,omitzero"`
// WAAP block action behavior could be configured with response status code and
// action duration.
Block DomainFirewallRuleUpdateParamsActionBlock `json:"block,omitzero"`
// contains filtered or unexported fields
}
The action that a firewall rule takes when triggered
func (DomainFirewallRuleUpdateParamsAction) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleUpdateParamsAction) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleUpdateParamsAction) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleUpdateParamsAction) UnmarshalJSON(data []byte) error
type DomainFirewallRuleUpdateParamsActionBlock ¶ added in v0.3.0
type DomainFirewallRuleUpdateParamsActionBlock struct {
// How long a rule's block action will apply to subsequent requests. Can be
// specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to
// represent time format (seconds, minutes, hours, or days). Empty time intervals
// are not allowed.
ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
// A custom HTTP status code that the WAAP returns if a rule blocks a request
//
// Any of 403, 405, 418, 429.
StatusCode int64 `json:"status_code,omitzero"`
// contains filtered or unexported fields
}
WAAP block action behavior could be configured with response status code and action duration.
func (DomainFirewallRuleUpdateParamsActionBlock) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleUpdateParamsActionBlock) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleUpdateParamsActionBlock) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleUpdateParamsActionBlock) UnmarshalJSON(data []byte) error
type DomainFirewallRuleUpdateParamsCondition ¶ added in v0.3.0
type DomainFirewallRuleUpdateParamsCondition struct {
// Match the incoming request against a single IP address
IP DomainFirewallRuleUpdateParamsConditionIP `json:"ip,omitzero"`
// Match the incoming request against an IP range
IPRange DomainFirewallRuleUpdateParamsConditionIPRange `json:"ip_range,omitzero"`
// contains filtered or unexported fields
}
The criteria of an incoming web request and the models of the various values those criteria can take
func (DomainFirewallRuleUpdateParamsCondition) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleUpdateParamsCondition) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleUpdateParamsCondition) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleUpdateParamsCondition) UnmarshalJSON(data []byte) error
type DomainFirewallRuleUpdateParamsConditionIP ¶ added in v0.3.0
type DomainFirewallRuleUpdateParamsConditionIP struct {
// A single IPv4 or IPv6 address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request against a single IP address
The property IPAddress is required.
func (DomainFirewallRuleUpdateParamsConditionIP) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleUpdateParamsConditionIP) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleUpdateParamsConditionIP) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleUpdateParamsConditionIP) UnmarshalJSON(data []byte) error
type DomainFirewallRuleUpdateParamsConditionIPRange ¶ added in v0.3.0
type DomainFirewallRuleUpdateParamsConditionIPRange struct {
// The lower bound IPv4 or IPv6 address to match against
LowerBound string `json:"lower_bound,required" format:"ipvanyaddress"`
// The upper bound IPv4 or IPv6 address to match against
UpperBound string `json:"upper_bound,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation param.Opt[bool] `json:"negation,omitzero"`
// contains filtered or unexported fields
}
Match the incoming request against an IP range
The properties LowerBound, UpperBound are required.
func (DomainFirewallRuleUpdateParamsConditionIPRange) MarshalJSON ¶ added in v0.3.0
func (r DomainFirewallRuleUpdateParamsConditionIPRange) MarshalJSON() (data []byte, err error)
func (*DomainFirewallRuleUpdateParamsConditionIPRange) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainFirewallRuleUpdateParamsConditionIPRange) UnmarshalJSON(data []byte) error
type DomainInsightGetParams ¶ added in v0.3.0
type DomainInsightGetParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainInsightListParams ¶ added in v0.3.0
type DomainInsightListParams struct {
// The description of the insight. Supports '\*' as a wildcard.
Description param.Opt[string] `query:"description,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// The ID of the insight
ID []string `query:"id,omitzero" format:"uuid" json:"-"`
// The type of the insight
InsightType []string `query:"insight_type,omitzero" json:"-"`
// The status of the insight
//
// Any of "OPEN", "ACKED", "CLOSED".
Status []string `query:"status,omitzero" json:"-"`
// Sort the response by given field.
//
// Any of "id", "-id", "insight_type", "-insight_type", "first_seen",
// "-first_seen", "last_seen", "-last_seen", "last_status_change",
// "-last_status_change", "status", "-status".
Ordering DomainInsightListParamsOrdering `query:"ordering,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainInsightListParams) URLQuery ¶ added in v0.3.0
func (r DomainInsightListParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainInsightListParams's query parameters as `url.Values`.
type DomainInsightListParamsOrdering ¶ added in v0.10.0
type DomainInsightListParamsOrdering string
Sort the response by given field.
const ( DomainInsightListParamsOrderingID DomainInsightListParamsOrdering = "id" DomainInsightListParamsOrderingMinusID DomainInsightListParamsOrdering = "-id" DomainInsightListParamsOrderingInsightType DomainInsightListParamsOrdering = "insight_type" DomainInsightListParamsOrderingMinusInsightType DomainInsightListParamsOrdering = "-insight_type" DomainInsightListParamsOrderingFirstSeen DomainInsightListParamsOrdering = "first_seen" DomainInsightListParamsOrderingMinusFirstSeen DomainInsightListParamsOrdering = "-first_seen" DomainInsightListParamsOrderingLastSeen DomainInsightListParamsOrdering = "last_seen" DomainInsightListParamsOrderingMinusLastSeen DomainInsightListParamsOrdering = "-last_seen" DomainInsightListParamsOrderingLastStatusChange DomainInsightListParamsOrdering = "last_status_change" DomainInsightListParamsOrderingMinusLastStatusChange DomainInsightListParamsOrdering = "-last_status_change" DomainInsightListParamsOrderingStatus DomainInsightListParamsOrdering = "status" DomainInsightListParamsOrderingMinusStatus DomainInsightListParamsOrdering = "-status" )
type DomainInsightReplaceParams ¶ added in v0.3.0
type DomainInsightReplaceParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// The status of the insight
//
// Any of "OPEN", "ACKED", "CLOSED".
Status DomainInsightReplaceParamsStatus `json:"status,omitzero,required"`
// contains filtered or unexported fields
}
func (DomainInsightReplaceParams) MarshalJSON ¶ added in v0.3.0
func (r DomainInsightReplaceParams) MarshalJSON() (data []byte, err error)
func (*DomainInsightReplaceParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainInsightReplaceParams) UnmarshalJSON(data []byte) error
type DomainInsightReplaceParamsStatus ¶ added in v0.10.0
type DomainInsightReplaceParamsStatus string
The status of the insight
const ( DomainInsightReplaceParamsStatusOpen DomainInsightReplaceParamsStatus = "OPEN" DomainInsightReplaceParamsStatusAcked DomainInsightReplaceParamsStatus = "ACKED" DomainInsightReplaceParamsStatusClosed DomainInsightReplaceParamsStatus = "CLOSED" )
type DomainInsightService ¶ added in v0.3.0
type DomainInsightService struct {
Options []option.RequestOption
}
DomainInsightService contains methods and other services that help with interacting with the gcore 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 NewDomainInsightService method instead.
func NewDomainInsightService ¶ added in v0.3.0
func NewDomainInsightService(opts ...option.RequestOption) (r DomainInsightService)
NewDomainInsightService 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 (*DomainInsightService) Get ¶ added in v0.3.0
func (r *DomainInsightService) Get(ctx context.Context, insightID string, query DomainInsightGetParams, opts ...option.RequestOption) (res *WaapInsight, err error)
Retrieve a specific insight for a specific domain.
func (*DomainInsightService) List ¶ added in v0.3.0
func (r *DomainInsightService) List(ctx context.Context, domainID int64, query DomainInsightListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapInsight], err error)
Retrieve a list of insights for a specific domain.
func (*DomainInsightService) ListAutoPaging ¶ added in v0.3.0
func (r *DomainInsightService) ListAutoPaging(ctx context.Context, domainID int64, query DomainInsightListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapInsight]
Retrieve a list of insights for a specific domain.
func (*DomainInsightService) Replace ¶ added in v0.3.0
func (r *DomainInsightService) Replace(ctx context.Context, insightID string, params DomainInsightReplaceParams, opts ...option.RequestOption) (res *WaapInsight, err error)
Update the status of an insight for a specific domain.
type DomainInsightSilenceDeleteParams ¶ added in v0.3.0
type DomainInsightSilenceDeleteParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainInsightSilenceGetParams ¶ added in v0.3.0
type DomainInsightSilenceGetParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainInsightSilenceListParams ¶ added in v0.3.0
type DomainInsightSilenceListParams struct {
// The author of the insight silence
Author param.Opt[string] `query:"author,omitzero" json:"-"`
// The comment of the insight silence
Comment param.Opt[string] `query:"comment,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// The ID of the insight silence
ID []string `query:"id,omitzero" format:"uuid" json:"-"`
// The type of the insight silence
InsightType []string `query:"insight_type,omitzero" json:"-"`
// Sort the response by given field.
//
// Any of "id", "-id", "insight_type", "-insight_type", "comment", "-comment",
// "author", "-author", "expire_at", "-expire_at".
Ordering DomainInsightSilenceListParamsOrdering `query:"ordering,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainInsightSilenceListParams) URLQuery ¶ added in v0.3.0
func (r DomainInsightSilenceListParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainInsightSilenceListParams's query parameters as `url.Values`.
type DomainInsightSilenceListParamsOrdering ¶ added in v0.10.0
type DomainInsightSilenceListParamsOrdering string
Sort the response by given field.
const ( DomainInsightSilenceListParamsOrderingID DomainInsightSilenceListParamsOrdering = "id" DomainInsightSilenceListParamsOrderingMinusID DomainInsightSilenceListParamsOrdering = "-id" DomainInsightSilenceListParamsOrderingInsightType DomainInsightSilenceListParamsOrdering = "insight_type" DomainInsightSilenceListParamsOrderingMinusInsightType DomainInsightSilenceListParamsOrdering = "-insight_type" DomainInsightSilenceListParamsOrderingComment DomainInsightSilenceListParamsOrdering = "comment" DomainInsightSilenceListParamsOrderingMinusComment DomainInsightSilenceListParamsOrdering = "-comment" DomainInsightSilenceListParamsOrderingAuthor DomainInsightSilenceListParamsOrdering = "author" DomainInsightSilenceListParamsOrderingMinusAuthor DomainInsightSilenceListParamsOrdering = "-author" DomainInsightSilenceListParamsOrderingExpireAt DomainInsightSilenceListParamsOrdering = "expire_at" DomainInsightSilenceListParamsOrderingMinusExpireAt DomainInsightSilenceListParamsOrdering = "-expire_at" )
type DomainInsightSilenceNewParams ¶ added in v0.3.0
type DomainInsightSilenceNewParams struct {
// The author of the silence
Author string `json:"author,required"`
// A comment explaining the reason for the silence
Comment string `json:"comment,required"`
// The slug of the insight type
InsightType string `json:"insight_type,required"`
// A hash table of label names and values that apply to the insight silence
Labels map[string]string `json:"labels,omitzero,required"`
// The date and time the silence expires in ISO 8601 format
ExpireAt param.Opt[time.Time] `json:"expire_at,omitzero" format:"date-time"`
// contains filtered or unexported fields
}
func (DomainInsightSilenceNewParams) MarshalJSON ¶ added in v0.3.0
func (r DomainInsightSilenceNewParams) MarshalJSON() (data []byte, err error)
func (*DomainInsightSilenceNewParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainInsightSilenceNewParams) UnmarshalJSON(data []byte) error
type DomainInsightSilenceService ¶ added in v0.3.0
type DomainInsightSilenceService struct {
Options []option.RequestOption
}
DomainInsightSilenceService contains methods and other services that help with interacting with the gcore 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 NewDomainInsightSilenceService method instead.
func NewDomainInsightSilenceService ¶ added in v0.3.0
func NewDomainInsightSilenceService(opts ...option.RequestOption) (r DomainInsightSilenceService)
NewDomainInsightSilenceService 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 (*DomainInsightSilenceService) Delete ¶ added in v0.3.0
func (r *DomainInsightSilenceService) Delete(ctx context.Context, silenceID string, body DomainInsightSilenceDeleteParams, opts ...option.RequestOption) (err error)
Delete an insight silence for a specific domain.
func (*DomainInsightSilenceService) Get ¶ added in v0.3.0
func (r *DomainInsightSilenceService) Get(ctx context.Context, silenceID string, query DomainInsightSilenceGetParams, opts ...option.RequestOption) (res *WaapInsightSilence, err error)
Retrieve a specific insight silence for a specific domain
func (*DomainInsightSilenceService) List ¶ added in v0.3.0
func (r *DomainInsightSilenceService) List(ctx context.Context, domainID int64, query DomainInsightSilenceListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapInsightSilence], err error)
Retrieve a list of insight silences for a specific domain
func (*DomainInsightSilenceService) ListAutoPaging ¶ added in v0.3.0
func (r *DomainInsightSilenceService) ListAutoPaging(ctx context.Context, domainID int64, query DomainInsightSilenceListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapInsightSilence]
Retrieve a list of insight silences for a specific domain
func (*DomainInsightSilenceService) New ¶ added in v0.3.0
func (r *DomainInsightSilenceService) New(ctx context.Context, domainID int64, body DomainInsightSilenceNewParams, opts ...option.RequestOption) (res *WaapInsightSilence, err error)
Create a new insight silence for a specified domain. Insight silences help in temporarily disabling certain insights based on specific criteria.
func (*DomainInsightSilenceService) Update ¶ added in v0.3.0
func (r *DomainInsightSilenceService) Update(ctx context.Context, silenceID string, params DomainInsightSilenceUpdateParams, opts ...option.RequestOption) (res *WaapInsightSilence, err error)
Update an insight silence for a specific domain.
type DomainInsightSilenceUpdateParams ¶ added in v0.3.0
type DomainInsightSilenceUpdateParams struct {
// The date and time the silence expires in ISO 8601 format
ExpireAt param.Opt[time.Time] `json:"expire_at,omitzero,required" format:"date-time"`
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// The author of the silence
Author string `json:"author,required"`
// A comment explaining the reason for the silence
Comment string `json:"comment,required"`
// A hash table of label names and values that apply to the insight silence
Labels map[string]string `json:"labels,omitzero"`
// contains filtered or unexported fields
}
func (DomainInsightSilenceUpdateParams) MarshalJSON ¶ added in v0.3.0
func (r DomainInsightSilenceUpdateParams) MarshalJSON() (data []byte, err error)
func (*DomainInsightSilenceUpdateParams) UnmarshalJSON ¶ added in v0.3.0
func (r *DomainInsightSilenceUpdateParams) UnmarshalJSON(data []byte) error
type DomainListParams ¶
type DomainListParams struct {
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter domains based on the domain name. Supports '\*' as a wildcard character
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Filter domains based on their IDs
IDs []int64 `query:"ids,omitzero" json:"-"`
// Sort the response by given field.
//
// Any of "id", "name", "status", "created_at", "-id", "-name", "-status",
// "-created_at".
Ordering DomainListParamsOrdering `query:"ordering,omitzero" json:"-"`
// Filter domains based on the domain status
//
// Any of "active", "bypass", "monitor", "locked".
Status DomainListParamsStatus `query:"status,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainListParams) URLQuery ¶
func (r DomainListParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainListParams's query parameters as `url.Values`.
type DomainListParamsOrdering ¶
type DomainListParamsOrdering string
Sort the response by given field.
const ( DomainListParamsOrderingID DomainListParamsOrdering = "id" DomainListParamsOrderingName DomainListParamsOrdering = "name" DomainListParamsOrderingStatus DomainListParamsOrdering = "status" DomainListParamsOrderingCreatedAt DomainListParamsOrdering = "created_at" DomainListParamsOrderingMinusID DomainListParamsOrdering = "-id" DomainListParamsOrderingMinusName DomainListParamsOrdering = "-name" DomainListParamsOrderingMinusStatus DomainListParamsOrdering = "-status" DomainListParamsOrderingMinusCreatedAt DomainListParamsOrdering = "-created_at" )
type DomainListParamsStatus ¶ added in v0.10.0
type DomainListParamsStatus string
Filter domains based on the domain status
const ( DomainListParamsStatusActive DomainListParamsStatus = "active" DomainListParamsStatusBypass DomainListParamsStatus = "bypass" DomainListParamsStatusMonitor DomainListParamsStatus = "monitor" DomainListParamsStatusLocked DomainListParamsStatus = "locked" )
type DomainService ¶
type DomainService struct {
Options []option.RequestOption
Settings DomainSettingService
APIPaths DomainAPIPathService
APIPathGroups DomainAPIPathGroupService
APIDiscovery DomainAPIDiscoveryService
Insights DomainInsightService
InsightSilences DomainInsightSilenceService
Statistics DomainStatisticService
CustomRules DomainCustomRuleService
FirewallRules DomainFirewallRuleService
AdvancedRules DomainAdvancedRuleService
}
DomainService contains methods and other services that help with interacting with the gcore 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 NewDomainService method instead.
func NewDomainService ¶
func NewDomainService(opts ...option.RequestOption) (r DomainService)
NewDomainService 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 (*DomainService) Delete ¶
func (r *DomainService) Delete(ctx context.Context, domainID int64, opts ...option.RequestOption) (err error)
Delete an inactive domain by ID. Only domains with status 'bypass' can be deleted.
func (*DomainService) Get ¶
func (r *DomainService) Get(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *WaapDetailedDomain, err error)
Retrieve detailed information about a specific domain
func (*DomainService) List ¶
func (r *DomainService) List(ctx context.Context, query DomainListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapSummaryDomain], err error)
Retrieve a list of domains associated with the client
func (*DomainService) ListAutoPaging ¶
func (r *DomainService) ListAutoPaging(ctx context.Context, query DomainListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapSummaryDomain]
Retrieve a list of domains associated with the client
func (*DomainService) ListRuleSets ¶ added in v0.3.0
func (r *DomainService) ListRuleSets(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *[]WaapRuleSet, err error)
Retrieve all rule sets linked to a particular domain
func (*DomainService) TogglePolicy ¶ added in v0.10.0
func (r *DomainService) TogglePolicy(ctx context.Context, policyID string, body DomainTogglePolicyParams, opts ...option.RequestOption) (res *WaapPolicyMode, err error)
Modify the activation state of a policy associated with a domain
func (*DomainService) Update ¶
func (r *DomainService) Update(ctx context.Context, domainID int64, body DomainUpdateParams, opts ...option.RequestOption) (err error)
Update Domain
type DomainSettingService ¶
type DomainSettingService struct {
Options []option.RequestOption
}
DomainSettingService contains methods and other services that help with interacting with the gcore 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 NewDomainSettingService method instead.
func NewDomainSettingService ¶
func NewDomainSettingService(opts ...option.RequestOption) (r DomainSettingService)
NewDomainSettingService 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 (*DomainSettingService) Get ¶
func (r *DomainSettingService) Get(ctx context.Context, domainID int64, opts ...option.RequestOption) (res *WaapDomainSettingsModel, err error)
Retrieve settings for a specific domain
func (*DomainSettingService) Update ¶
func (r *DomainSettingService) Update(ctx context.Context, domainID int64, body DomainSettingUpdateParams, opts ...option.RequestOption) (err error)
Update settings for a specific domain
type DomainSettingUpdateParams ¶
type DomainSettingUpdateParams struct {
// Editable API settings of a domain
API DomainSettingUpdateParamsAPI `json:"api,omitzero"`
// Editable DDoS settings for a domain.
DDOS DomainSettingUpdateParamsDDOS `json:"ddos,omitzero"`
// contains filtered or unexported fields
}
func (DomainSettingUpdateParams) MarshalJSON ¶
func (r DomainSettingUpdateParams) MarshalJSON() (data []byte, err error)
func (*DomainSettingUpdateParams) UnmarshalJSON ¶
func (r *DomainSettingUpdateParams) UnmarshalJSON(data []byte) error
type DomainSettingUpdateParamsAPI ¶
type DomainSettingUpdateParamsAPI struct {
// Indicates if the domain is an API domain. All requests to an API domain are
// treated as API requests. If this is set to true then the `api_urls` field is
// ignored.
IsAPI param.Opt[bool] `json:"is_api,omitzero"`
// The API URLs for a domain. If your domain has a common base URL for all API
// paths, it can be set here
APIURLs []string `json:"api_urls,omitzero"`
// contains filtered or unexported fields
}
Editable API settings of a domain
func (DomainSettingUpdateParamsAPI) MarshalJSON ¶
func (r DomainSettingUpdateParamsAPI) MarshalJSON() (data []byte, err error)
func (*DomainSettingUpdateParamsAPI) UnmarshalJSON ¶
func (r *DomainSettingUpdateParamsAPI) UnmarshalJSON(data []byte) error
type DomainSettingUpdateParamsDDOS ¶
type DomainSettingUpdateParamsDDOS struct {
// The burst threshold detects sudden rises in traffic. If it is met and the number
// of requests is at least five times the last 2-second interval, DDoS protection
// will activate. Default is 1000.
BurstThreshold param.Opt[int64] `json:"burst_threshold,omitzero"`
// The global threshold is responsible for identifying DDoS attacks with a slow
// rise in traffic. If the threshold is met and the current number of requests is
// at least double that of the previous 10-second window, DDoS protection will
// activate. Default is 5000.
GlobalThreshold param.Opt[int64] `json:"global_threshold,omitzero"`
// contains filtered or unexported fields
}
Editable DDoS settings for a domain.
func (DomainSettingUpdateParamsDDOS) MarshalJSON ¶
func (r DomainSettingUpdateParamsDDOS) MarshalJSON() (data []byte, err error)
func (*DomainSettingUpdateParamsDDOS) UnmarshalJSON ¶
func (r *DomainSettingUpdateParamsDDOS) UnmarshalJSON(data []byte) error
type DomainStatisticGetDDOSAttacksParams ¶ added in v0.10.0
type DomainStatisticGetDDOSAttacksParams struct {
// Filter attacks up to a specified end date in ISO 8601 format
EndTime param.Opt[time.Time] `query:"end_time,omitzero" format:"date-time" json:"-"`
// Filter attacks starting from a specified date in ISO 8601 format
StartTime param.Opt[time.Time] `query:"start_time,omitzero" format:"date-time" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Sort the response by given field.
//
// Any of "start_time", "-start_time", "end_time", "-end_time".
Ordering DomainStatisticGetDDOSAttacksParamsOrdering `query:"ordering,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainStatisticGetDDOSAttacksParams) URLQuery ¶ added in v0.10.0
func (r DomainStatisticGetDDOSAttacksParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainStatisticGetDDOSAttacksParams's query parameters as `url.Values`.
type DomainStatisticGetDDOSAttacksParamsOrdering ¶ added in v0.10.0
type DomainStatisticGetDDOSAttacksParamsOrdering string
Sort the response by given field.
const ( DomainStatisticGetDDOSAttacksParamsOrderingStartTime DomainStatisticGetDDOSAttacksParamsOrdering = "start_time" DomainStatisticGetDDOSAttacksParamsOrderingMinusStartTime DomainStatisticGetDDOSAttacksParamsOrdering = "-start_time" DomainStatisticGetDDOSAttacksParamsOrderingEndTime DomainStatisticGetDDOSAttacksParamsOrdering = "end_time" DomainStatisticGetDDOSAttacksParamsOrderingMinusEndTime DomainStatisticGetDDOSAttacksParamsOrdering = "-end_time" )
type DomainStatisticGetDDOSInfoParams ¶ added in v0.10.0
type DomainStatisticGetDDOSInfoParams struct {
// The identity of the requests to group by
//
// Any of "URL", "User-Agent", "IP".
GroupBy DomainStatisticGetDDOSInfoParamsGroupBy `query:"group_by,omitzero,required" json:"-"`
// Filter data items starting from a specified date in ISO 8601 format
Start string `query:"start,required" json:"-"`
// Filter data items up to a specified end date in ISO 8601 format. If not
// provided, defaults to the current date and time.
End param.Opt[string] `query:"end,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainStatisticGetDDOSInfoParams) URLQuery ¶ added in v0.10.0
func (r DomainStatisticGetDDOSInfoParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainStatisticGetDDOSInfoParams's query parameters as `url.Values`.
type DomainStatisticGetDDOSInfoParamsGroupBy ¶ added in v0.10.0
type DomainStatisticGetDDOSInfoParamsGroupBy string
The identity of the requests to group by
const ( DomainStatisticGetDDOSInfoParamsGroupByURL DomainStatisticGetDDOSInfoParamsGroupBy = "URL" DomainStatisticGetDDOSInfoParamsGroupByUserAgent DomainStatisticGetDDOSInfoParamsGroupBy = "User-Agent" DomainStatisticGetDDOSInfoParamsGroupByIP DomainStatisticGetDDOSInfoParamsGroupBy = "IP" )
type DomainStatisticGetEventsAggregatedParams ¶ added in v0.10.0
type DomainStatisticGetEventsAggregatedParams struct {
// Filter data items starting from a specified date in ISO 8601 format
Start string `query:"start,required" json:"-"`
// Filter data items up to a specified end date in ISO 8601 format. If not
// provided, defaults to the current date and time.
End param.Opt[string] `query:"end,omitzero" json:"-"`
// A list of action names to filter on.
//
// Any of "block", "captcha", "handshake", "monitor".
Action []string `query:"action,omitzero" json:"-"`
// A list of IPs to filter event statistics.
IP []string `query:"ip,omitzero" format:"ipvanyaddress" json:"-"`
// A list of reference IDs to filter event statistics.
ReferenceID []string `query:"reference_id,omitzero" json:"-"`
// A list of results to filter event statistics.
//
// Any of "passed", "blocked", "monitored", "allowed".
Result []string `query:"result,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainStatisticGetEventsAggregatedParams) URLQuery ¶ added in v0.10.0
func (r DomainStatisticGetEventsAggregatedParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainStatisticGetEventsAggregatedParams's query parameters as `url.Values`.
type DomainStatisticGetRequestDetailsParams ¶ added in v0.10.0
type DomainStatisticGetRequestDetailsParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainStatisticGetRequestsSeriesParams ¶ added in v0.10.0
type DomainStatisticGetRequestsSeriesParams struct {
// Filter data items starting from a specified date in ISO 8601 format
Start string `query:"start,required" json:"-"`
// Filter data items up to a specified end date in ISO 8601 format. If not
// provided, defaults to the current date and time.
End param.Opt[string] `query:"end,omitzero" json:"-"`
// Filter the response by IP.
IP param.Opt[string] `query:"ip,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Sort the response by given field.
Ordering param.Opt[string] `query:"ordering,omitzero" json:"-"`
// Filter the response by reference ID.
ReferenceID param.Opt[string] `query:"reference_id,omitzero" json:"-"`
// Filter the response by security rule name.
SecurityRuleName param.Opt[string] `query:"security_rule_name,omitzero" json:"-"`
// Filter the response by response code.
StatusCode param.Opt[int64] `query:"status_code,omitzero" json:"-"`
// Filter the response by actions.
//
// Any of "allow", "block", "captcha", "handshake".
Actions []string `query:"actions,omitzero" json:"-"`
// Filter the response by country codes in ISO 3166-1 alpha-2 format.
Countries []string `query:"countries,omitzero" json:"-"`
// Filter the response by traffic types.
//
// Any of "policy_allowed", "policy_blocked", "custom_rule_allowed",
// "custom_blocked", "legit_requests", "sanctioned", "dynamic", "api", "static",
// "ajax", "redirects", "monitor", "err_40x", "err_50x", "passed_to_origin",
// "timeout", "other", "ddos", "legit", "monitored".
TrafficTypes []string `query:"traffic_types,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainStatisticGetRequestsSeriesParams) URLQuery ¶ added in v0.10.0
func (r DomainStatisticGetRequestsSeriesParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainStatisticGetRequestsSeriesParams's query parameters as `url.Values`.
type DomainStatisticGetTrafficSeriesParams ¶ added in v0.10.0
type DomainStatisticGetTrafficSeriesParams struct {
// Specifies the granularity of the result data.
//
// Any of "daily", "hourly", "minutely".
Resolution DomainStatisticGetTrafficSeriesParamsResolution `query:"resolution,omitzero,required" json:"-"`
// Filter data items starting from a specified date in ISO 8601 format
Start string `query:"start,required" json:"-"`
// Filter data items up to a specified end date in ISO 8601 format. If not
// provided, defaults to the current date and time.
End param.Opt[string] `query:"end,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (DomainStatisticGetTrafficSeriesParams) URLQuery ¶ added in v0.10.0
func (r DomainStatisticGetTrafficSeriesParams) URLQuery() (v url.Values, err error)
URLQuery serializes DomainStatisticGetTrafficSeriesParams's query parameters as `url.Values`.
type DomainStatisticGetTrafficSeriesParamsResolution ¶ added in v0.10.0
type DomainStatisticGetTrafficSeriesParamsResolution string
Specifies the granularity of the result data.
const ( DomainStatisticGetTrafficSeriesParamsResolutionDaily DomainStatisticGetTrafficSeriesParamsResolution = "daily" DomainStatisticGetTrafficSeriesParamsResolutionHourly DomainStatisticGetTrafficSeriesParamsResolution = "hourly" DomainStatisticGetTrafficSeriesParamsResolutionMinutely DomainStatisticGetTrafficSeriesParamsResolution = "minutely" )
type DomainStatisticService ¶ added in v0.10.0
type DomainStatisticService struct {
Options []option.RequestOption
}
DomainStatisticService contains methods and other services that help with interacting with the gcore 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 NewDomainStatisticService method instead.
func NewDomainStatisticService ¶ added in v0.10.0
func NewDomainStatisticService(opts ...option.RequestOption) (r DomainStatisticService)
NewDomainStatisticService 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 (*DomainStatisticService) GetDDOSAttacks ¶ added in v0.10.0
func (r *DomainStatisticService) GetDDOSAttacks(ctx context.Context, domainID int64, query DomainStatisticGetDDOSAttacksParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapDDOSAttack], err error)
Retrieve a domain's DDoS attacks
func (*DomainStatisticService) GetDDOSAttacksAutoPaging ¶ added in v0.10.0
func (r *DomainStatisticService) GetDDOSAttacksAutoPaging(ctx context.Context, domainID int64, query DomainStatisticGetDDOSAttacksParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapDDOSAttack]
Retrieve a domain's DDoS attacks
func (*DomainStatisticService) GetDDOSInfo ¶ added in v0.10.0
func (r *DomainStatisticService) GetDDOSInfo(ctx context.Context, domainID int64, query DomainStatisticGetDDOSInfoParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapDDOSInfo], err error)
Returns the top DDoS counts grouped by URL, User-Agent or IP
func (*DomainStatisticService) GetDDOSInfoAutoPaging ¶ added in v0.10.0
func (r *DomainStatisticService) GetDDOSInfoAutoPaging(ctx context.Context, domainID int64, query DomainStatisticGetDDOSInfoParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapDDOSInfo]
Returns the top DDoS counts grouped by URL, User-Agent or IP
func (*DomainStatisticService) GetEventsAggregated ¶ added in v0.10.0
func (r *DomainStatisticService) GetEventsAggregated(ctx context.Context, domainID int64, query DomainStatisticGetEventsAggregatedParams, opts ...option.RequestOption) (res *WaapEventStatistics, err error)
Retrieve an domain's event statistics
func (*DomainStatisticService) GetRequestDetails ¶ added in v0.10.0
func (r *DomainStatisticService) GetRequestDetails(ctx context.Context, requestID string, query DomainStatisticGetRequestDetailsParams, opts ...option.RequestOption) (res *WaapRequestDetails, err error)
Retrieves all the available information for a request that matches a given request id
func (*DomainStatisticService) GetRequestsSeries ¶ added in v0.10.0
func (r *DomainStatisticService) GetRequestsSeries(ctx context.Context, domainID int64, query DomainStatisticGetRequestsSeriesParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapRequestSummary], err error)
Retrieve a domain's requests data.
func (*DomainStatisticService) GetRequestsSeriesAutoPaging ¶ added in v0.10.0
func (r *DomainStatisticService) GetRequestsSeriesAutoPaging(ctx context.Context, domainID int64, query DomainStatisticGetRequestsSeriesParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapRequestSummary]
Retrieve a domain's requests data.
func (*DomainStatisticService) GetTrafficSeries ¶ added in v0.10.0
func (r *DomainStatisticService) GetTrafficSeries(ctx context.Context, domainID int64, query DomainStatisticGetTrafficSeriesParams, opts ...option.RequestOption) (res *[]WaapTrafficMetrics, err error)
Retrieves a comprehensive report on a domain's traffic statistics based on Clickhouse. The report includes details such as API requests, blocked events, error counts, and many more traffic-related metrics.
type DomainTogglePolicyParams ¶ added in v0.10.0
type DomainTogglePolicyParams struct {
// The domain ID
DomainID int64 `path:"domain_id,required" json:"-"`
// contains filtered or unexported fields
}
type DomainUpdateParams ¶
type DomainUpdateParams struct {
// The current status of the domain
//
// Any of "active", "monitor".
Status DomainUpdateParamsStatus `json:"status,omitzero,required"`
// contains filtered or unexported fields
}
func (DomainUpdateParams) MarshalJSON ¶
func (r DomainUpdateParams) MarshalJSON() (data []byte, err error)
func (*DomainUpdateParams) UnmarshalJSON ¶
func (r *DomainUpdateParams) UnmarshalJSON(data []byte) error
type DomainUpdateParamsStatus ¶
type DomainUpdateParamsStatus string
The current status of the domain
const ( DomainUpdateParamsStatusActive DomainUpdateParamsStatus = "active" DomainUpdateParamsStatusMonitor DomainUpdateParamsStatus = "monitor" )
type IPInfoGetAttackTimeSeriesParams ¶ added in v0.3.0
type IPInfoGetAttackTimeSeriesParams struct {
// The IP address to check
IP string `query:"ip,required" format:"ipv4" json:"-"`
// contains filtered or unexported fields
}
func (IPInfoGetAttackTimeSeriesParams) URLQuery ¶ added in v0.3.0
func (r IPInfoGetAttackTimeSeriesParams) URLQuery() (v url.Values, err error)
URLQuery serializes IPInfoGetAttackTimeSeriesParams's query parameters as `url.Values`.
type IPInfoGetBlockedRequestsParams ¶ added in v0.3.0
type IPInfoGetBlockedRequestsParams struct {
// The identifier for a domain. When specified, the response will exclusively
// contain data pertinent to the indicated domain, filtering out information from
// other domains.
DomainID int64 `query:"domain_id,required" json:"-"`
// The IP address to check
IP string `query:"ip,required" format:"ipv4" json:"-"`
// contains filtered or unexported fields
}
func (IPInfoGetBlockedRequestsParams) URLQuery ¶ added in v0.3.0
func (r IPInfoGetBlockedRequestsParams) URLQuery() (v url.Values, err error)
URLQuery serializes IPInfoGetBlockedRequestsParams's query parameters as `url.Values`.
type IPInfoGetDDOSAttackSeriesParams ¶ added in v0.3.0
type IPInfoGetDDOSAttackSeriesParams struct {
// The IP address to check
IP string `query:"ip,required" format:"ipv4" json:"-"`
// contains filtered or unexported fields
}
func (IPInfoGetDDOSAttackSeriesParams) URLQuery ¶ added in v0.3.0
func (r IPInfoGetDDOSAttackSeriesParams) URLQuery() (v url.Values, err error)
URLQuery serializes IPInfoGetDDOSAttackSeriesParams's query parameters as `url.Values`.
type IPInfoGetIPInfoParams ¶ added in v0.10.0
type IPInfoGetIPInfoParams struct {
// The IP address to check
IP string `query:"ip,required" format:"ipv4" json:"-"`
// contains filtered or unexported fields
}
func (IPInfoGetIPInfoParams) URLQuery ¶ added in v0.10.0
func (r IPInfoGetIPInfoParams) URLQuery() (v url.Values, err error)
URLQuery serializes IPInfoGetIPInfoParams's query parameters as `url.Values`.
type IPInfoGetTopURLsParams ¶ added in v0.3.0
type IPInfoGetTopURLsParams struct {
// The identifier for a domain. When specified, the response will exclusively
// contain data pertinent to the indicated domain, filtering out information from
// other domains.
DomainID int64 `query:"domain_id,required" json:"-"`
// The IP address to check
IP string `query:"ip,required" format:"ipv4" json:"-"`
// contains filtered or unexported fields
}
func (IPInfoGetTopURLsParams) URLQuery ¶ added in v0.3.0
func (r IPInfoGetTopURLsParams) URLQuery() (v url.Values, err error)
URLQuery serializes IPInfoGetTopURLsParams's query parameters as `url.Values`.
type IPInfoGetTopUserAgentsParams ¶ added in v0.3.0
type IPInfoGetTopUserAgentsParams struct {
// The identifier for a domain. When specified, the response will exclusively
// contain data pertinent to the indicated domain, filtering out information from
// other domains.
DomainID int64 `query:"domain_id,required" json:"-"`
// The IP address to check
IP string `query:"ip,required" format:"ipv4" json:"-"`
// contains filtered or unexported fields
}
func (IPInfoGetTopUserAgentsParams) URLQuery ¶ added in v0.3.0
func (r IPInfoGetTopUserAgentsParams) URLQuery() (v url.Values, err error)
URLQuery serializes IPInfoGetTopUserAgentsParams's query parameters as `url.Values`.
type IPInfoGetTopUserSessionsParams ¶ added in v0.10.0
type IPInfoGetTopUserSessionsParams struct {
// The identifier for a domain. When specified, the response will exclusively
// contain data pertinent to the indicated domain, filtering out information from
// other domains.
DomainID int64 `query:"domain_id,required" json:"-"`
// The IP address to check
IP string `query:"ip,required" format:"ipv4" json:"-"`
// contains filtered or unexported fields
}
func (IPInfoGetTopUserSessionsParams) URLQuery ¶ added in v0.10.0
func (r IPInfoGetTopUserSessionsParams) URLQuery() (v url.Values, err error)
URLQuery serializes IPInfoGetTopUserSessionsParams's query parameters as `url.Values`.
type IPInfoListAttackedCountriesParams ¶ added in v0.3.0
type IPInfoListAttackedCountriesParams struct {
// The IP address to check
IP string `query:"ip,required" format:"ipv4" json:"-"`
// contains filtered or unexported fields
}
func (IPInfoListAttackedCountriesParams) URLQuery ¶ added in v0.3.0
func (r IPInfoListAttackedCountriesParams) URLQuery() (v url.Values, err error)
URLQuery serializes IPInfoListAttackedCountriesParams's query parameters as `url.Values`.
type IPInfoMetricListParams ¶ added in v0.10.0
type IPInfoMetricListParams struct {
// The IP address to check
IP string `query:"ip,required" format:"ipv4" json:"-"`
// The identifier for a domain. When specified, the response will exclusively
// contain data pertinent to the indicated domain, filtering out information from
// other domains.
DomainID param.Opt[int64] `query:"domain_id,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (IPInfoMetricListParams) URLQuery ¶ added in v0.10.0
func (r IPInfoMetricListParams) URLQuery() (v url.Values, err error)
URLQuery serializes IPInfoMetricListParams's query parameters as `url.Values`.
type IPInfoMetricService ¶ added in v0.10.0
type IPInfoMetricService struct {
Options []option.RequestOption
}
IPInfoMetricService contains methods and other services that help with interacting with the gcore 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 NewIPInfoMetricService method instead.
func NewIPInfoMetricService ¶ added in v0.10.0
func NewIPInfoMetricService(opts ...option.RequestOption) (r IPInfoMetricService)
NewIPInfoMetricService 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 (*IPInfoMetricService) List ¶ added in v0.10.0
func (r *IPInfoMetricService) List(ctx context.Context, query IPInfoMetricListParams, opts ...option.RequestOption) (res *WaapIPInfoCounts, err error)
Retrieve metrics encompassing the counts of total requests, blocked requests and unique sessions associated with a specified IP address. Metrics provide a statistical overview, aiding in analyzing the interaction and access patterns of the IP address in context.
type IPInfoService ¶ added in v0.3.0
type IPInfoService struct {
Options []option.RequestOption
Metrics IPInfoMetricService
}
IPInfoService contains methods and other services that help with interacting with the gcore 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 NewIPInfoService method instead.
func NewIPInfoService ¶ added in v0.3.0
func NewIPInfoService(opts ...option.RequestOption) (r IPInfoService)
NewIPInfoService 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 (*IPInfoService) GetAttackTimeSeries ¶ added in v0.3.0
func (r *IPInfoService) GetAttackTimeSeries(ctx context.Context, query IPInfoGetAttackTimeSeriesParams, opts ...option.RequestOption) (res *[]WaapTimeSeriesAttack, err error)
Retrieve a time-series of attacks originating from a specified IP address.
func (*IPInfoService) GetBlockedRequests ¶ added in v0.3.0
func (r *IPInfoService) GetBlockedRequests(ctx context.Context, query IPInfoGetBlockedRequestsParams, opts ...option.RequestOption) (res *[]WaapRuleBlockedRequests, err error)
Retrieve metrics, which enumerate blocked requests originating from a specific IP to a domain, grouped by rule name and taken action. Each metric provides insights into the request count blocked under a specific rule and the corresponding action that was executed.
func (*IPInfoService) GetDDOSAttackSeries ¶ added in v0.3.0
func (r *IPInfoService) GetDDOSAttackSeries(ctx context.Context, query IPInfoGetDDOSAttackSeriesParams, opts ...option.RequestOption) (res *WaapIPDDOSInfoModel, err error)
Fetch and analyze DDoS (Distributed Denial of Service) attack metrics for a specified IP address. The endpoint provides time-series data, enabling users to evaluate the frequency and intensity of attacks across various time intervals, and it returns metrics in Prometheus format to offer a systematic view of DDoS attack patterns.
func (*IPInfoService) GetIPInfo ¶ added in v0.10.0
func (r *IPInfoService) GetIPInfo(ctx context.Context, query IPInfoGetIPInfoParams, opts ...option.RequestOption) (res *WaapIPInfo, err error)
Fetch details about a particular IP address, including WHOIS data, risk score, and additional tags.
func (*IPInfoService) GetTopURLs ¶ added in v0.3.0
func (r *IPInfoService) GetTopURLs(ctx context.Context, query IPInfoGetTopURLsParams, opts ...option.RequestOption) (res *[]WaapTopURL, err error)
Returns a list of the top 10 URLs accessed by a specified IP address within a specific domain. This data is vital to understand user navigation patterns, pinpoint high-traffic pages, and facilitate more targeted enhancements or security monitoring based on URL popularity.
func (*IPInfoService) GetTopUserAgents ¶ added in v0.3.0
func (r *IPInfoService) GetTopUserAgents(ctx context.Context, query IPInfoGetTopUserAgentsParams, opts ...option.RequestOption) (res *[]WaapTopUserAgent, err error)
Retrieve the top 10 user agents interacting with a specified domain, filtered by IP.
func (*IPInfoService) GetTopUserSessions ¶ added in v0.10.0
func (r *IPInfoService) GetTopUserSessions(ctx context.Context, query IPInfoGetTopUserSessionsParams, opts ...option.RequestOption) (res *[]WaapTopSession, err error)
Obtain the top 10 user sessions interfacing with a particular domain, identified by IP.
func (*IPInfoService) ListAttackedCountries ¶ added in v0.3.0
func (r *IPInfoService) ListAttackedCountries(ctx context.Context, query IPInfoListAttackedCountriesParams, opts ...option.RequestOption) (res *[]WaapIPCountryAttack, err error)
Retrieve a list of countries attacked by the specified IP address
type InsightListTypesParams ¶ added in v0.10.0
type InsightListTypesParams struct {
// Filter by the frequency of the insight type
InsightFrequency param.Opt[int64] `query:"insight_frequency,omitzero" json:"-"`
// Filter by the name of the insight type
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// The slug of the insight type
Slug param.Opt[string] `query:"slug,omitzero" json:"-"`
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Sort the response by given field.
//
// Any of "name", "-name", "slug", "-slug", "insight_frequency",
// "-insight_frequency".
Ordering InsightListTypesParamsOrdering `query:"ordering,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (InsightListTypesParams) URLQuery ¶ added in v0.10.0
func (r InsightListTypesParams) URLQuery() (v url.Values, err error)
URLQuery serializes InsightListTypesParams's query parameters as `url.Values`.
type InsightListTypesParamsOrdering ¶ added in v0.10.0
type InsightListTypesParamsOrdering string
Sort the response by given field.
const ( InsightListTypesParamsOrderingName InsightListTypesParamsOrdering = "name" InsightListTypesParamsOrderingMinusName InsightListTypesParamsOrdering = "-name" InsightListTypesParamsOrderingSlug InsightListTypesParamsOrdering = "slug" InsightListTypesParamsOrderingMinusSlug InsightListTypesParamsOrdering = "-slug" InsightListTypesParamsOrderingInsightFrequency InsightListTypesParamsOrdering = "insight_frequency" InsightListTypesParamsOrderingMinusInsightFrequency InsightListTypesParamsOrdering = "-insight_frequency" )
type InsightService ¶ added in v0.10.0
type InsightService struct {
Options []option.RequestOption
}
InsightService contains methods and other services that help with interacting with the gcore 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 NewInsightService method instead.
func NewInsightService ¶ added in v0.10.0
func NewInsightService(opts ...option.RequestOption) (r InsightService)
NewInsightService 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 (*InsightService) ListTypes ¶ added in v0.10.0
func (r *InsightService) ListTypes(ctx context.Context, query InsightListTypesParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapInsightType], err error)
Insight types are generalized categories that encompass various specific occurrences of the same kind.
func (*InsightService) ListTypesAutoPaging ¶ added in v0.10.0
func (r *InsightService) ListTypesAutoPaging(ctx context.Context, query InsightListTypesParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapInsightType]
Insight types are generalized categories that encompass various specific occurrences of the same kind.
type OrganizationListParams ¶ added in v0.3.0
type OrganizationListParams struct {
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter organizations by their name. Supports '\*' as a wildcard character.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Determine the field to order results by
//
// Any of "name", "id", "-name", "-id".
Ordering OrganizationListParamsOrdering `query:"ordering,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (OrganizationListParams) URLQuery ¶ added in v0.3.0
func (r OrganizationListParams) URLQuery() (v url.Values, err error)
URLQuery serializes OrganizationListParams's query parameters as `url.Values`.
type OrganizationListParamsOrdering ¶ added in v0.3.0
type OrganizationListParamsOrdering string
Determine the field to order results by
const ( OrganizationListParamsOrderingName OrganizationListParamsOrdering = "name" OrganizationListParamsOrderingID OrganizationListParamsOrdering = "id" OrganizationListParamsOrderingMinusName OrganizationListParamsOrdering = "-name" OrganizationListParamsOrderingMinusID OrganizationListParamsOrdering = "-id" )
type OrganizationService ¶ added in v0.3.0
type OrganizationService struct {
Options []option.RequestOption
}
OrganizationService contains methods and other services that help with interacting with the gcore 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 NewOrganizationService method instead.
func NewOrganizationService ¶ added in v0.3.0
func NewOrganizationService(opts ...option.RequestOption) (r OrganizationService)
NewOrganizationService 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 (*OrganizationService) List ¶ added in v0.3.0
func (r *OrganizationService) List(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapOrganization], err error)
This endpoint retrieves a list of network organizations that own IP ranges as identified by the Whois service.It supports pagination, filtering based on various parameters, and ordering of results.
func (*OrganizationService) ListAutoPaging ¶ added in v0.3.0
func (r *OrganizationService) ListAutoPaging(ctx context.Context, query OrganizationListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapOrganization]
This endpoint retrieves a list of network organizations that own IP ranges as identified by the Whois service.It supports pagination, filtering based on various parameters, and ordering of results.
type StatisticGetUsageSeriesParams ¶ added in v0.3.0
type StatisticGetUsageSeriesParams struct {
// Beginning of the requested time period (ISO 8601 format, UTC)
From time.Time `query:"from,required" format:"date-time" json:"-"`
// Duration of the time blocks into which the data will be divided.
//
// Any of "1h", "1d".
Granularity StatisticGetUsageSeriesParamsGranularity `query:"granularity,omitzero,required" json:"-"`
// List of metric types to retrieve statistics for.
//
// Any of "total_bytes", "total_requests".
Metrics []string `query:"metrics,omitzero,required" json:"-"`
// End of the requested time period (ISO 8601 format, UTC)
To time.Time `query:"to,required" format:"date-time" json:"-"`
// contains filtered or unexported fields
}
func (StatisticGetUsageSeriesParams) URLQuery ¶ added in v0.3.0
func (r StatisticGetUsageSeriesParams) URLQuery() (v url.Values, err error)
URLQuery serializes StatisticGetUsageSeriesParams's query parameters as `url.Values`.
type StatisticGetUsageSeriesParamsGranularity ¶ added in v0.3.0
type StatisticGetUsageSeriesParamsGranularity string
Duration of the time blocks into which the data will be divided.
const ( StatisticGetUsageSeriesParamsGranularity1h StatisticGetUsageSeriesParamsGranularity = "1h" StatisticGetUsageSeriesParamsGranularity1d StatisticGetUsageSeriesParamsGranularity = "1d" )
type StatisticService ¶ added in v0.3.0
type StatisticService struct {
Options []option.RequestOption
}
StatisticService contains methods and other services that help with interacting with the gcore 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 NewStatisticService method instead.
func NewStatisticService ¶ added in v0.3.0
func NewStatisticService(opts ...option.RequestOption) (r StatisticService)
NewStatisticService 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 (*StatisticService) GetUsageSeries ¶ added in v0.3.0
func (r *StatisticService) GetUsageSeries(ctx context.Context, query StatisticGetUsageSeriesParams, opts ...option.RequestOption) (res *WaapStatisticsSeries, err error)
Retrieve statistics data as a time series. The `from` and `to` parameters are rounded down and up according to the `granularity`. This means that if the `granularity` is set to `1h`, the `from` and `to` parameters will be rounded down and up to the nearest hour, respectively. If the `granularity` is set to `1d`, the `from` and `to` parameters will be rounded down and up to the nearest day, respectively. The response will include explicit 0 values for any missing data points.
type TagListParams ¶ added in v0.3.0
type TagListParams struct {
// Number of items to return
Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
// Filter tags by their name. Supports '\*' as a wildcard character.
Name param.Opt[string] `query:"name,omitzero" json:"-"`
// Number of items to skip
Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
// Filter tags by their readable name. Supports '\*' as a wildcard character.
ReadableName param.Opt[string] `query:"readable_name,omitzero" json:"-"`
// Filter to include only reserved tags.
Reserved param.Opt[bool] `query:"reserved,omitzero" json:"-"`
// Determine the field to order results by
//
// Any of "name", "readable_name", "reserved", "-name", "-readable_name",
// "-reserved".
Ordering TagListParamsOrdering `query:"ordering,omitzero" json:"-"`
// contains filtered or unexported fields
}
func (TagListParams) URLQuery ¶ added in v0.3.0
func (r TagListParams) URLQuery() (v url.Values, err error)
URLQuery serializes TagListParams's query parameters as `url.Values`.
type TagListParamsOrdering ¶ added in v0.3.0
type TagListParamsOrdering string
Determine the field to order results by
const ( TagListParamsOrderingName TagListParamsOrdering = "name" TagListParamsOrderingReadableName TagListParamsOrdering = "readable_name" TagListParamsOrderingReserved TagListParamsOrdering = "reserved" TagListParamsOrderingMinusName TagListParamsOrdering = "-name" TagListParamsOrderingMinusReadableName TagListParamsOrdering = "-readable_name" TagListParamsOrderingMinusReserved TagListParamsOrdering = "-reserved" )
type TagService ¶ added in v0.3.0
type TagService struct {
Options []option.RequestOption
}
TagService contains methods and other services that help with interacting with the gcore 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 NewTagService method instead.
func NewTagService ¶ added in v0.3.0
func NewTagService(opts ...option.RequestOption) (r TagService)
NewTagService 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 (*TagService) List ¶ added in v0.3.0
func (r *TagService) List(ctx context.Context, query TagListParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapTag], err error)
Tags are shortcuts for the rules used in WAAP policies for the creation of more complex WAAP rules
func (*TagService) ListAutoPaging ¶ added in v0.3.0
func (r *TagService) ListAutoPaging(ctx context.Context, query TagListParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapTag]
Tags are shortcuts for the rules used in WAAP policies for the creation of more complex WAAP rules
type WaapAPIDiscoverySettings ¶ added in v0.10.0
type WaapAPIDiscoverySettings struct {
// The URL of the API description file. This will be periodically scanned if
// `descriptionFileScanEnabled` is enabled. Supported formats are YAML and JSON,
// and it must adhere to OpenAPI versions 2, 3, or 3.1.
DescriptionFileLocation string `json:"descriptionFileLocation,nullable"`
// Indicates if periodic scan of the description file is enabled
DescriptionFileScanEnabled bool `json:"descriptionFileScanEnabled,nullable"`
// The interval in hours for scanning the description file
DescriptionFileScanIntervalHours int64 `json:"descriptionFileScanIntervalHours,nullable"`
// Indicates if traffic scan is enabled. Traffic scan is used to discover
// undocumented APIs
TrafficScanEnabled bool `json:"trafficScanEnabled,nullable"`
// The interval in hours for scanning the traffic
TrafficScanIntervalHours int64 `json:"trafficScanIntervalHours,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DescriptionFileLocation respjson.Field
DescriptionFileScanEnabled respjson.Field
DescriptionFileScanIntervalHours respjson.Field
TrafficScanEnabled respjson.Field
TrafficScanIntervalHours respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response model for the API discovery settings
func (WaapAPIDiscoverySettings) RawJSON ¶ added in v0.10.0
func (r WaapAPIDiscoverySettings) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAPIDiscoverySettings) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapAPIDiscoverySettings) UnmarshalJSON(data []byte) error
type WaapAPIPath ¶ added in v0.10.0
type WaapAPIPath struct {
// The path ID
ID string `json:"id,required" format:"uuid"`
// An array of api groups associated with the API path
APIGroups []string `json:"api_groups,required"`
// The API version
APIVersion string `json:"api_version,required"`
// The date and time in ISO 8601 format the API path was first detected.
FirstDetected time.Time `json:"first_detected,required" format:"date-time"`
// The HTTP version of the API path
//
// Any of "HTTP", "HTTPS".
HTTPScheme WaapAPIPathHTTPScheme `json:"http_scheme,required"`
// The date and time in ISO 8601 format the API path was last detected.
LastDetected time.Time `json:"last_detected,required" format:"date-time"`
// The API RESTful method
//
// Any of "GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS".
Method WaapAPIPathMethod `json:"method,required"`
// The API path, locations that are saved for resource IDs will be put in curly
// brackets
Path string `json:"path,required"`
// The number of requests for this path in the last 24 hours
RequestCount int64 `json:"request_count,required"`
// The source of the discovered API
//
// Any of "API_DESCRIPTION_FILE", "TRAFFIC_SCAN", "USER_DEFINED".
Source WaapAPIPathSource `json:"source,required"`
// The status of the discovered API path
//
// Any of "CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API".
Status WaapAPIPathStatus `json:"status,required"`
// An array of tags associated with the API path
Tags []string `json:"tags,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
APIGroups respjson.Field
APIVersion respjson.Field
FirstDetected respjson.Field
HTTPScheme respjson.Field
LastDetected respjson.Field
Method respjson.Field
Path respjson.Field
RequestCount respjson.Field
Source respjson.Field
Status respjson.Field
Tags respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response model for the API path
func (WaapAPIPath) RawJSON ¶ added in v0.10.0
func (r WaapAPIPath) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAPIPath) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapAPIPath) UnmarshalJSON(data []byte) error
type WaapAPIPathHTTPScheme ¶ added in v0.10.0
type WaapAPIPathHTTPScheme string
The HTTP version of the API path
const ( WaapAPIPathHTTPSchemeHTTP WaapAPIPathHTTPScheme = "HTTP" WaapAPIPathHTTPSchemeHTTPS WaapAPIPathHTTPScheme = "HTTPS" )
type WaapAPIPathMethod ¶ added in v0.10.0
type WaapAPIPathMethod string
The API RESTful method
const ( WaapAPIPathMethodGet WaapAPIPathMethod = "GET" WaapAPIPathMethodPost WaapAPIPathMethod = "POST" WaapAPIPathMethodPut WaapAPIPathMethod = "PUT" WaapAPIPathMethodPatch WaapAPIPathMethod = "PATCH" WaapAPIPathMethodDelete WaapAPIPathMethod = "DELETE" WaapAPIPathMethodTrace WaapAPIPathMethod = "TRACE" WaapAPIPathMethodHead WaapAPIPathMethod = "HEAD" WaapAPIPathMethodOptions WaapAPIPathMethod = "OPTIONS" )
type WaapAPIPathSource ¶ added in v0.10.0
type WaapAPIPathSource string
The source of the discovered API
const ( WaapAPIPathSourceAPIDescriptionFile WaapAPIPathSource = "API_DESCRIPTION_FILE" WaapAPIPathSourceTrafficScan WaapAPIPathSource = "TRAFFIC_SCAN" WaapAPIPathSourceUserDefined WaapAPIPathSource = "USER_DEFINED" )
type WaapAPIPathStatus ¶ added in v0.10.0
type WaapAPIPathStatus string
The status of the discovered API path
const ( WaapAPIPathStatusConfirmedAPI WaapAPIPathStatus = "CONFIRMED_API" WaapAPIPathStatusPotentialAPI WaapAPIPathStatus = "POTENTIAL_API" WaapAPIPathStatusNotAPI WaapAPIPathStatus = "NOT_API" WaapAPIPathStatusDelistedAPI WaapAPIPathStatus = "DELISTED_API" )
type WaapAPIScanResult ¶ added in v0.10.0
type WaapAPIScanResult struct {
// The scan ID
ID string `json:"id,required" format:"uuid"`
// The date and time the scan ended
EndTime time.Time `json:"end_time,required" format:"date-time"`
// The message associated with the scan
Message string `json:"message,required"`
// The date and time the scan started
StartTime time.Time `json:"start_time,required" format:"date-time"`
// The status of the scan
//
// Any of "SUCCESS", "FAILURE", "IN_PROGRESS".
Status WaapAPIScanResultStatus `json:"status,required"`
// The type of scan
//
// Any of "TRAFFIC_SCAN", "API_DESCRIPTION_FILE_SCAN".
Type WaapAPIScanResultType `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
EndTime respjson.Field
Message respjson.Field
StartTime respjson.Field
Status respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The result of a scan
func (WaapAPIScanResult) RawJSON ¶ added in v0.10.0
func (r WaapAPIScanResult) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAPIScanResult) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapAPIScanResult) UnmarshalJSON(data []byte) error
type WaapAPIScanResultStatus ¶ added in v0.10.0
type WaapAPIScanResultStatus string
The status of the scan
const ( WaapAPIScanResultStatusSuccess WaapAPIScanResultStatus = "SUCCESS" WaapAPIScanResultStatusFailure WaapAPIScanResultStatus = "FAILURE" WaapAPIScanResultStatusInProgress WaapAPIScanResultStatus = "IN_PROGRESS" )
type WaapAPIScanResultType ¶ added in v0.10.0
type WaapAPIScanResultType string
The type of scan
const ( WaapAPIScanResultTypeTrafficScan WaapAPIScanResultType = "TRAFFIC_SCAN" WaapAPIScanResultTypeAPIDescriptionFileScan WaapAPIScanResultType = "API_DESCRIPTION_FILE_SCAN" )
type WaapAdvancedRule ¶ added in v0.3.0
type WaapAdvancedRule struct {
// The unique identifier for the rule
ID int64 `json:"id,required"`
// The action that the rule takes when triggered. Only one action can be set per
// rule.
Action WaapAdvancedRuleAction `json:"action,required"`
// Whether or not the rule is enabled
Enabled bool `json:"enabled,required"`
// The name assigned to the rule
Name string `json:"name,required"`
// A CEL syntax expression that contains the rule's conditions. Allowed objects
// are: request, whois, session, response, tags, `user_defined_tags`, `user_agent`,
// `client_data`.
//
// More info can be found here:
// https://gcore.com/docs/waap/waap-rules/advanced-rules
Source string `json:"source,required"`
// The description assigned to the rule
Description string `json:"description"`
// The WAAP request/response phase for applying the rule. Default is "access".
//
// The "access" phase is responsible for modifying the request before it is sent to
// the origin server.
//
// The "header_filter" phase is responsible for modifying the HTTP headers of a
// response before they are sent back to the client.
//
// The "body_filter" phase is responsible for modifying the body of a response
// before it is sent back to the client.
//
// Any of "access", "header_filter", "body_filter".
Phase WaapAdvancedRulePhase `json:"phase,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Action respjson.Field
Enabled respjson.Field
Name respjson.Field
Source respjson.Field
Description respjson.Field
Phase respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An advanced WAAP rule applied to a domain
func (WaapAdvancedRule) RawJSON ¶ added in v0.3.0
func (r WaapAdvancedRule) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAdvancedRule) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapAdvancedRule) UnmarshalJSON(data []byte) error
type WaapAdvancedRuleAction ¶ added in v0.3.0
type WaapAdvancedRuleAction struct {
// The WAAP allowed the request
Allow any `json:"allow"`
// WAAP block action behavior could be configured with response status code and
// action duration.
Block WaapAdvancedRuleActionBlock `json:"block"`
// The WAAP presented the user with a captcha
Captcha any `json:"captcha"`
// The WAAP performed automatic browser validation
Handshake any `json:"handshake"`
// The WAAP monitored the request but took no action
Monitor any `json:"monitor"`
// WAAP tag action gets a list of tags to tag the request scope with
Tag WaapAdvancedRuleActionTag `json:"tag"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Allow respjson.Field
Block respjson.Field
Captcha respjson.Field
Handshake respjson.Field
Monitor respjson.Field
Tag respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The action that the rule takes when triggered. Only one action can be set per rule.
func (WaapAdvancedRuleAction) RawJSON ¶ added in v0.3.0
func (r WaapAdvancedRuleAction) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAdvancedRuleAction) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapAdvancedRuleAction) UnmarshalJSON(data []byte) error
type WaapAdvancedRuleActionBlock ¶ added in v0.3.0
type WaapAdvancedRuleActionBlock struct {
// How long a rule's block action will apply to subsequent requests. Can be
// specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to
// represent time format (seconds, minutes, hours, or days). Empty time intervals
// are not allowed.
ActionDuration string `json:"action_duration"`
// A custom HTTP status code that the WAAP returns if a rule blocks a request
//
// Any of 403, 405, 418, 429.
StatusCode int64 `json:"status_code"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionDuration respjson.Field
StatusCode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WAAP block action behavior could be configured with response status code and action duration.
func (WaapAdvancedRuleActionBlock) RawJSON ¶ added in v0.3.0
func (r WaapAdvancedRuleActionBlock) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAdvancedRuleActionBlock) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapAdvancedRuleActionBlock) UnmarshalJSON(data []byte) error
type WaapAdvancedRuleActionTag ¶ added in v0.3.0
type WaapAdvancedRuleActionTag struct {
// The list of user defined tags to tag the request with
Tags []string `json:"tags,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Tags respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WAAP tag action gets a list of tags to tag the request scope with
func (WaapAdvancedRuleActionTag) RawJSON ¶ added in v0.3.0
func (r WaapAdvancedRuleActionTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAdvancedRuleActionTag) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapAdvancedRuleActionTag) UnmarshalJSON(data []byte) error
type WaapAdvancedRuleDescriptor ¶ added in v0.3.0
type WaapAdvancedRuleDescriptor struct {
// The object's name
Name string `json:"name,required"`
// The object's type
Type string `json:"type,required"`
// The object's attributes list
Attrs []WaapAdvancedRuleDescriptorAttr `json:"attrs,nullable"`
// The object's description
Description string `json:"description,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Type respjson.Field
Attrs respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Advanced rules descriptor object
func (WaapAdvancedRuleDescriptor) RawJSON ¶ added in v0.3.0
func (r WaapAdvancedRuleDescriptor) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAdvancedRuleDescriptor) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapAdvancedRuleDescriptor) UnmarshalJSON(data []byte) error
type WaapAdvancedRuleDescriptorAttr ¶ added in v0.3.0
type WaapAdvancedRuleDescriptorAttr struct {
// The attribute's name
Name string `json:"name,required"`
// The attribute's type
Type string `json:"type,required"`
// A list of arguments for the attribute
Args []WaapAdvancedRuleDescriptorAttrArg `json:"args,nullable"`
// The attribute's description
Description string `json:"description,nullable"`
// The attribute's hint
Hint string `json:"hint,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Type respjson.Field
Args respjson.Field
Description respjson.Field
Hint respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An attribute of a descriptor's object
func (WaapAdvancedRuleDescriptorAttr) RawJSON ¶ added in v0.3.0
func (r WaapAdvancedRuleDescriptorAttr) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAdvancedRuleDescriptorAttr) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapAdvancedRuleDescriptorAttr) UnmarshalJSON(data []byte) error
type WaapAdvancedRuleDescriptorAttrArg ¶ added in v0.3.0
type WaapAdvancedRuleDescriptorAttrArg struct {
// The argument's name
Name string `json:"name,required"`
// The argument's type
Type string `json:"type,required"`
// The argument's description
Description string `json:"description,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Type respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An argument of a descriptor's object
func (WaapAdvancedRuleDescriptorAttrArg) RawJSON ¶ added in v0.3.0
func (r WaapAdvancedRuleDescriptorAttrArg) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAdvancedRuleDescriptorAttrArg) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapAdvancedRuleDescriptorAttrArg) UnmarshalJSON(data []byte) error
type WaapAdvancedRuleDescriptorList ¶ added in v0.3.0
type WaapAdvancedRuleDescriptorList struct {
// The descriptor's version
Version string `json:"version,required"`
Objects []WaapAdvancedRuleDescriptor `json:"objects,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Version respjson.Field
Objects respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A response from a request to retrieve an advanced rules descriptor
func (WaapAdvancedRuleDescriptorList) RawJSON ¶ added in v0.3.0
func (r WaapAdvancedRuleDescriptorList) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapAdvancedRuleDescriptorList) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapAdvancedRuleDescriptorList) UnmarshalJSON(data []byte) error
type WaapAdvancedRulePhase ¶ added in v0.3.0
type WaapAdvancedRulePhase string
The WAAP request/response phase for applying the rule. Default is "access".
The "access" phase is responsible for modifying the request before it is sent to the origin server.
The "header_filter" phase is responsible for modifying the HTTP headers of a response before they are sent back to the client.
The "body_filter" phase is responsible for modifying the body of a response before it is sent back to the client.
const ( WaapAdvancedRulePhaseAccess WaapAdvancedRulePhase = "access" WaapAdvancedRulePhaseHeaderFilter WaapAdvancedRulePhase = "header_filter" WaapAdvancedRulePhaseBodyFilter WaapAdvancedRulePhase = "body_filter" )
type WaapBlockedStatistics ¶ added in v0.3.0
type WaapBlockedStatistics struct {
// A collection of event counts per action. The first item is the action's
// abbreviation/full action name, and the second item is the number of events
Action [][]WaapBlockedStatisticsActionUnion `json:"action,required"`
// A collection of event counts per country of origin. The first item is the
// country's ISO 3166-1 alpha-2, and the second item is the number of events
Country [][]WaapBlockedStatisticsCountryUnion `json:"country,required"`
// A collection of event counts per organization that owns the event's client IP.
// The first item is the organization's name, and the second item is the number of
// events
Org [][]WaapBlockedStatisticsOrgUnion `json:"org,required"`
// A collection of event counts per rule that triggered the event. The first item
// is the rule's name, and the second item is the number of events
RuleName [][]WaapBlockedStatisticsRuleNameUnion `json:"rule_name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Action respjson.Field
Country respjson.Field
Org respjson.Field
RuleName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A collection of total numbers of events with blocked results per criteria
func (WaapBlockedStatistics) RawJSON ¶ added in v0.3.0
func (r WaapBlockedStatistics) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapBlockedStatistics) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapBlockedStatistics) UnmarshalJSON(data []byte) error
type WaapBlockedStatisticsActionUnion ¶ added in v0.3.0
type WaapBlockedStatisticsActionUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WaapBlockedStatisticsActionUnion contains all possible properties and values from [string], [int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (WaapBlockedStatisticsActionUnion) AsInt ¶ added in v0.3.0
func (u WaapBlockedStatisticsActionUnion) AsInt() (v int64)
func (WaapBlockedStatisticsActionUnion) AsString ¶ added in v0.3.0
func (u WaapBlockedStatisticsActionUnion) AsString() (v string)
func (WaapBlockedStatisticsActionUnion) RawJSON ¶ added in v0.3.0
func (u WaapBlockedStatisticsActionUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapBlockedStatisticsActionUnion) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapBlockedStatisticsActionUnion) UnmarshalJSON(data []byte) error
type WaapBlockedStatisticsCountryUnion ¶ added in v0.3.0
type WaapBlockedStatisticsCountryUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WaapBlockedStatisticsCountryUnion contains all possible properties and values from [string], [int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (WaapBlockedStatisticsCountryUnion) AsInt ¶ added in v0.3.0
func (u WaapBlockedStatisticsCountryUnion) AsInt() (v int64)
func (WaapBlockedStatisticsCountryUnion) AsString ¶ added in v0.3.0
func (u WaapBlockedStatisticsCountryUnion) AsString() (v string)
func (WaapBlockedStatisticsCountryUnion) RawJSON ¶ added in v0.3.0
func (u WaapBlockedStatisticsCountryUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapBlockedStatisticsCountryUnion) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapBlockedStatisticsCountryUnion) UnmarshalJSON(data []byte) error
type WaapBlockedStatisticsOrgUnion ¶ added in v0.3.0
type WaapBlockedStatisticsOrgUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WaapBlockedStatisticsOrgUnion contains all possible properties and values from [string], [int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (WaapBlockedStatisticsOrgUnion) AsInt ¶ added in v0.3.0
func (u WaapBlockedStatisticsOrgUnion) AsInt() (v int64)
func (WaapBlockedStatisticsOrgUnion) AsString ¶ added in v0.3.0
func (u WaapBlockedStatisticsOrgUnion) AsString() (v string)
func (WaapBlockedStatisticsOrgUnion) RawJSON ¶ added in v0.3.0
func (u WaapBlockedStatisticsOrgUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapBlockedStatisticsOrgUnion) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapBlockedStatisticsOrgUnion) UnmarshalJSON(data []byte) error
type WaapBlockedStatisticsRuleNameUnion ¶ added in v0.3.0
type WaapBlockedStatisticsRuleNameUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WaapBlockedStatisticsRuleNameUnion contains all possible properties and values from [string], [int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (WaapBlockedStatisticsRuleNameUnion) AsInt ¶ added in v0.3.0
func (u WaapBlockedStatisticsRuleNameUnion) AsInt() (v int64)
func (WaapBlockedStatisticsRuleNameUnion) AsString ¶ added in v0.3.0
func (u WaapBlockedStatisticsRuleNameUnion) AsString() (v string)
func (WaapBlockedStatisticsRuleNameUnion) RawJSON ¶ added in v0.3.0
func (u WaapBlockedStatisticsRuleNameUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapBlockedStatisticsRuleNameUnion) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapBlockedStatisticsRuleNameUnion) UnmarshalJSON(data []byte) error
type WaapCountStatistics ¶ added in v0.3.0
type WaapCountStatistics struct {
// A collection of event counts per action. The first item is the action's
// abbreviation/full action name, and the second item is the number of events
Action [][]WaapCountStatisticsActionUnion `json:"action,required"`
// A collection of event counts per country of origin. The first item is the
// country's ISO 3166-1 alpha-2, and the second item is the number of events
Country [][]WaapCountStatisticsCountryUnion `json:"country,required"`
// A collection of event counts per organization that owns the event's client IP.
// The first item is the organization's name, and the second item is the number of
// events
Org [][]WaapCountStatisticsOrgUnion `json:"org,required"`
// A collection of event counts per rule that triggered the event. The first item
// is the rule's name, and the second item is the number of events
RuleName [][]WaapCountStatisticsRuleNameUnion `json:"rule_name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Action respjson.Field
Country respjson.Field
Org respjson.Field
RuleName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A collection of total numbers of events per criteria
func (WaapCountStatistics) RawJSON ¶ added in v0.3.0
func (r WaapCountStatistics) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCountStatistics) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCountStatistics) UnmarshalJSON(data []byte) error
type WaapCountStatisticsActionUnion ¶ added in v0.3.0
type WaapCountStatisticsActionUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WaapCountStatisticsActionUnion contains all possible properties and values from [string], [int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (WaapCountStatisticsActionUnion) AsInt ¶ added in v0.3.0
func (u WaapCountStatisticsActionUnion) AsInt() (v int64)
func (WaapCountStatisticsActionUnion) AsString ¶ added in v0.3.0
func (u WaapCountStatisticsActionUnion) AsString() (v string)
func (WaapCountStatisticsActionUnion) RawJSON ¶ added in v0.3.0
func (u WaapCountStatisticsActionUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCountStatisticsActionUnion) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCountStatisticsActionUnion) UnmarshalJSON(data []byte) error
type WaapCountStatisticsCountryUnion ¶ added in v0.3.0
type WaapCountStatisticsCountryUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WaapCountStatisticsCountryUnion contains all possible properties and values from [string], [int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (WaapCountStatisticsCountryUnion) AsInt ¶ added in v0.3.0
func (u WaapCountStatisticsCountryUnion) AsInt() (v int64)
func (WaapCountStatisticsCountryUnion) AsString ¶ added in v0.3.0
func (u WaapCountStatisticsCountryUnion) AsString() (v string)
func (WaapCountStatisticsCountryUnion) RawJSON ¶ added in v0.3.0
func (u WaapCountStatisticsCountryUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCountStatisticsCountryUnion) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCountStatisticsCountryUnion) UnmarshalJSON(data []byte) error
type WaapCountStatisticsOrgUnion ¶ added in v0.3.0
type WaapCountStatisticsOrgUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WaapCountStatisticsOrgUnion contains all possible properties and values from [string], [int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (WaapCountStatisticsOrgUnion) AsInt ¶ added in v0.3.0
func (u WaapCountStatisticsOrgUnion) AsInt() (v int64)
func (WaapCountStatisticsOrgUnion) AsString ¶ added in v0.3.0
func (u WaapCountStatisticsOrgUnion) AsString() (v string)
func (WaapCountStatisticsOrgUnion) RawJSON ¶ added in v0.3.0
func (u WaapCountStatisticsOrgUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCountStatisticsOrgUnion) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCountStatisticsOrgUnion) UnmarshalJSON(data []byte) error
type WaapCountStatisticsRuleNameUnion ¶ added in v0.3.0
type WaapCountStatisticsRuleNameUnion struct {
// This field will be present if the value is a [string] instead of an object.
OfString string `json:",inline"`
// This field will be present if the value is a [int64] instead of an object.
OfInt int64 `json:",inline"`
JSON struct {
OfString respjson.Field
OfInt respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WaapCountStatisticsRuleNameUnion contains all possible properties and values from [string], [int64].
Use the methods beginning with 'As' to cast the union to one of its variants.
If the underlying value is not a json object, one of the following properties will be valid: OfString OfInt]
func (WaapCountStatisticsRuleNameUnion) AsInt ¶ added in v0.3.0
func (u WaapCountStatisticsRuleNameUnion) AsInt() (v int64)
func (WaapCountStatisticsRuleNameUnion) AsString ¶ added in v0.3.0
func (u WaapCountStatisticsRuleNameUnion) AsString() (v string)
func (WaapCountStatisticsRuleNameUnion) RawJSON ¶ added in v0.3.0
func (u WaapCountStatisticsRuleNameUnion) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCountStatisticsRuleNameUnion) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCountStatisticsRuleNameUnion) UnmarshalJSON(data []byte) error
type WaapCustomPagePreview ¶ added in v0.3.0
type WaapCustomPagePreview struct {
// HTML content of the custom page
HTML string `json:"html,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
HTML respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapCustomPagePreview) RawJSON ¶ added in v0.3.0
func (r WaapCustomPagePreview) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomPagePreview) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomPagePreview) UnmarshalJSON(data []byte) error
type WaapCustomPageSet ¶ added in v0.3.0
type WaapCustomPageSet struct {
// The ID of the custom page set
ID int64 `json:"id,required"`
// Name of the custom page set
Name string `json:"name,required"`
Block WaapCustomPageSetBlock `json:"block,nullable"`
BlockCsrf WaapCustomPageSetBlockCsrf `json:"block_csrf,nullable"`
Captcha WaapCustomPageSetCaptcha `json:"captcha,nullable"`
CookieDisabled WaapCustomPageSetCookieDisabled `json:"cookie_disabled,nullable"`
// List of domain IDs that are associated with this page set
Domains []int64 `json:"domains,nullable"`
Handshake WaapCustomPageSetHandshake `json:"handshake,nullable"`
JavascriptDisabled WaapCustomPageSetJavascriptDisabled `json:"javascript_disabled,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
Block respjson.Field
BlockCsrf respjson.Field
Captcha respjson.Field
CookieDisabled respjson.Field
Domains respjson.Field
Handshake respjson.Field
JavascriptDisabled respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapCustomPageSet) RawJSON ¶ added in v0.3.0
func (r WaapCustomPageSet) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomPageSet) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomPageSet) UnmarshalJSON(data []byte) error
type WaapCustomPageSetBlock ¶ added in v0.10.0
type WaapCustomPageSetBlock struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header string `json:"header"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo string `json:"logo"`
// The text to display in the body of the custom page
Text string `json:"text"`
// The text to display in the title of the custom page
Title string `json:"title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
Header respjson.Field
Logo respjson.Field
Text respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapCustomPageSetBlock) RawJSON ¶ added in v0.10.0
func (r WaapCustomPageSetBlock) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomPageSetBlock) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapCustomPageSetBlock) UnmarshalJSON(data []byte) error
type WaapCustomPageSetBlockCsrf ¶ added in v0.10.0
type WaapCustomPageSetBlockCsrf struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header string `json:"header"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo string `json:"logo"`
// The text to display in the body of the custom page
Text string `json:"text"`
// The text to display in the title of the custom page
Title string `json:"title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
Header respjson.Field
Logo respjson.Field
Text respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapCustomPageSetBlockCsrf) RawJSON ¶ added in v0.10.0
func (r WaapCustomPageSetBlockCsrf) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomPageSetBlockCsrf) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapCustomPageSetBlockCsrf) UnmarshalJSON(data []byte) error
type WaapCustomPageSetCaptcha ¶ added in v0.10.0
type WaapCustomPageSetCaptcha struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// Error message
Error string `json:"error"`
// The text to display in the header of the custom page
Header string `json:"header"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo string `json:"logo"`
// The text to display in the body of the custom page
Text string `json:"text"`
// The text to display in the title of the custom page
Title string `json:"title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
Error respjson.Field
Header respjson.Field
Logo respjson.Field
Text respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapCustomPageSetCaptcha) RawJSON ¶ added in v0.10.0
func (r WaapCustomPageSetCaptcha) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomPageSetCaptcha) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapCustomPageSetCaptcha) UnmarshalJSON(data []byte) error
type WaapCustomPageSetCookieDisabled ¶ added in v0.10.0
type WaapCustomPageSetCookieDisabled struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header string `json:"header"`
// The text to display in the body of the custom page
Text string `json:"text"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
Header respjson.Field
Text respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapCustomPageSetCookieDisabled) RawJSON ¶ added in v0.10.0
func (r WaapCustomPageSetCookieDisabled) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomPageSetCookieDisabled) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapCustomPageSetCookieDisabled) UnmarshalJSON(data []byte) error
type WaapCustomPageSetHandshake ¶ added in v0.10.0
type WaapCustomPageSetHandshake struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header string `json:"header"`
// Supported image types are JPEG, PNG and JPG, size is limited to width 450px,
// height 130px. This should be a base 64 encoding of the full HTML img tag
// compatible image, with the header included.
Logo string `json:"logo"`
// The text to display in the title of the custom page
Title string `json:"title"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
Header respjson.Field
Logo respjson.Field
Title respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapCustomPageSetHandshake) RawJSON ¶ added in v0.10.0
func (r WaapCustomPageSetHandshake) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomPageSetHandshake) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapCustomPageSetHandshake) UnmarshalJSON(data []byte) error
type WaapCustomPageSetJavascriptDisabled ¶ added in v0.10.0
type WaapCustomPageSetJavascriptDisabled struct {
// Indicates whether the custom custom page is active or inactive
Enabled bool `json:"enabled,required"`
// The text to display in the header of the custom page
Header string `json:"header"`
// The text to display in the body of the custom page
Text string `json:"text"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
Header respjson.Field
Text respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapCustomPageSetJavascriptDisabled) RawJSON ¶ added in v0.10.0
func (r WaapCustomPageSetJavascriptDisabled) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomPageSetJavascriptDisabled) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapCustomPageSetJavascriptDisabled) UnmarshalJSON(data []byte) error
type WaapCustomRule ¶ added in v0.3.0
type WaapCustomRule struct {
// The unique identifier for the rule
ID int64 `json:"id,required"`
// The action that the rule takes when triggered. Only one action can be set per
// rule.
Action WaapCustomRuleAction `json:"action,required"`
// The conditions required for the WAAP engine to trigger the rule. Rules may have
// between 1 and 5 conditions. All conditions must pass for the rule to trigger
Conditions []WaapCustomRuleCondition `json:"conditions,required"`
// Whether or not the rule is enabled
Enabled bool `json:"enabled,required"`
// The name assigned to the rule
Name string `json:"name,required"`
// The description assigned to the rule
Description string `json:"description"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Action respjson.Field
Conditions respjson.Field
Enabled respjson.Field
Name respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
An WAAP rule applied to a domain
func (WaapCustomRule) RawJSON ¶ added in v0.3.0
func (r WaapCustomRule) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRule) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRule) UnmarshalJSON(data []byte) error
type WaapCustomRuleAction ¶ added in v0.3.0
type WaapCustomRuleAction struct {
// The WAAP allowed the request
Allow any `json:"allow"`
// WAAP block action behavior could be configured with response status code and
// action duration.
Block WaapCustomRuleActionBlock `json:"block"`
// The WAAP presented the user with a captcha
Captcha any `json:"captcha"`
// The WAAP performed automatic browser validation
Handshake any `json:"handshake"`
// The WAAP monitored the request but took no action
Monitor any `json:"monitor"`
// WAAP tag action gets a list of tags to tag the request scope with
Tag WaapCustomRuleActionTag `json:"tag"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Allow respjson.Field
Block respjson.Field
Captcha respjson.Field
Handshake respjson.Field
Monitor respjson.Field
Tag respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The action that the rule takes when triggered. Only one action can be set per rule.
func (WaapCustomRuleAction) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleAction) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleAction) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleAction) UnmarshalJSON(data []byte) error
type WaapCustomRuleActionBlock ¶ added in v0.3.0
type WaapCustomRuleActionBlock struct {
// How long a rule's block action will apply to subsequent requests. Can be
// specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to
// represent time format (seconds, minutes, hours, or days). Empty time intervals
// are not allowed.
ActionDuration string `json:"action_duration"`
// A custom HTTP status code that the WAAP returns if a rule blocks a request
//
// Any of 403, 405, 418, 429.
StatusCode int64 `json:"status_code"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionDuration respjson.Field
StatusCode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WAAP block action behavior could be configured with response status code and action duration.
func (WaapCustomRuleActionBlock) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleActionBlock) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleActionBlock) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleActionBlock) UnmarshalJSON(data []byte) error
type WaapCustomRuleActionTag ¶ added in v0.3.0
type WaapCustomRuleActionTag struct {
// The list of user defined tags to tag the request with
Tags []string `json:"tags,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Tags respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WAAP tag action gets a list of tags to tag the request scope with
func (WaapCustomRuleActionTag) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleActionTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleActionTag) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleActionTag) UnmarshalJSON(data []byte) error
type WaapCustomRuleCondition ¶ added in v0.3.0
type WaapCustomRuleCondition struct {
// Match the requested Content-Type
ContentType WaapCustomRuleConditionContentType `json:"content_type"`
// Match the country that the request originated from
Country WaapCustomRuleConditionCountry `json:"country"`
// Match the incoming file extension
FileExtension WaapCustomRuleConditionFileExtension `json:"file_extension"`
// Match an incoming request header
Header WaapCustomRuleConditionHeader `json:"header"`
// Match when an incoming request header is present
HeaderExists WaapCustomRuleConditionHeaderExists `json:"header_exists"`
// Match the incoming HTTP method
HTTPMethod WaapCustomRuleConditionHTTPMethod `json:"http_method"`
// Match the incoming request against a single IP address
IP WaapCustomRuleConditionIP `json:"ip"`
// Match the incoming request against an IP range
IPRange WaapCustomRuleConditionIPRange `json:"ip_range"`
// Match the organization the request originated from, as determined by a WHOIS
// lookup of the requesting IP
Organization WaapCustomRuleConditionOrganization `json:"organization"`
// Match the type of organization that owns the IP address making an incoming
// request
OwnerTypes WaapCustomRuleConditionOwnerTypes `json:"owner_types"`
// Match the rate at which requests come in that match certain conditions
RequestRate WaapCustomRuleConditionRequestRate `json:"request_rate"`
// Match a response header
ResponseHeader WaapCustomRuleConditionResponseHeader `json:"response_header"`
// Match when a response header is present
ResponseHeaderExists WaapCustomRuleConditionResponseHeaderExists `json:"response_header_exists"`
// Match the number of dynamic page requests made in a WAAP session
SessionRequestCount WaapCustomRuleConditionSessionRequestCount `json:"session_request_count"`
// Matches requests based on specified tags
Tags WaapCustomRuleConditionTags `json:"tags"`
// Match the incoming request URL
URL WaapCustomRuleConditionURL `json:"url"`
// Match the user agent making the request
UserAgent WaapCustomRuleConditionUserAgent `json:"user_agent"`
// Matches requests based on user-defined tags
UserDefinedTags WaapCustomRuleConditionUserDefinedTags `json:"user_defined_tags"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ContentType respjson.Field
Country respjson.Field
FileExtension respjson.Field
Header respjson.Field
HeaderExists respjson.Field
HTTPMethod respjson.Field
IP respjson.Field
IPRange respjson.Field
Organization respjson.Field
OwnerTypes respjson.Field
RequestRate respjson.Field
ResponseHeader respjson.Field
ResponseHeaderExists respjson.Field
SessionRequestCount respjson.Field
Tags respjson.Field
URL respjson.Field
UserAgent respjson.Field
UserDefinedTags respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The criteria of an incoming web request and the models of the various values those criteria can take
func (WaapCustomRuleCondition) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleCondition) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleCondition) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleCondition) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionContentType ¶ added in v0.3.0
type WaapCustomRuleConditionContentType struct {
// The list of content types to match against
ContentType []string `json:"content_type,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ContentType respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the requested Content-Type
func (WaapCustomRuleConditionContentType) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionContentType) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionContentType) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionContentType) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionCountry ¶ added in v0.3.0
type WaapCustomRuleConditionCountry struct {
// A list of ISO 3166-1 alpha-2 formatted strings representing the countries to
// match against
CountryCode []string `json:"country_code,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
CountryCode respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the country that the request originated from
func (WaapCustomRuleConditionCountry) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionCountry) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionCountry) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionCountry) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionFileExtension ¶ added in v0.3.0
type WaapCustomRuleConditionFileExtension struct {
// The list of file extensions to match against
FileExtension []string `json:"file_extension,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
FileExtension respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the incoming file extension
func (WaapCustomRuleConditionFileExtension) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionFileExtension) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionFileExtension) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionFileExtension) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionHTTPMethod ¶ added in v0.3.0
type WaapCustomRuleConditionHTTPMethod struct {
// HTTP methods of a request
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethod string `json:"http_method,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
HTTPMethod respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the incoming HTTP method
func (WaapCustomRuleConditionHTTPMethod) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionHTTPMethod) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionHTTPMethod) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionHTTPMethod) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionHeader ¶ added in v0.3.0
type WaapCustomRuleConditionHeader struct {
// The request header name
Header string `json:"header,required"`
// The request header value
Value string `json:"value,required"`
// The type of matching condition for header and value.
//
// Any of "Exact", "Contains".
MatchType string `json:"match_type"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Header respjson.Field
Value respjson.Field
MatchType respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match an incoming request header
func (WaapCustomRuleConditionHeader) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionHeader) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionHeader) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionHeader) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionHeaderExists ¶ added in v0.3.0
type WaapCustomRuleConditionHeaderExists struct {
// The request header name
Header string `json:"header,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Header respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match when an incoming request header is present
func (WaapCustomRuleConditionHeaderExists) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionHeaderExists) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionHeaderExists) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionHeaderExists) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionIP ¶ added in v0.3.0
type WaapCustomRuleConditionIP struct {
// A single IPv4 or IPv6 address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IPAddress respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the incoming request against a single IP address
func (WaapCustomRuleConditionIP) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionIP) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionIP) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionIP) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionIPRange ¶ added in v0.3.0
type WaapCustomRuleConditionIPRange struct {
// The lower bound IPv4 or IPv6 address to match against
LowerBound string `json:"lower_bound,required" format:"ipvanyaddress"`
// The upper bound IPv4 or IPv6 address to match against
UpperBound string `json:"upper_bound,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
LowerBound respjson.Field
UpperBound respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the incoming request against an IP range
func (WaapCustomRuleConditionIPRange) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionIPRange) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionIPRange) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionIPRange) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionOrganization ¶ added in v0.3.0
type WaapCustomRuleConditionOrganization struct {
// The organization to match against
Organization string `json:"organization,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Organization respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the organization the request originated from, as determined by a WHOIS lookup of the requesting IP
func (WaapCustomRuleConditionOrganization) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionOrganization) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionOrganization) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionOrganization) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionOwnerTypes ¶ added in v0.3.0
type WaapCustomRuleConditionOwnerTypes struct {
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// Match the type of organization that owns the IP address making an incoming
// request
//
// Any of "COMMERCIAL", "EDUCATIONAL", "GOVERNMENT", "HOSTING_SERVICES", "ISP",
// "MOBILE_NETWORK", "NETWORK", "RESERVED".
OwnerTypes []string `json:"owner_types"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Negation respjson.Field
OwnerTypes respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the type of organization that owns the IP address making an incoming request
func (WaapCustomRuleConditionOwnerTypes) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionOwnerTypes) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionOwnerTypes) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionOwnerTypes) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionRequestRate ¶ added in v0.3.0
type WaapCustomRuleConditionRequestRate struct {
// A regular expression matching the URL path of the incoming request
PathPattern string `json:"path_pattern,required"`
// The number of incoming requests over the given time that can trigger a request
// rate condition
Requests int64 `json:"requests,required"`
// The number of seconds that the WAAP measures incoming requests over before
// triggering a request rate condition
Time int64 `json:"time,required"`
// Possible HTTP request methods that can trigger a request rate condition
//
// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
// "TRACE".
HTTPMethods []string `json:"http_methods"`
// A list of source IPs that can trigger a request rate condition
IPs []string `json:"ips" format:"ipvanyaddress"`
// A user-defined tag that can be included in incoming requests and used to trigger
// a request rate condition
UserDefinedTag string `json:"user_defined_tag"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
PathPattern respjson.Field
Requests respjson.Field
Time respjson.Field
HTTPMethods respjson.Field
IPs respjson.Field
UserDefinedTag respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the rate at which requests come in that match certain conditions
func (WaapCustomRuleConditionRequestRate) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionRequestRate) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionRequestRate) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionRequestRate) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionResponseHeader ¶ added in v0.3.0
type WaapCustomRuleConditionResponseHeader struct {
// The response header name
Header string `json:"header,required"`
// The response header value
Value string `json:"value,required"`
// The type of matching condition for header and value.
//
// Any of "Exact", "Contains".
MatchType string `json:"match_type"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Header respjson.Field
Value respjson.Field
MatchType respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match a response header
func (WaapCustomRuleConditionResponseHeader) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionResponseHeader) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionResponseHeader) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionResponseHeader) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionResponseHeaderExists ¶ added in v0.3.0
type WaapCustomRuleConditionResponseHeaderExists struct {
// The response header name
Header string `json:"header,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Header respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match when a response header is present
func (WaapCustomRuleConditionResponseHeaderExists) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionResponseHeaderExists) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionResponseHeaderExists) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionResponseHeaderExists) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionSessionRequestCount ¶ added in v0.3.0
type WaapCustomRuleConditionSessionRequestCount struct {
// The number of dynamic requests in the session
RequestCount int64 `json:"request_count,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
RequestCount respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the number of dynamic page requests made in a WAAP session
func (WaapCustomRuleConditionSessionRequestCount) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionSessionRequestCount) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionSessionRequestCount) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionSessionRequestCount) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionTags ¶ added in v0.3.0
type WaapCustomRuleConditionTags struct {
// A list of tags to match against the request tags
Tags []string `json:"tags,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Tags respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Matches requests based on specified tags
func (WaapCustomRuleConditionTags) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionTags) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionTags) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionTags) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionURL ¶ added in v0.3.0
type WaapCustomRuleConditionURL struct {
// The pattern to match against the request URL. Constraints depend on
// `match_type`:
//
// - **Exact/Contains**: plain text matching (e.g., `/admin`, must comply with
// `^[\w!\$~:#\[\]@\(\)*\+,=\/\-\.\%]+$`).
// - **Regex**: a valid regular expression (e.g., `^/upload(/\d+)?/\w+`).
// Lookahead/lookbehind constructs are forbidden.
URL string `json:"url,required"`
// The type of matching condition.
//
// Any of "Exact", "Contains", "Regex".
MatchType string `json:"match_type"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
URL respjson.Field
MatchType respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the incoming request URL
func (WaapCustomRuleConditionURL) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionURL) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionURL) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionUserAgent ¶ added in v0.3.0
type WaapCustomRuleConditionUserAgent struct {
// The user agent value to match
UserAgent string `json:"user_agent,required"`
// The type of matching condition.
//
// Any of "Exact", "Contains".
MatchType string `json:"match_type"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
UserAgent respjson.Field
MatchType respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the user agent making the request
func (WaapCustomRuleConditionUserAgent) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionUserAgent) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionUserAgent) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionUserAgent) UnmarshalJSON(data []byte) error
type WaapCustomRuleConditionUserDefinedTags ¶ added in v0.3.0
type WaapCustomRuleConditionUserDefinedTags struct {
// A list of user-defined tags to match against the request tags
Tags []string `json:"tags,required"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Tags respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Matches requests based on user-defined tags
func (WaapCustomRuleConditionUserDefinedTags) RawJSON ¶ added in v0.3.0
func (r WaapCustomRuleConditionUserDefinedTags) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapCustomRuleConditionUserDefinedTags) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapCustomRuleConditionUserDefinedTags) UnmarshalJSON(data []byte) error
type WaapDDOSAttack ¶ added in v0.3.0
type WaapDDOSAttack struct {
// End time of DDoS attack
EndTime time.Time `json:"end_time,nullable" format:"date-time"`
// Start time of DDoS attack
StartTime time.Time `json:"start_time,nullable" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
EndTime respjson.Field
StartTime respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapDDOSAttack) RawJSON ¶ added in v0.3.0
func (r WaapDDOSAttack) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapDDOSAttack) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapDDOSAttack) UnmarshalJSON(data []byte) error
type WaapDDOSInfo ¶ added in v0.3.0
type WaapDDOSInfo struct {
// The number of requests made
Count int64 `json:"count,required"`
// The value for the grouped by type
Identity string `json:"identity,required"`
// Any of "URL", "IP", "User-Agent".
Type WaapDDOSInfoType `json:"type,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Identity respjson.Field
Type respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapDDOSInfo) RawJSON ¶ added in v0.3.0
func (r WaapDDOSInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapDDOSInfo) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapDDOSInfo) UnmarshalJSON(data []byte) error
type WaapDDOSInfoType ¶ added in v0.3.0
type WaapDDOSInfoType string
const ( WaapDDOSInfoTypeURL WaapDDOSInfoType = "URL" WaapDDOSInfoTypeIP WaapDDOSInfoType = "IP" WaapDDOSInfoTypeUserAgent WaapDDOSInfoType = "User-Agent" )
type WaapDetailedDomain ¶
type WaapDetailedDomain struct {
// The domain ID
ID int64 `json:"id,required"`
// The date and time the domain was created in ISO 8601 format
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// The ID of the custom page set
CustomPageSet int64 `json:"custom_page_set,required"`
// The domain name
Name string `json:"name,required"`
// The different statuses a domain can have
//
// Any of "active", "bypass", "monitor", "locked".
Status WaapDetailedDomainStatus `json:"status,required"`
// Domain level quotas
Quotas map[string]WaapDetailedDomainQuota `json:"quotas,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
CustomPageSet respjson.Field
Name respjson.Field
Status respjson.Field
Quotas respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a WAAP domain, serving as a singular unit within the WAAP service.
Each domain functions autonomously, possessing its own set of rules and configurations to manage web application firewall settings and behaviors.
func (WaapDetailedDomain) RawJSON ¶
func (r WaapDetailedDomain) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapDetailedDomain) UnmarshalJSON ¶
func (r *WaapDetailedDomain) UnmarshalJSON(data []byte) error
type WaapDetailedDomainQuota ¶
type WaapDetailedDomainQuota struct {
// The maximum allowed number of this resource
Allowed int64 `json:"allowed,required"`
// The current number of this resource
Current int64 `json:"current,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Allowed respjson.Field
Current respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapDetailedDomainQuota) RawJSON ¶
func (r WaapDetailedDomainQuota) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapDetailedDomainQuota) UnmarshalJSON ¶
func (r *WaapDetailedDomainQuota) UnmarshalJSON(data []byte) error
type WaapDetailedDomainStatus ¶ added in v0.10.0
type WaapDetailedDomainStatus string
The different statuses a domain can have
const ( WaapDetailedDomainStatusActive WaapDetailedDomainStatus = "active" WaapDetailedDomainStatusBypass WaapDetailedDomainStatus = "bypass" WaapDetailedDomainStatusMonitor WaapDetailedDomainStatus = "monitor" WaapDetailedDomainStatusLocked WaapDetailedDomainStatus = "locked" )
type WaapDomainAPISettings ¶ added in v0.3.0
type WaapDomainAPISettings struct {
// The API URLs for a domain. If your domain has a common base URL for all API
// paths, it can be set here
APIURLs []string `json:"api_urls"`
// Indicates if the domain is an API domain. All requests to an API domain are
// treated as API requests. If this is set to true then the `api_urls` field is
// ignored.
IsAPI bool `json:"is_api"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
APIURLs respjson.Field
IsAPI respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
API settings of a domain
func (WaapDomainAPISettings) RawJSON ¶ added in v0.3.0
func (r WaapDomainAPISettings) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapDomainAPISettings) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapDomainAPISettings) UnmarshalJSON(data []byte) error
type WaapDomainDDOSSettings ¶
type WaapDomainDDOSSettings struct {
// The burst threshold detects sudden rises in traffic. If it is met and the number
// of requests is at least five times the last 2-second interval, DDoS protection
// will activate. Default is 1000.
BurstThreshold int64 `json:"burst_threshold"`
// The global threshold is responsible for identifying DDoS attacks with a slow
// rise in traffic. If the threshold is met and the current number of requests is
// at least double that of the previous 10-second window, DDoS protection will
// activate. Default is 5000.
GlobalThreshold int64 `json:"global_threshold"`
// The sub-second threshold protects WAAP servers against attacks from traffic
// bursts. When this threshold is reached, the DDoS mode will activate on the
// affected WAAP server, not the whole WAAP cluster. Default is 50.
SubSecondThreshold int64 `json:"sub_second_threshold"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BurstThreshold respjson.Field
GlobalThreshold respjson.Field
SubSecondThreshold respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
DDoS settings for a domain.
func (WaapDomainDDOSSettings) RawJSON ¶
func (r WaapDomainDDOSSettings) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapDomainDDOSSettings) UnmarshalJSON ¶
func (r *WaapDomainDDOSSettings) UnmarshalJSON(data []byte) error
type WaapDomainSettingsModel ¶ added in v0.3.0
type WaapDomainSettingsModel struct {
// API settings of a domain
API WaapDomainAPISettings `json:"api,required"`
// DDoS settings for a domain.
DDOS WaapDomainDDOSSettings `json:"ddos,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
API respjson.Field
DDOS respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Settings for a domain.
func (WaapDomainSettingsModel) RawJSON ¶ added in v0.3.0
func (r WaapDomainSettingsModel) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapDomainSettingsModel) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapDomainSettingsModel) UnmarshalJSON(data []byte) error
type WaapEventStatistics ¶ added in v0.3.0
type WaapEventStatistics struct {
// A collection of total numbers of events with blocked results per criteria
Blocked WaapBlockedStatistics `json:"blocked,required"`
// A collection of total numbers of events per criteria
Count WaapCountStatistics `json:"count,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blocked respjson.Field
Count respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A collection of event metrics over a time span
func (WaapEventStatistics) RawJSON ¶ added in v0.3.0
func (r WaapEventStatistics) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapEventStatistics) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapEventStatistics) UnmarshalJSON(data []byte) error
type WaapFirewallRule ¶ added in v0.3.0
type WaapFirewallRule struct {
// The unique identifier of the rule
ID int64 `json:"id,required"`
// The action that the rule takes when triggered
Action WaapFirewallRuleAction `json:"action,required"`
// The condition required for the WAAP engine to trigger the rule.
Conditions []WaapFirewallRuleCondition `json:"conditions,required"`
// Whether or not the rule is enabled
Enabled bool `json:"enabled,required"`
// The name assigned to the rule
Name string `json:"name,required"`
// The description assigned to the rule
Description string `json:"description"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Action respjson.Field
Conditions respjson.Field
Enabled respjson.Field
Name respjson.Field
Description respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapFirewallRule) RawJSON ¶ added in v0.3.0
func (r WaapFirewallRule) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapFirewallRule) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapFirewallRule) UnmarshalJSON(data []byte) error
type WaapFirewallRuleAction ¶ added in v0.3.0
type WaapFirewallRuleAction struct {
// The WAAP allowed the request
Allow any `json:"allow,nullable"`
// WAAP block action behavior could be configured with response status code and
// action duration.
Block WaapFirewallRuleActionBlock `json:"block,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Allow respjson.Field
Block respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The action that the rule takes when triggered
func (WaapFirewallRuleAction) RawJSON ¶ added in v0.3.0
func (r WaapFirewallRuleAction) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapFirewallRuleAction) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapFirewallRuleAction) UnmarshalJSON(data []byte) error
type WaapFirewallRuleActionBlock ¶ added in v0.3.0
type WaapFirewallRuleActionBlock struct {
// How long a rule's block action will apply to subsequent requests. Can be
// specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to
// represent time format (seconds, minutes, hours, or days). Empty time intervals
// are not allowed.
ActionDuration string `json:"action_duration"`
// A custom HTTP status code that the WAAP returns if a rule blocks a request
//
// Any of 403, 405, 418, 429.
StatusCode int64 `json:"status_code"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ActionDuration respjson.Field
StatusCode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
WAAP block action behavior could be configured with response status code and action duration.
func (WaapFirewallRuleActionBlock) RawJSON ¶ added in v0.3.0
func (r WaapFirewallRuleActionBlock) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapFirewallRuleActionBlock) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapFirewallRuleActionBlock) UnmarshalJSON(data []byte) error
type WaapFirewallRuleCondition ¶ added in v0.3.0
type WaapFirewallRuleCondition struct {
// Match the incoming request against a single IP address
IP WaapFirewallRuleConditionIP `json:"ip"`
// Match the incoming request against an IP range
IPRange WaapFirewallRuleConditionIPRange `json:"ip_range"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IP respjson.Field
IPRange respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The criteria of an incoming web request and the models of the various values those criteria can take
func (WaapFirewallRuleCondition) RawJSON ¶ added in v0.3.0
func (r WaapFirewallRuleCondition) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapFirewallRuleCondition) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapFirewallRuleCondition) UnmarshalJSON(data []byte) error
type WaapFirewallRuleConditionIP ¶ added in v0.3.0
type WaapFirewallRuleConditionIP struct {
// A single IPv4 or IPv6 address
IPAddress string `json:"ip_address,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
IPAddress respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the incoming request against a single IP address
func (WaapFirewallRuleConditionIP) RawJSON ¶ added in v0.3.0
func (r WaapFirewallRuleConditionIP) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapFirewallRuleConditionIP) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapFirewallRuleConditionIP) UnmarshalJSON(data []byte) error
type WaapFirewallRuleConditionIPRange ¶ added in v0.3.0
type WaapFirewallRuleConditionIPRange struct {
// The lower bound IPv4 or IPv6 address to match against
LowerBound string `json:"lower_bound,required" format:"ipvanyaddress"`
// The upper bound IPv4 or IPv6 address to match against
UpperBound string `json:"upper_bound,required" format:"ipvanyaddress"`
// Whether or not to apply a boolean NOT operation to the rule's condition
Negation bool `json:"negation"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
LowerBound respjson.Field
UpperBound respjson.Field
Negation respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Match the incoming request against an IP range
func (WaapFirewallRuleConditionIPRange) RawJSON ¶ added in v0.3.0
func (r WaapFirewallRuleConditionIPRange) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapFirewallRuleConditionIPRange) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapFirewallRuleConditionIPRange) UnmarshalJSON(data []byte) error
type WaapGetAccountOverviewResponse ¶ added in v0.3.0
type WaapGetAccountOverviewResponse struct {
// The client ID
ID int64 `json:"id,required"`
// List of enabled features
Features []string `json:"features,required"`
// Quotas for the client
Quotas map[string]WaapGetAccountOverviewResponseQuota `json:"quotas,required"`
// Information about the WAAP service status
Service WaapGetAccountOverviewResponseService `json:"service,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Features respjson.Field
Quotas respjson.Field
Service respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents the WAAP service information for a client
func (WaapGetAccountOverviewResponse) RawJSON ¶ added in v0.3.0
func (r WaapGetAccountOverviewResponse) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapGetAccountOverviewResponse) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapGetAccountOverviewResponse) UnmarshalJSON(data []byte) error
type WaapGetAccountOverviewResponseQuota ¶ added in v0.3.0
type WaapGetAccountOverviewResponseQuota struct {
// The maximum allowed number of this resource
Allowed int64 `json:"allowed,required"`
// The current number of this resource
Current int64 `json:"current,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Allowed respjson.Field
Current respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapGetAccountOverviewResponseQuota) RawJSON ¶ added in v0.3.0
func (r WaapGetAccountOverviewResponseQuota) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapGetAccountOverviewResponseQuota) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapGetAccountOverviewResponseQuota) UnmarshalJSON(data []byte) error
type WaapGetAccountOverviewResponseService ¶ added in v0.3.0
type WaapGetAccountOverviewResponseService struct {
// Whether the service is enabled
Enabled bool `json:"enabled,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Enabled respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Information about the WAAP service status
func (WaapGetAccountOverviewResponseService) RawJSON ¶ added in v0.3.0
func (r WaapGetAccountOverviewResponseService) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapGetAccountOverviewResponseService) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapGetAccountOverviewResponseService) UnmarshalJSON(data []byte) error
type WaapIPCountryAttack ¶ added in v0.3.0
type WaapIPCountryAttack struct {
// The number of attacks from the specified IP address to the country
Count int64 `json:"count,required"`
// An ISO 3166-1 alpha-2 formatted string representing the country that was
// attacked
Country string `json:"country,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Country respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapIPCountryAttack) RawJSON ¶ added in v0.3.0
func (r WaapIPCountryAttack) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapIPCountryAttack) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapIPCountryAttack) UnmarshalJSON(data []byte) error
type WaapIPDDOSInfoModel ¶ added in v0.3.0
type WaapIPDDOSInfoModel struct {
// Indicates if the IP is tagged as a botnet client
BotnetClient bool `json:"botnet_client,required"`
// The time series data for the DDoS attacks from the IP address
TimeSeries []WaapIPDDOSInfoModelTimeSeries `json:"time_series,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BotnetClient respjson.Field
TimeSeries respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapIPDDOSInfoModel) RawJSON ¶ added in v0.3.0
func (r WaapIPDDOSInfoModel) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapIPDDOSInfoModel) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapIPDDOSInfoModel) UnmarshalJSON(data []byte) error
type WaapIPDDOSInfoModelTimeSeries ¶ added in v0.11.0
type WaapIPDDOSInfoModelTimeSeries struct {
// The number of attacks
Count int64 `json:"count,required"`
// The timestamp of the time series item as a POSIX timestamp
Timestamp int64 `json:"timestamp,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Timestamp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapIPDDOSInfoModelTimeSeries) RawJSON ¶ added in v0.11.0
func (r WaapIPDDOSInfoModelTimeSeries) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapIPDDOSInfoModelTimeSeries) UnmarshalJSON ¶ added in v0.11.0
func (r *WaapIPDDOSInfoModelTimeSeries) UnmarshalJSON(data []byte) error
type WaapIPInfo ¶ added in v0.3.0
type WaapIPInfo struct {
// The risk score of the IP address
//
// Any of "NO_RISK", "LOW", "MEDIUM", "HIGH", "EXTREME", "NOT_ENOUGH_DATA".
RiskScore WaapIPInfoRiskScore `json:"risk_score,required"`
// The tags associated with the IP address that affect the risk score
Tags []string `json:"tags,required"`
// The WHOIS information for the IP address
Whois WaapIPInfoWhois `json:"whois,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
RiskScore respjson.Field
Tags respjson.Field
Whois respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapIPInfo) RawJSON ¶ added in v0.3.0
func (r WaapIPInfo) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapIPInfo) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapIPInfo) UnmarshalJSON(data []byte) error
type WaapIPInfoCounts ¶ added in v0.3.0
type WaapIPInfoCounts struct {
// The number of requests from the IP address that were blocked
BlockedRequests int64 `json:"blocked_requests,required"`
// The total number of requests made by the IP address
TotalRequests int64 `json:"total_requests,required"`
// The number of unique sessions from the IP address
UniqueSessions int64 `json:"unique_sessions,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BlockedRequests respjson.Field
TotalRequests respjson.Field
UniqueSessions respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapIPInfoCounts) RawJSON ¶ added in v0.3.0
func (r WaapIPInfoCounts) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapIPInfoCounts) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapIPInfoCounts) UnmarshalJSON(data []byte) error
type WaapIPInfoRiskScore ¶ added in v0.3.0
type WaapIPInfoRiskScore string
The risk score of the IP address
const ( WaapIPInfoRiskScoreNoRisk WaapIPInfoRiskScore = "NO_RISK" WaapIPInfoRiskScoreLow WaapIPInfoRiskScore = "LOW" WaapIPInfoRiskScoreMedium WaapIPInfoRiskScore = "MEDIUM" WaapIPInfoRiskScoreHigh WaapIPInfoRiskScore = "HIGH" WaapIPInfoRiskScoreExtreme WaapIPInfoRiskScore = "EXTREME" WaapIPInfoRiskScoreNotEnoughData WaapIPInfoRiskScore = "NOT_ENOUGH_DATA" )
type WaapIPInfoWhois ¶ added in v0.3.0
type WaapIPInfoWhois struct {
// The abuse mail
AbuseMail string `json:"abuse_mail,nullable"`
// The CIDR
Cidr int64 `json:"cidr,nullable"`
// The country
Country string `json:"country,nullable"`
// The network description
NetDescription string `json:"net_description,nullable"`
// The network name
NetName string `json:"net_name,nullable"`
// The network range
NetRange string `json:"net_range,nullable"`
// The network type
NetType string `json:"net_type,nullable"`
// The organization ID
OrgID string `json:"org_id,nullable"`
// The organization name
OrgName string `json:"org_name,nullable"`
// The owner type
OwnerType string `json:"owner_type,nullable"`
// The RIR
Rir string `json:"rir,nullable"`
// The state
State string `json:"state,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AbuseMail respjson.Field
Cidr respjson.Field
Country respjson.Field
NetDescription respjson.Field
NetName respjson.Field
NetRange respjson.Field
NetType respjson.Field
OrgID respjson.Field
OrgName respjson.Field
OwnerType respjson.Field
Rir respjson.Field
State respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
The WHOIS information for the IP address
func (WaapIPInfoWhois) RawJSON ¶ added in v0.3.0
func (r WaapIPInfoWhois) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapIPInfoWhois) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapIPInfoWhois) UnmarshalJSON(data []byte) error
type WaapInsight ¶ added in v0.3.0
type WaapInsight struct {
// A generated unique identifier for the insight
ID string `json:"id,required" format:"uuid"`
// The description of the insight
Description string `json:"description,required"`
// The date and time the insight was first seen in ISO 8601 format
FirstSeen time.Time `json:"first_seen,required" format:"date-time"`
// The slug of the insight type
InsightType string `json:"insight_type,required"`
// A hash table of label names and values that apply to the insight
Labels map[string]string `json:"labels,required"`
// The date and time the insight was last seen in ISO 8601 format
LastSeen time.Time `json:"last_seen,required" format:"date-time"`
// The date and time the insight was last seen in ISO 8601 format
LastStatusChange time.Time `json:"last_status_change,required" format:"date-time"`
// The recommended action to perform to resolve the insight
Recommendation string `json:"recommendation,required"`
// The status of the insight
//
// Any of "OPEN", "ACKED", "CLOSED".
Status WaapInsightStatus `json:"status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Description respjson.Field
FirstSeen respjson.Field
InsightType respjson.Field
Labels respjson.Field
LastSeen respjson.Field
LastStatusChange respjson.Field
Recommendation respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapInsight) RawJSON ¶ added in v0.3.0
func (r WaapInsight) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapInsight) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapInsight) UnmarshalJSON(data []byte) error
type WaapInsightSilence ¶ added in v0.3.0
type WaapInsightSilence struct {
// A generated unique identifier for the silence
ID string `json:"id,required" format:"uuid"`
// The author of the silence
Author string `json:"author,required"`
// A comment explaining the reason for the silence
Comment string `json:"comment,required"`
// The date and time the silence expires in ISO 8601 format
ExpireAt time.Time `json:"expire_at,required" format:"date-time"`
// The slug of the insight type
InsightType string `json:"insight_type,required"`
// A hash table of label names and values that apply to the insight silence
Labels map[string]string `json:"labels,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Author respjson.Field
Comment respjson.Field
ExpireAt respjson.Field
InsightType respjson.Field
Labels respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapInsightSilence) RawJSON ¶ added in v0.3.0
func (r WaapInsightSilence) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapInsightSilence) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapInsightSilence) UnmarshalJSON(data []byte) error
type WaapInsightStatus ¶ added in v0.3.0
type WaapInsightStatus string
The status of the insight
const ( WaapInsightStatusOpen WaapInsightStatus = "OPEN" WaapInsightStatusAcked WaapInsightStatus = "ACKED" WaapInsightStatusClosed WaapInsightStatus = "CLOSED" )
type WaapInsightType ¶ added in v0.10.0
type WaapInsightType struct {
// The description of the insight type
Description string `json:"description,required"`
// The frequency of the insight type
InsightFrequency int64 `json:"insight_frequency,required"`
// The grouping dimensions of the insight type
InsightGroupingDimensions []string `json:"insight_grouping_dimensions,required"`
// The insight template
InsightTemplate string `json:"insight_template,required"`
// The labels of the insight type
Labels []string `json:"labels,required"`
// The name of the insight type
Name string `json:"name,required"`
// The recommendation template
RecommendationTemplate string `json:"recommendation_template,required"`
// The slug of the insight type
Slug string `json:"slug,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
InsightFrequency respjson.Field
InsightGroupingDimensions respjson.Field
InsightTemplate respjson.Field
Labels respjson.Field
Name respjson.Field
RecommendationTemplate respjson.Field
Slug respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapInsightType) RawJSON ¶ added in v0.10.0
func (r WaapInsightType) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapInsightType) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapInsightType) UnmarshalJSON(data []byte) error
type WaapOrganization ¶ added in v0.3.0
type WaapOrganization struct {
// The ID of an organization
ID int64 `json:"id,required"`
// The name of an organization
Name string `json:"name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents an IP range owner organization
func (WaapOrganization) RawJSON ¶ added in v0.3.0
func (r WaapOrganization) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapOrganization) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapOrganization) UnmarshalJSON(data []byte) error
type WaapPolicyMode ¶ added in v0.3.0
type WaapPolicyMode struct {
// Indicates if the security rule is active
Mode bool `json:"mode,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Mode respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents the mode of a security rule.
func (WaapPolicyMode) RawJSON ¶ added in v0.3.0
func (r WaapPolicyMode) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapPolicyMode) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapPolicyMode) UnmarshalJSON(data []byte) error
type WaapRequestDetails ¶ added in v0.3.0
type WaapRequestDetails struct {
// Request ID
ID string `json:"id,required"`
// Request action
Action string `json:"action,required"`
// List of common tags
CommonTags []WaapRequestDetailsCommonTag `json:"common_tags,required"`
// Content type of request
ContentType string `json:"content_type,required"`
// Domain name
Domain string `json:"domain,required"`
// Status code for http request
HTTPStatusCode int64 `json:"http_status_code,required"`
// HTTP version of request
HTTPVersion string `json:"http_version,required"`
// ID of challenge that was generated
IncidentID string `json:"incident_id,required"`
// Request method
Method string `json:"method,required"`
// Network details
Network WaapRequestDetailsNetwork `json:"network,required"`
// Request path
Path string `json:"path,required"`
// List of shield tags
PatternMatchedTags []WaapRequestDetailsPatternMatchedTag `json:"pattern_matched_tags,required"`
// The query string of the request
QueryString string `json:"query_string,required"`
// Reference ID to identify user sanction
ReferenceID string `json:"reference_id,required"`
// HTTP request headers
RequestHeaders map[string]any `json:"request_headers,required"`
// The time of the request
RequestTime time.Time `json:"request_time,required" format:"date-time"`
// The type of the request that generated an event
RequestType string `json:"request_type,required"`
// The real domain name
RequestedDomain string `json:"requested_domain,required"`
// Time took to process all request
ResponseTime string `json:"response_time,required"`
// The result of a request
//
// Any of "passed", "blocked", "suppressed", "".
Result WaapRequestDetailsResult `json:"result,required"`
// ID of the triggered rule
RuleID string `json:"rule_id,required"`
// Name of the triggered rule
RuleName string `json:"rule_name,required"`
// The HTTP scheme of the request that generated an event
Scheme string `json:"scheme,required"`
// The number requests in session
SessionRequestCount string `json:"session_request_count,required"`
// List of traffic types
TrafficTypes []string `json:"traffic_types,required"`
// User agent
UserAgent WaapRequestDetailsUserAgent `json:"user_agent,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Action respjson.Field
CommonTags respjson.Field
ContentType respjson.Field
Domain respjson.Field
HTTPStatusCode respjson.Field
HTTPVersion respjson.Field
IncidentID respjson.Field
Method respjson.Field
Network respjson.Field
Path respjson.Field
PatternMatchedTags respjson.Field
QueryString respjson.Field
ReferenceID respjson.Field
RequestHeaders respjson.Field
RequestTime respjson.Field
RequestType respjson.Field
RequestedDomain respjson.Field
ResponseTime respjson.Field
Result respjson.Field
RuleID respjson.Field
RuleName respjson.Field
Scheme respjson.Field
SessionRequestCount respjson.Field
TrafficTypes respjson.Field
UserAgent respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Request's details used when displaying a single request.
func (WaapRequestDetails) RawJSON ¶ added in v0.3.0
func (r WaapRequestDetails) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRequestDetails) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapRequestDetails) UnmarshalJSON(data []byte) error
type WaapRequestDetailsCommonTag ¶ added in v0.10.0
type WaapRequestDetailsCommonTag struct {
// Tag description information
Description string `json:"description,required"`
// The tag's display name
DisplayName string `json:"display_name,required"`
// Tag name
Tag string `json:"tag,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
DisplayName respjson.Field
Tag respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Common tag details
func (WaapRequestDetailsCommonTag) RawJSON ¶ added in v0.10.0
func (r WaapRequestDetailsCommonTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRequestDetailsCommonTag) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapRequestDetailsCommonTag) UnmarshalJSON(data []byte) error
type WaapRequestDetailsNetwork ¶ added in v0.10.0
type WaapRequestDetailsNetwork struct {
// Client IP
ClientIP string `json:"client_ip,required"`
// Country code
Country string `json:"country,required"`
// Organization details
Organization WaapRequestDetailsNetworkOrganization `json:"organization,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ClientIP respjson.Field
Country respjson.Field
Organization respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Network details
func (WaapRequestDetailsNetwork) RawJSON ¶ added in v0.10.0
func (r WaapRequestDetailsNetwork) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRequestDetailsNetwork) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapRequestDetailsNetwork) UnmarshalJSON(data []byte) error
type WaapRequestDetailsNetworkOrganization ¶ added in v0.10.0
type WaapRequestDetailsNetworkOrganization struct {
// Organization name
Name string `json:"name,required"`
// Network range
Subnet string `json:"subnet,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Name respjson.Field
Subnet respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Organization details
func (WaapRequestDetailsNetworkOrganization) RawJSON ¶ added in v0.10.0
func (r WaapRequestDetailsNetworkOrganization) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRequestDetailsNetworkOrganization) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapRequestDetailsNetworkOrganization) UnmarshalJSON(data []byte) error
type WaapRequestDetailsPatternMatchedTag ¶ added in v0.10.0
type WaapRequestDetailsPatternMatchedTag struct {
// Tag description information
Description string `json:"description,required"`
// The tag's display name
DisplayName string `json:"display_name,required"`
// The phase in which the tag was triggered: access -> Request, `header_filter` ->
// `response_header`, `body_filter` -> `response_body`
ExecutionPhase string `json:"execution_phase,required"`
// The entity to which the variable that triggered the tag belong to. For example:
// `request_headers`, uri, cookies etc.
Field string `json:"field,required"`
// The name of the variable which holds the value that triggered the tag
FieldName string `json:"field_name,required"`
// The name of the detected regexp pattern
PatternName string `json:"pattern_name,required"`
// The pattern which triggered the tag
PatternValue string `json:"pattern_value,required"`
// Tag name
Tag string `json:"tag,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
DisplayName respjson.Field
ExecutionPhase respjson.Field
Field respjson.Field
FieldName respjson.Field
PatternName respjson.Field
PatternValue respjson.Field
Tag respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Pattern matched tag details
func (WaapRequestDetailsPatternMatchedTag) RawJSON ¶ added in v0.10.0
func (r WaapRequestDetailsPatternMatchedTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRequestDetailsPatternMatchedTag) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapRequestDetailsPatternMatchedTag) UnmarshalJSON(data []byte) error
type WaapRequestDetailsResult ¶ added in v0.3.0
type WaapRequestDetailsResult string
The result of a request
const ( WaapRequestDetailsResultPassed WaapRequestDetailsResult = "passed" WaapRequestDetailsResultBlocked WaapRequestDetailsResult = "blocked" WaapRequestDetailsResultSuppressed WaapRequestDetailsResult = "suppressed" WaapRequestDetailsResultEmpty WaapRequestDetailsResult = "" )
type WaapRequestDetailsUserAgent ¶ added in v0.10.0
type WaapRequestDetailsUserAgent struct {
// User agent browser
BaseBrowser string `json:"base_browser,required"`
// User agent browser version
BaseBrowserVersion string `json:"base_browser_version,required"`
// Client from User agent header
Client string `json:"client,required"`
// User agent client type
ClientType string `json:"client_type,required"`
// User agent client version
ClientVersion string `json:"client_version,required"`
// User agent cpu
CPU string `json:"cpu,required"`
// User agent device
Device string `json:"device,required"`
// User agent device type
DeviceType string `json:"device_type,required"`
// User agent
FullString string `json:"full_string,required"`
// User agent os
Os string `json:"os,required"`
// User agent engine
RenderingEngine string `json:"rendering_engine,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
BaseBrowser respjson.Field
BaseBrowserVersion respjson.Field
Client respjson.Field
ClientType respjson.Field
ClientVersion respjson.Field
CPU respjson.Field
Device respjson.Field
DeviceType respjson.Field
FullString respjson.Field
Os respjson.Field
RenderingEngine respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
User agent
func (WaapRequestDetailsUserAgent) RawJSON ¶ added in v0.10.0
func (r WaapRequestDetailsUserAgent) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRequestDetailsUserAgent) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapRequestDetailsUserAgent) UnmarshalJSON(data []byte) error
type WaapRequestSummary ¶ added in v0.3.0
type WaapRequestSummary struct {
// Request's unique id
ID string `json:"id,required"`
// Action of the triggered rule
Action string `json:"action,required"`
// Client's IP address.
ClientIP string `json:"client_ip,required"`
// Country code
Country string `json:"country,required"`
// Domain name
Domain string `json:"domain,required"`
// HTTP method
Method string `json:"method,required"`
// Organization
Organization string `json:"organization,required"`
// Request path
Path string `json:"path,required"`
// The reference ID to a sanction that was given to a user.
ReferenceID string `json:"reference_id,required"`
// The UNIX timestamp in ms of the date a set of traffic counters was recorded
RequestTime int64 `json:"request_time,required"`
// Any of "passed", "blocked", "suppressed", "".
Result WaapRequestSummaryResult `json:"result,required"`
// The ID of the triggered rule.
RuleID string `json:"rule_id,required"`
// Name of the triggered rule
RuleName string `json:"rule_name,required"`
// Status code for http request
StatusCode int64 `json:"status_code,required"`
// Comma separated list of traffic types.
TrafficTypes string `json:"traffic_types,required"`
// User agent
UserAgent string `json:"user_agent,required"`
// Client from parsed User agent header
UserAgentClient string `json:"user_agent_client,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Action respjson.Field
ClientIP respjson.Field
Country respjson.Field
Domain respjson.Field
Method respjson.Field
Organization respjson.Field
Path respjson.Field
ReferenceID respjson.Field
RequestTime respjson.Field
Result respjson.Field
RuleID respjson.Field
RuleName respjson.Field
StatusCode respjson.Field
TrafficTypes respjson.Field
UserAgent respjson.Field
UserAgentClient respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Request summary used when displaying a list of requests
func (WaapRequestSummary) RawJSON ¶ added in v0.3.0
func (r WaapRequestSummary) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRequestSummary) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapRequestSummary) UnmarshalJSON(data []byte) error
type WaapRequestSummaryResult ¶ added in v0.3.0
type WaapRequestSummaryResult string
const ( WaapRequestSummaryResultPassed WaapRequestSummaryResult = "passed" WaapRequestSummaryResultBlocked WaapRequestSummaryResult = "blocked" WaapRequestSummaryResultSuppressed WaapRequestSummaryResult = "suppressed" WaapRequestSummaryResultEmpty WaapRequestSummaryResult = "" )
type WaapRuleBlockedRequests ¶ added in v0.3.0
type WaapRuleBlockedRequests struct {
// The action taken by the rule
Action string `json:"action,required"`
// The number of requests blocked by the rule
Count int64 `json:"count,required"`
// The name of the rule that blocked the request
RuleName string `json:"rule_name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Action respjson.Field
Count respjson.Field
RuleName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapRuleBlockedRequests) RawJSON ¶ added in v0.3.0
func (r WaapRuleBlockedRequests) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRuleBlockedRequests) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapRuleBlockedRequests) UnmarshalJSON(data []byte) error
type WaapRuleSet ¶ added in v0.3.0
type WaapRuleSet struct {
// Identifier of the rule set.
ID int64 `json:"id,required"`
// Detailed description of the rule set.
Description string `json:"description,required"`
// Indicates if the rule set is currently active.
IsActive bool `json:"is_active,required"`
// Name of the rule set.
Name string `json:"name,required"`
// Collection of tags associated with the rule set.
Tags []WaapRuleSetTag `json:"tags,required"`
// The resource slug associated with the rule set.
ResourceSlug string `json:"resource_slug,nullable"`
Rules []WaapRuleSetRule `json:"rules"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Description respjson.Field
IsActive respjson.Field
Name respjson.Field
Tags respjson.Field
ResourceSlug respjson.Field
Rules respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a custom rule set.
func (WaapRuleSet) RawJSON ¶ added in v0.3.0
func (r WaapRuleSet) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRuleSet) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapRuleSet) UnmarshalJSON(data []byte) error
type WaapRuleSetRule ¶ added in v0.10.0
type WaapRuleSetRule struct {
// Unique identifier for the security rule
ID string `json:"id,required"`
// Specifies the action taken by the WAAP upon rule activation
//
// Any of "Allow", "Block", "Captcha", "Gateway", "Handshake", "Monitor",
// "Composite".
Action string `json:"action,required"`
// Detailed description of the security rule
Description string `json:"description,required"`
// The rule set group name to which the rule belongs
Group string `json:"group,required"`
// Indicates if the security rule is active
Mode bool `json:"mode,required"`
// Name of the security rule
Name string `json:"name,required"`
// Identifier of the rule set to which the rule belongs
RuleSetID int64 `json:"rule_set_id,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Action respjson.Field
Description respjson.Field
Group respjson.Field
Mode respjson.Field
Name respjson.Field
RuleSetID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a configurable WAAP security rule, also known as a policy.
func (WaapRuleSetRule) RawJSON ¶ added in v0.10.0
func (r WaapRuleSetRule) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRuleSetRule) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapRuleSetRule) UnmarshalJSON(data []byte) error
type WaapRuleSetTag ¶ added in v0.3.0
type WaapRuleSetTag struct {
// Identifier of the tag.
ID int64 `json:"id,required"`
// Detailed description of the tag.
Description string `json:"description,required"`
// Name of the tag.
Name string `json:"name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
Description respjson.Field
Name respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
A single tag associated with a rule set.
func (WaapRuleSetTag) RawJSON ¶ added in v0.3.0
func (r WaapRuleSetTag) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapRuleSetTag) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapRuleSetTag) UnmarshalJSON(data []byte) error
type WaapService ¶
type WaapService struct {
Options []option.RequestOption
Statistics StatisticService
Domains DomainService
CustomPageSets CustomPageSetService
AdvancedRules AdvancedRuleService
Tags TagService
Organizations OrganizationService
Insights InsightService
IPInfo IPInfoService
}
WaapService contains methods and other services that help with interacting with the gcore 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 NewWaapService method instead.
func NewWaapService ¶
func NewWaapService(opts ...option.RequestOption) (r WaapService)
NewWaapService 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 (*WaapService) GetAccountOverview ¶ added in v0.3.0
func (r *WaapService) GetAccountOverview(ctx context.Context, opts ...option.RequestOption) (res *WaapGetAccountOverviewResponse, err error)
Get information about WAAP service for the client
type WaapStatisticItem ¶ added in v0.3.0
type WaapStatisticItem struct {
// The date and time for the statistic in ISO 8601 format
DateTime time.Time `json:"date_time,required" format:"date-time"`
// The value for the statistic. If there is no data for the given time, the value
// will be 0.
Value int64 `json:"value,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
DateTime respjson.Field
Value respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response model for the statistics item
func (WaapStatisticItem) RawJSON ¶ added in v0.3.0
func (r WaapStatisticItem) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapStatisticItem) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapStatisticItem) UnmarshalJSON(data []byte) error
type WaapStatisticsSeries ¶ added in v0.3.0
type WaapStatisticsSeries struct {
// Will be returned if `total_bytes` is requested in the metrics parameter
TotalBytes []WaapStatisticItem `json:"total_bytes,nullable"`
// Will be included if `total_requests` is requested in the metrics parameter
TotalRequests []WaapStatisticItem `json:"total_requests,nullable"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
TotalBytes respjson.Field
TotalRequests respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response model for the statistics series
func (WaapStatisticsSeries) RawJSON ¶ added in v0.3.0
func (r WaapStatisticsSeries) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapStatisticsSeries) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapStatisticsSeries) UnmarshalJSON(data []byte) error
type WaapSummaryDomain ¶
type WaapSummaryDomain struct {
// The domain ID
ID int64 `json:"id,required"`
// The date and time the domain was created in ISO 8601 format
CreatedAt time.Time `json:"created_at,required" format:"date-time"`
// The ID of the custom page set
CustomPageSet int64 `json:"custom_page_set,required"`
// The domain name
Name string `json:"name,required"`
// The different statuses a domain can have
//
// Any of "active", "bypass", "monitor", "locked".
Status WaapSummaryDomainStatus `json:"status,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
CreatedAt respjson.Field
CustomPageSet respjson.Field
Name respjson.Field
Status respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents a WAAP domain when getting a list of domains.
func (WaapSummaryDomain) RawJSON ¶
func (r WaapSummaryDomain) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapSummaryDomain) UnmarshalJSON ¶
func (r *WaapSummaryDomain) UnmarshalJSON(data []byte) error
type WaapSummaryDomainStatus ¶ added in v0.10.0
type WaapSummaryDomainStatus string
The different statuses a domain can have
const ( WaapSummaryDomainStatusActive WaapSummaryDomainStatus = "active" WaapSummaryDomainStatusBypass WaapSummaryDomainStatus = "bypass" WaapSummaryDomainStatusMonitor WaapSummaryDomainStatus = "monitor" WaapSummaryDomainStatusLocked WaapSummaryDomainStatus = "locked" )
type WaapTag ¶ added in v0.3.0
type WaapTag struct {
// A tag's human readable description
Description string `json:"description,required"`
// The name of a tag that should be used in a WAAP rule condition
Name string `json:"name,required"`
// The display name of the tag
ReadableName string `json:"readable_name,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Description respjson.Field
Name respjson.Field
ReadableName respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Tags provide shortcuts for the rules used in WAAP policies for the creation of more complex WAAP rules.
func (*WaapTag) UnmarshalJSON ¶ added in v0.3.0
type WaapTaskID ¶ added in v0.10.0
type WaapTaskID struct {
// The task ID
ID string `json:"id,required" format:"uuid"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
ID respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Response model for the task result ID
func (WaapTaskID) RawJSON ¶ added in v0.10.0
func (r WaapTaskID) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapTaskID) UnmarshalJSON ¶ added in v0.10.0
func (r *WaapTaskID) UnmarshalJSON(data []byte) error
type WaapTimeSeriesAttack ¶ added in v0.3.0
type WaapTimeSeriesAttack struct {
// The type of attack
AttackType string `json:"attack_type,required"`
// The time series data
Values []WaapTimeSeriesAttackValue `json:"values,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
AttackType respjson.Field
Values respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapTimeSeriesAttack) RawJSON ¶ added in v0.3.0
func (r WaapTimeSeriesAttack) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapTimeSeriesAttack) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapTimeSeriesAttack) UnmarshalJSON(data []byte) error
type WaapTimeSeriesAttackValue ¶ added in v0.3.0
type WaapTimeSeriesAttackValue struct {
// The number of attacks
Count int64 `json:"count,required"`
// The timestamp of the time series item as a POSIX timestamp
Timestamp int64 `json:"timestamp,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
Timestamp respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapTimeSeriesAttackValue) RawJSON ¶ added in v0.3.0
func (r WaapTimeSeriesAttackValue) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapTimeSeriesAttackValue) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapTimeSeriesAttackValue) UnmarshalJSON(data []byte) error
type WaapTopSession ¶ added in v0.3.0
type WaapTopSession struct {
// The number of blocked requests in the session
Blocked int64 `json:"blocked,required"`
// The duration of the session in seconds
Duration float64 `json:"duration,required"`
// The number of requests in the session
Requests int64 `json:"requests,required"`
// The session ID
SessionID string `json:"session_id,required" format:"uuid"`
// The start time of the session as a POSIX timestamp
StartTime time.Time `json:"start_time,required" format:"date-time"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Blocked respjson.Field
Duration respjson.Field
Requests respjson.Field
SessionID respjson.Field
StartTime respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapTopSession) RawJSON ¶ added in v0.3.0
func (r WaapTopSession) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapTopSession) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapTopSession) UnmarshalJSON(data []byte) error
type WaapTopURL ¶ added in v0.3.0
type WaapTopURL struct {
// The number of attacks to the URL
Count int64 `json:"count,required"`
// The URL that was attacked
URL string `json:"url,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
URL respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapTopURL) RawJSON ¶ added in v0.3.0
func (r WaapTopURL) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapTopURL) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapTopURL) UnmarshalJSON(data []byte) error
type WaapTopUserAgent ¶ added in v0.3.0
type WaapTopUserAgent struct {
// The number of requests made with the user agent
Count int64 `json:"count,required"`
// The user agent that was used
UserAgent string `json:"user_agent,required"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Count respjson.Field
UserAgent respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
func (WaapTopUserAgent) RawJSON ¶ added in v0.3.0
func (r WaapTopUserAgent) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapTopUserAgent) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapTopUserAgent) UnmarshalJSON(data []byte) error
type WaapTrafficMetrics ¶ added in v0.3.0
type WaapTrafficMetrics struct {
// UNIX timestamp indicating when the traffic data was recorded
Timestamp int64 `json:"timestamp,required"`
// Number of AJAX requests made
Ajax int64 `json:"ajax"`
// Number of API requests made
API int64 `json:"api"`
// Number of requests allowed through custom rules
CustomAllowed int64 `json:"customAllowed"`
// Number of requests blocked due to custom rules
CustomBlocked int64 `json:"customBlocked"`
// Number of DDoS attack attempts successfully blocked
DDOSBlocked int64 `json:"ddosBlocked"`
// Number of requests triggering monitoring actions
Monitored int64 `json:"monitored"`
// Number of successful HTTP 2xx responses from the origin server
Origin2xx int64 `json:"origin2xx"`
// Number of HTTP 3xx redirects issued by the origin server
Origin3xx int64 `json:"origin3xx"`
// Number of HTTP 4xx errors from the origin server
OriginError4xx int64 `json:"originError4xx"`
// Number of HTTP 5xx errors from the origin server
OriginError5xx int64 `json:"originError5xx"`
// Number of timeouts experienced at the origin server
OriginTimeout int64 `json:"originTimeout"`
// Number of requests served directly by the origin server
PassedToOrigin int64 `json:"passedToOrigin"`
// Number of requests allowed by security policies
PolicyAllowed int64 `json:"policyAllowed"`
// Number of requests blocked by security policies
PolicyBlocked int64 `json:"policyBlocked"`
// Average origin server response time in milliseconds
ResponseTime int64 `json:"responseTime"`
// Number of static asset requests
Static int64 `json:"static"`
// Total number of requests
Total int64 `json:"total"`
// Requests resulting in neither blocks nor sanctions
Uncategorized int64 `json:"uncategorized"`
// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
JSON struct {
Timestamp respjson.Field
Ajax respjson.Field
API respjson.Field
CustomAllowed respjson.Field
CustomBlocked respjson.Field
DDOSBlocked respjson.Field
Monitored respjson.Field
Origin2xx respjson.Field
Origin3xx respjson.Field
OriginError4xx respjson.Field
OriginError5xx respjson.Field
OriginTimeout respjson.Field
PassedToOrigin respjson.Field
PolicyAllowed respjson.Field
PolicyBlocked respjson.Field
ResponseTime respjson.Field
Static respjson.Field
Total respjson.Field
Uncategorized respjson.Field
ExtraFields map[string]respjson.Field
// contains filtered or unexported fields
} `json:"-"`
}
Represents the traffic metrics for a domain at a given time window
func (WaapTrafficMetrics) RawJSON ¶ added in v0.3.0
func (r WaapTrafficMetrics) RawJSON() string
Returns the unmodified JSON received from the API
func (*WaapTrafficMetrics) UnmarshalJSON ¶ added in v0.3.0
func (r *WaapTrafficMetrics) UnmarshalJSON(data []byte) error
Source Files
¶
- advancedrule.go
- aliases.go
- custompageset.go
- domain.go
- domainadvancedrule.go
- domainapidiscovery.go
- domainapipath.go
- domainapipathgroup.go
- domaincustomrule.go
- domainfirewallrule.go
- domaininsight.go
- domaininsightsilence.go
- domainsetting.go
- domainstatistic.go
- insight.go
- ipinfo.go
- ipinfometric.go
- organization.go
- statistic.go
- tag.go
- waap.go