waap

package
v0.64.0 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: Apache-2.0 Imports: 17 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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" api:"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

Retrieve an advanced rules descriptor

type AnalyticsGetDetailedEventsParams added in v0.62.0

type AnalyticsGetDetailedEventsParams struct {
	// Filter data items starting from a specified date in ISO 8601 format
	Start string `query:"start" api:"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:"-"`
	// True selects events with applied overrides; false excludes them. Omit to include
	// both.
	HasPolicyOverride param.Opt[bool] `query:"has_policy_override,omitzero" json:"-"`
	// Cursor value to fetch next page of events log.
	Next param.Opt[string] `query:"next,omitzero" json:"-"`
	// Number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter data by the ASN (Autonomous System Number) of the originating IP address.
	// Not supported by `/v1/analytics/requests`.
	Asns []int64 `query:"asns,omitzero" json:"-"`
	// Filter data by a country code of the originating IP address in ISO 3166-1
	// alpha-2 format.
	Countries []string `query:"countries,omitzero" json:"-"`
	// Filter data by decision.
	//
	// Any of "blocked", "monitored", "allowed", "passed".
	Decision []string `query:"decision,omitzero" json:"-"`
	// List of domain IDs. Empty list means all domains belonging to the current
	// account.
	Domains []int64 `query:"domains,omitzero" json:"-"`
	// Exclude data by the ASN (Autonomous System Number) of the originating IP
	// address. Not supported by `/v1/analytics/requests`.
	ExcludeAsns []int64 `query:"exclude_asns,omitzero" json:"-"`
	// Exclude data by a country code of the originating IP address in ISO 3166-1
	// alpha-2 format.
	ExcludeCountries []string `query:"exclude_countries,omitzero" json:"-"`
	// Exclude entries that match any of the given decisions.
	//
	// Any of "blocked", "monitored", "allowed", "passed".
	ExcludeDecision []string `query:"exclude_decision,omitzero" json:"-"`
	// Exclude data by domain ID.
	ExcludeDomains []int64 `query:"exclude_domains,omitzero" json:"-"`
	// Exclude entries with any of the given HTTP methods.
	//
	// Any of "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE".
	ExcludeHTTPMethods []string `query:"exclude_http_methods,omitzero" json:"-"`
	// Exclude traffic data by client IP.
	ExcludeIPs []string `query:"exclude_ips,omitzero" format:"ipvanyaddress" json:"-"`
	// Exclude entries whose JA3 TLS client fingerprint matches any of the supplied
	// values. Each value must be exactly 32 hexadecimal characters, mixed case
	// allowed, normalized to lowercase. Supply multiple values to exclude any of them.
	// Omit the parameter to apply no JA3 exclusion.
	ExcludeJa3 []string `query:"exclude_ja3,omitzero" json:"-"`
	// Exclude entries whose JA4 TLS client fingerprint equals any of the supplied
	// values. An item must match the JA4 form `<ja4_a>_<ja4_b>_<ja4_c>` (a
	// 10-character prefix and two 12-character hexadecimal hashes, mixed case allowed,
	// normalized to lowercase). Omit the parameter to apply no JA4 exclusion.
	ExcludeJa4 []string `query:"exclude_ja4,omitzero" json:"-"`
	// Exclude entries that match any of the given optional action values.
	//
	// Any of "captcha", "challenge".
	ExcludeOptionalAction []string `query:"exclude_optional_action,omitzero" json:"-"`
	// Exclude entries whose organization exactly equals any supplied value. Omit or
	// provide an empty list to apply no organization exclusion.
	ExcludeOrganizations []string `query:"exclude_organizations,omitzero" json:"-"`
	// Exclude entries that match the given URL path pattern; '\*' is wildcard.
	ExcludePath []string `query:"exclude_path,omitzero" json:"-"`
	// Exclude data by reference IDs.
	ExcludeReferenceIDs []string `query:"exclude_reference_ids,omitzero" json:"-"`
	// Exclude data by request IDs.
	ExcludeRequestIDs []string `query:"exclude_request_ids,omitzero" json:"-"`
	// Exclude data by name of a security rule matched the request.
	ExcludeSecurityRuleNames []string `query:"exclude_security_rule_names,omitzero" json:"-"`
	// Exclude data by session IDs.
	ExcludeSessionIDs []string `query:"exclude_session_ids,omitzero" json:"-"`
	// Exclude entries with any of the given HTTP response status codes.
	ExcludeStatusCodes []int64 `query:"exclude_status_codes,omitzero" json:"-"`
	// Exclude entries whose tag exactly equals any supplied value. Omit or provide an
	// empty list to apply no tag exclusion.
	ExcludeTags []string `query:"exclude_tags,omitzero" json:"-"`
	// Exclude entries whose user agent contains any of the supplied texts,
	// case-insensitive partial match. Omit or provide an empty list to apply no user
	// agent text exclusion.
	ExcludeUserAgent []string `query:"exclude_user_agent,omitzero" json:"-"`
	// Exclude entries whose parsed user agent client exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent client exclusion.
	ExcludeUserAgentClients []string `query:"exclude_user_agent_clients,omitzero" json:"-"`
	// Exclude entries whose parsed user agent device exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent device exclusion.
	ExcludeUserAgentDevices []string `query:"exclude_user_agent_devices,omitzero" json:"-"`
	// Filter by HTTP methods
	//
	// Any of "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE".
	HTTPMethods []string `query:"http_methods,omitzero" json:"-"`
	// Filter traffic data by client IP.
	IPs []string `query:"ips,omitzero" format:"ipvanyaddress" json:"-"`
	// Filter by JA3 TLS client fingerprint. Each value must be exactly 32 hexadecimal
	// characters, mixed case allowed, normalized to lowercase. Supply multiple values
	// to match any of them. Omit the parameter to apply no JA3 filter.
	Ja3 []string `query:"ja3,omitzero" json:"-"`
	// Filter by JA4 TLS client fingerprint. When present, the value must match the JA4
	// form `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character prefix and two 12-character
	// hexadecimal hashes, mixed case allowed, normalized to lowercase). Supply
	// multiple values to match any of them. Omit the parameter entirely to apply no
	// JA4 filter.
	Ja4 []string `query:"ja4,omitzero" json:"-"`
	// Filter data by optional action.
	//
	// Any of "captcha", "challenge".
	OptionalAction []string `query:"optional_action,omitzero" json:"-"`
	// Result sorting order.
	//
	// Any of "request_time.asc", "request_time.desc".
	OrderBy AnalyticsGetDetailedEventsParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// Include entries whose organization exactly equals any supplied value. Omit or
	// provide an empty list to apply no organization filter.
	Organizations []string `query:"organizations,omitzero" json:"-"`
	// Filter by URL path. '\*' is wildcard.
	Path []string `query:"path,omitzero" json:"-"`
	// Filter data by reference IDs.
	ReferenceIDs []string `query:"reference_ids,omitzero" json:"-"`
	// Filter data by request IDs.
	RequestIDs []string `query:"request_ids,omitzero" json:"-"`
	// Filter data by name of a security rule matched the request.
	SecurityRuleNames []string `query:"security_rule_names,omitzero" json:"-"`
	// Filter data by session IDs.
	SessionIDs []string `query:"session_ids,omitzero" json:"-"`
	// Filter data by HTTP response status code.
	StatusCodes []int64 `query:"status_codes,omitzero" json:"-"`
	// Include entries whose tag exactly equals any supplied value. Omit or provide an
	// empty list to apply no tag filter.
	Tags []string `query:"tags,omitzero" json:"-"`
	// Include entries that have any of the given 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:"-"`
	// Include entries whose user agent contains any of the supplied texts,
	// case-insensitive partial match. Omit or provide an empty list to apply no user
	// agent text filter.
	UserAgent []string `query:"user_agent,omitzero" json:"-"`
	// Include entries whose parsed user agent client exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent client filter.
	UserAgentClients []string `query:"user_agent_clients,omitzero" json:"-"`
	// Include entries whose parsed user agent device exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent device filter.
	UserAgentDevices []string `query:"user_agent_devices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AnalyticsGetDetailedEventsParams) URLQuery added in v0.62.0

func (r AnalyticsGetDetailedEventsParams) URLQuery() (v url.Values, err error)

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

type AnalyticsGetDetailedEventsParamsOrderBy added in v0.62.0

type AnalyticsGetDetailedEventsParamsOrderBy string

Result sorting order.

const (
	AnalyticsGetDetailedEventsParamsOrderByRequestTimeAsc  AnalyticsGetDetailedEventsParamsOrderBy = "request_time.asc"
	AnalyticsGetDetailedEventsParamsOrderByRequestTimeDesc AnalyticsGetDetailedEventsParamsOrderBy = "request_time.desc"
)

type AnalyticsGetEventStatisticsParams added in v0.39.0

type AnalyticsGetEventStatisticsParams struct {
	// Filter data items starting from a specified date in ISO 8601 format
	Start string `query:"start" api:"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:"-"`
	// List of domain IDs. Empty list means all domains belonging to the current
	// account.
	Domains []int64 `query:"domains,omitzero" json:"-"`
	// Filter statistics by client IP addresses (max 10).
	IPs []string `query:"ips,omitzero" format:"ipvanyaddress" json:"-"`
	// Ordering applied to the ranked points within the dimension. `total.desc` ranks
	// by total event count descending; `threats.desc` ranks by threat (blocked and
	// monitored) event count descending.
	//
	// Any of "total.desc", "threats.desc".
	OrderBy AnalyticsGetEventStatisticsParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// Filter data by name of a security rule matched the request.
	SecurityRuleNames []string `query:"security_rule_names,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AnalyticsGetEventStatisticsParams) URLQuery added in v0.39.0

func (r AnalyticsGetEventStatisticsParams) URLQuery() (v url.Values, err error)

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

type AnalyticsGetEventStatisticsParamsDimension added in v0.39.0

type AnalyticsGetEventStatisticsParamsDimension string

A request characteristics dimension

const (
	AnalyticsGetEventStatisticsParamsDimensionCountry   AnalyticsGetEventStatisticsParamsDimension = "country"
	AnalyticsGetEventStatisticsParamsDimensionRule      AnalyticsGetEventStatisticsParamsDimension = "rule"
	AnalyticsGetEventStatisticsParamsDimensionOrg       AnalyticsGetEventStatisticsParamsDimension = "org"
	AnalyticsGetEventStatisticsParamsDimensionIP        AnalyticsGetEventStatisticsParamsDimension = "ip"
	AnalyticsGetEventStatisticsParamsDimensionUseragent AnalyticsGetEventStatisticsParamsDimension = "useragent"
	AnalyticsGetEventStatisticsParamsDimensionTarget    AnalyticsGetEventStatisticsParamsDimension = "target"
)

type AnalyticsGetEventStatisticsParamsOrderBy added in v0.51.0

type AnalyticsGetEventStatisticsParamsOrderBy string

Ordering applied to the ranked points within the dimension. `total.desc` ranks by total event count descending; `threats.desc` ranks by threat (blocked and monitored) event count descending.

const (
	AnalyticsGetEventStatisticsParamsOrderByTotalDesc   AnalyticsGetEventStatisticsParamsOrderBy = "total.desc"
	AnalyticsGetEventStatisticsParamsOrderByThreatsDesc AnalyticsGetEventStatisticsParamsOrderBy = "threats.desc"
)

type AnalyticsGetEventsParams added in v0.60.0

type AnalyticsGetEventsParams struct {
	// Filter data items starting from a specified date in ISO 8601 format
	Start string `query:"start" api:"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:"-"`
	// True selects events with applied overrides; false excludes them. Omit to include
	// both.
	HasPolicyOverride param.Opt[bool] `query:"has_policy_override,omitzero" json:"-"`
	// Cursor value to fetch next page of events log.
	Next param.Opt[string] `query:"next,omitzero" json:"-"`
	// Number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter data by the ASN (Autonomous System Number) of the originating IP address.
	// Not supported by `/v1/analytics/requests`.
	Asns []int64 `query:"asns,omitzero" json:"-"`
	// Filter data by a country code of the originating IP address in ISO 3166-1
	// alpha-2 format.
	Countries []string `query:"countries,omitzero" json:"-"`
	// Filter data by decision.
	//
	// Any of "blocked", "monitored", "allowed", "passed".
	Decision []string `query:"decision,omitzero" json:"-"`
	// List of domain IDs. Empty list means all domains belonging to the current
	// account.
	Domains []int64 `query:"domains,omitzero" json:"-"`
	// Exclude data by the ASN (Autonomous System Number) of the originating IP
	// address. Not supported by `/v1/analytics/requests`.
	ExcludeAsns []int64 `query:"exclude_asns,omitzero" json:"-"`
	// Exclude data by a country code of the originating IP address in ISO 3166-1
	// alpha-2 format.
	ExcludeCountries []string `query:"exclude_countries,omitzero" json:"-"`
	// Exclude entries that match any of the given decisions.
	//
	// Any of "blocked", "monitored", "allowed", "passed".
	ExcludeDecision []string `query:"exclude_decision,omitzero" json:"-"`
	// Exclude data by domain ID.
	ExcludeDomains []int64 `query:"exclude_domains,omitzero" json:"-"`
	// Exclude entries with any of the given HTTP methods.
	//
	// Any of "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE".
	ExcludeHTTPMethods []string `query:"exclude_http_methods,omitzero" json:"-"`
	// Exclude traffic data by client IP.
	ExcludeIPs []string `query:"exclude_ips,omitzero" format:"ipvanyaddress" json:"-"`
	// Exclude entries whose JA3 TLS client fingerprint matches any of the supplied
	// values. Each value must be exactly 32 hexadecimal characters, mixed case
	// allowed, normalized to lowercase. Supply multiple values to exclude any of them.
	// Omit the parameter to apply no JA3 exclusion.
	ExcludeJa3 []string `query:"exclude_ja3,omitzero" json:"-"`
	// Exclude entries whose JA4 TLS client fingerprint equals any of the supplied
	// values. An item must match the JA4 form `<ja4_a>_<ja4_b>_<ja4_c>` (a
	// 10-character prefix and two 12-character hexadecimal hashes, mixed case allowed,
	// normalized to lowercase). Omit the parameter to apply no JA4 exclusion.
	ExcludeJa4 []string `query:"exclude_ja4,omitzero" json:"-"`
	// Exclude entries that match any of the given optional action values.
	//
	// Any of "captcha", "challenge".
	ExcludeOptionalAction []string `query:"exclude_optional_action,omitzero" json:"-"`
	// Exclude entries whose organization exactly equals any supplied value. Omit or
	// provide an empty list to apply no organization exclusion.
	ExcludeOrganizations []string `query:"exclude_organizations,omitzero" json:"-"`
	// Exclude entries that match the given URL path pattern; '\*' is wildcard.
	ExcludePath []string `query:"exclude_path,omitzero" json:"-"`
	// Exclude data by reference IDs.
	ExcludeReferenceIDs []string `query:"exclude_reference_ids,omitzero" json:"-"`
	// Exclude data by request IDs.
	ExcludeRequestIDs []string `query:"exclude_request_ids,omitzero" json:"-"`
	// Exclude data by name of a security rule matched the request.
	ExcludeSecurityRuleNames []string `query:"exclude_security_rule_names,omitzero" json:"-"`
	// Exclude data by session IDs.
	ExcludeSessionIDs []string `query:"exclude_session_ids,omitzero" json:"-"`
	// Exclude entries with any of the given HTTP response status codes.
	ExcludeStatusCodes []int64 `query:"exclude_status_codes,omitzero" json:"-"`
	// Exclude entries whose tag exactly equals any supplied value. Omit or provide an
	// empty list to apply no tag exclusion.
	ExcludeTags []string `query:"exclude_tags,omitzero" json:"-"`
	// Exclude entries whose user agent contains any of the supplied texts,
	// case-insensitive partial match. Omit or provide an empty list to apply no user
	// agent text exclusion.
	ExcludeUserAgent []string `query:"exclude_user_agent,omitzero" json:"-"`
	// Exclude entries whose parsed user agent client exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent client exclusion.
	ExcludeUserAgentClients []string `query:"exclude_user_agent_clients,omitzero" json:"-"`
	// Exclude entries whose parsed user agent device exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent device exclusion.
	ExcludeUserAgentDevices []string `query:"exclude_user_agent_devices,omitzero" json:"-"`
	// Filter by HTTP methods
	//
	// Any of "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE".
	HTTPMethods []string `query:"http_methods,omitzero" json:"-"`
	// Filter traffic data by client IP.
	IPs []string `query:"ips,omitzero" format:"ipvanyaddress" json:"-"`
	// Filter by JA3 TLS client fingerprint. Each value must be exactly 32 hexadecimal
	// characters, mixed case allowed, normalized to lowercase. Supply multiple values
	// to match any of them. Omit the parameter to apply no JA3 filter.
	Ja3 []string `query:"ja3,omitzero" json:"-"`
	// Filter by JA4 TLS client fingerprint. When present, the value must match the JA4
	// form `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character prefix and two 12-character
	// hexadecimal hashes, mixed case allowed, normalized to lowercase). Supply
	// multiple values to match any of them. Omit the parameter entirely to apply no
	// JA4 filter.
	Ja4 []string `query:"ja4,omitzero" json:"-"`
	// Filter data by optional action.
	//
	// Any of "captcha", "challenge".
	OptionalAction []string `query:"optional_action,omitzero" json:"-"`
	// Result sorting order.
	//
	// Any of "request_time.asc", "request_time.desc".
	OrderBy AnalyticsGetEventsParamsOrderBy `query:"order_by,omitzero" json:"-"`
	// Include entries whose organization exactly equals any supplied value. Omit or
	// provide an empty list to apply no organization filter.
	Organizations []string `query:"organizations,omitzero" json:"-"`
	// Filter by URL path. '\*' is wildcard.
	Path []string `query:"path,omitzero" json:"-"`
	// Filter data by reference IDs.
	ReferenceIDs []string `query:"reference_ids,omitzero" json:"-"`
	// Filter data by request IDs.
	RequestIDs []string `query:"request_ids,omitzero" json:"-"`
	// Filter data by name of a security rule matched the request.
	SecurityRuleNames []string `query:"security_rule_names,omitzero" json:"-"`
	// Filter data by session IDs.
	SessionIDs []string `query:"session_ids,omitzero" json:"-"`
	// Filter data by HTTP response status code.
	StatusCodes []int64 `query:"status_codes,omitzero" json:"-"`
	// Include entries whose tag exactly equals any supplied value. Omit or provide an
	// empty list to apply no tag filter.
	Tags []string `query:"tags,omitzero" json:"-"`
	// Include entries that have any of the given 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:"-"`
	// Include entries whose user agent contains any of the supplied texts,
	// case-insensitive partial match. Omit or provide an empty list to apply no user
	// agent text filter.
	UserAgent []string `query:"user_agent,omitzero" json:"-"`
	// Include entries whose parsed user agent client exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent client filter.
	UserAgentClients []string `query:"user_agent_clients,omitzero" json:"-"`
	// Include entries whose parsed user agent device exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent device filter.
	UserAgentDevices []string `query:"user_agent_devices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AnalyticsGetEventsParams) URLQuery added in v0.60.0

func (r AnalyticsGetEventsParams) URLQuery() (v url.Values, err error)

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

type AnalyticsGetEventsParamsOrderBy added in v0.60.0

type AnalyticsGetEventsParamsOrderBy string

Result sorting order.

const (
	AnalyticsGetEventsParamsOrderByRequestTimeAsc  AnalyticsGetEventsParamsOrderBy = "request_time.asc"
	AnalyticsGetEventsParamsOrderByRequestTimeDesc AnalyticsGetEventsParamsOrderBy = "request_time.desc"
)

type AnalyticsGetFiltersParams added in v0.50.0

type AnalyticsGetFiltersParams struct {
	// Filter data items starting from a specified date in ISO 8601 format
	Start string `query:"start" api:"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:"-"`
	// Case-insensitive partial autocomplete pattern matched against the value name by
	// the value provider. Must be between 2 and 100 characters; empty or omitted
	// returns the available suggestions for the current account and time range.
	Name param.Opt[string] `query:"name,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:"-"`
	// List of domain IDs. Empty list means all domains belonging to the current
	// account.
	Domains []int64 `query:"domains,omitzero" json:"-"`
	// Suggestion ordering. `count` sorts by observed occurrence count descending (most
	// frequent first) with value as a tie breaker; `value` sorts alphabetically by
	// value ascending with count as a tie breaker.
	//
	// Any of "count", "value".
	Ordering AnalyticsGetFiltersParamsOrdering `query:"ordering,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AnalyticsGetFiltersParams) URLQuery added in v0.50.0

func (r AnalyticsGetFiltersParams) URLQuery() (v url.Values, err error)

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

type AnalyticsGetFiltersParamsOrdering added in v0.50.0

type AnalyticsGetFiltersParamsOrdering string

Suggestion ordering. `count` sorts by observed occurrence count descending (most frequent first) with value as a tie breaker; `value` sorts alphabetically by value ascending with count as a tie breaker.

const (
	AnalyticsGetFiltersParamsOrderingCount AnalyticsGetFiltersParamsOrdering = "count"
	AnalyticsGetFiltersParamsOrderingValue AnalyticsGetFiltersParamsOrdering = "value"
)

type AnalyticsGetFiltersParamsType added in v0.50.0

type AnalyticsGetFiltersParamsType string

Parsed user-agent field type.

const (
	AnalyticsGetFiltersParamsTypeUserAgentClients AnalyticsGetFiltersParamsType = "user-agent-clients"
	AnalyticsGetFiltersParamsTypeUserAgentDevices AnalyticsGetFiltersParamsType = "user-agent-devices"
	AnalyticsGetFiltersParamsTypeOrganizations    AnalyticsGetFiltersParamsType = "organizations"
)

type AnalyticsGetRequestsParams added in v0.39.0

type AnalyticsGetRequestsParams struct {
	// Filter data items starting from a specified date in ISO 8601 format
	Start string `query:"start" api:"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:"-"`
	// True selects requests with applied overrides; false excludes them. Omit to
	// include both.
	HasPolicyOverride param.Opt[bool] `query:"has_policy_override,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:"-"`
	// Results sorting order.
	Ordering param.Opt[string] `query:"ordering,omitzero" json:"-"`
	// Filter data by the ASN (Autonomous System Number) of the originating IP address.
	// Not supported by `/v1/analytics/requests`.
	Asns []int64 `query:"asns,omitzero" json:"-"`
	// Filter data by a country code of the originating IP address in ISO 3166-1
	// alpha-2 format.
	Countries []string `query:"countries,omitzero" json:"-"`
	// Filter data by decision.
	//
	// Any of "blocked", "monitored", "allowed", "passed".
	Decision []string `query:"decision,omitzero" json:"-"`
	// List of domain IDs. Empty list means all domains belonging to the current
	// account.
	Domains []int64 `query:"domains,omitzero" json:"-"`
	// Exclude data by the ASN (Autonomous System Number) of the originating IP
	// address. Not supported by `/v1/analytics/requests`.
	ExcludeAsns []int64 `query:"exclude_asns,omitzero" json:"-"`
	// Exclude data by a country code of the originating IP address in ISO 3166-1
	// alpha-2 format.
	ExcludeCountries []string `query:"exclude_countries,omitzero" json:"-"`
	// Exclude entries that match any of the given decisions.
	//
	// Any of "blocked", "monitored", "allowed", "passed".
	ExcludeDecision []string `query:"exclude_decision,omitzero" json:"-"`
	// Exclude data by domain ID.
	ExcludeDomains []int64 `query:"exclude_domains,omitzero" json:"-"`
	// Exclude entries with any of the given HTTP methods.
	//
	// Any of "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE".
	ExcludeHTTPMethods []string `query:"exclude_http_methods,omitzero" json:"-"`
	// Exclude traffic data by client IP.
	ExcludeIPs []string `query:"exclude_ips,omitzero" format:"ipvanyaddress" json:"-"`
	// Exclude entries whose JA3 TLS client fingerprint matches any of the supplied
	// values. Each value must be exactly 32 hexadecimal characters, mixed case
	// allowed, normalized to lowercase. Supply multiple values to exclude any of them.
	// Omit the parameter to apply no JA3 exclusion.
	ExcludeJa3 []string `query:"exclude_ja3,omitzero" json:"-"`
	// Exclude entries whose JA4 TLS client fingerprint equals any of the supplied
	// values. An item must match the JA4 form `<ja4_a>_<ja4_b>_<ja4_c>` (a
	// 10-character prefix and two 12-character hexadecimal hashes, mixed case allowed,
	// normalized to lowercase). Omit the parameter to apply no JA4 exclusion.
	ExcludeJa4 []string `query:"exclude_ja4,omitzero" json:"-"`
	// Exclude entries that match any of the given optional action values.
	//
	// Any of "captcha", "challenge".
	ExcludeOptionalAction []string `query:"exclude_optional_action,omitzero" json:"-"`
	// Exclude entries whose organization exactly equals any supplied value. Omit or
	// provide an empty list to apply no organization exclusion.
	ExcludeOrganizations []string `query:"exclude_organizations,omitzero" json:"-"`
	// Exclude entries that match the given URL path pattern; '\*' is wildcard.
	ExcludePath []string `query:"exclude_path,omitzero" json:"-"`
	// Exclude data by reference IDs.
	ExcludeReferenceIDs []string `query:"exclude_reference_ids,omitzero" json:"-"`
	// Exclude data by request IDs.
	ExcludeRequestIDs []string `query:"exclude_request_ids,omitzero" json:"-"`
	// Exclude data by name of a security rule matched the request.
	ExcludeSecurityRuleNames []string `query:"exclude_security_rule_names,omitzero" json:"-"`
	// Exclude data by session IDs.
	ExcludeSessionIDs []string `query:"exclude_session_ids,omitzero" json:"-"`
	// Exclude entries with any of the given HTTP response status codes.
	ExcludeStatusCodes []int64 `query:"exclude_status_codes,omitzero" json:"-"`
	// Exclude entries whose tag exactly equals any supplied value. Omit or provide an
	// empty list to apply no tag exclusion.
	ExcludeTags []string `query:"exclude_tags,omitzero" json:"-"`
	// Exclude entries whose user agent contains any of the supplied texts,
	// case-insensitive partial match. Omit or provide an empty list to apply no user
	// agent text exclusion.
	ExcludeUserAgent []string `query:"exclude_user_agent,omitzero" json:"-"`
	// Exclude entries whose parsed user agent client exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent client exclusion.
	ExcludeUserAgentClients []string `query:"exclude_user_agent_clients,omitzero" json:"-"`
	// Exclude entries whose parsed user agent device exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent device exclusion.
	ExcludeUserAgentDevices []string `query:"exclude_user_agent_devices,omitzero" json:"-"`
	// Filter by HTTP methods
	//
	// Any of "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE".
	HTTPMethods []string `query:"http_methods,omitzero" json:"-"`
	// Filter traffic data by client IP.
	IPs []string `query:"ips,omitzero" format:"ipvanyaddress" json:"-"`
	// Filter by JA3 TLS client fingerprint. Each value must be exactly 32 hexadecimal
	// characters, mixed case allowed, normalized to lowercase. Supply multiple values
	// to match any of them. Omit the parameter to apply no JA3 filter.
	Ja3 []string `query:"ja3,omitzero" json:"-"`
	// Filter by JA4 TLS client fingerprint. When present, the value must match the JA4
	// form `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character prefix and two 12-character
	// hexadecimal hashes, mixed case allowed, normalized to lowercase). Supply
	// multiple values to match any of them. Omit the parameter entirely to apply no
	// JA4 filter.
	Ja4 []string `query:"ja4,omitzero" json:"-"`
	// Filter data by optional action.
	//
	// Any of "captcha", "challenge".
	OptionalAction []string `query:"optional_action,omitzero" json:"-"`
	// Include entries whose organization exactly equals any supplied value. Omit or
	// provide an empty list to apply no organization filter.
	Organizations []string `query:"organizations,omitzero" json:"-"`
	// Filter by URL path. '\*' is wildcard.
	Path []string `query:"path,omitzero" json:"-"`
	// Filter data by reference IDs.
	ReferenceIDs []string `query:"reference_ids,omitzero" json:"-"`
	// Filter data by request IDs.
	RequestIDs []string `query:"request_ids,omitzero" json:"-"`
	// Filter data by name of a security rule matched the request.
	SecurityRuleNames []string `query:"security_rule_names,omitzero" json:"-"`
	// Filter data by session IDs.
	SessionIDs []string `query:"session_ids,omitzero" json:"-"`
	// Filter data by HTTP response status code.
	StatusCodes []int64 `query:"status_codes,omitzero" json:"-"`
	// Include entries whose tag exactly equals any supplied value. Omit or provide an
	// empty list to apply no tag filter.
	Tags []string `query:"tags,omitzero" json:"-"`
	// Include entries that have any of the given 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:"-"`
	// Include entries whose user agent contains any of the supplied texts,
	// case-insensitive partial match. Omit or provide an empty list to apply no user
	// agent text filter.
	UserAgent []string `query:"user_agent,omitzero" json:"-"`
	// Include entries whose parsed user agent client exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent client filter.
	UserAgentClients []string `query:"user_agent_clients,omitzero" json:"-"`
	// Include entries whose parsed user agent device exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent device filter.
	UserAgentDevices []string `query:"user_agent_devices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AnalyticsGetRequestsParams) URLQuery added in v0.39.0

func (r AnalyticsGetRequestsParams) URLQuery() (v url.Values, err error)

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

type AnalyticsGetTrafficFilteredParams added in v0.39.0

type AnalyticsGetTrafficFilteredParams struct {
	// Specifies the granularity of the result data.
	//
	// Any of "daily", "hourly", "minutely".
	Resolution AnalyticsGetTrafficFilteredParamsResolution `query:"resolution,omitzero" api:"required" json:"-"`
	// Filter data items starting from a specified date in ISO 8601 format
	Start string `query:"start" api:"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:"-"`
	// Optional explicit aggregation bucket width in seconds. When supplied,
	// `bucket_size` supersedes `resolution` for aggregation granularity.
	//
	// Any of 60, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400.
	BucketSize int64 `query:"bucket_size,omitzero" json:"-"`
	// Filter data by the ASN (Autonomous System Number) of the originating IP address.
	// Not supported by `/v1/analytics/requests`.
	Asns []int64 `query:"asns,omitzero" json:"-"`
	// Filter data by a country code of the originating IP address in ISO 3166-1
	// alpha-2 format.
	Countries []string `query:"countries,omitzero" json:"-"`
	// Filter data by decision.
	//
	// Any of "blocked", "monitored", "allowed", "passed".
	Decision []string `query:"decision,omitzero" json:"-"`
	// List of domain IDs. Empty list means all domains belonging to the current
	// account.
	Domains []int64 `query:"domains,omitzero" json:"-"`
	// Exclude data by the ASN (Autonomous System Number) of the originating IP
	// address. Not supported by `/v1/analytics/requests`.
	ExcludeAsns []int64 `query:"exclude_asns,omitzero" json:"-"`
	// Exclude data by a country code of the originating IP address in ISO 3166-1
	// alpha-2 format.
	ExcludeCountries []string `query:"exclude_countries,omitzero" json:"-"`
	// Exclude entries that match any of the given decisions.
	//
	// Any of "blocked", "monitored", "allowed", "passed".
	ExcludeDecision []string `query:"exclude_decision,omitzero" json:"-"`
	// Exclude data by domain ID.
	ExcludeDomains []int64 `query:"exclude_domains,omitzero" json:"-"`
	// Exclude entries with any of the given HTTP methods.
	//
	// Any of "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE".
	ExcludeHTTPMethods []string `query:"exclude_http_methods,omitzero" json:"-"`
	// Exclude traffic data by client IP.
	ExcludeIPs []string `query:"exclude_ips,omitzero" format:"ipvanyaddress" json:"-"`
	// Exclude entries whose JA3 TLS client fingerprint matches any of the supplied
	// values. Each value must be exactly 32 hexadecimal characters, mixed case
	// allowed, normalized to lowercase. Supply multiple values to exclude any of them.
	// Omit the parameter to apply no JA3 exclusion.
	ExcludeJa3 []string `query:"exclude_ja3,omitzero" json:"-"`
	// Exclude entries whose JA4 TLS client fingerprint equals any of the supplied
	// values. An item must match the JA4 form `<ja4_a>_<ja4_b>_<ja4_c>` (a
	// 10-character prefix and two 12-character hexadecimal hashes, mixed case allowed,
	// normalized to lowercase). Omit the parameter to apply no JA4 exclusion.
	ExcludeJa4 []string `query:"exclude_ja4,omitzero" json:"-"`
	// Exclude entries that match any of the given optional action values.
	//
	// Any of "captcha", "challenge".
	ExcludeOptionalAction []string `query:"exclude_optional_action,omitzero" json:"-"`
	// Exclude entries whose organization exactly equals any supplied value. Omit or
	// provide an empty list to apply no organization exclusion.
	ExcludeOrganizations []string `query:"exclude_organizations,omitzero" json:"-"`
	// Exclude entries that match the given URL path pattern; '\*' is wildcard.
	ExcludePath []string `query:"exclude_path,omitzero" json:"-"`
	// Exclude data by reference IDs.
	ExcludeReferenceIDs []string `query:"exclude_reference_ids,omitzero" json:"-"`
	// Exclude data by request IDs.
	ExcludeRequestIDs []string `query:"exclude_request_ids,omitzero" json:"-"`
	// Exclude data by name of a security rule matched the request.
	ExcludeSecurityRuleNames []string `query:"exclude_security_rule_names,omitzero" json:"-"`
	// Exclude data by session IDs.
	ExcludeSessionIDs []string `query:"exclude_session_ids,omitzero" json:"-"`
	// Exclude entries with any of the given HTTP response status codes.
	ExcludeStatusCodes []int64 `query:"exclude_status_codes,omitzero" json:"-"`
	// Exclude entries whose tag exactly equals any supplied value. Omit or provide an
	// empty list to apply no tag exclusion.
	ExcludeTags []string `query:"exclude_tags,omitzero" json:"-"`
	// Exclude entries whose user agent contains any of the supplied texts,
	// case-insensitive partial match. Omit or provide an empty list to apply no user
	// agent text exclusion.
	ExcludeUserAgent []string `query:"exclude_user_agent,omitzero" json:"-"`
	// Exclude entries whose parsed user agent client exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent client exclusion.
	ExcludeUserAgentClients []string `query:"exclude_user_agent_clients,omitzero" json:"-"`
	// Exclude entries whose parsed user agent device exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent device exclusion.
	ExcludeUserAgentDevices []string `query:"exclude_user_agent_devices,omitzero" json:"-"`
	// Filter by HTTP methods
	//
	// Any of "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT", "TRACE".
	HTTPMethods []string `query:"http_methods,omitzero" json:"-"`
	// Filter traffic data by client IP.
	IPs []string `query:"ips,omitzero" format:"ipvanyaddress" json:"-"`
	// Filter by JA3 TLS client fingerprint. Each value must be exactly 32 hexadecimal
	// characters, mixed case allowed, normalized to lowercase. Supply multiple values
	// to match any of them. Omit the parameter to apply no JA3 filter.
	Ja3 []string `query:"ja3,omitzero" json:"-"`
	// Filter by JA4 TLS client fingerprint. When present, the value must match the JA4
	// form `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character prefix and two 12-character
	// hexadecimal hashes, mixed case allowed, normalized to lowercase). Supply
	// multiple values to match any of them. Omit the parameter entirely to apply no
	// JA4 filter.
	Ja4 []string `query:"ja4,omitzero" json:"-"`
	// Filter data by optional action.
	//
	// Any of "captcha", "challenge".
	OptionalAction []string `query:"optional_action,omitzero" json:"-"`
	// Include entries whose organization exactly equals any supplied value. Omit or
	// provide an empty list to apply no organization filter.
	Organizations []string `query:"organizations,omitzero" json:"-"`
	// Filter by URL path. '\*' is wildcard.
	Path []string `query:"path,omitzero" json:"-"`
	// Filter data by reference IDs.
	ReferenceIDs []string `query:"reference_ids,omitzero" json:"-"`
	// Filter data by request IDs.
	RequestIDs []string `query:"request_ids,omitzero" json:"-"`
	// Filter data by name of a security rule matched the request.
	SecurityRuleNames []string `query:"security_rule_names,omitzero" json:"-"`
	// Filter data by session IDs.
	SessionIDs []string `query:"session_ids,omitzero" json:"-"`
	// Filter data by HTTP response status code.
	StatusCodes []int64 `query:"status_codes,omitzero" json:"-"`
	// Include entries whose tag exactly equals any supplied value. Omit or provide an
	// empty list to apply no tag filter.
	Tags []string `query:"tags,omitzero" json:"-"`
	// Include entries that have any of the given 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:"-"`
	// Include entries whose user agent contains any of the supplied texts,
	// case-insensitive partial match. Omit or provide an empty list to apply no user
	// agent text filter.
	UserAgent []string `query:"user_agent,omitzero" json:"-"`
	// Include entries whose parsed user agent client exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent client filter.
	UserAgentClients []string `query:"user_agent_clients,omitzero" json:"-"`
	// Include entries whose parsed user agent device exactly equals any supplied
	// value. Omit or provide an empty list to apply no user agent device filter.
	UserAgentDevices []string `query:"user_agent_devices,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AnalyticsGetTrafficFilteredParams) URLQuery added in v0.39.0

func (r AnalyticsGetTrafficFilteredParams) URLQuery() (v url.Values, err error)

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

type AnalyticsGetTrafficFilteredParamsResolution added in v0.39.0

type AnalyticsGetTrafficFilteredParamsResolution string

Specifies the granularity of the result data.

const (
	AnalyticsGetTrafficFilteredParamsResolutionDaily    AnalyticsGetTrafficFilteredParamsResolution = "daily"
	AnalyticsGetTrafficFilteredParamsResolutionHourly   AnalyticsGetTrafficFilteredParamsResolution = "hourly"
	AnalyticsGetTrafficFilteredParamsResolutionMinutely AnalyticsGetTrafficFilteredParamsResolution = "minutely"
)

type AnalyticsGetTrafficParams added in v0.39.0

type AnalyticsGetTrafficParams struct {
	// Specifies the granularity of the result data.
	//
	// Any of "daily", "hourly", "minutely".
	Resolution AnalyticsGetTrafficParamsResolution `query:"resolution,omitzero" api:"required" json:"-"`
	// Filter data items starting from a specified date in ISO 8601 format
	Start string `query:"start" api:"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:"-"`
	// Optional explicit aggregation bucket width in seconds. When supplied,
	// `bucket_size` supersedes `resolution` for aggregation granularity.
	//
	// Any of 60, 300, 600, 900, 1800, 3600, 7200, 10800, 21600, 43200, 86400.
	BucketSize int64 `query:"bucket_size,omitzero" json:"-"`
	// List of domain IDs. Empty list means all domains belonging to the current
	// account.
	Domains []int64 `query:"domains,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (AnalyticsGetTrafficParams) URLQuery added in v0.39.0

func (r AnalyticsGetTrafficParams) URLQuery() (v url.Values, err error)

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

type AnalyticsGetTrafficParamsResolution added in v0.39.0

type AnalyticsGetTrafficParamsResolution string

Specifies the granularity of the result data.

const (
	AnalyticsGetTrafficParamsResolutionDaily    AnalyticsGetTrafficParamsResolution = "daily"
	AnalyticsGetTrafficParamsResolutionHourly   AnalyticsGetTrafficParamsResolution = "hourly"
	AnalyticsGetTrafficParamsResolutionMinutely AnalyticsGetTrafficParamsResolution = "minutely"
)

type AnalyticsService added in v0.39.0

type AnalyticsService struct {
	Options []option.RequestOption
}

AnalyticsService 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 NewAnalyticsService method instead.

func NewAnalyticsService added in v0.39.0

func NewAnalyticsService(opts ...option.RequestOption) (r AnalyticsService)

NewAnalyticsService 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 (*AnalyticsService) GetDetailedEvents added in v0.62.0

Retrieves security events with the same filters, ordering and cursor pagination as [Get security events (V2)](#operation/`get_events_v2_analytics_events_get`). Each event carries its request details: everything [Get request details](/docs/api-reference/waap/analytics/get-request-details) returns, except the request headers. A page holds up to 1000 events. Requires the `analytics_requests` permission.

func (*AnalyticsService) GetDetailedEventsAutoPaging added in v0.62.0

Retrieves security events with the same filters, ordering and cursor pagination as [Get security events (V2)](#operation/`get_events_v2_analytics_events_get`). Each event carries its request details: everything [Get request details](/docs/api-reference/waap/analytics/get-request-details) returns, except the request headers. A page holds up to 1000 events. Requires the `analytics_requests` permission.

func (*AnalyticsService) GetEventStatistics added in v0.39.0

Retrieves event statistics per given dimension of a request characteristics. A WAAP _Event_ represents a request observed by the system. The report contains the total, blocked, suppressed, and allowed event counts for top ten points in the selected dimension.

func (*AnalyticsService) GetEvents added in v0.60.0

Retrieve security events over account's domains. A security event is recorded for every request passing through WAAP towards the origin server.

func (*AnalyticsService) GetEventsAutoPaging added in v0.60.0

Retrieve security events over account's domains. A security event is recorded for every request passing through WAAP towards the origin server.

func (*AnalyticsService) GetFilters added in v0.50.0

Retrieves autocomplete suggestions for specified filter parameter values observed within the current client account during the requested time range. Use the returned `value` in the filter parameters of an analytics data request ([Get security events (V2)](#operation/`get_events_v2_analytics_events_get`) and [Get filtered traffic data](#operation/`get_traffic_filtered_v1_analytics_traffic_filtered_get`)). `count` reports how many times the value was observed in the requested range.

func (*AnalyticsService) GetFiltersAutoPaging added in v0.50.0

Retrieves autocomplete suggestions for specified filter parameter values observed within the current client account during the requested time range. Use the returned `value` in the filter parameters of an analytics data request ([Get security events (V2)](#operation/`get_events_v2_analytics_events_get`) and [Get filtered traffic data](#operation/`get_traffic_filtered_v1_analytics_traffic_filtered_get`)). `count` reports how many times the value was observed in the requested range.

func (*AnalyticsService) GetRequests deprecated added in v0.39.0

Retrieve request log data over account's domains. The log records every request passing through WAAP towards the origin server. Deprecated. Use [Get security events (V2)](#operation/`get_events_v2_analytics_events_get`) instead.

Deprecated: deprecated

func (*AnalyticsService) GetRequestsAutoPaging deprecated added in v0.39.0

Retrieve request log data over account's domains. The log records every request passing through WAAP towards the origin server. Deprecated. Use [Get security events (V2)](#operation/`get_events_v2_analytics_events_get`) instead.

Deprecated: deprecated

func (*AnalyticsService) GetTraffic added in v0.39.0

func (r *AnalyticsService) GetTraffic(ctx context.Context, query AnalyticsGetTrafficParams, opts ...option.RequestOption) (res *[]WaapTrafficMetrics, err error)

Retrieves a comprehensive report on traffic statistics for a set of domains. The report includes details such as API requests, blocked events, error counts, and many more traffic-related metrics.

func (*AnalyticsService) GetTrafficFiltered added in v0.39.0

Retrieves a traffic time series data over a set of domains. The response is suitable for plotting a time series chart. This method allows filtering the traffic data by various criteria.

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" api:"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" api:"required"`
	// The text to display in the header of the custom page
	Header param.Opt[string] `json:"header,omitzero"`
	// 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" api:"required"`
	// The text to display in the header of the custom page
	Header param.Opt[string] `json:"header,omitzero"`
	// 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" api:"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"`
	// 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" api:"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" api:"required"`
	// The text to display in the header of the custom page
	Header param.Opt[string] `json:"header,omitzero"`
	// 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" api:"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" api:"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"`
	// 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

Retrieve a list of custom page sets available for use

func (*CustomPageSetService) ListAutoPaging added in v0.3.0

Retrieve a list of custom page sets available for use

func (*CustomPageSetService) New added in v0.3.0

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

Allows to preview a custom page without creating it based on the provided type and data

func (*CustomPageSetService) Update added in v0.3.0

Fields with a value are updated, fields set to null are removed, and fields omitted are left unchanged (`name` cannot be removed). When updating a custom page, include all fields it should have — any field not included is 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" api:"required"`
	// The text to display in the header of the custom page
	Header param.Opt[string] `json:"header,omitzero"`
	// 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" api:"required"`
	// The text to display in the header of the custom page
	Header param.Opt[string] `json:"header,omitzero"`
	// 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" api:"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"`
	// 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" api:"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" api:"required"`
	// The text to display in the header of the custom page
	Header param.Opt[string] `json:"header,omitzero"`
	// 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" api:"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 DomainAPIDiscoveryOpenAPIService added in v0.34.0

type DomainAPIDiscoveryOpenAPIService struct {
	Options []option.RequestOption
}

DomainAPIDiscoveryOpenAPIService 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 NewDomainAPIDiscoveryOpenAPIService method instead.

func NewDomainAPIDiscoveryOpenAPIService added in v0.34.0

func NewDomainAPIDiscoveryOpenAPIService(opts ...option.RequestOption) (r DomainAPIDiscoveryOpenAPIService)

NewDomainAPIDiscoveryOpenAPIService 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 (*DomainAPIDiscoveryOpenAPIService) Scan added in v0.34.0

func (r *DomainAPIDiscoveryOpenAPIService) Scan(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 (*DomainAPIDiscoveryOpenAPIService) Upload added in v0.34.0

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 DomainAPIDiscoveryOpenAPIUploadParams added in v0.34.0

type DomainAPIDiscoveryOpenAPIUploadParams 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" api:"required"`
	// The name of the file
	FileName string `json:"file_name" api:"required"`
	// contains filtered or unexported fields
}

func (DomainAPIDiscoveryOpenAPIUploadParams) MarshalJSON added in v0.34.0

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

func (*DomainAPIDiscoveryOpenAPIUploadParams) UnmarshalJSON added in v0.34.0

func (r *DomainAPIDiscoveryOpenAPIUploadParams) UnmarshalJSON(data []byte) error

type DomainAPIDiscoveryScanResultGetParams added in v0.3.0

type DomainAPIDiscoveryScanResultGetParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type DomainAPIDiscoveryScanResultListParams added in v0.3.0

type DomainAPIDiscoveryScanResultListParams 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:"-"`
	// Filter by the status of the scan
	//
	// Any of "SUCCESS", "FAILURE", "IN_PROGRESS".
	Status DomainAPIDiscoveryScanResultListParamsStatus `query:"status,omitzero" json:"-"`
	// Filter by the path of the scan type
	//
	// Any of "TRAFFIC_SCAN", "API_DESCRIPTION_FILE_SCAN".
	Type DomainAPIDiscoveryScanResultListParamsType `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 DomainAPIDiscoveryScanResultListParamsOrdering `query:"ordering,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DomainAPIDiscoveryScanResultListParams) URLQuery added in v0.3.0

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

type DomainAPIDiscoveryScanResultListParamsOrdering added in v0.3.0

type DomainAPIDiscoveryScanResultListParamsOrdering string

Sort the response by given field.

const (
	DomainAPIDiscoveryScanResultListParamsOrderingID             DomainAPIDiscoveryScanResultListParamsOrdering = "id"
	DomainAPIDiscoveryScanResultListParamsOrderingType           DomainAPIDiscoveryScanResultListParamsOrdering = "type"
	DomainAPIDiscoveryScanResultListParamsOrderingStartTime      DomainAPIDiscoveryScanResultListParamsOrdering = "start_time"
	DomainAPIDiscoveryScanResultListParamsOrderingEndTime        DomainAPIDiscoveryScanResultListParamsOrdering = "end_time"
	DomainAPIDiscoveryScanResultListParamsOrderingStatus         DomainAPIDiscoveryScanResultListParamsOrdering = "status"
	DomainAPIDiscoveryScanResultListParamsOrderingMessage        DomainAPIDiscoveryScanResultListParamsOrdering = "message"
	DomainAPIDiscoveryScanResultListParamsOrderingMinusID        DomainAPIDiscoveryScanResultListParamsOrdering = "-id"
	DomainAPIDiscoveryScanResultListParamsOrderingMinusType      DomainAPIDiscoveryScanResultListParamsOrdering = "-type"
	DomainAPIDiscoveryScanResultListParamsOrderingMinusStartTime DomainAPIDiscoveryScanResultListParamsOrdering = "-start_time"
	DomainAPIDiscoveryScanResultListParamsOrderingMinusEndTime   DomainAPIDiscoveryScanResultListParamsOrdering = "-end_time"
	DomainAPIDiscoveryScanResultListParamsOrderingMinusStatus    DomainAPIDiscoveryScanResultListParamsOrdering = "-status"
	DomainAPIDiscoveryScanResultListParamsOrderingMinusMessage   DomainAPIDiscoveryScanResultListParamsOrdering = "-message"
)

type DomainAPIDiscoveryScanResultListParamsStatus added in v0.3.0

type DomainAPIDiscoveryScanResultListParamsStatus string

Filter by the status of the scan

const (
	DomainAPIDiscoveryScanResultListParamsStatusSuccess    DomainAPIDiscoveryScanResultListParamsStatus = "SUCCESS"
	DomainAPIDiscoveryScanResultListParamsStatusFailure    DomainAPIDiscoveryScanResultListParamsStatus = "FAILURE"
	DomainAPIDiscoveryScanResultListParamsStatusInProgress DomainAPIDiscoveryScanResultListParamsStatus = "IN_PROGRESS"
)

type DomainAPIDiscoveryScanResultListParamsType added in v0.3.0

type DomainAPIDiscoveryScanResultListParamsType string

Filter by the path of the scan type

const (
	DomainAPIDiscoveryScanResultListParamsTypeTrafficScan            DomainAPIDiscoveryScanResultListParamsType = "TRAFFIC_SCAN"
	DomainAPIDiscoveryScanResultListParamsTypeAPIDescriptionFileScan DomainAPIDiscoveryScanResultListParamsType = "API_DESCRIPTION_FILE_SCAN"
)

type DomainAPIDiscoveryScanResultService added in v0.3.0

type DomainAPIDiscoveryScanResultService struct {
	Options []option.RequestOption
}

DomainAPIDiscoveryScanResultService 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 NewDomainAPIDiscoveryScanResultService method instead.

func NewDomainAPIDiscoveryScanResultService added in v0.3.0

func NewDomainAPIDiscoveryScanResultService(opts ...option.RequestOption) (r DomainAPIDiscoveryScanResultService)

NewDomainAPIDiscoveryScanResultService 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 (*DomainAPIDiscoveryScanResultService) Get added in v0.3.0

Get Scan Result

func (*DomainAPIDiscoveryScanResultService) List added in v0.3.0

Get Scan Results

func (*DomainAPIDiscoveryScanResultService) ListAutoPaging added in v0.3.0

Get Scan Results

type DomainAPIDiscoveryService added in v0.3.0

type DomainAPIDiscoveryService struct {
	Options     []option.RequestOption
	ScanResults DomainAPIDiscoveryScanResultService
	OpenAPI     DomainAPIDiscoveryOpenAPIService
	// API Discovery settings control how WAAP scans a domain's API description file
	// and traffic to discover its API paths.
	Settings DomainAPIDiscoverySettingService
}

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.

type DomainAPIDiscoverySettingService added in v0.34.0

type DomainAPIDiscoverySettingService struct {
	Options []option.RequestOption
}

API Discovery settings control how WAAP scans a domain's API description file and traffic to discover its API paths.

DomainAPIDiscoverySettingService 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 NewDomainAPIDiscoverySettingService method instead.

func NewDomainAPIDiscoverySettingService added in v0.34.0

func NewDomainAPIDiscoverySettingService(opts ...option.RequestOption) (r DomainAPIDiscoverySettingService)

NewDomainAPIDiscoverySettingService 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 (*DomainAPIDiscoverySettingService) Get added in v0.34.0

Retrieve the API discovery settings for a domain

func (*DomainAPIDiscoverySettingService) Update added in v0.34.0

Update the API discovery settings for a domain

type DomainAPIDiscoverySettingUpdateParams added in v0.34.0

type DomainAPIDiscoverySettingUpdateParams 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 (DomainAPIDiscoverySettingUpdateParams) MarshalJSON added in v0.34.0

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

func (*DomainAPIDiscoverySettingUpdateParams) UnmarshalJSON added in v0.34.0

func (r *DomainAPIDiscoverySettingUpdateParams) UnmarshalJSON(data []byte) error

type DomainAPIPathDeleteParams added in v0.3.0

type DomainAPIPathDeleteParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"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" api:"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:"-"`
	// Filter by the HTTP version of the API path
	//
	// Any of "HTTP", "HTTPS".
	HTTPScheme DomainAPIPathListParamsHTTPScheme `query:"http_scheme,omitzero" json:"-"`
	// Filter by the path ID
	IDs []string `query:"ids,omitzero" format:"uuid" json:"-"`
	// Filter by the API RESTful method
	//
	// Any of "GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS".
	Method DomainAPIPathListParamsMethod `query:"method,omitzero" json:"-"`
	// Filter by the source of the discovered API
	//
	// 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

Filter by the HTTP version of the API path

const (
	DomainAPIPathListParamsHTTPSchemeHTTP  DomainAPIPathListParamsHTTPScheme = "HTTP"
	DomainAPIPathListParamsHTTPSchemeHTTPS DomainAPIPathListParamsHTTPScheme = "HTTPS"
)

type DomainAPIPathListParamsMethod added in v0.3.0

type DomainAPIPathListParamsMethod string

Filter by the API RESTful method

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

Filter by the source of the discovered API

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" api:"required"`
	// The different methods an API path can have
	//
	// Any of "GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS".
	Method DomainAPIPathNewParamsMethod `json:"method,omitzero" api:"required"`
	// The API path, locations that are saved for resource IDs will be put in curly
	// brackets
	Path       string            `json:"path" api:"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

Retrieve a list of API paths for a specific domain

func (*DomainAPIPathService) ListAutoPaging added in v0.3.0

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) (res *WaapAPIPath, 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" api:"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" api:"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" api:"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" api:"required"`
	// Whether or not the rule is enabled
	Enabled bool `json:"enabled" api:"required"`
	// The name assigned to the rule
	Name string `json:"name" api:"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" api:"required"`
	// A human-readable description.
	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 allows the request
	Allow map[string]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 presents the user with a captcha
	Captcha map[string]any `json:"captcha,omitzero"`
	// The WAAP performs automatic browser validation
	Handshake map[string]any `json:"handshake,omitzero"`
	// The WAAP monitors the request but takes no action
	Monitor map[string]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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
	// An 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" api:"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
}

Advanced rules are CEL-expression WAAP rules that allow, block, challenge, monitor or tag requests to a domain.

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

Delete advanced rule

func (*DomainAdvancedRuleService) Get added in v0.3.0

Retrieve a specific advanced rule assigned to a domain

func (*DomainAdvancedRuleService) List added in v0.3.0

Retrieve a list of advanced rules assigned to a domain, offering filter, ordering, and pagination capabilities

func (*DomainAdvancedRuleService) ListAutoPaging added in v0.3.0

Retrieve a list of advanced rules assigned to a domain, offering filter, ordering, and pagination capabilities

func (*DomainAdvancedRuleService) New added in v0.3.0

Create advanced rule

func (*DomainAdvancedRuleService) Toggle added in v0.3.0

Toggle advanced rule

func (*DomainAdvancedRuleService) Update added in v0.3.0

Only properties present in the request will be updated

type DomainAdvancedRuleToggleParams added in v0.3.0

type DomainAdvancedRuleToggleParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// The advanced rule ID
	RuleID int64 `path:"rule_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

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" api:"required" json:"-"`
	// A human-readable description. When set to empty string, erases any value set
	// earlier.
	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 the 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 allows the request
	Allow map[string]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 presents the user with a captcha
	Captcha map[string]any `json:"captcha,omitzero"`
	// The WAAP performs automatic browser validation
	Handshake map[string]any `json:"handshake,omitzero"`
	// The WAAP monitors the request but takes no action
	Monitor map[string]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 the 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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
	// An 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" api:"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" api:"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" api:"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" api:"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" api:"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" api:"required"`
	// Whether or not the rule is enabled
	Enabled bool `json:"enabled" api:"required"`
	// The name assigned to the rule
	Name string `json:"name" api:"required"`
	// A human-readable description.
	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 allows the request
	Allow map[string]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 presents the user with a captcha
	Captcha map[string]any `json:"captcha,omitzero"`
	// The WAAP performs automatic browser validation
	Handshake map[string]any `json:"handshake,omitzero"`
	// The WAAP monitors the request but takes no action
	Monitor map[string]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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
	// An 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" api:"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 ASN (Autonomous System Number) the request originated from, as
	// determined by a WHOIS lookup of the requesting IP
	Asn DomainCustomRuleNewParamsConditionAsn `json:"asn,omitzero"`
	// 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 JA3 TLS client fingerprint of the request
	Ja3 DomainCustomRuleNewParamsConditionJa3 `json:"ja3,omitzero"`
	// Match the JA4 TLS client fingerprint of the request
	Ja4 DomainCustomRuleNewParamsConditionJa4 `json:"ja4,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 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.

Used for creating and updating custom rules. Does not include the ResponseHeader/ ResponseHeaderExists condition types, which are only readable on existing rules (see CustomRuleConditionResponse).

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 DomainCustomRuleNewParamsConditionAsn added in v0.60.0

type DomainCustomRuleNewParamsConditionAsn struct {
	// A list of Autonomous System Numbers (ASNs) to match against
	Asns []int64 `json:"asns,omitzero" api:"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 ASN (Autonomous System Number) the request originated from, as determined by a WHOIS lookup of the requesting IP

The property Asns is required.

func (DomainCustomRuleNewParamsConditionAsn) MarshalJSON added in v0.60.0

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

func (*DomainCustomRuleNewParamsConditionAsn) UnmarshalJSON added in v0.60.0

func (r *DomainCustomRuleNewParamsConditionAsn) 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" api:"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" api:"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" api:"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

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" api:"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" api:"required"`
	// The request header value
	Value string `json:"value" api:"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" api:"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

type DomainCustomRuleNewParamsConditionIP added in v0.3.0

type DomainCustomRuleNewParamsConditionIP struct {
	// A single IPv4 or IPv6 address
	IPAddress string `json:"ip_address" api:"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" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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 DomainCustomRuleNewParamsConditionJa3 added in v0.50.0

type DomainCustomRuleNewParamsConditionJa3 struct {
	// A list of JA3 TLS client fingerprints to match against the request
	Ja3Fingerprints []string `json:"ja3_fingerprints,omitzero" api:"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 JA3 TLS client fingerprint of the request

The property Ja3Fingerprints is required.

func (DomainCustomRuleNewParamsConditionJa3) MarshalJSON added in v0.50.0

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

func (*DomainCustomRuleNewParamsConditionJa3) UnmarshalJSON added in v0.50.0

func (r *DomainCustomRuleNewParamsConditionJa3) UnmarshalJSON(data []byte) error

type DomainCustomRuleNewParamsConditionJa4 added in v0.50.0

type DomainCustomRuleNewParamsConditionJa4 struct {
	// A list of JA4 TLS client fingerprints to match against the request
	Ja4Fingerprints []string `json:"ja4_fingerprints,omitzero" api:"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 JA4 TLS client fingerprint of the request

The property Ja4Fingerprints is required.

func (DomainCustomRuleNewParamsConditionJa4) MarshalJSON added in v0.50.0

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

func (*DomainCustomRuleNewParamsConditionJa4) UnmarshalJSON added in v0.50.0

func (r *DomainCustomRuleNewParamsConditionJa4) UnmarshalJSON(data []byte) error

type DomainCustomRuleNewParamsConditionOrganization added in v0.3.0

type DomainCustomRuleNewParamsConditionOrganization struct {
	// The organization to match against
	Organization string `json:"organization" api:"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

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" api:"required"`
	// The number of incoming requests over the given time that can trigger a request
	// rate condition
	Requests int64 `json:"requests" api:"required"`
	// The number of seconds that the WAAP measures incoming requests over before
	// triggering a request rate condition
	Time int64 `json:"time" api:"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 DomainCustomRuleNewParamsConditionSessionRequestCount added in v0.3.0

type DomainCustomRuleNewParamsConditionSessionRequestCount struct {
	// The number of dynamic requests in the session
	RequestCount int64 `json:"request_count" api:"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 (*DomainCustomRuleNewParamsConditionSessionRequestCount) UnmarshalJSON added in v0.3.0

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" api:"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" api:"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" api:"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" api:"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

type DomainCustomRuleService added in v0.3.0

type DomainCustomRuleService struct {
	Options []option.RequestOption
}

WAAP custom rules allow, block, challenge, monitor or tag requests to a domain when all of their conditions match.

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

Delete custom rule

func (*DomainCustomRuleService) DeleteMultiple added in v0.3.0

Delete multiple custom WAAP rules

func (*DomainCustomRuleService) Get added in v0.3.0

Extracts a specific custom rule assigned to a domain

func (*DomainCustomRuleService) List added in v0.3.0

Extracts a list of custom rules assigned to a domain, offering filter, ordering, and pagination capabilities

func (*DomainCustomRuleService) ListAutoPaging added in v0.3.0

Extracts a list of custom rules assigned to a domain, offering filter, ordering, and pagination capabilities

func (*DomainCustomRuleService) New added in v0.3.0

Create custom rule

func (*DomainCustomRuleService) Toggle added in v0.3.0

Toggle custom rule

func (*DomainCustomRuleService) Update added in v0.3.0

Only properties present in the request will be updated

type DomainCustomRuleToggleParams added in v0.3.0

type DomainCustomRuleToggleParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// The custom rule ID
	RuleID int64 `path:"rule_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

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" api:"required" json:"-"`
	// A human-readable description. When set to empty string, erases any value set
	// earlier.
	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 the 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 allows the request
	Allow map[string]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 presents the user with a captcha
	Captcha map[string]any `json:"captcha,omitzero"`
	// The WAAP performs automatic browser validation
	Handshake map[string]any `json:"handshake,omitzero"`
	// The WAAP monitors the request but takes no action
	Monitor map[string]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 the 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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
	// An 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" api:"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 ASN (Autonomous System Number) the request originated from, as
	// determined by a WHOIS lookup of the requesting IP
	Asn DomainCustomRuleUpdateParamsConditionAsn `json:"asn,omitzero"`
	// 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 JA3 TLS client fingerprint of the request
	Ja3 DomainCustomRuleUpdateParamsConditionJa3 `json:"ja3,omitzero"`
	// Match the JA4 TLS client fingerprint of the request
	Ja4 DomainCustomRuleUpdateParamsConditionJa4 `json:"ja4,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 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.

Used for creating and updating custom rules. Does not include the ResponseHeader/ ResponseHeaderExists condition types, which are only readable on existing rules (see CustomRuleConditionResponse).

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 DomainCustomRuleUpdateParamsConditionAsn added in v0.60.0

type DomainCustomRuleUpdateParamsConditionAsn struct {
	// A list of Autonomous System Numbers (ASNs) to match against
	Asns []int64 `json:"asns,omitzero" api:"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 ASN (Autonomous System Number) the request originated from, as determined by a WHOIS lookup of the requesting IP

The property Asns is required.

func (DomainCustomRuleUpdateParamsConditionAsn) MarshalJSON added in v0.60.0

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

func (*DomainCustomRuleUpdateParamsConditionAsn) UnmarshalJSON added in v0.60.0

func (r *DomainCustomRuleUpdateParamsConditionAsn) 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" api:"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

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" api:"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" api:"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

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" api:"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

type DomainCustomRuleUpdateParamsConditionHeader added in v0.3.0

type DomainCustomRuleUpdateParamsConditionHeader struct {
	// The request header name
	Header string `json:"header" api:"required"`
	// The request header value
	Value string `json:"value" api:"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" api:"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

type DomainCustomRuleUpdateParamsConditionIP added in v0.3.0

type DomainCustomRuleUpdateParamsConditionIP struct {
	// A single IPv4 or IPv6 address
	IPAddress string `json:"ip_address" api:"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" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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 DomainCustomRuleUpdateParamsConditionJa3 added in v0.50.0

type DomainCustomRuleUpdateParamsConditionJa3 struct {
	// A list of JA3 TLS client fingerprints to match against the request
	Ja3Fingerprints []string `json:"ja3_fingerprints,omitzero" api:"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 JA3 TLS client fingerprint of the request

The property Ja3Fingerprints is required.

func (DomainCustomRuleUpdateParamsConditionJa3) MarshalJSON added in v0.50.0

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

func (*DomainCustomRuleUpdateParamsConditionJa3) UnmarshalJSON added in v0.50.0

func (r *DomainCustomRuleUpdateParamsConditionJa3) UnmarshalJSON(data []byte) error

type DomainCustomRuleUpdateParamsConditionJa4 added in v0.50.0

type DomainCustomRuleUpdateParamsConditionJa4 struct {
	// A list of JA4 TLS client fingerprints to match against the request
	Ja4Fingerprints []string `json:"ja4_fingerprints,omitzero" api:"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 JA4 TLS client fingerprint of the request

The property Ja4Fingerprints is required.

func (DomainCustomRuleUpdateParamsConditionJa4) MarshalJSON added in v0.50.0

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

func (*DomainCustomRuleUpdateParamsConditionJa4) UnmarshalJSON added in v0.50.0

func (r *DomainCustomRuleUpdateParamsConditionJa4) UnmarshalJSON(data []byte) error

type DomainCustomRuleUpdateParamsConditionOrganization added in v0.3.0

type DomainCustomRuleUpdateParamsConditionOrganization struct {
	// The organization to match against
	Organization string `json:"organization" api:"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

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

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" api:"required"`
	// The number of incoming requests over the given time that can trigger a request
	// rate condition
	Requests int64 `json:"requests" api:"required"`
	// The number of seconds that the WAAP measures incoming requests over before
	// triggering a request rate condition
	Time int64 `json:"time" api:"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

type DomainCustomRuleUpdateParamsConditionSessionRequestCount added in v0.3.0

type DomainCustomRuleUpdateParamsConditionSessionRequestCount struct {
	// The number of dynamic requests in the session
	RequestCount int64 `json:"request_count" api:"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 (*DomainCustomRuleUpdateParamsConditionSessionRequestCount) UnmarshalJSON added in v0.3.0

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" api:"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" api:"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" api:"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

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" api:"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

type DomainFirewallRuleDeleteMultipleParams added in v0.3.0

type DomainFirewallRuleDeleteMultipleParams struct {
	// The IDs of the rules to delete
	RuleIDs []int64 `json:"rule_ids,omitzero" api:"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" api:"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" api:"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" api:"required"`
	// The condition required for the WAAP engine to trigger the rule.
	Conditions []DomainFirewallRuleNewParamsCondition `json:"conditions,omitzero" api:"required"`
	// Whether or not the rule is enabled
	Enabled bool `json:"enabled" api:"required"`
	// The name assigned to the rule
	Name string `json:"name" api:"required"`
	// A human-readable description.
	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 allows the request
	Allow map[string]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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
	// An 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" api:"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" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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
}

WAAP firewall rules allow or block requests to a domain based on the client IP address or IP range.

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

Delete firewall rule

func (*DomainFirewallRuleService) DeleteMultiple added in v0.3.0

Delete multiple WAAP firewall rules

func (*DomainFirewallRuleService) Get added in v0.3.0

Extracts a specific firewall rule assigned to a domain

func (*DomainFirewallRuleService) List added in v0.3.0

Extracts a list of firewall rules assigned to a domain, offering filter, ordering, and pagination capabilities

func (*DomainFirewallRuleService) ListAutoPaging added in v0.3.0

Extracts a list of firewall rules assigned to a domain, offering filter, ordering, and pagination capabilities

func (*DomainFirewallRuleService) New added in v0.3.0

Create firewall rule

func (*DomainFirewallRuleService) Toggle added in v0.3.0

Toggle firewall rule

func (*DomainFirewallRuleService) Update added in v0.3.0

Only properties present in the request will be updated

type DomainFirewallRuleToggleParams added in v0.3.0

type DomainFirewallRuleToggleParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// The firewall rule ID
	RuleID int64 `path:"rule_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

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" api:"required" json:"-"`
	// A human-readable description. When set to empty string, erases any value set
	// earlier.
	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 the 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 allows the request
	Allow map[string]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 the 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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration param.Opt[string] `json:"action_duration,omitzero"`
	// An 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" api:"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" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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

type DomainInsightGetParams added in v0.3.0

type DomainInsightGetParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"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" api:"required" json:"-"`
	// The status of the insight
	//
	// Any of "OPEN", "ACKED", "CLOSED".
	Status DomainInsightReplaceParamsStatus `json:"status,omitzero" api:"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

Retrieve a list of insights for a specific domain.

func (*DomainInsightService) ListAutoPaging added in v0.3.0

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" api:"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" api:"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" api:"required"`
	// A comment explaining the reason for the silence
	Comment string `json:"comment" api:"required"`
	// The slug of the insight type
	InsightType string `json:"insight_type" api:"required"`
	// A hash table of label names and values that apply to the insight silence
	Labels map[string]string `json:"labels,omitzero" api:"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

Delete an insight silence for a specific domain.

func (*DomainInsightSilenceService) Get added in v0.3.0

Retrieve a specific insight silence for a specific domain

func (*DomainInsightSilenceService) List added in v0.3.0

Retrieve a list of insight silences for a specific domain

func (*DomainInsightSilenceService) ListAutoPaging added in v0.3.0

Retrieve a list of insight silences for a specific domain

func (*DomainInsightSilenceService) New added in v0.3.0

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

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" api:"required" format:"date-time"`
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// The author of the silence
	Author string `json:"author" api:"required"`
	// A comment explaining the reason for the silence
	Comment string `json:"comment" api:"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 or any of its aliases. 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", "total_requests", "-total_requests", "attacks_detected",
	// "-attacks_detected".
	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"
	DomainListParamsOrderingTotalRequests        DomainListParamsOrdering = "total_requests"
	DomainListParamsOrderingMinusTotalRequests   DomainListParamsOrdering = "-total_requests"
	DomainListParamsOrderingAttacksDetected      DomainListParamsOrdering = "attacks_detected"
	DomainListParamsOrderingMinusAttacksDetected DomainListParamsOrdering = "-attacks_detected"
)

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 DomainListRuleSetsParams added in v0.60.0

type DomainListRuleSetsParams struct {
	// 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 (DomainListRuleSetsParams) URLQuery added in v0.60.0

func (r DomainListRuleSetsParams) URLQuery() (v url.Values, err error)

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

type DomainPolicyGetParams added in v0.60.0

type DomainPolicyGetParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type DomainPolicyListParams added in v0.60.0

type DomainPolicyListParams struct {
	// Filter policies by rule set ID
	RuleSetID param.Opt[int64] `query:"rule_set_id,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 (DomainPolicyListParams) URLQuery added in v0.60.0

func (r DomainPolicyListParams) URLQuery() (v url.Values, err error)

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

type DomainPolicyOverrideDeleteParams added in v0.60.0

type DomainPolicyOverrideDeleteParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type DomainPolicyOverrideGetParams added in v0.60.0

type DomainPolicyOverrideGetParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// contains filtered or unexported fields
}

type DomainPolicyOverrideListOwaspTopThreatsTargetsParams added in v0.60.0

type DomainPolicyOverrideListOwaspTopThreatsTargetsParams struct {
	// 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 (DomainPolicyOverrideListOwaspTopThreatsTargetsParams) URLQuery added in v0.60.0

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

type DomainPolicyOverrideListParams added in v0.60.0

type DomainPolicyOverrideListParams struct {
	// Filter by enabled state.
	Enabled param.Opt[bool] `query:"enabled,omitzero" json:"-"`
	// Search policy override names and descriptions.
	Search param.Opt[string] `query:"search,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:"-"`
	// Determine the field used to order results.
	//
	// Any of "id", "name", "target_type", "enabled", "stale", "created_at",
	// "updated_at", "-id", "-name", "-target_type", "-enabled", "-stale",
	// "-created_at", "-updated_at".
	Ordering DomainPolicyOverrideListParamsOrdering `query:"ordering,omitzero" json:"-"`
	// Filter by linked target type.
	//
	// Any of "detector", "rule".
	TargetType DomainPolicyOverrideListParamsTargetType `query:"target_type,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (DomainPolicyOverrideListParams) URLQuery added in v0.60.0

func (r DomainPolicyOverrideListParams) URLQuery() (v url.Values, err error)

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

type DomainPolicyOverrideListParamsOrdering added in v0.60.0

type DomainPolicyOverrideListParamsOrdering string

Determine the field used to order results.

const (
	DomainPolicyOverrideListParamsOrderingID              DomainPolicyOverrideListParamsOrdering = "id"
	DomainPolicyOverrideListParamsOrderingName            DomainPolicyOverrideListParamsOrdering = "name"
	DomainPolicyOverrideListParamsOrderingTargetType      DomainPolicyOverrideListParamsOrdering = "target_type"
	DomainPolicyOverrideListParamsOrderingEnabled         DomainPolicyOverrideListParamsOrdering = "enabled"
	DomainPolicyOverrideListParamsOrderingStale           DomainPolicyOverrideListParamsOrdering = "stale"
	DomainPolicyOverrideListParamsOrderingCreatedAt       DomainPolicyOverrideListParamsOrdering = "created_at"
	DomainPolicyOverrideListParamsOrderingUpdatedAt       DomainPolicyOverrideListParamsOrdering = "updated_at"
	DomainPolicyOverrideListParamsOrderingMinusID         DomainPolicyOverrideListParamsOrdering = "-id"
	DomainPolicyOverrideListParamsOrderingMinusName       DomainPolicyOverrideListParamsOrdering = "-name"
	DomainPolicyOverrideListParamsOrderingMinusTargetType DomainPolicyOverrideListParamsOrdering = "-target_type"
	DomainPolicyOverrideListParamsOrderingMinusEnabled    DomainPolicyOverrideListParamsOrdering = "-enabled"
	DomainPolicyOverrideListParamsOrderingMinusStale      DomainPolicyOverrideListParamsOrdering = "-stale"
	DomainPolicyOverrideListParamsOrderingMinusCreatedAt  DomainPolicyOverrideListParamsOrdering = "-created_at"
	DomainPolicyOverrideListParamsOrderingMinusUpdatedAt  DomainPolicyOverrideListParamsOrdering = "-updated_at"
)

type DomainPolicyOverrideListParamsTargetType added in v0.60.0

type DomainPolicyOverrideListParamsTargetType string

Filter by linked target type.

const (
	DomainPolicyOverrideListParamsTargetTypeDetector DomainPolicyOverrideListParamsTargetType = "detector"
	DomainPolicyOverrideListParamsTargetTypeRule     DomainPolicyOverrideListParamsTargetType = "rule"
)

type DomainPolicyOverrideNewParams added in v0.60.0

type DomainPolicyOverrideNewParams struct {
	// Whether the override is active
	Enabled bool `json:"enabled" api:"required"`
	// The policy override's display name
	Name string `json:"name" api:"required"`
	// The detectors or rules this override suppresses
	TargetIDs []int64 `json:"target_ids,omitzero" api:"required"`
	// Whether `target_ids` are detector IDs or rule IDs
	//
	// Any of "detector", "rule".
	TargetType DomainPolicyOverrideNewParamsTargetType `json:"target_type,omitzero" api:"required"`
	// An optional note explaining the override
	Description param.Opt[string] `json:"description,omitzero"`
	// The ID of the request that prompted this override, if created from Event
	// Details. Preserves a snapshot of that request for audit purposes; has no effect
	// on override behavior and is not returned by this API.
	RequestID param.Opt[string] `json:"request_id,omitzero"`
	// The conditions required for the override to apply. An override may have up to 5
	// conditions; all must pass for the override to apply. Without conditions the
	// override applies to every request on the owning domain that hits a linked
	// target.
	Conditions []DomainPolicyOverrideNewParamsCondition `json:"conditions,omitzero"`
	// contains filtered or unexported fields
}

func (DomainPolicyOverrideNewParams) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParams) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideNewParams) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideNewParamsCondition added in v0.60.0

type DomainPolicyOverrideNewParamsCondition struct {
	// Match the country that the request originated from
	Country DomainPolicyOverrideNewParamsConditionCountry `json:"country,omitzero"`
	// Match an incoming request header
	Header DomainPolicyOverrideNewParamsConditionHeader `json:"header,omitzero"`
	// Match when an incoming request header is present
	HeaderExists DomainPolicyOverrideNewParamsConditionHeaderExists `json:"header_exists,omitzero"`
	// Match the incoming HTTP method
	HTTPMethod DomainPolicyOverrideNewParamsConditionHTTPMethod `json:"http_method,omitzero"`
	// Match the incoming request against a single IP address
	IP DomainPolicyOverrideNewParamsConditionIP `json:"ip,omitzero"`
	// Match the incoming request against an IP range
	IPRange DomainPolicyOverrideNewParamsConditionIPRange `json:"ip_range,omitzero"`
	// Match the JA3 TLS client fingerprint of the request
	Ja3 DomainPolicyOverrideNewParamsConditionJa3 `json:"ja3,omitzero"`
	// Match the JA4 TLS client fingerprint of the request
	Ja4 DomainPolicyOverrideNewParamsConditionJa4 `json:"ja4,omitzero"`
	// Match the organization the request originated from, as determined by a WHOIS
	// lookup of the requesting IP
	Organization DomainPolicyOverrideNewParamsConditionOrganization `json:"organization,omitzero"`
	// Match the incoming request URL
	URL DomainPolicyOverrideNewParamsConditionURL `json:"url,omitzero"`
	// Match the user agent making the request
	UserAgent DomainPolicyOverrideNewParamsConditionUserAgent `json:"user_agent,omitzero"`
	// contains filtered or unexported fields
}

A single policy override condition. Only one of the fields below may be set.

Limited to the subset of `CustomRuleConditionScope` scopes that policy overrides support (Lime wire-format translation is reused from Custom Rules' own `app.models.customer_rules.lime_translation.ConditionMapper`).

func (DomainPolicyOverrideNewParamsCondition) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsCondition) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideNewParamsCondition) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideNewParamsConditionCountry added in v0.60.0

type DomainPolicyOverrideNewParamsConditionCountry struct {
	// A list of ISO 3166-1 alpha-2 formatted strings representing the countries to
	// match against
	CountryCode []string `json:"country_code,omitzero" api:"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 (DomainPolicyOverrideNewParamsConditionCountry) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionCountry) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideNewParamsConditionCountry) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideNewParamsConditionHTTPMethod added in v0.60.0

type DomainPolicyOverrideNewParamsConditionHTTPMethod struct {
	// HTTP methods of a request
	//
	// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
	// "TRACE".
	HTTPMethod string `json:"http_method,omitzero" api:"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 (DomainPolicyOverrideNewParamsConditionHTTPMethod) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionHTTPMethod) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideNewParamsConditionHeader added in v0.60.0

type DomainPolicyOverrideNewParamsConditionHeader struct {
	// The request header name
	Header string `json:"header" api:"required"`
	// The request header value
	Value string `json:"value" api:"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 (DomainPolicyOverrideNewParamsConditionHeader) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionHeader) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideNewParamsConditionHeader) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideNewParamsConditionHeaderExists added in v0.60.0

type DomainPolicyOverrideNewParamsConditionHeaderExists struct {
	// The request header name
	Header string `json:"header" api:"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 (DomainPolicyOverrideNewParamsConditionHeaderExists) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionHeaderExists) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideNewParamsConditionIP added in v0.60.0

type DomainPolicyOverrideNewParamsConditionIP struct {
	// A single IPv4 or IPv6 address
	IPAddress string `json:"ip_address" api:"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 (DomainPolicyOverrideNewParamsConditionIP) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionIP) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideNewParamsConditionIP) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideNewParamsConditionIPRange added in v0.60.0

type DomainPolicyOverrideNewParamsConditionIPRange struct {
	// The lower bound IPv4 or IPv6 address to match against
	LowerBound string `json:"lower_bound" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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 (DomainPolicyOverrideNewParamsConditionIPRange) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionIPRange) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideNewParamsConditionIPRange) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideNewParamsConditionJa3 added in v0.60.0

type DomainPolicyOverrideNewParamsConditionJa3 struct {
	// A list of JA3 TLS client fingerprints to match against the request
	Ja3Fingerprints []string `json:"ja3_fingerprints,omitzero" api:"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 JA3 TLS client fingerprint of the request

The property Ja3Fingerprints is required.

func (DomainPolicyOverrideNewParamsConditionJa3) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionJa3) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideNewParamsConditionJa3) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideNewParamsConditionJa4 added in v0.60.0

type DomainPolicyOverrideNewParamsConditionJa4 struct {
	// A list of JA4 TLS client fingerprints to match against the request
	Ja4Fingerprints []string `json:"ja4_fingerprints,omitzero" api:"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 JA4 TLS client fingerprint of the request

The property Ja4Fingerprints is required.

func (DomainPolicyOverrideNewParamsConditionJa4) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionJa4) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideNewParamsConditionJa4) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideNewParamsConditionOrganization added in v0.60.0

type DomainPolicyOverrideNewParamsConditionOrganization struct {
	// The organization to match against
	Organization string `json:"organization" api:"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 (DomainPolicyOverrideNewParamsConditionOrganization) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionOrganization) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideNewParamsConditionURL added in v0.60.0

type DomainPolicyOverrideNewParamsConditionURL 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" api:"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 (DomainPolicyOverrideNewParamsConditionURL) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionURL) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideNewParamsConditionURL) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideNewParamsConditionUserAgent added in v0.60.0

type DomainPolicyOverrideNewParamsConditionUserAgent struct {
	// The user agent value to match
	UserAgent string `json:"user_agent" api:"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 (DomainPolicyOverrideNewParamsConditionUserAgent) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideNewParamsConditionUserAgent) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideNewParamsTargetType added in v0.60.0

type DomainPolicyOverrideNewParamsTargetType string

Whether `target_ids` are detector IDs or rule IDs

const (
	DomainPolicyOverrideNewParamsTargetTypeDetector DomainPolicyOverrideNewParamsTargetType = "detector"
	DomainPolicyOverrideNewParamsTargetTypeRule     DomainPolicyOverrideNewParamsTargetType = "rule"
)

type DomainPolicyOverrideService added in v0.60.0

type DomainPolicyOverrideService struct {
	Options []option.RequestOption
}

DomainPolicyOverrideService 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 NewDomainPolicyOverrideService method instead.

func NewDomainPolicyOverrideService added in v0.60.0

func NewDomainPolicyOverrideService(opts ...option.RequestOption) (r DomainPolicyOverrideService)

NewDomainPolicyOverrideService 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 (*DomainPolicyOverrideService) Delete added in v0.60.0

func (r *DomainPolicyOverrideService) Delete(ctx context.Context, policyOverrideID int64, body DomainPolicyOverrideDeleteParams, opts ...option.RequestOption) (err error)

Delete a policy override

func (*DomainPolicyOverrideService) Get added in v0.60.0

Retrieve a policy override

func (*DomainPolicyOverrideService) List added in v0.60.0

Retrieve policy overrides

func (*DomainPolicyOverrideService) ListAutoPaging added in v0.60.0

Retrieve policy overrides

func (*DomainPolicyOverrideService) ListOwaspTopThreatsTargets added in v0.60.0

List OWASP Top Threats targets selectable as a policy override target

func (*DomainPolicyOverrideService) ListOwaspTopThreatsTargetsAutoPaging added in v0.60.0

List OWASP Top Threats targets selectable as a policy override target

func (*DomainPolicyOverrideService) New added in v0.60.0

Create a policy override

func (*DomainPolicyOverrideService) Update added in v0.60.0

Update a policy override

type DomainPolicyOverrideUpdateParams added in v0.60.0

type DomainPolicyOverrideUpdateParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// An optional note explaining the override
	Description param.Opt[string] `json:"description,omitzero"`
	// Whether the override is active
	Enabled param.Opt[bool] `json:"enabled,omitzero"`
	// The policy override's display name
	Name param.Opt[string] `json:"name,omitzero"`
	// The conditions required for the override to apply. An override may have up to 5
	// conditions; all must pass for the override to apply. Without conditions the
	// override applies to every request on the owning domain that hits a linked
	// target.
	Conditions []DomainPolicyOverrideUpdateParamsCondition `json:"conditions,omitzero"`
	// contains filtered or unexported fields
}

func (DomainPolicyOverrideUpdateParams) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParams) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideUpdateParams) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideUpdateParamsCondition added in v0.60.0

type DomainPolicyOverrideUpdateParamsCondition struct {
	// Match the country that the request originated from
	Country DomainPolicyOverrideUpdateParamsConditionCountry `json:"country,omitzero"`
	// Match an incoming request header
	Header DomainPolicyOverrideUpdateParamsConditionHeader `json:"header,omitzero"`
	// Match when an incoming request header is present
	HeaderExists DomainPolicyOverrideUpdateParamsConditionHeaderExists `json:"header_exists,omitzero"`
	// Match the incoming HTTP method
	HTTPMethod DomainPolicyOverrideUpdateParamsConditionHTTPMethod `json:"http_method,omitzero"`
	// Match the incoming request against a single IP address
	IP DomainPolicyOverrideUpdateParamsConditionIP `json:"ip,omitzero"`
	// Match the incoming request against an IP range
	IPRange DomainPolicyOverrideUpdateParamsConditionIPRange `json:"ip_range,omitzero"`
	// Match the JA3 TLS client fingerprint of the request
	Ja3 DomainPolicyOverrideUpdateParamsConditionJa3 `json:"ja3,omitzero"`
	// Match the JA4 TLS client fingerprint of the request
	Ja4 DomainPolicyOverrideUpdateParamsConditionJa4 `json:"ja4,omitzero"`
	// Match the organization the request originated from, as determined by a WHOIS
	// lookup of the requesting IP
	Organization DomainPolicyOverrideUpdateParamsConditionOrganization `json:"organization,omitzero"`
	// Match the incoming request URL
	URL DomainPolicyOverrideUpdateParamsConditionURL `json:"url,omitzero"`
	// Match the user agent making the request
	UserAgent DomainPolicyOverrideUpdateParamsConditionUserAgent `json:"user_agent,omitzero"`
	// contains filtered or unexported fields
}

A single policy override condition. Only one of the fields below may be set.

Limited to the subset of `CustomRuleConditionScope` scopes that policy overrides support (Lime wire-format translation is reused from Custom Rules' own `app.models.customer_rules.lime_translation.ConditionMapper`).

func (DomainPolicyOverrideUpdateParamsCondition) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsCondition) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideUpdateParamsCondition) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideUpdateParamsConditionCountry added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionCountry struct {
	// A list of ISO 3166-1 alpha-2 formatted strings representing the countries to
	// match against
	CountryCode []string `json:"country_code,omitzero" api:"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 (DomainPolicyOverrideUpdateParamsConditionCountry) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsConditionCountry) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionHTTPMethod added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionHTTPMethod struct {
	// HTTP methods of a request
	//
	// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
	// "TRACE".
	HTTPMethod string `json:"http_method,omitzero" api:"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 (DomainPolicyOverrideUpdateParamsConditionHTTPMethod) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsConditionHTTPMethod) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionHeader added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionHeader struct {
	// The request header name
	Header string `json:"header" api:"required"`
	// The request header value
	Value string `json:"value" api:"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 (DomainPolicyOverrideUpdateParamsConditionHeader) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsConditionHeader) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionHeaderExists added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionHeaderExists struct {
	// The request header name
	Header string `json:"header" api:"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 (DomainPolicyOverrideUpdateParamsConditionHeaderExists) MarshalJSON added in v0.60.0

func (*DomainPolicyOverrideUpdateParamsConditionHeaderExists) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionIP added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionIP struct {
	// A single IPv4 or IPv6 address
	IPAddress string `json:"ip_address" api:"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 (DomainPolicyOverrideUpdateParamsConditionIP) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsConditionIP) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideUpdateParamsConditionIP) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideUpdateParamsConditionIPRange added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionIPRange struct {
	// The lower bound IPv4 or IPv6 address to match against
	LowerBound string `json:"lower_bound" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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 (DomainPolicyOverrideUpdateParamsConditionIPRange) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsConditionIPRange) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionJa3 added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionJa3 struct {
	// A list of JA3 TLS client fingerprints to match against the request
	Ja3Fingerprints []string `json:"ja3_fingerprints,omitzero" api:"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 JA3 TLS client fingerprint of the request

The property Ja3Fingerprints is required.

func (DomainPolicyOverrideUpdateParamsConditionJa3) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsConditionJa3) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideUpdateParamsConditionJa3) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideUpdateParamsConditionJa4 added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionJa4 struct {
	// A list of JA4 TLS client fingerprints to match against the request
	Ja4Fingerprints []string `json:"ja4_fingerprints,omitzero" api:"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 JA4 TLS client fingerprint of the request

The property Ja4Fingerprints is required.

func (DomainPolicyOverrideUpdateParamsConditionJa4) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsConditionJa4) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideUpdateParamsConditionJa4) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideUpdateParamsConditionOrganization added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionOrganization struct {
	// The organization to match against
	Organization string `json:"organization" api:"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 (DomainPolicyOverrideUpdateParamsConditionOrganization) MarshalJSON added in v0.60.0

func (*DomainPolicyOverrideUpdateParamsConditionOrganization) UnmarshalJSON added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionURL added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionURL 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" api:"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 (DomainPolicyOverrideUpdateParamsConditionURL) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsConditionURL) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyOverrideUpdateParamsConditionURL) UnmarshalJSON(data []byte) error

type DomainPolicyOverrideUpdateParamsConditionUserAgent added in v0.60.0

type DomainPolicyOverrideUpdateParamsConditionUserAgent struct {
	// The user agent value to match
	UserAgent string `json:"user_agent" api:"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 (DomainPolicyOverrideUpdateParamsConditionUserAgent) MarshalJSON added in v0.60.0

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

func (*DomainPolicyOverrideUpdateParamsConditionUserAgent) UnmarshalJSON added in v0.60.0

type DomainPolicyService added in v0.3.0

type DomainPolicyService struct {
	Options []option.RequestOption
}

WAAP security policies are the built-in protection rules of a domain. Each policy can be turned on or off.

DomainPolicyService 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 NewDomainPolicyService method instead.

func NewDomainPolicyService added in v0.3.0

func NewDomainPolicyService(opts ...option.RequestOption) (r DomainPolicyService)

NewDomainPolicyService 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 (*DomainPolicyService) Get added in v0.60.0

Retrieve the configuration of a security policy on a domain.

func (*DomainPolicyService) List added in v0.60.0

Retrieve a paginated list of policies linked to a particular domain, optionally filtered by rule set

func (*DomainPolicyService) ListAutoPaging added in v0.60.0

Retrieve a paginated list of policies linked to a particular domain, optionally filtered by rule set

func (*DomainPolicyService) Update added in v0.60.0

Configure a security policy on a domain.

type DomainPolicyUpdateParams added in v0.60.0

type DomainPolicyUpdateParams struct {
	// The domain ID
	DomainID int64 `path:"domain_id" api:"required" json:"-"`
	// Configurable settings of a security rule (a.k.a. policy) on a domain.
	WaapDomainPolicySettings WaapDomainPolicySettingsParam
	// contains filtered or unexported fields
}

func (DomainPolicyUpdateParams) MarshalJSON added in v0.60.0

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

func (*DomainPolicyUpdateParams) UnmarshalJSON added in v0.60.0

func (r *DomainPolicyUpdateParams) UnmarshalJSON(data []byte) error

type DomainService

type DomainService struct {
	Options []option.RequestOption
	// WAAP security policies are the built-in protection rules of a domain. Each
	// policy can be turned on or off.
	Policies        DomainPolicyService
	PolicyOverrides DomainPolicyOverrideService
	// WAAP domain settings control the DDoS protection thresholds and API detection of
	// a domain.
	Settings        DomainSettingService
	APIPaths        DomainAPIPathService
	APIPathGroups   DomainAPIPathGroupService
	APIDiscovery    DomainAPIDiscoveryService
	Insights        DomainInsightService
	InsightSilences DomainInsightSilenceService
	Statistics      DomainStatisticService
	// WAAP custom rules allow, block, challenge, monitor or tag requests to a domain
	// when all of their conditions match.
	CustomRules DomainCustomRuleService
	// WAAP firewall rules allow or block requests to a domain based on the client IP
	// address or IP range.
	FirewallRules DomainFirewallRuleService
	// Advanced rules are CEL-expression WAAP rules that allow, block, challenge,
	// monitor or tag requests to a domain.
	AdvancedRules DomainAdvancedRuleService
}

WAAP domains enable Web Application and API Protection for monitoring and defending web applications against security threats.

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

Retrieve a list of domains associated with the client, including traffic statistics

func (*DomainService) ListAutoPaging

Retrieve a list of domains associated with the client, including traffic statistics

func (*DomainService) ListRuleSets added in v0.3.0

func (r *DomainService) ListRuleSets(ctx context.Context, domainID int64, query DomainListRuleSetsParams, opts ...option.RequestOption) (res *pagination.OffsetPage[WaapRuleSet], err error)

Retrieve a paginated list of policy rule sets available for a particular domain. Use [List domain policies](#operation/`list_domain_policies_v2_domains__domain_id__policies_get`) to fetch the policies.

func (*DomainService) ListRuleSetsAutoPaging added in v0.60.0

func (r *DomainService) ListRuleSetsAutoPaging(ctx context.Context, domainID int64, query DomainListRuleSetsParams, opts ...option.RequestOption) *pagination.OffsetPageAutoPager[WaapRuleSet]

Retrieve a paginated list of policy rule sets available for a particular domain. Use [List domain policies](#operation/`list_domain_policies_v2_domains__domain_id__policies_get`) to fetch the policies.

func (*DomainService) Update

func (r *DomainService) Update(ctx context.Context, domainID int64, body DomainUpdateParams, opts ...option.RequestOption) (res *WaapDetailedDomain, err error)

Update domain

type DomainSettingService

type DomainSettingService struct {
	Options []option.RequestOption
}

WAAP domain settings control the DDoS protection thresholds and API detection of a domain.

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

Set various settings for a specific domain. Omitted settings will remain unchanged.

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 base paths for a domain. If your domain has a common base path for all
	// API endpoints, it can be set here. When set or updated, each entry must contain
	// at least one letter or digit; a value that would match the whole domain (such as
	// "/") is rejected - to treat the entire domain as an API domain, use the `is_api`
	// field instead.
	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 {
	// End time of the search interval. Excludes attacks that started after it. If not
	// provided or in the future, the current date and time is used
	EndTime param.Opt[time.Time] `query:"end_time,omitzero" format:"date-time" json:"-"`
	// Start time of the search interval. Excludes attacks that ended before it. Must
	// precede `end_time`. Attacks are kept for 180 days
	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", "COUNTRY", "JA4".
	GroupBy DomainStatisticGetDDOSInfoParamsGroupBy `query:"group_by,omitzero" api:"required" json:"-"`
	// Filter data items starting from a specified date in ISO 8601 format
	Start string `query:"start" api:"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"
	DomainStatisticGetDDOSInfoParamsGroupByCountry   DomainStatisticGetDDOSInfoParamsGroupBy = "COUNTRY"
	DomainStatisticGetDDOSInfoParamsGroupByJa4       DomainStatisticGetDDOSInfoParamsGroupBy = "JA4"
)

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" api:"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 "allow", "block", "captcha", "handshake".
	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

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" api:"required" json:"-"`
	// contains filtered or unexported fields
}

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

Retrieve a domain's DDoS attacks

func (*DomainStatisticService) GetDDOSAttacksAutoPaging added in v0.10.0

Retrieve a domain's DDoS attacks

func (*DomainStatisticService) GetDDOSInfo added in v0.10.0

Returns the top DDoS counts grouped by URL, User-Agent, IP, COUNTRY or JA4. Requests without a country or a JA4 fingerprint are excluded from those groupings. Countries are ISO 3166-1 alpha-2 codes

func (*DomainStatisticService) GetDDOSInfoAutoPaging added in v0.10.0

Returns the top DDoS counts grouped by URL, User-Agent, IP, COUNTRY or JA4. Requests without a country or a JA4 fingerprint are excluded from those groupings. Countries are ISO 3166-1 alpha-2 codes

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

type DomainUpdateParams

type DomainUpdateParams struct {
	// The current status of the domain
	//
	// Any of "active", "monitor".
	Status DomainUpdateParamsStatus `json:"status,omitzero" api:"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 Error

type Error = apierror.Error

type FilterTemplateListParams added in v0.60.0

type FilterTemplateListParams struct {
	// Number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter template names by case-insensitive substring match
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Number of items to skip
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FilterTemplateListParams) URLQuery added in v0.60.0

func (r FilterTemplateListParams) URLQuery() (v url.Values, err error)

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

type FilterTemplateNewParams added in v0.60.0

type FilterTemplateNewParams struct {
	// Arbitrary JSON object storing the frontend filter state
	FilterConfig map[string]any `json:"filter_config,omitzero" api:"required"`
	// Human-readable template name
	Name string `json:"name" api:"required"`
	// contains filtered or unexported fields
}

func (FilterTemplateNewParams) MarshalJSON added in v0.60.0

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

func (*FilterTemplateNewParams) UnmarshalJSON added in v0.60.0

func (r *FilterTemplateNewParams) UnmarshalJSON(data []byte) error

type FilterTemplateService added in v0.60.0

type FilterTemplateService struct {
	Options []option.RequestOption
}

FilterTemplateService 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 NewFilterTemplateService method instead.

func NewFilterTemplateService added in v0.60.0

func NewFilterTemplateService(opts ...option.RequestOption) (r FilterTemplateService)

NewFilterTemplateService 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 (*FilterTemplateService) Delete added in v0.60.0

func (r *FilterTemplateService) Delete(ctx context.Context, templateID int64, opts ...option.RequestOption) (err error)

Delete a filter template owned by the authenticated user.

func (*FilterTemplateService) Get added in v0.60.0

func (r *FilterTemplateService) Get(ctx context.Context, templateID int64, opts ...option.RequestOption) (res *WaapFilterTemplate, err error)

Retrieve a single filter template, scoped to the authenticated user.

func (*FilterTemplateService) List added in v0.60.0

List filter templates owned by the authenticated user.

func (*FilterTemplateService) ListAutoPaging added in v0.60.0

List filter templates owned by the authenticated user.

func (*FilterTemplateService) New added in v0.60.0

Create a filter template for the authenticated user.

func (*FilterTemplateService) Update added in v0.60.0

Update or rename a filter template owned by the authenticated user.

type FilterTemplateUpdateParams added in v0.60.0

type FilterTemplateUpdateParams struct {
	// Human-readable template name
	Name param.Opt[string] `json:"name,omitzero"`
	// Arbitrary JSON object storing the frontend filter state
	FilterConfig map[string]any `json:"filter_config,omitzero"`
	// contains filtered or unexported fields
}

func (FilterTemplateUpdateParams) MarshalJSON added in v0.60.0

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

func (*FilterTemplateUpdateParams) UnmarshalJSON added in v0.60.0

func (r *FilterTemplateUpdateParams) UnmarshalJSON(data []byte) error

type FirewallRuleListParams added in v0.60.0

type FirewallRuleListParams struct {
	// Filter rules by description (supports wildcards)
	Description param.Opt[string] `query:"description,omitzero" json:"-"`
	// Filter by enabled status
	Enabled param.Opt[bool] `query:"enabled,omitzero" json:"-"`
	// Number of items to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Filter rules by name (supports wildcards)
	Name param.Opt[string] `query:"name,omitzero" json:"-"`
	// Number of items to skip
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// Order results by field (prefix with - for descending)
	//
	// Any of "id", "name", "description", "enabled", "action", "-id", "-name",
	// "-description", "-enabled", "-action".
	Ordering FirewallRuleListParamsOrdering `query:"ordering,omitzero" json:"-"`
	// Filter by action type
	//
	// Any of "allow", "block".
	Action FirewallRuleListParamsAction `query:"action,omitzero" json:"-"`
	// Filter by domain IDs (can specify multiple)
	DomainIDs []int64 `query:"domain_ids,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (FirewallRuleListParams) URLQuery added in v0.60.0

func (r FirewallRuleListParams) URLQuery() (v url.Values, err error)

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

type FirewallRuleListParamsAction added in v0.60.0

type FirewallRuleListParamsAction string

Filter by action type

const (
	FirewallRuleListParamsActionAllow FirewallRuleListParamsAction = "allow"
	FirewallRuleListParamsActionBlock FirewallRuleListParamsAction = "block"
)

type FirewallRuleListParamsOrdering added in v0.60.0

type FirewallRuleListParamsOrdering string

Order results by field (prefix with - for descending)

const (
	FirewallRuleListParamsOrderingID               FirewallRuleListParamsOrdering = "id"
	FirewallRuleListParamsOrderingName             FirewallRuleListParamsOrdering = "name"
	FirewallRuleListParamsOrderingDescription      FirewallRuleListParamsOrdering = "description"
	FirewallRuleListParamsOrderingEnabled          FirewallRuleListParamsOrdering = "enabled"
	FirewallRuleListParamsOrderingAction           FirewallRuleListParamsOrdering = "action"
	FirewallRuleListParamsOrderingMinusID          FirewallRuleListParamsOrdering = "-id"
	FirewallRuleListParamsOrderingMinusName        FirewallRuleListParamsOrdering = "-name"
	FirewallRuleListParamsOrderingMinusDescription FirewallRuleListParamsOrdering = "-description"
	FirewallRuleListParamsOrderingMinusEnabled     FirewallRuleListParamsOrdering = "-enabled"
	FirewallRuleListParamsOrderingMinusAction      FirewallRuleListParamsOrdering = "-action"
)

type FirewallRuleService added in v0.60.0

type FirewallRuleService struct {
	Options []option.RequestOption
}

FirewallRuleService 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 NewFirewallRuleService method instead.

func NewFirewallRuleService added in v0.60.0

func NewFirewallRuleService(opts ...option.RequestOption) (r FirewallRuleService)

NewFirewallRuleService 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 (*FirewallRuleService) List added in v0.60.0

Returns all firewall rules across all domains belonging to the authenticated account. Supports filtering, ordering, and pagination.

func (*FirewallRuleService) ListAutoPaging added in v0.60.0

Returns all firewall rules across all domains belonging to the authenticated account. Supports filtering, ordering, and pagination.

type IPInfoGetAccountAttackTimeSeriesParams added in v0.60.0

type IPInfoGetAccountAttackTimeSeriesParams struct {
	// The IP address to check
	IP string `query:"ip" api:"required" format:"ipv4" json:"-"`
	// Number of days to look back for attack data
	Days param.Opt[int64] `query:"days,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (IPInfoGetAccountAttackTimeSeriesParams) URLQuery added in v0.60.0

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

type IPInfoGetAccountCountsParams added in v0.60.0

type IPInfoGetAccountCountsParams struct {
	// The IP address to check
	IP string `query:"ip" api:"required" format:"ipv4" json:"-"`
	// contains filtered or unexported fields
}

func (IPInfoGetAccountCountsParams) URLQuery added in v0.60.0

func (r IPInfoGetAccountCountsParams) URLQuery() (v url.Values, err error)

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

type IPInfoGetAccountTopUserAgentsParams added in v0.60.0

type IPInfoGetAccountTopUserAgentsParams struct {
	// The IP address to check
	IP string `query:"ip" api:"required" format:"ipv4" json:"-"`
	// contains filtered or unexported fields
}

func (IPInfoGetAccountTopUserAgentsParams) URLQuery added in v0.60.0

func (r IPInfoGetAccountTopUserAgentsParams) URLQuery() (v url.Values, err error)

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

type IPInfoGetAttackTimeSeriesParams added in v0.3.0

type IPInfoGetAttackTimeSeriesParams struct {
	// The IP address to check
	IP string `query:"ip" api:"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" api:"required" json:"-"`
	// The IP address to check
	IP string `query:"ip" api:"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" api:"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" api:"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 IPInfoGetTopAttacksParams added in v0.60.0

type IPInfoGetTopAttacksParams struct {
	// The IP address to check
	IP string `query:"ip" api:"required" format:"ipv4" json:"-"`
	// contains filtered or unexported fields
}

func (IPInfoGetTopAttacksParams) URLQuery added in v0.60.0

func (r IPInfoGetTopAttacksParams) URLQuery() (v url.Values, err error)

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

type IPInfoGetTopDomainsParams added in v0.60.0

type IPInfoGetTopDomainsParams struct {
	// The IP address to check
	IP string `query:"ip" api:"required" format:"ipv4" json:"-"`
	// contains filtered or unexported fields
}

func (IPInfoGetTopDomainsParams) URLQuery added in v0.60.0

func (r IPInfoGetTopDomainsParams) URLQuery() (v url.Values, err error)

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

type IPInfoGetTopPathsParams added in v0.60.0

type IPInfoGetTopPathsParams struct {
	// The IP address to check
	IP string `query:"ip" api:"required" format:"ipv4" json:"-"`
	// contains filtered or unexported fields
}

func (IPInfoGetTopPathsParams) URLQuery added in v0.60.0

func (r IPInfoGetTopPathsParams) URLQuery() (v url.Values, err error)

URLQuery serializes IPInfoGetTopPathsParams'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" api:"required" json:"-"`
	// The IP address to check
	IP string `query:"ip" api:"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" api:"required" json:"-"`
	// The IP address to check
	IP string `query:"ip" api:"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" api:"required" json:"-"`
	// The IP address to check
	IP string `query:"ip" api:"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" api:"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" api:"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

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) GetAccountAttackTimeSeries added in v0.60.0

func (r *IPInfoService) GetAccountAttackTimeSeries(ctx context.Context, query IPInfoGetAccountAttackTimeSeriesParams, opts ...option.RequestOption) (res *[]WaapTimeSeriesAttack, err error)

Retrieve a time-series of attacks originating from a specified IP address, scoped to the authenticated account's domains

func (*IPInfoService) GetAccountCounts added in v0.60.0

func (r *IPInfoService) GetAccountCounts(ctx context.Context, query IPInfoGetAccountCountsParams, opts ...option.RequestOption) (res *WaapIPInfoCountsV2, err error)

Retrieve comprehensive metrics for an IP address including distinct counts of attack types, domains, paths, and user agents across all account domains

func (*IPInfoService) GetAccountTopUserAgents added in v0.60.0

func (r *IPInfoService) GetAccountTopUserAgents(ctx context.Context, query IPInfoGetAccountTopUserAgentsParams, opts ...option.RequestOption) (res *[]WaapTopUserAgentDetail, err error)

Retrieve up to 10 top user agents associated with an IP across all account domains.

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) GetTopAttacks added in v0.60.0

func (r *IPInfoService) GetTopAttacks(ctx context.Context, query IPInfoGetTopAttacksParams, opts ...option.RequestOption) (res *[]WaapTopAttack, err error)

Returns top attack types with associated domains, paths, and counts across all account domains

func (*IPInfoService) GetTopDomains added in v0.60.0

func (r *IPInfoService) GetTopDomains(ctx context.Context, query IPInfoGetTopDomainsParams, opts ...option.RequestOption) (res *[]WaapTopDomainDetail, err error)

Retrieve top attacked domains for an IP address, scoped to the authenticated account's domains

func (*IPInfoService) GetTopPaths added in v0.60.0

func (r *IPInfoService) GetTopPaths(ctx context.Context, query IPInfoGetTopPathsParams, opts ...option.RequestOption) (res *[]WaapTopPathDetail, err error)

Retrieve top attacked paths for an IP address, scoped to the authenticated account's domains

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 IPReputationClearLocalTagsParams added in v0.60.0

type IPReputationClearLocalTagsParams struct {
	Items []IPReputationClearLocalTagsParamsItem
	// contains filtered or unexported fields
}

func (IPReputationClearLocalTagsParams) MarshalJSON added in v0.60.0

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

func (*IPReputationClearLocalTagsParams) UnmarshalJSON added in v0.60.0

func (r *IPReputationClearLocalTagsParams) UnmarshalJSON(data []byte) error

type IPReputationClearLocalTagsParamsItem added in v0.60.0

type IPReputationClearLocalTagsParamsItem struct {
	// The domain ID to delete tags for
	DomainID int64 `json:"domain_id" api:"required"`
	// The IP address to delete tags for
	IP string `json:"ip" api:"required" format:"ipvanyaddress"`
	// contains filtered or unexported fields
}

Request model for deleting local IP tags.

The properties DomainID, IP are required.

func (IPReputationClearLocalTagsParamsItem) MarshalJSON added in v0.60.0

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

func (*IPReputationClearLocalTagsParamsItem) UnmarshalJSON added in v0.60.0

func (r *IPReputationClearLocalTagsParamsItem) UnmarshalJSON(data []byte) error

type IPReputationListParams added in v0.60.0

type IPReputationListParams struct {
	// The IP address to check
	IP string `query:"ip" api:"required" format:"ipvanyaddress" 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 "date", "-date", "domain_name", "-domain_name".
	Ordering IPReputationListParamsOrdering `query:"ordering,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (IPReputationListParams) URLQuery added in v0.60.0

func (r IPReputationListParams) URLQuery() (v url.Values, err error)

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

type IPReputationListParamsOrdering added in v0.60.0

type IPReputationListParamsOrdering string

Sort the response by given field.

const (
	IPReputationListParamsOrderingDate            IPReputationListParamsOrdering = "date"
	IPReputationListParamsOrderingMinusDate       IPReputationListParamsOrdering = "-date"
	IPReputationListParamsOrderingDomainName      IPReputationListParamsOrdering = "domain_name"
	IPReputationListParamsOrderingMinusDomainName IPReputationListParamsOrdering = "-domain_name"
)

type IPReputationService added in v0.60.0

type IPReputationService struct {
	Options []option.RequestOption
}

IPReputationService 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 NewIPReputationService method instead.

func NewIPReputationService added in v0.60.0

func NewIPReputationService(opts ...option.RequestOption) (r IPReputationService)

NewIPReputationService 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 (*IPReputationService) ClearLocalTags added in v0.60.0

Clear all tags associated between the provided IP addresses and domains.

func (*IPReputationService) List added in v0.60.0

Retrieve a list of tags associated with the IP address grouped by domains. This will return records for all domains which were accessed by the IP and received tags.

func (*IPReputationService) ListAutoPaging added in v0.60.0

Retrieve a list of tags associated with the IP address grouped by domains. This will return records for all domains which were accessed by the IP and received tags.

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:"-"`
	// Filter by 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

Insight types are generalized categories that encompass various specific occurrences of the same kind.

func (*InsightService) ListTypesAutoPaging added in v0.10.0

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

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

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 PrebillingGetBreakdownParams added in v0.63.0

type PrebillingGetBreakdownParams struct {
	// The report start date (inclusive) in ISO 8601 format
	From time.Time `query:"from" api:"required" format:"date" json:"-"`
	// The report end date (exclusive) in ISO 8601 format
	To time.Time `query:"to" api:"required" format:"date" json:"-"`
	// Number of clients to return
	Limit param.Opt[int64] `query:"limit,omitzero" json:"-"`
	// Number of clients to skip
	Offset param.Opt[int64] `query:"offset,omitzero" json:"-"`
	// contains filtered or unexported fields
}

func (PrebillingGetBreakdownParams) URLQuery added in v0.63.0

func (r PrebillingGetBreakdownParams) URLQuery() (v url.Values, err error)

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

type PrebillingGetBreakdownParamsMetric added in v0.63.0

type PrebillingGetBreakdownParamsMetric string

The metric to get billable consumption for

const (
	PrebillingGetBreakdownParamsMetricDomains       PrebillingGetBreakdownParamsMetric = "domains"
	PrebillingGetBreakdownParamsMetricVolume        PrebillingGetBreakdownParamsMetric = "volume"
	PrebillingGetBreakdownParamsMetricRequests      PrebillingGetBreakdownParamsMetric = "requests"
	PrebillingGetBreakdownParamsMetricRequestsClean PrebillingGetBreakdownParamsMetric = "requests_clean"
)

type PrebillingGetTotalParams added in v0.60.0

type PrebillingGetTotalParams struct {
	// The report start date (inclusive) in ISO 8601 format
	From time.Time `query:"from" api:"required" format:"date" json:"-"`
	// The report end date (exclusive) in ISO 8601 format
	To time.Time `query:"to" api:"required" format:"date" 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 (PrebillingGetTotalParams) URLQuery added in v0.60.0

func (r PrebillingGetTotalParams) URLQuery() (v url.Values, err error)

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

type PrebillingGetTotalParamsMetric added in v0.60.0

type PrebillingGetTotalParamsMetric string

The metric to get billable consumption for

const (
	PrebillingGetTotalParamsMetricDomains       PrebillingGetTotalParamsMetric = "domains"
	PrebillingGetTotalParamsMetricVolume        PrebillingGetTotalParamsMetric = "volume"
	PrebillingGetTotalParamsMetricRequests      PrebillingGetTotalParamsMetric = "requests"
	PrebillingGetTotalParamsMetricRequestsClean PrebillingGetTotalParamsMetric = "requests_clean"
)

type PrebillingService added in v0.60.0

type PrebillingService struct {
	Options []option.RequestOption
}

PrebillingService 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 NewPrebillingService method instead.

func NewPrebillingService added in v0.60.0

func NewPrebillingService(opts ...option.RequestOption) (r PrebillingService)

NewPrebillingService 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 (*PrebillingService) GetBreakdown added in v0.63.0

Retrieve a report on the calling client's own billable consumption by given metric with per-account breakdown. The report is paginated by accounts: `limit`, `offset` and `count` are counted in accounts, and each account is returned with all its items on exactly one page

func (*PrebillingService) GetBreakdownAutoPaging added in v0.63.0

Retrieve a report on the calling client's own billable consumption by given metric with per-account breakdown. The report is paginated by accounts: `limit`, `offset` and `count` are counted in accounts, and each account is returned with all its items on exactly one page

func (*PrebillingService) GetTotal added in v0.60.0

Retrieve an aggregated report on the calling client's own billable consumption by given metric

func (*PrebillingService) GetTotalAutoPaging added in v0.60.0

Retrieve an aggregated report on the calling client's own billable consumption by given metric

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" api:"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" api:"required" json:"-"`
	// List of metric types to retrieve statistics for.
	//
	// Any of "total_bytes", "total_requests".
	Metrics []string `query:"metrics,omitzero" api:"required" json:"-"`
	// End of the requested time period (ISO 8601 format, UTC)
	To time.Time `query:"to" api:"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

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

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" api:"nullable"`
	// Indicates if periodic scan of the description file is enabled
	DescriptionFileScanEnabled bool `json:"descriptionFileScanEnabled" api:"nullable"`
	// The interval in hours for scanning the description file
	DescriptionFileScanIntervalHours int64 `json:"descriptionFileScanIntervalHours" api:"nullable"`
	// Indicates if traffic scan is enabled. Traffic scan is used to discover
	// undocumented APIs
	TrafficScanEnabled bool `json:"trafficScanEnabled" api:"nullable"`
	// The interval in hours for scanning the traffic
	TrafficScanIntervalHours int64 `json:"trafficScanIntervalHours" api:"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" api:"required" format:"uuid"`
	// An array of api groups associated with the API path
	APIGroups []string `json:"api_groups" api:"required"`
	// The API version
	APIVersion string `json:"api_version" api:"required"`
	// The date and time in ISO 8601 format the API path was first detected.
	FirstDetected time.Time `json:"first_detected" api:"required" format:"date-time"`
	// The HTTP version of the API path
	//
	// Any of "HTTP", "HTTPS".
	HTTPScheme WaapAPIPathHTTPScheme `json:"http_scheme" api:"required"`
	// The date and time in ISO 8601 format the API path was last detected.
	LastDetected time.Time `json:"last_detected" api:"required" format:"date-time"`
	// The API RESTful method
	//
	// Any of "GET", "POST", "PUT", "PATCH", "DELETE", "TRACE", "HEAD", "OPTIONS".
	Method WaapAPIPathMethod `json:"method" api:"required"`
	// The API path, locations that are saved for resource IDs will be put in curly
	// brackets
	Path string `json:"path" api:"required"`
	// The number of requests for this path in the last 24 hours
	RequestCount int64 `json:"request_count" api:"required"`
	// The source of the discovered API
	//
	// Any of "API_DESCRIPTION_FILE", "TRAFFIC_SCAN", "USER_DEFINED".
	Source WaapAPIPathSource `json:"source" api:"required"`
	// The status of the discovered API path
	//
	// Any of "CONFIRMED_API", "POTENTIAL_API", "NOT_API", "DELISTED_API".
	Status WaapAPIPathStatus `json:"status" api:"required"`
	// An array of tags associated with the API path
	Tags []string `json:"tags" api:"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" api:"required" format:"uuid"`
	// The date and time the scan ended
	EndTime time.Time `json:"end_time" api:"required" format:"date-time"`
	// The message associated with the scan
	Message string `json:"message" api:"required"`
	// The date and time the scan started
	StartTime time.Time `json:"start_time" api:"required" format:"date-time"`
	// The status of the scan
	//
	// Any of "SUCCESS", "FAILURE", "IN_PROGRESS".
	Status WaapAPIScanResultStatus `json:"status" api:"required"`
	// The type of scan
	//
	// Any of "TRAFFIC_SCAN", "API_DESCRIPTION_FILE_SCAN".
	Type WaapAPIScanResultType `json:"type" api:"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 WaapAccountFirewallRule added in v0.60.0

type WaapAccountFirewallRule struct {
	// The unique identifier for the rule
	ID int64 `json:"id" api:"required"`
	// The action that the rule takes when triggered
	Action WaapAccountFirewallRuleAction `json:"action" api:"required"`
	// The condition required for the WAAP engine to trigger the rule.
	Conditions []WaapAccountFirewallRuleCondition `json:"conditions" api:"required"`
	// A description assigned to the rule.
	Description string `json:"description" api:"required"`
	// The domain this firewall rule belongs to
	Domain WaapAccountFirewallRuleDomain `json:"domain" api:"required"`
	// Whether or not the rule is enabled
	Enabled bool `json:"enabled" api:"required"`
	// The name assigned to the rule
	Name string `json:"name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Action      respjson.Field
		Conditions  respjson.Field
		Description respjson.Field
		Domain      respjson.Field
		Enabled     respjson.Field
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Firewall rule response for account-level queries with domain information

func (WaapAccountFirewallRule) RawJSON added in v0.60.0

func (r WaapAccountFirewallRule) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapAccountFirewallRule) UnmarshalJSON added in v0.60.0

func (r *WaapAccountFirewallRule) UnmarshalJSON(data []byte) error

type WaapAccountFirewallRuleAction added in v0.60.0

type WaapAccountFirewallRuleAction struct {
	// The WAAP allows the request
	Allow map[string]any `json:"allow" api:"nullable"`
	// WAAP block action behavior could be configured with response status code and
	// action duration.
	Block WaapAccountFirewallRuleActionBlock `json:"block" api:"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 (WaapAccountFirewallRuleAction) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapAccountFirewallRuleAction) UnmarshalJSON added in v0.60.0

func (r *WaapAccountFirewallRuleAction) UnmarshalJSON(data []byte) error

type WaapAccountFirewallRuleActionBlock added in v0.60.0

type WaapAccountFirewallRuleActionBlock 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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration string `json:"action_duration"`
	// An 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 (WaapAccountFirewallRuleActionBlock) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapAccountFirewallRuleActionBlock) UnmarshalJSON added in v0.60.0

func (r *WaapAccountFirewallRuleActionBlock) UnmarshalJSON(data []byte) error

type WaapAccountFirewallRuleCondition added in v0.60.0

type WaapAccountFirewallRuleCondition struct {
	// Match the incoming request against a single IP address
	IP WaapAccountFirewallRuleConditionIP `json:"ip"`
	// Match the incoming request against an IP range
	IPRange WaapAccountFirewallRuleConditionIPRange `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 (WaapAccountFirewallRuleCondition) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapAccountFirewallRuleCondition) UnmarshalJSON added in v0.60.0

func (r *WaapAccountFirewallRuleCondition) UnmarshalJSON(data []byte) error

type WaapAccountFirewallRuleConditionIP added in v0.60.0

type WaapAccountFirewallRuleConditionIP struct {
	// A single IPv4 or IPv6 address
	IPAddress string `json:"ip_address" api:"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 (WaapAccountFirewallRuleConditionIP) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapAccountFirewallRuleConditionIP) UnmarshalJSON added in v0.60.0

func (r *WaapAccountFirewallRuleConditionIP) UnmarshalJSON(data []byte) error

type WaapAccountFirewallRuleConditionIPRange added in v0.60.0

type WaapAccountFirewallRuleConditionIPRange struct {
	// The lower bound IPv4 or IPv6 address to match against
	LowerBound string `json:"lower_bound" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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 (WaapAccountFirewallRuleConditionIPRange) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapAccountFirewallRuleConditionIPRange) UnmarshalJSON added in v0.60.0

func (r *WaapAccountFirewallRuleConditionIPRange) UnmarshalJSON(data []byte) error

type WaapAccountFirewallRuleDomain added in v0.60.0

type WaapAccountFirewallRuleDomain struct {
	// The domain ID
	ID int64 `json:"id" api:"required"`
	// The domain name
	Name string `json:"name" api:"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:"-"`
}

The domain this firewall rule belongs to

func (WaapAccountFirewallRuleDomain) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapAccountFirewallRuleDomain) UnmarshalJSON added in v0.60.0

func (r *WaapAccountFirewallRuleDomain) UnmarshalJSON(data []byte) error

type WaapAccountOverview added in v0.60.0

type WaapAccountOverview struct {
	// The client ID
	ID int64 `json:"id" api:"required"`
	// List of enabled features
	Features []string `json:"features" api:"required"`
	// Quotas for the client
	Quotas map[string]WaapAccountOverviewQuota `json:"quotas" api:"required"`
	// Information about the WAAP service status
	Service WaapAccountOverviewService `json:"service" api:"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 (WaapAccountOverview) RawJSON added in v0.60.0

func (r WaapAccountOverview) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapAccountOverview) UnmarshalJSON added in v0.60.0

func (r *WaapAccountOverview) UnmarshalJSON(data []byte) error

type WaapAccountOverviewQuota added in v0.60.0

type WaapAccountOverviewQuota struct {
	// The maximum allowed number of this resource
	Allowed int64 `json:"allowed" api:"required"`
	// The current number of this resource
	Current int64 `json:"current" api:"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 (WaapAccountOverviewQuota) RawJSON added in v0.60.0

func (r WaapAccountOverviewQuota) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapAccountOverviewQuota) UnmarshalJSON added in v0.60.0

func (r *WaapAccountOverviewQuota) UnmarshalJSON(data []byte) error

type WaapAccountOverviewService added in v0.60.0

type WaapAccountOverviewService struct {
	// Whether the service is enabled
	Enabled bool `json:"enabled" api:"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 (WaapAccountOverviewService) RawJSON added in v0.60.0

func (r WaapAccountOverviewService) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapAccountOverviewService) UnmarshalJSON added in v0.60.0

func (r *WaapAccountOverviewService) UnmarshalJSON(data []byte) error

type WaapAdvancedRule added in v0.3.0

type WaapAdvancedRule struct {
	// The unique identifier for the rule
	ID int64 `json:"id" api:"required"`
	// The action that the rule takes when triggered. Only one action can be set per
	// rule.
	Action WaapAdvancedRuleAction `json:"action" api:"required"`
	// A description assigned to the rule.
	Description string `json:"description" api:"required"`
	// Whether or not the rule is enabled
	Enabled bool `json:"enabled" api:"required"`
	// The name assigned to the rule
	Name string `json:"name" api:"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" api:"required"`
	// 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" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Action      respjson.Field
		Description respjson.Field
		Enabled     respjson.Field
		Name        respjson.Field
		Source      respjson.Field
		Phase       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Full advanced rule representation

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 allows the request
	Allow map[string]any `json:"allow"`
	// WAAP block action behavior could be configured with response status code and
	// action duration.
	Block WaapAdvancedRuleActionBlock `json:"block"`
	// The WAAP presents the user with a captcha
	Captcha map[string]any `json:"captcha"`
	// The WAAP performs automatic browser validation
	Handshake map[string]any `json:"handshake"`
	// The WAAP monitors the request but takes no action
	Monitor map[string]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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration string `json:"action_duration"`
	// An 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" api:"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" api:"required"`
	// The object's type
	Type string `json:"type" api:"required"`
	// The object's attributes list
	Attrs []WaapAdvancedRuleDescriptorAttr `json:"attrs" api:"nullable"`
	// The object's description
	Description string `json:"description" api:"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" api:"required"`
	// The attribute's type
	Type string `json:"type" api:"required"`
	// A list of arguments for the attribute
	Args []WaapAdvancedRuleDescriptorAttrArg `json:"args" api:"nullable"`
	// The attribute's description
	Description string `json:"description" api:"nullable"`
	// The attribute's hint
	Hint string `json:"hint" api:"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

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" api:"required"`
	// The argument's type
	Type string `json:"type" api:"required"`
	// The argument's description
	Description string `json:"description" api:"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

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" api:"required"`
	Objects []WaapAdvancedRuleDescriptor `json:"objects" api:"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

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 WaapBillingReportItem added in v0.60.0

type WaapBillingReportItem struct {
	// The amount of the billable resource accrued on the date
	Amount int64 `json:"amount" api:"required"`
	// The date of the accrued billable consumption item
	Date string `json:"date" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Amount      respjson.Field
		Date        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapBillingReportItem) RawJSON added in v0.60.0

func (r WaapBillingReportItem) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapBillingReportItem) UnmarshalJSON added in v0.60.0

func (r *WaapBillingReportItem) UnmarshalJSON(data []byte) error

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" api:"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" api:"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" api:"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" api:"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 (WaapBlockedStatisticsActionUnion) AsString added in v0.3.0

func (u WaapBlockedStatisticsActionUnion) AsString() (v string)

func (WaapBlockedStatisticsActionUnion) RawJSON added in v0.3.0

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 (WaapBlockedStatisticsCountryUnion) AsString added in v0.3.0

func (u WaapBlockedStatisticsCountryUnion) AsString() (v string)

func (WaapBlockedStatisticsCountryUnion) RawJSON added in v0.3.0

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

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 (WaapBlockedStatisticsRuleNameUnion) AsString added in v0.3.0

func (u WaapBlockedStatisticsRuleNameUnion) AsString() (v string)

func (WaapBlockedStatisticsRuleNameUnion) RawJSON added in v0.3.0

Returns the unmodified JSON received from the API

func (*WaapBlockedStatisticsRuleNameUnion) UnmarshalJSON added in v0.3.0

func (r *WaapBlockedStatisticsRuleNameUnion) UnmarshalJSON(data []byte) error

type WaapClearLocalTagsResponse added in v0.60.0

type WaapClearLocalTagsResponse struct {
	// The number of items affected by the action
	NumCleared int64 `json:"num_cleared"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		NumCleared  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapClearLocalTagsResponse) RawJSON added in v0.60.0

func (r WaapClearLocalTagsResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapClearLocalTagsResponse) UnmarshalJSON added in v0.60.0

func (r *WaapClearLocalTagsResponse) UnmarshalJSON(data []byte) error

type WaapClientBillingReport added in v0.63.0

type WaapClientBillingReport struct {
	// The client ID
	ClientID int64 `json:"client_id" api:"required"`
	// The billable consumption items of the client, ordered by date
	Items []WaapBillingReportItem `json:"items" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ClientID    respjson.Field
		Items       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapClientBillingReport) RawJSON added in v0.63.0

func (r WaapClientBillingReport) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapClientBillingReport) UnmarshalJSON added in v0.63.0

func (r *WaapClientBillingReport) UnmarshalJSON(data []byte) error

type WaapCompactTrafficMetrics added in v0.39.0

type WaapCompactTrafficMetrics struct {
	// UNIX timestamp indicating when the traffic data was recorded
	Timestamp int64 `json:"timestamp" api:"required"`
	// Traffic passed due to a permissive security rule
	Allowed int64 `json:"allowed"`
	// Traffic blocked by a security policy, custom rule, or DDoS protection
	Blocked int64 `json:"blocked"`
	// Traffic that was identified as malicious by security policies (for monitored
	// domains)
	Monitored int64 `json:"monitored"`
	// Traffic (number of requests) that was passed to the origin and didn't trigger
	// any rules
	Passed int64 `json:"passed"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Timestamp   respjson.Field
		Allowed     respjson.Field
		Blocked     respjson.Field
		Monitored   respjson.Field
		Passed      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Represents the compact traffic metrics for a domain at a given time window

func (WaapCompactTrafficMetrics) RawJSON added in v0.39.0

func (r WaapCompactTrafficMetrics) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapCompactTrafficMetrics) UnmarshalJSON added in v0.39.0

func (r *WaapCompactTrafficMetrics) 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" api:"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" api:"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" api:"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" api:"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

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

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 (WaapCountStatisticsRuleNameUnion) AsString added in v0.3.0

func (u WaapCountStatisticsRuleNameUnion) AsString() (v string)

func (WaapCountStatisticsRuleNameUnion) RawJSON added in v0.3.0

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" api:"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" api:"required"`
	// Name of the custom page set
	Name           string                          `json:"name" api:"required"`
	Block          WaapCustomPageSetBlock          `json:"block" api:"nullable"`
	BlockCsrf      WaapCustomPageSetBlockCsrf      `json:"block_csrf" api:"nullable"`
	Captcha        WaapCustomPageSetCaptcha        `json:"captcha" api:"nullable"`
	CookieDisabled WaapCustomPageSetCookieDisabled `json:"cookie_disabled" api:"nullable"`
	// List of domain IDs that are associated with this page set
	Domains            []int64                             `json:"domains" api:"nullable"`
	Handshake          WaapCustomPageSetHandshake          `json:"handshake" api:"nullable"`
	JavascriptDisabled WaapCustomPageSetJavascriptDisabled `json:"javascript_disabled" api:"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" api:"required"`
	// The text to display in the header of the custom page
	Header string `json:"header"`
	// 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" api:"required"`
	// The text to display in the header of the custom page
	Header string `json:"header"`
	// 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" api:"required"`
	// Error message
	Error string `json:"error"`
	// The text to display in the header of the custom page
	Header string `json:"header"`
	// 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" api:"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

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" api:"required"`
	// The text to display in the header of the custom page
	Header string `json:"header"`
	// 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" api:"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

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" api:"required"`
	// The action that the rule takes when triggered. Only one action can be set per
	// rule.
	Action WaapCustomRuleAction `json:"action" api:"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" api:"required"`
	// A description assigned to the rule.
	Description string `json:"description" api:"required"`
	// Whether or not the rule is enabled
	Enabled bool `json:"enabled" api:"required"`
	// The name assigned to the rule
	Name string `json:"name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Action      respjson.Field
		Conditions  respjson.Field
		Description respjson.Field
		Enabled     respjson.Field
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Full custom rule representation

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 allows the request
	Allow map[string]any `json:"allow"`
	// WAAP block action behavior could be configured with response status code and
	// action duration.
	Block WaapCustomRuleActionBlock `json:"block"`
	// The WAAP presents the user with a captcha
	Captcha map[string]any `json:"captcha"`
	// The WAAP performs automatic browser validation
	Handshake map[string]any `json:"handshake"`
	// The WAAP monitors the request but takes no action
	Monitor map[string]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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration string `json:"action_duration"`
	// An 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" api:"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 ASN (Autonomous System Number) the request originated from, as
	// determined by a WHOIS lookup of the requesting IP
	Asn WaapCustomRuleConditionAsn `json:"asn"`
	// 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 JA3 TLS client fingerprint of the request
	Ja3 WaapCustomRuleConditionJa3 `json:"ja3"`
	// Match the JA4 TLS client fingerprint of the request
	Ja4 WaapCustomRuleConditionJa4 `json:"ja4"`
	// 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 {
		Asn                  respjson.Field
		ContentType          respjson.Field
		Country              respjson.Field
		FileExtension        respjson.Field
		Header               respjson.Field
		HeaderExists         respjson.Field
		HTTPMethod           respjson.Field
		IP                   respjson.Field
		IPRange              respjson.Field
		Ja3                  respjson.Field
		Ja4                  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 full set of custom rule condition types, including ResponseHeader/ResponseHeaderExists conditions that may exist on rules already stored in Lime but cannot be created or updated through the API.

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 WaapCustomRuleConditionAsn added in v0.60.0

type WaapCustomRuleConditionAsn struct {
	// A list of Autonomous System Numbers (ASNs) to match against
	Asns []int64 `json:"asns" api:"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 {
		Asns        respjson.Field
		Negation    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Match the ASN (Autonomous System Number) the request originated from, as determined by a WHOIS lookup of the requesting IP

func (WaapCustomRuleConditionAsn) RawJSON added in v0.60.0

func (r WaapCustomRuleConditionAsn) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapCustomRuleConditionAsn) UnmarshalJSON added in v0.60.0

func (r *WaapCustomRuleConditionAsn) 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" api:"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

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" api:"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

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" api:"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

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" api:"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

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" api:"required"`
	// The request header value
	Value string `json:"value" api:"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

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" api:"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

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" api:"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" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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

Returns the unmodified JSON received from the API

func (*WaapCustomRuleConditionIPRange) UnmarshalJSON added in v0.3.0

func (r *WaapCustomRuleConditionIPRange) UnmarshalJSON(data []byte) error

type WaapCustomRuleConditionJa3 added in v0.50.0

type WaapCustomRuleConditionJa3 struct {
	// A list of JA3 TLS client fingerprints to match against the request
	Ja3Fingerprints []string `json:"ja3_fingerprints" api:"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 {
		Ja3Fingerprints respjson.Field
		Negation        respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Match the JA3 TLS client fingerprint of the request

func (WaapCustomRuleConditionJa3) RawJSON added in v0.50.0

func (r WaapCustomRuleConditionJa3) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapCustomRuleConditionJa3) UnmarshalJSON added in v0.50.0

func (r *WaapCustomRuleConditionJa3) UnmarshalJSON(data []byte) error

type WaapCustomRuleConditionJa4 added in v0.50.0

type WaapCustomRuleConditionJa4 struct {
	// A list of JA4 TLS client fingerprints to match against the request
	Ja4Fingerprints []string `json:"ja4_fingerprints" api:"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 {
		Ja4Fingerprints respjson.Field
		Negation        respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Match the JA4 TLS client fingerprint of the request

func (WaapCustomRuleConditionJa4) RawJSON added in v0.50.0

func (r WaapCustomRuleConditionJa4) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapCustomRuleConditionJa4) UnmarshalJSON added in v0.50.0

func (r *WaapCustomRuleConditionJa4) UnmarshalJSON(data []byte) error

type WaapCustomRuleConditionOrganization added in v0.3.0

type WaapCustomRuleConditionOrganization struct {
	// The organization to match against
	Organization string `json:"organization" api:"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

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

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" api:"required"`
	// The number of incoming requests over the given time that can trigger a request
	// rate condition
	Requests int64 `json:"requests" api:"required"`
	// The number of seconds that the WAAP measures incoming requests over before
	// triggering a request rate condition
	Time int64 `json:"time" api:"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

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" api:"required"`
	// The response header value
	Value string `json:"value" api:"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

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" api:"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

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" api:"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

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" api:"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" api:"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" api:"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

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" api:"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

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" api:"nullable" format:"date-time"`
	// Total DDoS-blocked requests attributed to the attack over its full duration.
	// Computed over the attack's own time window, so it stays consistent regardless of
	// the selected reporting range. Null when the count could not be computed.
	Requests int64 `json:"requests" api:"nullable"`
	// Start time of DDoS attack
	StartTime time.Time `json:"start_time" api:"nullable" format:"date-time"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		EndTime     respjson.Field
		Requests    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" api:"required"`
	// The value for the grouped by type
	Identity string `json:"identity" api:"required"`
	// Any of "URL", "User-Agent", "IP", "COUNTRY", "JA4".
	Type WaapDDOSInfoType `json:"type" api:"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"
	WaapDDOSInfoTypeUserAgent WaapDDOSInfoType = "User-Agent"
	WaapDDOSInfoTypeIP        WaapDDOSInfoType = "IP"
	WaapDDOSInfoTypeCountry   WaapDDOSInfoType = "COUNTRY"
	WaapDDOSInfoTypeJa4       WaapDDOSInfoType = "JA4"
)

type WaapDetailedDomain

type WaapDetailedDomain struct {
	// The domain ID
	ID int64 `json:"id" api:"required"`
	// The date and time the domain was created in ISO 8601 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// The ID of the custom page set
	CustomPageSet int64 `json:"custom_page_set" api:"required"`
	// The domain name
	Name string `json:"name" api:"required"`
	// The different statuses a domain can have
	//
	// Any of "active", "bypass", "monitor", "locked".
	Status WaapDetailedDomainStatus `json:"status" api:"required"`
	// CNAME aliases pointing at this domain's CDN resource
	Aliases []string `json:"aliases"`
	// Domain level quotas
	Quotas map[string]WaapDetailedDomainQuota `json:"quotas" api:"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
		Aliases       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" api:"required"`
	// The current number of this resource
	Current int64 `json:"current" api:"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 WaapDetailedEvent added in v0.62.0

type WaapDetailedEvent struct {
	// Request ID
	ID string `json:"id" api:"required"`
	// Request action
	Action string `json:"action" api:"required"`
	// List of common tags
	CommonTags []WaapDetailedEventCommonTag `json:"common_tags" api:"required"`
	// Content type of request
	ContentType string `json:"content_type" api:"required"`
	// Domain name
	Domain string `json:"domain" api:"required"`
	// Domain ID
	DomainID int64 `json:"domain_id" api:"required"`
	// Status code for http request
	HTTPStatusCode int64 `json:"http_status_code" api:"required"`
	// HTTP version of request
	HTTPVersion string `json:"http_version" api:"required"`
	// ID of challenge that was generated
	IncidentID string `json:"incident_id" api:"required"`
	// Request method
	Method string `json:"method" api:"required"`
	// Network details
	Network WaapDetailedEventNetwork `json:"network" api:"required"`
	// Request path
	Path string `json:"path" api:"required"`
	// List of shield tags
	PatternMatchedTags []WaapDetailedEventPatternMatchedTag `json:"pattern_matched_tags" api:"required"`
	// The query string of the request
	QueryString string `json:"query_string" api:"required"`
	// Reference ID to identify user sanction
	ReferenceID string `json:"reference_id" api:"required"`
	// The time of the request
	RequestTime time.Time `json:"request_time" api:"required" format:"date-time"`
	// The type of the request that generated an event
	RequestType string `json:"request_type" api:"required"`
	// The real domain name
	RequestedDomain string `json:"requested_domain" api:"required"`
	// Time took to process all request
	ResponseTime string `json:"response_time" api:"required"`
	// The result of a request
	//
	// Any of "passed", "blocked", "suppressed", "".
	Result WaapDetailedEventResult `json:"result" api:"required"`
	// ID of the triggered rule
	RuleID string `json:"rule_id" api:"required"`
	// Name of the triggered rule
	RuleName string `json:"rule_name" api:"required"`
	// The URI scheme of the request that generated an event
	Scheme string `json:"scheme" api:"required"`
	// The session ID associated with the request.
	SessionID string `json:"session_id" api:"required"`
	// The number requests in session
	SessionRequestCount string `json:"session_request_count" api:"required"`
	// List of traffic types
	TrafficTypes []string `json:"traffic_types" api:"required"`
	// User agent
	UserAgent WaapDetailedEventUserAgent `json:"user_agent" api:"required"`
	// The decision made for processing the request through the WAAP.
	//
	// Any of "passed", "allowed", "monitored", "blocked", "".
	Decision WaapDetailedEventDecision `json:"decision"`
	// Rules that matched the request and triggered the event decision.
	Detector []WaapDetailedEventDetector `json:"detector"`
	// JA3 TLS client fingerprint as a 32-character lowercase hexadecimal MD5 hash, or
	// an empty string when the record has no JA3 value.
	Ja3 string `json:"ja3"`
	// JA4 TLS client fingerprint in the form `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character
	// prefix and two 12-character lowercase hexadecimal hashes), or an empty string
	// when the record has no JA4 value.
	Ja4 string `json:"ja4"`
	// An optional action that may be applied in addition to the primary decision.
	//
	// Any of "captcha", "challenge", "".
	OptionalAction WaapDetailedEventOptionalAction `json:"optional_action"`
	// Applied overrides with id, t, and matched metadata keyed by target ID. Does not
	// replace the final decision.
	PolicyOverride []WaapDetailedEventPolicyOverride `json:"policy_override"`
	// 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
		DomainID            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
		RequestTime         respjson.Field
		RequestType         respjson.Field
		RequestedDomain     respjson.Field
		ResponseTime        respjson.Field
		Result              respjson.Field
		RuleID              respjson.Field
		RuleName            respjson.Field
		Scheme              respjson.Field
		SessionID           respjson.Field
		SessionRequestCount respjson.Field
		TrafficTypes        respjson.Field
		UserAgent           respjson.Field
		Decision            respjson.Field
		Detector            respjson.Field
		Ja3                 respjson.Field
		Ja4                 respjson.Field
		OptionalAction      respjson.Field
		PolicyOverride      respjson.Field
		ExtraFields         map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A security event with its request details, without the request headers.

func (WaapDetailedEvent) RawJSON added in v0.62.0

func (r WaapDetailedEvent) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapDetailedEvent) UnmarshalJSON added in v0.62.0

func (r *WaapDetailedEvent) UnmarshalJSON(data []byte) error

type WaapDetailedEventCommonTag added in v0.62.0

type WaapDetailedEventCommonTag struct {
	// Tag description information
	Description string `json:"description" api:"required"`
	// The tag's display name
	DisplayName string `json:"display_name" api:"required"`
	// Tag name
	Tag string `json:"tag" api:"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 (WaapDetailedEventCommonTag) RawJSON added in v0.62.0

func (r WaapDetailedEventCommonTag) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapDetailedEventCommonTag) UnmarshalJSON added in v0.62.0

func (r *WaapDetailedEventCommonTag) UnmarshalJSON(data []byte) error

type WaapDetailedEventDecision added in v0.62.0

type WaapDetailedEventDecision string

The decision made for processing the request through the WAAP.

const (
	WaapDetailedEventDecisionPassed    WaapDetailedEventDecision = "passed"
	WaapDetailedEventDecisionAllowed   WaapDetailedEventDecision = "allowed"
	WaapDetailedEventDecisionMonitored WaapDetailedEventDecision = "monitored"
	WaapDetailedEventDecisionBlocked   WaapDetailedEventDecision = "blocked"
	WaapDetailedEventDecisionEmpty     WaapDetailedEventDecision = ""
)

type WaapDetailedEventDetector added in v0.62.0

type WaapDetailedEventDetector struct {
	// The content that matched the rule
	MatchedContent string `json:"matched_content" api:"required"`
	// ID of the rule that matched
	RuleID string `json:"rule_id" api:"required"`
	// Name of the rule that matched
	RuleName string `json:"rule_name" api:"required"`
	// The name of the variable whose value triggered the rule
	SubjectField string `json:"subject_field" api:"required"`
	// The entity to which the matched variable belongs (e.g. `request_headers`, uri,
	// cookies)
	SubjectType string `json:"subject_type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MatchedContent respjson.Field
		RuleID         respjson.Field
		RuleName       respjson.Field
		SubjectField   respjson.Field
		SubjectType    respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A rule that matched the request, with the matched subject and content.

func (WaapDetailedEventDetector) RawJSON added in v0.62.0

func (r WaapDetailedEventDetector) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapDetailedEventDetector) UnmarshalJSON added in v0.62.0

func (r *WaapDetailedEventDetector) UnmarshalJSON(data []byte) error

type WaapDetailedEventNetwork added in v0.62.0

type WaapDetailedEventNetwork struct {
	// Client IP
	ClientIP string `json:"client_ip" api:"required"`
	// Country code
	Country string `json:"country" api:"required"`
	// Organization details
	Organization WaapDetailedEventNetworkOrganization `json:"organization" api:"required"`
	// Autonomous System Number, or an empty string when unknown
	Asn string `json:"asn"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ClientIP     respjson.Field
		Country      respjson.Field
		Organization respjson.Field
		Asn          respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Network details

func (WaapDetailedEventNetwork) RawJSON added in v0.62.0

func (r WaapDetailedEventNetwork) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapDetailedEventNetwork) UnmarshalJSON added in v0.62.0

func (r *WaapDetailedEventNetwork) UnmarshalJSON(data []byte) error

type WaapDetailedEventNetworkOrganization added in v0.62.0

type WaapDetailedEventNetworkOrganization struct {
	// Organization name
	Name string `json:"name" api:"required"`
	// Network range
	Subnet string `json:"subnet" api:"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 (WaapDetailedEventNetworkOrganization) RawJSON added in v0.62.0

Returns the unmodified JSON received from the API

func (*WaapDetailedEventNetworkOrganization) UnmarshalJSON added in v0.62.0

func (r *WaapDetailedEventNetworkOrganization) UnmarshalJSON(data []byte) error

type WaapDetailedEventOptionalAction added in v0.62.0

type WaapDetailedEventOptionalAction string

An optional action that may be applied in addition to the primary decision.

const (
	WaapDetailedEventOptionalActionCaptcha   WaapDetailedEventOptionalAction = "captcha"
	WaapDetailedEventOptionalActionChallenge WaapDetailedEventOptionalAction = "challenge"
	WaapDetailedEventOptionalActionEmpty     WaapDetailedEventOptionalAction = ""
)

type WaapDetailedEventPatternMatchedTag added in v0.62.0

type WaapDetailedEventPatternMatchedTag struct {
	// Tag description information
	Description string `json:"description" api:"required"`
	// The tag's display name
	DisplayName string `json:"display_name" api:"required"`
	// The phase in which the tag was triggered: access -> Request, `header_filter` ->
	// `response_header`, `body_filter` -> `response_body`
	ExecutionPhase string `json:"execution_phase" api:"required"`
	// The entity to which the variable that triggered the tag belong to. For example:
	// `request_headers`, uri, cookies etc.
	Field string `json:"field" api:"required"`
	// The name of the variable which holds the value that triggered the tag
	FieldName string `json:"field_name" api:"required"`
	// The name of the detected regexp pattern
	PatternName string `json:"pattern_name" api:"required"`
	// The pattern which triggered the tag
	PatternValue string `json:"pattern_value" api:"required"`
	// Tag name
	Tag string `json:"tag" api:"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 (WaapDetailedEventPatternMatchedTag) RawJSON added in v0.62.0

Returns the unmodified JSON received from the API

func (*WaapDetailedEventPatternMatchedTag) UnmarshalJSON added in v0.62.0

func (r *WaapDetailedEventPatternMatchedTag) UnmarshalJSON(data []byte) error

type WaapDetailedEventPolicyOverride added in v0.62.0

type WaapDetailedEventPolicyOverride struct {
	// ID of the policy override applied to this request.
	ID int64 `json:"id" api:"required"`
	// Match evidence keyed by target reference: a detector ID such as 'ID861', or a
	// rule ID such as '94'. A detector entry holds 'field' and 'pattern_found'. A rule
	// entry holds the rule's metadata, such as 'action' and 'rule_name', and for a
	// rule based on a detector result also that match's 'field' and 'pattern_found'.
	// 'pattern_found' is empty when the matched content is hidden. For legacy records,
	// evidence is retained only for the first matched target; subsequent matched
	// targets have empty objects.
	Matched map[string]any `json:"matched" api:"required"`
	// Type of target affected by the override: 'waf_rule' for a detector or
	// 'static_rule_template' for a rule.
	//
	// Any of "waf_rule", "static_rule_template".
	T string `json:"t" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Matched     respjson.Field
		T           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An override that applied to a request, with its match metadata.

func (WaapDetailedEventPolicyOverride) RawJSON added in v0.62.0

Returns the unmodified JSON received from the API

func (*WaapDetailedEventPolicyOverride) UnmarshalJSON added in v0.62.0

func (r *WaapDetailedEventPolicyOverride) UnmarshalJSON(data []byte) error

type WaapDetailedEventResult added in v0.62.0

type WaapDetailedEventResult string

The result of a request

const (
	WaapDetailedEventResultPassed     WaapDetailedEventResult = "passed"
	WaapDetailedEventResultBlocked    WaapDetailedEventResult = "blocked"
	WaapDetailedEventResultSuppressed WaapDetailedEventResult = "suppressed"
	WaapDetailedEventResultEmpty      WaapDetailedEventResult = ""
)

type WaapDetailedEventUserAgent added in v0.62.0

type WaapDetailedEventUserAgent struct {
	// User agent browser
	BaseBrowser string `json:"base_browser" api:"required"`
	// User agent browser version
	BaseBrowserVersion string `json:"base_browser_version" api:"required"`
	// Client from User agent header
	Client string `json:"client" api:"required"`
	// User agent client type
	ClientType string `json:"client_type" api:"required"`
	// User agent client version
	ClientVersion string `json:"client_version" api:"required"`
	// User agent cpu
	CPU string `json:"cpu" api:"required"`
	// User agent device
	Device string `json:"device" api:"required"`
	// User agent device type
	DeviceType string `json:"device_type" api:"required"`
	// User agent
	FullString string `json:"full_string" api:"required"`
	// User agent os
	Os string `json:"os" api:"required"`
	// User agent engine
	RenderingEngine string `json:"rendering_engine" api:"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 (WaapDetailedEventUserAgent) RawJSON added in v0.62.0

func (r WaapDetailedEventUserAgent) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapDetailedEventUserAgent) UnmarshalJSON added in v0.62.0

func (r *WaapDetailedEventUserAgent) UnmarshalJSON(data []byte) error

type WaapDomainAPISettings added in v0.3.0

type WaapDomainAPISettings struct {
	// The API base paths for a domain. If your domain has a common base path for all
	// API endpoints, it can be set here. When set or updated, each entry must contain
	// at least one letter or digit; a value that would match the whole domain (such as
	// "/") is rejected - to treat the entire domain as an API domain, use the `is_api`
	// field instead.
	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 WaapDomainPolicy added in v0.3.0

type WaapDomainPolicy struct {
	// Unique identifier for the security rule
	ID string `json:"id" api:"required"`
	// Specifies the action taken by the WAAP upon rule activation
	//
	// Any of "Allow", "Block", "Captcha", "Gateway", "Handshake", "Monitor",
	// "Composite".
	Action WaapDomainPolicyAction `json:"action" api:"required"`
	// Detailed description of the security rule
	Description string `json:"description" api:"required"`
	// The rule set group name to which the rule belongs
	Group string `json:"group" api:"required"`
	// Indicates if the security rule is active
	Mode bool `json:"mode" api:"required"`
	// Name of the security rule
	Name string `json:"name" api:"required"`
	// Identifier of the rule set to which the rule belongs
	RuleSetID int64 `json:"rule_set_id" api:"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 (WaapDomainPolicy) RawJSON added in v0.3.0

func (r WaapDomainPolicy) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapDomainPolicy) UnmarshalJSON added in v0.3.0

func (r *WaapDomainPolicy) UnmarshalJSON(data []byte) error

type WaapDomainPolicyAction added in v0.60.0

type WaapDomainPolicyAction string

Specifies the action taken by the WAAP upon rule activation

const (
	WaapDomainPolicyActionAllow     WaapDomainPolicyAction = "Allow"
	WaapDomainPolicyActionBlock     WaapDomainPolicyAction = "Block"
	WaapDomainPolicyActionCaptcha   WaapDomainPolicyAction = "Captcha"
	WaapDomainPolicyActionGateway   WaapDomainPolicyAction = "Gateway"
	WaapDomainPolicyActionHandshake WaapDomainPolicyAction = "Handshake"
	WaapDomainPolicyActionMonitor   WaapDomainPolicyAction = "Monitor"
	WaapDomainPolicyActionComposite WaapDomainPolicyAction = "Composite"
)

type WaapDomainPolicySettings added in v0.56.0

type WaapDomainPolicySettings struct {
	// Indicates if the security rule is active
	Mode bool `json:"mode" api:"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:"-"`
}

Configurable settings of a security rule (a.k.a. policy) on a domain.

func (WaapDomainPolicySettings) RawJSON added in v0.56.0

func (r WaapDomainPolicySettings) RawJSON() string

Returns the unmodified JSON received from the API

func (WaapDomainPolicySettings) ToParam added in v0.56.0

ToParam converts this WaapDomainPolicySettings to a WaapDomainPolicySettingsParam.

Warning: the fields of the param type will not be present. ToParam should only be used at the last possible moment before sending a request. Test for this with WaapDomainPolicySettingsParam.Overrides()

func (*WaapDomainPolicySettings) UnmarshalJSON added in v0.56.0

func (r *WaapDomainPolicySettings) UnmarshalJSON(data []byte) error

type WaapDomainPolicySettingsParam added in v0.56.0

type WaapDomainPolicySettingsParam struct {
	// Indicates if the security rule is active
	Mode bool `json:"mode" api:"required"`
	// contains filtered or unexported fields
}

Configurable settings of a security rule (a.k.a. policy) on a domain.

The property Mode is required.

func (WaapDomainPolicySettingsParam) MarshalJSON added in v0.56.0

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

func (*WaapDomainPolicySettingsParam) UnmarshalJSON added in v0.56.0

func (r *WaapDomainPolicySettingsParam) UnmarshalJSON(data []byte) error

type WaapDomainSettingsModel added in v0.3.0

type WaapDomainSettingsModel struct {
	// API settings of a domain
	API WaapDomainAPISettings `json:"api" api:"required"`
	// DDoS settings for a domain.
	DDOS WaapDomainDDOSSettings `json:"ddos" api:"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:"-"`
}

Domain settings, accessible for clients.

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" api:"required"`
	// A collection of total numbers of events per criteria
	Count WaapCountStatistics `json:"count" api:"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 WaapEventSummary added in v0.60.0

type WaapEventSummary struct {
	// Request's unique id
	ID string `json:"id" api:"required"`
	// Action of the triggered rule
	Action string `json:"action" api:"required"`
	// Client's IP address.
	ClientIP string `json:"client_ip" api:"required"`
	// Country code
	Country string `json:"country" api:"required"`
	// The decision made for processing the request through the WAAP. Empty when no
	// decision was recorded.
	//
	// Any of "blocked", "monitored", "allowed", "passed", "".
	Decision WaapEventSummaryDecision `json:"decision" api:"required"`
	// Domain name
	Domain string `json:"domain" api:"required"`
	// Domain ID
	DomainID int64 `json:"domain_id" api:"required"`
	// HTTP method
	Method string `json:"method" api:"required"`
	// An optional action that may be applied in addition to the primary decision.
	// Empty when none applies.
	//
	// Any of "captcha", "challenge", "".
	OptionalAction WaapEventSummaryOptionalAction `json:"optional_action" api:"required"`
	// Request path
	Path string `json:"path" api:"required"`
	// Whether a Policy Override can be created for this request.
	PolicyOverrideAllowed bool `json:"policy_override_allowed" api:"required"`
	// The UNIX timestamp in ms of the date a set of traffic counters was recorded
	RequestTime int64 `json:"request_time" api:"required"`
	// The result of a request
	//
	// Any of "passed", "blocked", "suppressed", "".
	Result WaapEventSummaryResult `json:"result" api:"required"`
	// The ID of the triggered rule.
	RuleID string `json:"rule_id" api:"required"`
	// Name of the triggered rule
	RuleName string `json:"rule_name" api:"required"`
	// Status code for http request
	StatusCode int64 `json:"status_code" api:"required"`
	// Applied overrides with id, t, and matched metadata keyed by target ID. Does not
	// replace the final decision.
	PolicyOverride []WaapEventSummaryPolicyOverride `json:"policy_override"`
	// The URI scheme of the request that generated an event
	Scheme string `json:"scheme"`
	// 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
		Decision              respjson.Field
		Domain                respjson.Field
		DomainID              respjson.Field
		Method                respjson.Field
		OptionalAction        respjson.Field
		Path                  respjson.Field
		PolicyOverrideAllowed respjson.Field
		RequestTime           respjson.Field
		Result                respjson.Field
		RuleID                respjson.Field
		RuleName              respjson.Field
		StatusCode            respjson.Field
		PolicyOverride        respjson.Field
		Scheme                respjson.Field
		ExtraFields           map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Event record summary used when displaying a list of events

func (WaapEventSummary) RawJSON added in v0.60.0

func (r WaapEventSummary) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapEventSummary) UnmarshalJSON added in v0.60.0

func (r *WaapEventSummary) UnmarshalJSON(data []byte) error

type WaapEventSummaryDecision added in v0.60.0

type WaapEventSummaryDecision string

The decision made for processing the request through the WAAP. Empty when no decision was recorded.

const (
	WaapEventSummaryDecisionBlocked   WaapEventSummaryDecision = "blocked"
	WaapEventSummaryDecisionMonitored WaapEventSummaryDecision = "monitored"
	WaapEventSummaryDecisionAllowed   WaapEventSummaryDecision = "allowed"
	WaapEventSummaryDecisionPassed    WaapEventSummaryDecision = "passed"
	WaapEventSummaryDecisionEmpty     WaapEventSummaryDecision = ""
)

type WaapEventSummaryOptionalAction added in v0.60.0

type WaapEventSummaryOptionalAction string

An optional action that may be applied in addition to the primary decision. Empty when none applies.

const (
	WaapEventSummaryOptionalActionCaptcha   WaapEventSummaryOptionalAction = "captcha"
	WaapEventSummaryOptionalActionChallenge WaapEventSummaryOptionalAction = "challenge"
	WaapEventSummaryOptionalActionEmpty     WaapEventSummaryOptionalAction = ""
)

type WaapEventSummaryPolicyOverride added in v0.60.0

type WaapEventSummaryPolicyOverride struct {
	// ID of the policy override applied to this request.
	ID int64 `json:"id" api:"required"`
	// Match evidence keyed by target reference: a detector ID such as 'ID861', or a
	// rule ID such as '94'. A detector entry holds 'field' and 'pattern_found'. A rule
	// entry holds the rule's metadata, such as 'action' and 'rule_name', and for a
	// rule based on a detector result also that match's 'field' and 'pattern_found'.
	// 'pattern_found' is empty when the matched content is hidden. For legacy records,
	// evidence is retained only for the first matched target; subsequent matched
	// targets have empty objects.
	Matched map[string]any `json:"matched" api:"required"`
	// Type of target affected by the override: 'waf_rule' for a detector or
	// 'static_rule_template' for a rule.
	//
	// Any of "waf_rule", "static_rule_template".
	T string `json:"t" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Matched     respjson.Field
		T           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An override that applied to a request, with its match metadata.

func (WaapEventSummaryPolicyOverride) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapEventSummaryPolicyOverride) UnmarshalJSON added in v0.60.0

func (r *WaapEventSummaryPolicyOverride) UnmarshalJSON(data []byte) error

type WaapEventSummaryResult added in v0.60.0

type WaapEventSummaryResult string

The result of a request

const (
	WaapEventSummaryResultPassed     WaapEventSummaryResult = "passed"
	WaapEventSummaryResultBlocked    WaapEventSummaryResult = "blocked"
	WaapEventSummaryResultSuppressed WaapEventSummaryResult = "suppressed"
	WaapEventSummaryResultEmpty      WaapEventSummaryResult = ""
)

type WaapFilterTemplate added in v0.60.0

type WaapFilterTemplate struct {
	// The ID of the filter template
	ID int64 `json:"id" api:"required"`
	// Arbitrary JSON object storing the frontend filter state
	FilterConfig map[string]any `json:"filter_config" api:"required"`
	// Human-readable template name
	Name string `json:"name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID           respjson.Field
		FilterConfig respjson.Field
		Name         respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Response body for a single filter template.

func (WaapFilterTemplate) RawJSON added in v0.60.0

func (r WaapFilterTemplate) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapFilterTemplate) UnmarshalJSON added in v0.60.0

func (r *WaapFilterTemplate) UnmarshalJSON(data []byte) error

type WaapFilterValueSuggestion added in v0.60.0

type WaapFilterValueSuggestion struct {
	// Number of times this value was observed in the requested range.
	Count int64 `json:"count" api:"required"`
	// Value to use in an analytics query for the required filter parameter.
	Value string `json:"value" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Count       respjson.Field
		Value       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A supported analytics filter value with its observed occurrence count.

func (WaapFilterValueSuggestion) RawJSON added in v0.60.0

func (r WaapFilterValueSuggestion) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapFilterValueSuggestion) UnmarshalJSON added in v0.60.0

func (r *WaapFilterValueSuggestion) UnmarshalJSON(data []byte) error

type WaapFirewallRule added in v0.3.0

type WaapFirewallRule struct {
	// The unique identifier for the rule
	ID int64 `json:"id" api:"required"`
	// The action that the rule takes when triggered
	Action WaapFirewallRuleAction `json:"action" api:"required"`
	// The condition required for the WAAP engine to trigger the rule.
	Conditions []WaapFirewallRuleCondition `json:"conditions" api:"required"`
	// A description assigned to the rule.
	Description string `json:"description" api:"required"`
	// Whether or not the rule is enabled
	Enabled bool `json:"enabled" api:"required"`
	// The name assigned to the rule
	Name string `json:"name" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Action      respjson.Field
		Conditions  respjson.Field
		Description respjson.Field
		Enabled     respjson.Field
		Name        respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Full firewall rule representation

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 allows the request
	Allow map[string]any `json:"allow" api:"nullable"`
	// WAAP block action behavior could be configured with response status code and
	// action duration.
	Block WaapFirewallRuleActionBlock `json:"block" api:"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. If not specified, the action is applied only to the request
	// that triggers the rule.
	ActionDuration string `json:"action_duration"`
	// An 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" api:"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" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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

Returns the unmodified JSON received from the API

func (*WaapFirewallRuleConditionIPRange) UnmarshalJSON added in v0.3.0

func (r *WaapFirewallRuleConditionIPRange) 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" api:"required"`
	// An ISO 3166-1 alpha-2 formatted string representing the country that was
	// attacked
	Country string `json:"country" api:"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" api:"required"`
	// The time series data for the DDoS attacks from the IP address
	TimeSeries []WaapIPDDOSInfoModelTimeSeries `json:"time_series" api:"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" api:"required"`
	// The timestamp of the time series item as a POSIX timestamp
	Timestamp int64 `json:"timestamp" api:"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

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" api:"required"`
	// The tags associated with the IP address that affect the risk score
	Tags []string `json:"tags" api:"required"`
	// The WHOIS information for the IP address
	Whois WaapIPInfoWhois `json:"whois" api:"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" api:"required"`
	// The total number of requests made by the IP address
	TotalRequests int64 `json:"total_requests" api:"required"`
	// The number of unique sessions from the IP address
	UniqueSessions int64 `json:"unique_sessions" api:"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 WaapIPInfoCountsV2 added in v0.60.0

type WaapIPInfoCountsV2 struct {
	// The number of distinct attack types (rules) that blocked requests from this IP
	AttackTypes int64 `json:"attack_types" api:"required"`
	// The number of requests from the IP address that were blocked
	BlockedRequests int64 `json:"blocked_requests" api:"required"`
	// The number of distinct domains accessed by this IP
	Domains int64 `json:"domains" api:"required"`
	// The number of distinct paths (URLs) accessed by this IP
	Paths int64 `json:"paths" api:"required"`
	// The total number of requests made by the IP address
	TotalRequests int64 `json:"total_requests" api:"required"`
	// The number of unique sessions from the IP address
	UniqueSessions int64 `json:"unique_sessions" api:"required"`
	// The number of distinct user agents used by this IP
	UserAgents int64 `json:"user_agents" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AttackTypes     respjson.Field
		BlockedRequests respjson.Field
		Domains         respjson.Field
		Paths           respjson.Field
		TotalRequests   respjson.Field
		UniqueSessions  respjson.Field
		UserAgents      respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapIPInfoCountsV2) RawJSON added in v0.60.0

func (r WaapIPInfoCountsV2) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapIPInfoCountsV2) UnmarshalJSON added in v0.60.0

func (r *WaapIPInfoCountsV2) 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" api:"nullable"`
	// The CIDR
	Cidr int64 `json:"cidr" api:"nullable"`
	// The country
	Country string `json:"country" api:"nullable"`
	// The network description
	NetDescription string `json:"net_description" api:"nullable"`
	// The network name
	NetName string `json:"net_name" api:"nullable"`
	// The network range
	NetRange string `json:"net_range" api:"nullable"`
	// The network type
	NetType string `json:"net_type" api:"nullable"`
	// The organization ID
	OrgID string `json:"org_id" api:"nullable"`
	// The organization name
	OrgName string `json:"org_name" api:"nullable"`
	// The owner type
	OwnerType string `json:"owner_type" api:"nullable"`
	// The RIR
	Rir string `json:"rir" api:"nullable"`
	// The state
	State string `json:"state" api:"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" api:"required" format:"uuid"`
	// The description of the insight
	Description string `json:"description" api:"required"`
	// The date and time the insight was first seen in ISO 8601 format
	FirstSeen time.Time `json:"first_seen" api:"required" format:"date-time"`
	// The slug of the insight type
	InsightType string `json:"insight_type" api:"required"`
	// A hash table of label names and values that apply to the insight
	Labels map[string]string `json:"labels" api:"required"`
	// The date and time the insight was last seen in ISO 8601 format
	LastSeen time.Time `json:"last_seen" api:"required" format:"date-time"`
	// The date and time the insight was last seen in ISO 8601 format
	LastStatusChange time.Time `json:"last_status_change" api:"required" format:"date-time"`
	// The recommended action to perform to resolve the insight
	Recommendation string `json:"recommendation" api:"required"`
	// The status of the insight
	//
	// Any of "OPEN", "ACKED", "CLOSED".
	Status WaapInsightStatus `json:"status" api:"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" api:"required" format:"uuid"`
	// The author of the silence
	Author string `json:"author" api:"required"`
	// A comment explaining the reason for the silence
	Comment string `json:"comment" api:"required"`
	// The date and time the silence expires in ISO 8601 format
	ExpireAt time.Time `json:"expire_at" api:"required" format:"date-time"`
	// The slug of the insight type
	InsightType string `json:"insight_type" api:"required"`
	// A hash table of label names and values that apply to the insight silence
	Labels map[string]string `json:"labels" api:"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" api:"required"`
	// The frequency of the insight type
	InsightFrequency int64 `json:"insight_frequency" api:"required"`
	// The grouping dimensions of the insight type
	InsightGroupingDimensions []string `json:"insight_grouping_dimensions" api:"required"`
	// The insight template
	InsightTemplate string `json:"insight_template" api:"required"`
	// The labels of the insight type
	Labels []string `json:"labels" api:"required"`
	// The name of the insight type
	Name string `json:"name" api:"required"`
	// The recommendation template
	RecommendationTemplate string `json:"recommendation_template" api:"required"`
	// The slug of the insight type
	Slug string `json:"slug" api:"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 WaapLocalIPTagsRecord added in v0.60.0

type WaapLocalIPTagsRecord struct {
	// The timestamp of the last request from the IP to the domain
	Date   int64                       `json:"date" api:"required"`
	Domain WaapLocalIPTagsRecordDomain `json:"domain" api:"required"`
	// The tags associated with the IP globally
	GlobalTags []string `json:"global_tags" api:"required"`
	// The IP address
	IP string `json:"ip" api:"required"`
	// The tags associated with the IP in the context of the domain
	LocalTags []string `json:"local_tags" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Date        respjson.Field
		Domain      respjson.Field
		GlobalTags  respjson.Field
		IP          respjson.Field
		LocalTags   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapLocalIPTagsRecord) RawJSON added in v0.60.0

func (r WaapLocalIPTagsRecord) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapLocalIPTagsRecord) UnmarshalJSON added in v0.60.0

func (r *WaapLocalIPTagsRecord) UnmarshalJSON(data []byte) error

type WaapLocalIPTagsRecordDomain added in v0.60.0

type WaapLocalIPTagsRecordDomain struct {
	// The unique identifier for the domain
	ID int64 `json:"id" api:"required"`
	// The domain name
	Name string `json:"name" api:"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:"-"`
}

func (WaapLocalIPTagsRecordDomain) RawJSON added in v0.60.0

func (r WaapLocalIPTagsRecordDomain) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapLocalIPTagsRecordDomain) UnmarshalJSON added in v0.60.0

func (r *WaapLocalIPTagsRecordDomain) UnmarshalJSON(data []byte) error

type WaapOrganization added in v0.3.0

type WaapOrganization struct {
	// The ID of an organization
	ID int64 `json:"id" api:"required"`
	// The name of an organization
	Name string `json:"name" api:"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 WaapOwaspTopThreatsTarget added in v0.60.0

type WaapOwaspTopThreatsTarget struct {
	// The rule's ID; use this as a `target_id` when creating a policy override
	ID int64 `json:"id" api:"required"`
	// The action this rule takes when it triggers
	Action string `json:"action" api:"required"`
	// The rule's display name
	Name string `json:"name" api:"required"`
	// The parent policy this rule is grouped under, if any
	Policy WaapOwaspTopThreatsTargetPolicy `json:"policy" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Action      respjson.Field
		Name        respjson.Field
		Policy      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A default OWASP Top Threats target that can be selected as the target of a policy override, so this specific managed detection stops blocking matching traffic while the rest of OWASP Top Threats protection stays unchanged.

func (WaapOwaspTopThreatsTarget) RawJSON added in v0.60.0

func (r WaapOwaspTopThreatsTarget) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapOwaspTopThreatsTarget) UnmarshalJSON added in v0.60.0

func (r *WaapOwaspTopThreatsTarget) UnmarshalJSON(data []byte) error

type WaapOwaspTopThreatsTargetPolicy added in v0.60.0

type WaapOwaspTopThreatsTargetPolicy struct {
	// The parent policy's ID
	ID int64 `json:"id" api:"required"`
	// The parent policy's name
	Name string `json:"name" api:"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:"-"`
}

The parent policy this rule is grouped under, if any

func (WaapOwaspTopThreatsTargetPolicy) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapOwaspTopThreatsTargetPolicy) UnmarshalJSON added in v0.60.0

func (r *WaapOwaspTopThreatsTargetPolicy) UnmarshalJSON(data []byte) error

type WaapPolicyOverride added in v0.60.0

type WaapPolicyOverride struct {
	// The policy override's ID
	ID int64 `json:"id" api:"required"`
	// The conditions required for the override to apply. Empty means the override
	// applies to every request on the owning domain that hits a linked target.
	Conditions []WaapPolicyOverrideCondition `json:"conditions" api:"required"`
	// When the override was created
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// The domain this override belongs to
	DomainID int64 `json:"domain_id" api:"required"`
	// Whether the override is active
	Enabled bool `json:"enabled" api:"required"`
	// The policy override's display name
	Name string `json:"name" api:"required"`
	// Whether a linked target has been deleted, disabled, or otherwise become invalid.
	// A stale override is not published and does not suppress anything until it's
	// edited.
	Stale bool `json:"stale" api:"required"`
	// Whether targets are detectors or rules
	//
	// Any of "detector", "rule".
	TargetType WaapPolicyOverrideTargetType `json:"target_type" api:"required"`
	// The detectors or rules this override suppresses
	Targets []WaapPolicyOverrideTarget `json:"targets" api:"required"`
	// When the override was last updated
	UpdatedAt time.Time `json:"updated_at" api:"required" format:"date-time"`
	// An optional note explaining the override
	Description string `json:"description" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Conditions  respjson.Field
		CreatedAt   respjson.Field
		DomainID    respjson.Field
		Enabled     respjson.Field
		Name        respjson.Field
		Stale       respjson.Field
		TargetType  respjson.Field
		Targets     respjson.Field
		UpdatedAt   respjson.Field
		Description respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapPolicyOverride) RawJSON added in v0.60.0

func (r WaapPolicyOverride) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapPolicyOverride) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverride) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideCondition added in v0.60.0

type WaapPolicyOverrideCondition struct {
	// Match the country that the request originated from
	Country WaapPolicyOverrideConditionCountry `json:"country"`
	// Match an incoming request header
	Header WaapPolicyOverrideConditionHeader `json:"header"`
	// Match when an incoming request header is present
	HeaderExists WaapPolicyOverrideConditionHeaderExists `json:"header_exists"`
	// Match the incoming HTTP method
	HTTPMethod WaapPolicyOverrideConditionHTTPMethod `json:"http_method"`
	// Match the incoming request against a single IP address
	IP WaapPolicyOverrideConditionIP `json:"ip"`
	// Match the incoming request against an IP range
	IPRange WaapPolicyOverrideConditionIPRange `json:"ip_range"`
	// Match the JA3 TLS client fingerprint of the request
	Ja3 WaapPolicyOverrideConditionJa3 `json:"ja3"`
	// Match the JA4 TLS client fingerprint of the request
	Ja4 WaapPolicyOverrideConditionJa4 `json:"ja4"`
	// Match the organization the request originated from, as determined by a WHOIS
	// lookup of the requesting IP
	Organization WaapPolicyOverrideConditionOrganization `json:"organization"`
	// Match the incoming request URL
	URL WaapPolicyOverrideConditionURL `json:"url"`
	// Match the user agent making the request
	UserAgent WaapPolicyOverrideConditionUserAgent `json:"user_agent"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country      respjson.Field
		Header       respjson.Field
		HeaderExists respjson.Field
		HTTPMethod   respjson.Field
		IP           respjson.Field
		IPRange      respjson.Field
		Ja3          respjson.Field
		Ja4          respjson.Field
		Organization respjson.Field
		URL          respjson.Field
		UserAgent    respjson.Field
		ExtraFields  map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A single policy override condition. Only one of the fields below may be set.

Limited to the subset of `CustomRuleConditionScope` scopes that policy overrides support (Lime wire-format translation is reused from Custom Rules' own `app.models.customer_rules.lime_translation.ConditionMapper`).

func (WaapPolicyOverrideCondition) RawJSON added in v0.60.0

func (r WaapPolicyOverrideCondition) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideCondition) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideCondition) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionCountry added in v0.60.0

type WaapPolicyOverrideConditionCountry struct {
	// A list of ISO 3166-1 alpha-2 formatted strings representing the countries to
	// match against
	CountryCode []string `json:"country_code" api:"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 (WaapPolicyOverrideConditionCountry) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionCountry) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionCountry) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionHTTPMethod added in v0.60.0

type WaapPolicyOverrideConditionHTTPMethod struct {
	// HTTP methods of a request
	//
	// Any of "CONNECT", "DELETE", "GET", "HEAD", "OPTIONS", "PATCH", "POST", "PUT",
	// "TRACE".
	HTTPMethod string `json:"http_method" api:"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 (WaapPolicyOverrideConditionHTTPMethod) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionHTTPMethod) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionHTTPMethod) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionHeader added in v0.60.0

type WaapPolicyOverrideConditionHeader struct {
	// The request header name
	Header string `json:"header" api:"required"`
	// The request header value
	Value string `json:"value" api:"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 (WaapPolicyOverrideConditionHeader) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionHeader) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionHeader) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionHeaderExists added in v0.60.0

type WaapPolicyOverrideConditionHeaderExists struct {
	// The request header name
	Header string `json:"header" api:"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 (WaapPolicyOverrideConditionHeaderExists) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionHeaderExists) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionHeaderExists) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionIP added in v0.60.0

type WaapPolicyOverrideConditionIP struct {
	// A single IPv4 or IPv6 address
	IPAddress string `json:"ip_address" api:"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 (WaapPolicyOverrideConditionIP) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionIP) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionIP) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionIPRange added in v0.60.0

type WaapPolicyOverrideConditionIPRange struct {
	// The lower bound IPv4 or IPv6 address to match against
	LowerBound string `json:"lower_bound" api:"required" format:"ipvanyaddress"`
	// The upper bound IPv4 or IPv6 address to match against
	UpperBound string `json:"upper_bound" api:"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 (WaapPolicyOverrideConditionIPRange) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionIPRange) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionIPRange) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionJa3 added in v0.60.0

type WaapPolicyOverrideConditionJa3 struct {
	// A list of JA3 TLS client fingerprints to match against the request
	Ja3Fingerprints []string `json:"ja3_fingerprints" api:"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 {
		Ja3Fingerprints respjson.Field
		Negation        respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Match the JA3 TLS client fingerprint of the request

func (WaapPolicyOverrideConditionJa3) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionJa3) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionJa3) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionJa4 added in v0.60.0

type WaapPolicyOverrideConditionJa4 struct {
	// A list of JA4 TLS client fingerprints to match against the request
	Ja4Fingerprints []string `json:"ja4_fingerprints" api:"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 {
		Ja4Fingerprints respjson.Field
		Negation        respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Match the JA4 TLS client fingerprint of the request

func (WaapPolicyOverrideConditionJa4) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionJa4) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionJa4) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionOrganization added in v0.60.0

type WaapPolicyOverrideConditionOrganization struct {
	// The organization to match against
	Organization string `json:"organization" api:"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 (WaapPolicyOverrideConditionOrganization) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionOrganization) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionOrganization) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionURL added in v0.60.0

type WaapPolicyOverrideConditionURL 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" api:"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 (WaapPolicyOverrideConditionURL) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionURL) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionURL) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideConditionUserAgent added in v0.60.0

type WaapPolicyOverrideConditionUserAgent struct {
	// The user agent value to match
	UserAgent string `json:"user_agent" api:"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 (WaapPolicyOverrideConditionUserAgent) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideConditionUserAgent) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideConditionUserAgent) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideTarget added in v0.60.0

type WaapPolicyOverrideTarget struct {
	// The policy override target's ID
	ID int64 `json:"id" api:"required"`
	// The stable reference edge uses to match this target
	Ref string `json:"ref" api:"required"`
	// A point-in-time record of the target's details, retained for display after the
	// linked object is deleted
	Snapshot WaapPolicyOverrideTargetSnapshot `json:"snapshot" api:"required"`
	// The linked detector's ID, if `target_type` is detector
	DetectorID int64 `json:"detector_id" api:"nullable"`
	// The linked rule's ID, if `target_type` is rule
	RuleID int64 `json:"rule_id" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Ref         respjson.Field
		Snapshot    respjson.Field
		DetectorID  respjson.Field
		RuleID      respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapPolicyOverrideTarget) RawJSON added in v0.60.0

func (r WaapPolicyOverrideTarget) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideTarget) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideTarget) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideTargetSnapshot added in v0.60.0

type WaapPolicyOverrideTargetSnapshot struct {
	// The target's display name when it was linked
	Name string `json:"name" api:"required"`
	// The action the target took when it triggered, if `target_type` is rule
	Action string `json:"action" api:"nullable"`
	// The attack category the target detected, if `target_type` is rule
	AttackType string `json:"attack_type" api:"nullable"`
	// The target's rule category (policy or template), if `target_type` is rule
	Category string `json:"category" api:"nullable"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Name        respjson.Field
		Action      respjson.Field
		AttackType  respjson.Field
		Category    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A point-in-time record of the target's details, retained for display after the linked object is deleted

func (WaapPolicyOverrideTargetSnapshot) RawJSON added in v0.60.0

Returns the unmodified JSON received from the API

func (*WaapPolicyOverrideTargetSnapshot) UnmarshalJSON added in v0.60.0

func (r *WaapPolicyOverrideTargetSnapshot) UnmarshalJSON(data []byte) error

type WaapPolicyOverrideTargetType added in v0.60.0

type WaapPolicyOverrideTargetType string

Whether targets are detectors or rules

const (
	WaapPolicyOverrideTargetTypeDetector WaapPolicyOverrideTargetType = "detector"
	WaapPolicyOverrideTargetTypeRule     WaapPolicyOverrideTargetType = "rule"
)

type WaapRequestDetails added in v0.3.0

type WaapRequestDetails struct {
	// Request ID
	ID string `json:"id" api:"required"`
	// Request action
	Action string `json:"action" api:"required"`
	// List of common tags
	CommonTags []WaapRequestDetailsCommonTag `json:"common_tags" api:"required"`
	// Content type of request
	ContentType string `json:"content_type" api:"required"`
	// Domain name
	Domain string `json:"domain" api:"required"`
	// Status code for http request
	HTTPStatusCode int64 `json:"http_status_code" api:"required"`
	// HTTP version of request
	HTTPVersion string `json:"http_version" api:"required"`
	// ID of challenge that was generated
	IncidentID string `json:"incident_id" api:"required"`
	// Request method
	Method string `json:"method" api:"required"`
	// Network details
	Network WaapRequestDetailsNetwork `json:"network" api:"required"`
	// Request path
	Path string `json:"path" api:"required"`
	// List of shield tags
	PatternMatchedTags []WaapRequestDetailsPatternMatchedTag `json:"pattern_matched_tags" api:"required"`
	// The query string of the request
	QueryString string `json:"query_string" api:"required"`
	// Reference ID to identify user sanction
	ReferenceID string `json:"reference_id" api:"required"`
	// HTTP request headers
	RequestHeaders map[string]any `json:"request_headers" api:"required"`
	// The time of the request
	RequestTime time.Time `json:"request_time" api:"required" format:"date-time"`
	// The type of the request that generated an event
	RequestType string `json:"request_type" api:"required"`
	// The real domain name
	RequestedDomain string `json:"requested_domain" api:"required"`
	// Time took to process all request
	ResponseTime string `json:"response_time" api:"required"`
	// The result of a request
	//
	// Any of "passed", "blocked", "suppressed", "".
	Result WaapRequestDetailsResult `json:"result" api:"required"`
	// ID of the triggered rule
	RuleID string `json:"rule_id" api:"required"`
	// Name of the triggered rule
	RuleName string `json:"rule_name" api:"required"`
	// The URI scheme of the request that generated an event
	Scheme string `json:"scheme" api:"required"`
	// The session ID associated with the request.
	SessionID string `json:"session_id" api:"required"`
	// The number requests in session
	SessionRequestCount string `json:"session_request_count" api:"required"`
	// List of traffic types
	TrafficTypes []string `json:"traffic_types" api:"required"`
	// User agent
	UserAgent WaapRequestDetailsUserAgent `json:"user_agent" api:"required"`
	// The decision made for processing the request through the WAAP.
	//
	// Any of "passed", "allowed", "monitored", "blocked", "".
	Decision WaapRequestDetailsDecision `json:"decision"`
	// Rules that matched the request and triggered the event decision.
	Detector []WaapRequestDetailsDetector `json:"detector"`
	// JA3 TLS client fingerprint as a 32-character lowercase hexadecimal MD5 hash, or
	// an empty string when the record has no JA3 value.
	Ja3 string `json:"ja3"`
	// JA4 TLS client fingerprint in the form `<ja4_a>_<ja4_b>_<ja4_c>` (a 10-character
	// prefix and two 12-character lowercase hexadecimal hashes), or an empty string
	// when the record has no JA4 value.
	Ja4 string `json:"ja4"`
	// An optional action that may be applied in addition to the primary decision.
	//
	// Any of "captcha", "challenge", "".
	OptionalAction WaapRequestDetailsOptionalAction `json:"optional_action"`
	// Applied overrides with id, t, and matched metadata keyed by target ID. Does not
	// replace the final decision.
	PolicyOverride []WaapRequestDetailsPolicyOverride `json:"policy_override"`
	// 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
		SessionID           respjson.Field
		SessionRequestCount respjson.Field
		TrafficTypes        respjson.Field
		UserAgent           respjson.Field
		Decision            respjson.Field
		Detector            respjson.Field
		Ja3                 respjson.Field
		Ja4                 respjson.Field
		OptionalAction      respjson.Field
		PolicyOverride      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" api:"required"`
	// The tag's display name
	DisplayName string `json:"display_name" api:"required"`
	// Tag name
	Tag string `json:"tag" api:"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 WaapRequestDetailsDecision added in v0.32.0

type WaapRequestDetailsDecision string

The decision made for processing the request through the WAAP.

const (
	WaapRequestDetailsDecisionPassed    WaapRequestDetailsDecision = "passed"
	WaapRequestDetailsDecisionAllowed   WaapRequestDetailsDecision = "allowed"
	WaapRequestDetailsDecisionMonitored WaapRequestDetailsDecision = "monitored"
	WaapRequestDetailsDecisionBlocked   WaapRequestDetailsDecision = "blocked"
	WaapRequestDetailsDecisionEmpty     WaapRequestDetailsDecision = ""
)

type WaapRequestDetailsDetector added in v0.50.0

type WaapRequestDetailsDetector struct {
	// The content that matched the rule
	MatchedContent string `json:"matched_content" api:"required"`
	// ID of the rule that matched
	RuleID string `json:"rule_id" api:"required"`
	// Name of the rule that matched
	RuleName string `json:"rule_name" api:"required"`
	// The name of the variable whose value triggered the rule
	SubjectField string `json:"subject_field" api:"required"`
	// The entity to which the matched variable belongs (e.g. `request_headers`, uri,
	// cookies)
	SubjectType string `json:"subject_type" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		MatchedContent respjson.Field
		RuleID         respjson.Field
		RuleName       respjson.Field
		SubjectField   respjson.Field
		SubjectType    respjson.Field
		ExtraFields    map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A rule that matched the request, with the matched subject and content.

func (WaapRequestDetailsDetector) RawJSON added in v0.50.0

func (r WaapRequestDetailsDetector) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapRequestDetailsDetector) UnmarshalJSON added in v0.50.0

func (r *WaapRequestDetailsDetector) UnmarshalJSON(data []byte) error

type WaapRequestDetailsNetwork added in v0.10.0

type WaapRequestDetailsNetwork struct {
	// Client IP
	ClientIP string `json:"client_ip" api:"required"`
	// Country code
	Country string `json:"country" api:"required"`
	// Organization details
	Organization WaapRequestDetailsNetworkOrganization `json:"organization" api:"required"`
	// Autonomous System Number, or an empty string when unknown
	Asn string `json:"asn"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ClientIP     respjson.Field
		Country      respjson.Field
		Organization respjson.Field
		Asn          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" api:"required"`
	// Network range
	Subnet string `json:"subnet" api:"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

Returns the unmodified JSON received from the API

func (*WaapRequestDetailsNetworkOrganization) UnmarshalJSON added in v0.10.0

func (r *WaapRequestDetailsNetworkOrganization) UnmarshalJSON(data []byte) error

type WaapRequestDetailsOptionalAction added in v0.32.0

type WaapRequestDetailsOptionalAction string

An optional action that may be applied in addition to the primary decision.

const (
	WaapRequestDetailsOptionalActionCaptcha   WaapRequestDetailsOptionalAction = "captcha"
	WaapRequestDetailsOptionalActionChallenge WaapRequestDetailsOptionalAction = "challenge"
	WaapRequestDetailsOptionalActionEmpty     WaapRequestDetailsOptionalAction = ""
)

type WaapRequestDetailsPatternMatchedTag added in v0.10.0

type WaapRequestDetailsPatternMatchedTag struct {
	// Tag description information
	Description string `json:"description" api:"required"`
	// The tag's display name
	DisplayName string `json:"display_name" api:"required"`
	// The phase in which the tag was triggered: access -> Request, `header_filter` ->
	// `response_header`, `body_filter` -> `response_body`
	ExecutionPhase string `json:"execution_phase" api:"required"`
	// The entity to which the variable that triggered the tag belong to. For example:
	// `request_headers`, uri, cookies etc.
	Field string `json:"field" api:"required"`
	// The name of the variable which holds the value that triggered the tag
	FieldName string `json:"field_name" api:"required"`
	// The name of the detected regexp pattern
	PatternName string `json:"pattern_name" api:"required"`
	// The pattern which triggered the tag
	PatternValue string `json:"pattern_value" api:"required"`
	// Tag name
	Tag string `json:"tag" api:"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

Returns the unmodified JSON received from the API

func (*WaapRequestDetailsPatternMatchedTag) UnmarshalJSON added in v0.10.0

func (r *WaapRequestDetailsPatternMatchedTag) UnmarshalJSON(data []byte) error

type WaapRequestDetailsPolicyOverride added in v0.58.0

type WaapRequestDetailsPolicyOverride struct {
	// ID of the policy override applied to this request.
	ID int64 `json:"id" api:"required"`
	// Match evidence keyed by target reference: a detector ID such as 'ID861', or a
	// rule ID such as '94'. A detector entry holds 'field' and 'pattern_found'. A rule
	// entry holds the rule's metadata, such as 'action' and 'rule_name', and for a
	// rule based on a detector result also that match's 'field' and 'pattern_found'.
	// 'pattern_found' is empty when the matched content is hidden. For legacy records,
	// evidence is retained only for the first matched target; subsequent matched
	// targets have empty objects.
	Matched map[string]any `json:"matched" api:"required"`
	// Type of target affected by the override: 'waf_rule' for a detector or
	// 'static_rule_template' for a rule.
	//
	// Any of "waf_rule", "static_rule_template".
	T string `json:"t" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Matched     respjson.Field
		T           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An override that applied to a request, with its match metadata.

func (WaapRequestDetailsPolicyOverride) RawJSON added in v0.58.0

Returns the unmodified JSON received from the API

func (*WaapRequestDetailsPolicyOverride) UnmarshalJSON added in v0.58.0

func (r *WaapRequestDetailsPolicyOverride) 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" api:"required"`
	// User agent browser version
	BaseBrowserVersion string `json:"base_browser_version" api:"required"`
	// Client from User agent header
	Client string `json:"client" api:"required"`
	// User agent client type
	ClientType string `json:"client_type" api:"required"`
	// User agent client version
	ClientVersion string `json:"client_version" api:"required"`
	// User agent cpu
	CPU string `json:"cpu" api:"required"`
	// User agent device
	Device string `json:"device" api:"required"`
	// User agent device type
	DeviceType string `json:"device_type" api:"required"`
	// User agent
	FullString string `json:"full_string" api:"required"`
	// User agent os
	Os string `json:"os" api:"required"`
	// User agent engine
	RenderingEngine string `json:"rendering_engine" api:"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" api:"required"`
	// Action of the triggered rule
	Action string `json:"action" api:"required"`
	// Client's IP address.
	ClientIP string `json:"client_ip" api:"required"`
	// Country code
	Country string `json:"country" api:"required"`
	// The decision made for processing the request through the WAAP.
	//
	// Any of "passed", "allowed", "monitored", "blocked", "".
	Decision WaapRequestSummaryDecision `json:"decision" api:"required"`
	// Domain name
	Domain string `json:"domain" api:"required"`
	// Domain ID
	DomainID int64 `json:"domain_id" api:"required"`
	// HTTP method
	Method string `json:"method" api:"required"`
	// An optional action that may be applied in addition to the primary decision.
	//
	// Any of "captcha", "challenge", "".
	OptionalAction WaapRequestSummaryOptionalAction `json:"optional_action" api:"required"`
	// Organization
	Organization string `json:"organization" api:"required"`
	// Request path
	Path string `json:"path" api:"required"`
	// The reference ID to a sanction that was given to a user.
	ReferenceID string `json:"reference_id" api:"required"`
	// The UNIX timestamp in ms of the date a set of traffic counters was recorded
	RequestTime int64 `json:"request_time" api:"required"`
	// Any of "passed", "blocked", "suppressed", "".
	Result WaapRequestSummaryResult `json:"result" api:"required"`
	// The ID of the triggered rule.
	RuleID string `json:"rule_id" api:"required"`
	// Name of the triggered rule
	RuleName string `json:"rule_name" api:"required"`
	// Status code for http request
	StatusCode int64 `json:"status_code" api:"required"`
	// Comma separated list of traffic types.
	TrafficTypes string `json:"traffic_types" api:"required"`
	// User agent
	UserAgent string `json:"user_agent" api:"required"`
	// Client from parsed User agent header
	UserAgentClient string `json:"user_agent_client" api:"required"`
	// HTTP version of request
	HTTPVersion string `json:"http_version"`
	// JA3 TLS client fingerprint as a 32-character lowercase hexadecimal MD5 hash, or
	// an empty string when the record has no JA3 value.
	Ja3 string `json:"ja3"`
	// Applied overrides with id, t, and matched metadata keyed by target ID. Does not
	// replace the final decision.
	PolicyOverride []WaapRequestSummaryPolicyOverride `json:"policy_override"`
	// The URI scheme of the request that generated an event
	Scheme string `json:"scheme"`
	// The session ID associated with the request.
	SessionID string `json:"session_id"`
	// 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
		Decision        respjson.Field
		Domain          respjson.Field
		DomainID        respjson.Field
		Method          respjson.Field
		OptionalAction  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
		HTTPVersion     respjson.Field
		Ja3             respjson.Field
		PolicyOverride  respjson.Field
		Scheme          respjson.Field
		SessionID       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 WaapRequestSummaryDecision added in v0.32.0

type WaapRequestSummaryDecision string

The decision made for processing the request through the WAAP.

const (
	WaapRequestSummaryDecisionPassed    WaapRequestSummaryDecision = "passed"
	WaapRequestSummaryDecisionAllowed   WaapRequestSummaryDecision = "allowed"
	WaapRequestSummaryDecisionMonitored WaapRequestSummaryDecision = "monitored"
	WaapRequestSummaryDecisionBlocked   WaapRequestSummaryDecision = "blocked"
	WaapRequestSummaryDecisionEmpty     WaapRequestSummaryDecision = ""
)

type WaapRequestSummaryOptionalAction added in v0.32.0

type WaapRequestSummaryOptionalAction string

An optional action that may be applied in addition to the primary decision.

const (
	WaapRequestSummaryOptionalActionCaptcha   WaapRequestSummaryOptionalAction = "captcha"
	WaapRequestSummaryOptionalActionChallenge WaapRequestSummaryOptionalAction = "challenge"
	WaapRequestSummaryOptionalActionEmpty     WaapRequestSummaryOptionalAction = ""
)

type WaapRequestSummaryPolicyOverride added in v0.58.0

type WaapRequestSummaryPolicyOverride struct {
	// ID of the policy override applied to this request.
	ID int64 `json:"id" api:"required"`
	// Match evidence keyed by target reference: a detector ID such as 'ID861', or a
	// rule ID such as '94'. A detector entry holds 'field' and 'pattern_found'. A rule
	// entry holds the rule's metadata, such as 'action' and 'rule_name', and for a
	// rule based on a detector result also that match's 'field' and 'pattern_found'.
	// 'pattern_found' is empty when the matched content is hidden. For legacy records,
	// evidence is retained only for the first matched target; subsequent matched
	// targets have empty objects.
	Matched map[string]any `json:"matched" api:"required"`
	// Type of target affected by the override: 'waf_rule' for a detector or
	// 'static_rule_template' for a rule.
	//
	// Any of "waf_rule", "static_rule_template".
	T string `json:"t" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		ID          respjson.Field
		Matched     respjson.Field
		T           respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

An override that applied to a request, with its match metadata.

func (WaapRequestSummaryPolicyOverride) RawJSON added in v0.58.0

Returns the unmodified JSON received from the API

func (*WaapRequestSummaryPolicyOverride) UnmarshalJSON added in v0.58.0

func (r *WaapRequestSummaryPolicyOverride) 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" api:"required"`
	// The number of requests blocked by the rule
	Count int64 `json:"count" api:"required"`
	// The name of the rule that blocked the request
	RuleName string `json:"rule_name" api:"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" api:"required"`
	// Detailed description of the rule set.
	Description string `json:"description" api:"required"`
	// Indicates if the rule set is currently active.
	IsActive bool `json:"is_active" api:"required"`
	// Name of the rule set.
	Name string `json:"name" api:"required"`
	// Collection of tags associated with the rule set.
	Tags []WaapRuleSetTag `json:"tags" api:"required"`
	// The resource slug associated with the rule set.
	ResourceSlug string `json:"resource_slug" api:"nullable"`
	// 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
		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 WaapRuleSetTag added in v0.3.0

type WaapRuleSetTag struct {
	// Identifier of the tag.
	ID int64 `json:"id" api:"required"`
	// Detailed description of the tag.
	Description string `json:"description" api:"required"`
	// Name of the tag.
	Name string `json:"name" api:"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 WaapRuleToggleResponse added in v0.60.0

type WaapRuleToggleResponse struct {
	// Rule enabled status after operation
	Enabled bool `json:"enabled" api:"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:"-"`
}

func (WaapRuleToggleResponse) RawJSON added in v0.60.0

func (r WaapRuleToggleResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapRuleToggleResponse) UnmarshalJSON added in v0.60.0

func (r *WaapRuleToggleResponse) UnmarshalJSON(data []byte) error

type WaapRulesBulkDeleteResponse added in v0.60.0

type WaapRulesBulkDeleteResponse struct {
	// Rules IDs deleted by the operation
	DeletedIDs []int64 `json:"deleted_ids"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DeletedIDs  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapRulesBulkDeleteResponse) RawJSON added in v0.60.0

func (r WaapRulesBulkDeleteResponse) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapRulesBulkDeleteResponse) UnmarshalJSON added in v0.60.0

func (r *WaapRulesBulkDeleteResponse) UnmarshalJSON(data []byte) error

type WaapService

type WaapService struct {
	Options    []option.RequestOption
	Statistics StatisticService
	Analytics  AnalyticsService
	// WAAP domains enable Web Application and API Protection for monitoring and
	// defending web applications against security threats.
	Domains         DomainService
	CustomPageSets  CustomPageSetService
	FirewallRules   FirewallRuleService
	FilterTemplates FilterTemplateService
	Prebilling      PrebillingService
	IPReputation    IPReputationService
	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 *WaapAccountOverview, err error)

Get information about WAAP service for the client

type WaapSimpleEventStatistics added in v0.39.0

type WaapSimpleEventStatistics struct {
	// Number of requests passed due to a permissive security rule.
	Allowed [][]any `json:"allowed" api:"required"`
	// Number of blocked request events, with the same keys and formatted the same as
	// in the total field.
	Blocked [][]any `json:"blocked" api:"required"`
	// Additional information, depending on the selected dimension. Keys refer to the
	// items in the result (first value of a tuple).
	Reference map[string]WaapSimpleEventStatisticsReferenceUnion `json:"reference" api:"required"`
	// Number of requests observed in monitoring mode that would have been blocked
	// otherwise.
	Suppressed [][]any `json:"suppressed" api:"required"`
	// Total number of observed requests. First element of the tuple is a key, the
	// second one is its counter value. The key refers to a point in the requested
	// dimension (e.g., an IP address). Results are ordered by the counter value in
	// descending order.
	Total [][]any `json:"total" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Allowed     respjson.Field
		Blocked     respjson.Field
		Reference   respjson.Field
		Suppressed  respjson.Field
		Total       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

A collection of event counts per dimension values over a time span.

func (WaapSimpleEventStatistics) RawJSON added in v0.39.0

func (r WaapSimpleEventStatistics) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapSimpleEventStatistics) UnmarshalJSON added in v0.39.0

func (r *WaapSimpleEventStatistics) UnmarshalJSON(data []byte) error

type WaapSimpleEventStatisticsReferenceDomainReference added in v0.39.0

type WaapSimpleEventStatisticsReferenceDomainReference struct {
	DomainID int64 `json:"domain_id" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		DomainID    respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapSimpleEventStatisticsReferenceDomainReference) RawJSON added in v0.39.0

Returns the unmodified JSON received from the API

func (*WaapSimpleEventStatisticsReferenceDomainReference) UnmarshalJSON added in v0.39.0

type WaapSimpleEventStatisticsReferenceIPReference added in v0.39.0

type WaapSimpleEventStatisticsReferenceIPReference struct {
	Country string `json:"country" api:"required"`
	Org     string `json:"org" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Country     respjson.Field
		Org         respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapSimpleEventStatisticsReferenceIPReference) RawJSON added in v0.39.0

Returns the unmodified JSON received from the API

func (*WaapSimpleEventStatisticsReferenceIPReference) UnmarshalJSON added in v0.39.0

func (r *WaapSimpleEventStatisticsReferenceIPReference) UnmarshalJSON(data []byte) error

type WaapSimpleEventStatisticsReferenceUnion added in v0.39.0

type WaapSimpleEventStatisticsReferenceUnion struct {
	// This field is from variant [WaapSimpleEventStatisticsReferenceIPReference].
	Country string `json:"country"`
	// This field is from variant [WaapSimpleEventStatisticsReferenceIPReference].
	Org string `json:"org"`
	// This field is from variant [WaapSimpleEventStatisticsReferenceDomainReference].
	DomainID int64 `json:"domain_id"`
	JSON     struct {
		Country  respjson.Field
		Org      respjson.Field
		DomainID respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

WaapSimpleEventStatisticsReferenceUnion contains all possible properties and values from WaapSimpleEventStatisticsReferenceIPReference, WaapSimpleEventStatisticsReferenceDomainReference.

Use the methods beginning with 'As' to cast the union to one of its variants.

func (WaapSimpleEventStatisticsReferenceUnion) AsDomainReference added in v0.39.0

func (WaapSimpleEventStatisticsReferenceUnion) AsIPReference added in v0.39.0

func (WaapSimpleEventStatisticsReferenceUnion) RawJSON added in v0.39.0

Returns the unmodified JSON received from the API

func (*WaapSimpleEventStatisticsReferenceUnion) UnmarshalJSON added in v0.39.0

func (r *WaapSimpleEventStatisticsReferenceUnion) UnmarshalJSON(data []byte) error

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" api:"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" api:"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" api:"nullable"`
	// Will be included if `total_requests` is requested in the metrics parameter
	TotalRequests []WaapStatisticItem `json:"total_requests" api:"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" api:"required"`
	// The date and time the domain was created in ISO 8601 format
	CreatedAt time.Time `json:"created_at" api:"required" format:"date-time"`
	// The ID of the custom page set
	CustomPageSet int64 `json:"custom_page_set" api:"required"`
	// The domain name
	Name string `json:"name" api:"required"`
	// The different statuses a domain can have
	//
	// Any of "active", "bypass", "monitor", "locked".
	Status WaapSummaryDomainStatus `json:"status" api:"required"`
	// CNAME aliases pointing at this domain's CDN resource
	Aliases []string `json:"aliases"`
	// The ID of the CDN resource this domain is bound to
	CDNResourceID int64 `json:"cdn_resource_id" api:"nullable"`
	// Traffic statistics for a domain.
	Stats WaapSummaryDomainStats `json:"stats"`
	// 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
		Aliases       respjson.Field
		CDNResourceID respjson.Field
		Stats         respjson.Field
		ExtraFields   map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Represents a WAAP domain with traffic statistics for v2 endpoint.

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 WaapSummaryDomainStats added in v0.56.0

type WaapSummaryDomainStats struct {
	// Total number of blocked attacks for the last 30 days
	AttacksBlocked int64 `json:"attacks_blocked"`
	// Total number of detected attacks for the last 30 days
	AttacksDetected int64 `json:"attacks_detected"`
	// Total number of requests for the last 30 days
	TotalRequests int64 `json:"total_requests"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AttacksBlocked  respjson.Field
		AttacksDetected respjson.Field
		TotalRequests   respjson.Field
		ExtraFields     map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

Traffic statistics for a domain.

func (WaapSummaryDomainStats) RawJSON added in v0.56.0

func (r WaapSummaryDomainStats) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapSummaryDomainStats) UnmarshalJSON added in v0.56.0

func (r *WaapSummaryDomainStats) 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" api:"required"`
	// The name of a tag that should be used in a WAAP rule condition
	Name string `json:"name" api:"required"`
	// The display name of the tag
	ReadableName string `json:"readable_name" api:"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) RawJSON added in v0.3.0

func (r WaapTag) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapTag) UnmarshalJSON added in v0.3.0

func (r *WaapTag) UnmarshalJSON(data []byte) error

type WaapTaskID added in v0.10.0

type WaapTaskID struct {
	// The task ID
	ID string `json:"id" api:"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" api:"required"`
	// The time series data
	Values []WaapTimeSeriesAttackValue `json:"values" api:"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" api:"required"`
	// The timestamp of the time series item as a POSIX timestamp
	Timestamp int64 `json:"timestamp" api:"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 WaapTopAttack added in v0.60.0

type WaapTopAttack struct {
	// The attack type (rule name)
	AttackType string `json:"attack_type" api:"required"`
	// Total number of attack requests (blocked + monitored)
	Attacks int64 `json:"attacks" api:"required"`
	// Number of blocked attack requests
	Blocked int64 `json:"blocked" api:"required"`
	// Full list of domains where this attack type was seen
	Domains []string `json:"domains"`
	// Full list of paths where this attack type was seen
	Paths []string `json:"paths"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AttackType  respjson.Field
		Attacks     respjson.Field
		Blocked     respjson.Field
		Domains     respjson.Field
		Paths       respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapTopAttack) RawJSON added in v0.60.0

func (r WaapTopAttack) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapTopAttack) UnmarshalJSON added in v0.60.0

func (r *WaapTopAttack) UnmarshalJSON(data []byte) error

type WaapTopDomainDetail added in v0.60.0

type WaapTopDomainDetail struct {
	// Distinct rule names seen for this IP+domain, sorted alphabetically.
	AttackTypes []string `json:"attack_types" api:"required"`
	// Total detected attacks.
	Attacks int64 `json:"attacks" api:"required"`
	// Blocked attacks.
	Blocked int64 `json:"blocked" api:"required"`
	// First-seen timestamp for the IP+domain within retention period.
	Date time.Time `json:"date" api:"required" format:"date-time"`
	// Domain name.
	Domain string `json:"domain" api:"required"`
	// `last_seen` - `first_seen` in seconds within retention.
	Duration int64 `json:"duration" api:"required"`
	// Distinct URL paths excluding query strings.
	Paths int64 `json:"paths" api:"required"`
	// Total requests.
	Requests int64 `json:"requests" api:"required"`
	// Distinct sessions.
	Sessions int64 `json:"sessions" api:"required"`
	// Distinct user agents.
	UserAgents int64 `json:"user_agents" api:"required"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		AttackTypes respjson.Field
		Attacks     respjson.Field
		Blocked     respjson.Field
		Date        respjson.Field
		Domain      respjson.Field
		Duration    respjson.Field
		Paths       respjson.Field
		Requests    respjson.Field
		Sessions    respjson.Field
		UserAgents  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapTopDomainDetail) RawJSON added in v0.60.0

func (r WaapTopDomainDetail) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapTopDomainDetail) UnmarshalJSON added in v0.60.0

func (r *WaapTopDomainDetail) UnmarshalJSON(data []byte) error

type WaapTopPathDetail added in v0.60.0

type WaapTopPathDetail struct {
	// First seen timestamp for the IP+path within retention period
	Date time.Time `json:"date" api:"required" format:"date-time"`
	// Path value as stored in logs
	Path string `json:"path" api:"required"`
	// Distinct rule names seen for this IP+path
	AttackTypes []string `json:"attack_types"`
	// Total detected attacks (blocked + monitored/suppressed outcomes)
	Attacks int64 `json:"attacks"`
	// Blocked attacks
	Blocked int64 `json:"blocked"`
	// `last_seen` - `first_seen` in seconds within retention
	Duration int64 `json:"duration"`
	// Total requests
	Requests int64 `json:"requests"`
	// Distinct sessions
	Sessions int64 `json:"sessions"`
	// Distinct user agents
	UserAgents int64 `json:"user_agents"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Date        respjson.Field
		Path        respjson.Field
		AttackTypes respjson.Field
		Attacks     respjson.Field
		Blocked     respjson.Field
		Duration    respjson.Field
		Requests    respjson.Field
		Sessions    respjson.Field
		UserAgents  respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapTopPathDetail) RawJSON added in v0.60.0

func (r WaapTopPathDetail) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapTopPathDetail) UnmarshalJSON added in v0.60.0

func (r *WaapTopPathDetail) 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" api:"required"`
	// The duration of the session in seconds
	Duration float64 `json:"duration" api:"required"`
	// The number of requests in the session
	Requests int64 `json:"requests" api:"required"`
	// The session ID
	SessionID string `json:"session_id" api:"required" format:"uuid"`
	// The start time of the session as a POSIX timestamp
	StartTime time.Time `json:"start_time" api:"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" api:"required"`
	// The URL that was attacked
	URL string `json:"url" api:"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" api:"required"`
	// The user agent that was used
	UserAgent string `json:"user_agent" api:"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 WaapTopUserAgentDetail added in v0.60.0

type WaapTopUserAgentDetail struct {
	// Total number of detected attacks.
	Attacks int64 `json:"attacks"`
	// Number of blocked attacks.
	Blocked int64 `json:"blocked"`
	// Number of distinct domains.
	Domains int64 `json:"domains"`
	// Number of distinct URL paths excluding query strings.
	Paths int64 `json:"paths"`
	// Total number of requests.
	Requests int64 `json:"requests"`
	// Number of distinct sessions.
	Sessions int64 `json:"sessions"`
	// The user agent string; missing values are represented as "".
	UserAgent string `json:"user_agent"`
	// JSON contains metadata for fields, check presence with [respjson.Field.Valid].
	JSON struct {
		Attacks     respjson.Field
		Blocked     respjson.Field
		Domains     respjson.Field
		Paths       respjson.Field
		Requests    respjson.Field
		Sessions    respjson.Field
		UserAgent   respjson.Field
		ExtraFields map[string]respjson.Field
		// contains filtered or unexported fields
	} `json:"-"`
}

func (WaapTopUserAgentDetail) RawJSON added in v0.60.0

func (r WaapTopUserAgentDetail) RawJSON() string

Returns the unmodified JSON received from the API

func (*WaapTopUserAgentDetail) UnmarshalJSON added in v0.60.0

func (r *WaapTopUserAgentDetail) 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" api:"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

Jump to

Keyboard shortcuts

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