brand_protection

package
v2.0.0-beta.11 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BrandProtectionService

type BrandProtectionService struct {
	Options []option.RequestOption
}

BrandProtectionService contains methods and other services that help with interacting with the cloudflare API. Note, unlike clients, this service does not read variables from the environment automatically. You should not instantiate this service directly, and instead use the NewBrandProtectionService method instead.

func NewBrandProtectionService

func NewBrandProtectionService(opts ...option.RequestOption) (r *BrandProtectionService)

NewBrandProtectionService 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 (*BrandProtectionService) Submit

Submit suspicious URL for scanning

func (*BrandProtectionService) URLInfo

Get results for a URL scan

type BrandProtectionSubmitParams

type BrandProtectionSubmitParams struct {
	// Identifier
	AccountID param.Field[string] `path:"account_id,required"`
	// URL(s) to filter submissions results by
	URL param.Field[string] `json:"url" format:"uri"`
}

func (BrandProtectionSubmitParams) MarshalJSON

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

type BrandProtectionSubmitResponseEnvelope

type BrandProtectionSubmitResponseEnvelope struct {
	Errors   []BrandProtectionSubmitResponseEnvelopeErrors   `json:"errors,required"`
	Messages []BrandProtectionSubmitResponseEnvelopeMessages `json:"messages,required"`
	Result   IntelPhishingURLSubmit                          `json:"result,required"`
	// Whether the API call was successful
	Success BrandProtectionSubmitResponseEnvelopeSuccess `json:"success,required"`
	JSON    brandProtectionSubmitResponseEnvelopeJSON    `json:"-"`
}

func (*BrandProtectionSubmitResponseEnvelope) UnmarshalJSON

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

type BrandProtectionSubmitResponseEnvelopeErrors

type BrandProtectionSubmitResponseEnvelopeErrors struct {
	Code    int64                                           `json:"code,required"`
	Message string                                          `json:"message,required"`
	JSON    brandProtectionSubmitResponseEnvelopeErrorsJSON `json:"-"`
}

func (*BrandProtectionSubmitResponseEnvelopeErrors) UnmarshalJSON

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

type BrandProtectionSubmitResponseEnvelopeMessages

type BrandProtectionSubmitResponseEnvelopeMessages struct {
	Code    int64                                             `json:"code,required"`
	Message string                                            `json:"message,required"`
	JSON    brandProtectionSubmitResponseEnvelopeMessagesJSON `json:"-"`
}

func (*BrandProtectionSubmitResponseEnvelopeMessages) UnmarshalJSON

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

type BrandProtectionSubmitResponseEnvelopeSuccess

type BrandProtectionSubmitResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BrandProtectionSubmitResponseEnvelopeSuccessTrue BrandProtectionSubmitResponseEnvelopeSuccess = true
)

func (BrandProtectionSubmitResponseEnvelopeSuccess) IsKnown

type BrandProtectionURLInfoParams

type BrandProtectionURLInfoParams struct {
	// Identifier
	AccountID  param.Field[string]                                 `path:"account_id,required"`
	URL        param.Field[string]                                 `query:"url"`
	URLIDParam param.Field[BrandProtectionURLInfoParamsURLIDParam] `query:"url_id_param"`
}

func (BrandProtectionURLInfoParams) URLQuery

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

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

type BrandProtectionURLInfoParamsURLIDParam

type BrandProtectionURLInfoParamsURLIDParam struct {
	// Submission ID(s) to filter submission results by.
	URLID param.Field[int64] `query:"url_id"`
}

func (BrandProtectionURLInfoParamsURLIDParam) URLQuery

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

type BrandProtectionURLInfoResponseEnvelope

type BrandProtectionURLInfoResponseEnvelope struct {
	Errors   []BrandProtectionURLInfoResponseEnvelopeErrors   `json:"errors,required"`
	Messages []BrandProtectionURLInfoResponseEnvelopeMessages `json:"messages,required"`
	Result   IntelPhishingURLInfo                             `json:"result,required"`
	// Whether the API call was successful
	Success BrandProtectionURLInfoResponseEnvelopeSuccess `json:"success,required"`
	JSON    brandProtectionURLInfoResponseEnvelopeJSON    `json:"-"`
}

func (*BrandProtectionURLInfoResponseEnvelope) UnmarshalJSON

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

type BrandProtectionURLInfoResponseEnvelopeErrors

type BrandProtectionURLInfoResponseEnvelopeErrors struct {
	Code    int64                                            `json:"code,required"`
	Message string                                           `json:"message,required"`
	JSON    brandProtectionURLInfoResponseEnvelopeErrorsJSON `json:"-"`
}

func (*BrandProtectionURLInfoResponseEnvelopeErrors) UnmarshalJSON

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

type BrandProtectionURLInfoResponseEnvelopeMessages

type BrandProtectionURLInfoResponseEnvelopeMessages struct {
	Code    int64                                              `json:"code,required"`
	Message string                                             `json:"message,required"`
	JSON    brandProtectionURLInfoResponseEnvelopeMessagesJSON `json:"-"`
}

func (*BrandProtectionURLInfoResponseEnvelopeMessages) UnmarshalJSON

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

type BrandProtectionURLInfoResponseEnvelopeSuccess

type BrandProtectionURLInfoResponseEnvelopeSuccess bool

Whether the API call was successful

const (
	BrandProtectionURLInfoResponseEnvelopeSuccessTrue BrandProtectionURLInfoResponseEnvelopeSuccess = true
)

func (BrandProtectionURLInfoResponseEnvelopeSuccess) IsKnown

type Error

type Error = apierror.Error

type IntelPhishingURLInfo

type IntelPhishingURLInfo struct {
	// List of categorizations applied to this submission.
	Categorizations []IntelPhishingURLInfoCategorization `json:"categorizations"`
	// List of model results for completed scans.
	ModelResults []IntelPhishingURLInfoModelResult `json:"model_results"`
	// List of signatures that matched against site content found when crawling the
	// URL.
	RuleMatches []IntelPhishingURLInfoRuleMatch `json:"rule_matches"`
	// Status of the most recent scan found.
	ScanStatus IntelPhishingURLInfoScanStatus `json:"scan_status"`
	// For internal use.
	ScreenshotDownloadSignature string `json:"screenshot_download_signature"`
	// For internal use.
	ScreenshotPath string `json:"screenshot_path"`
	// URL that was submitted.
	URL  string                   `json:"url"`
	JSON intelPhishingURLInfoJSON `json:"-"`
}

func (*IntelPhishingURLInfo) UnmarshalJSON

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

type IntelPhishingURLInfoCategorization

type IntelPhishingURLInfoCategorization struct {
	// Name of the category applied.
	Category string `json:"category"`
	// Result of human review for this categorization.
	VerificationStatus string                                 `json:"verification_status"`
	JSON               intelPhishingURLInfoCategorizationJSON `json:"-"`
}

func (*IntelPhishingURLInfoCategorization) UnmarshalJSON

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

type IntelPhishingURLInfoModelResult

type IntelPhishingURLInfoModelResult struct {
	// Name of the model.
	ModelName string `json:"model_name"`
	// Score output by the model for this submission.
	ModelScore float64                             `json:"model_score"`
	JSON       intelPhishingURLInfoModelResultJSON `json:"-"`
}

func (*IntelPhishingURLInfoModelResult) UnmarshalJSON

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

type IntelPhishingURLInfoRuleMatch

type IntelPhishingURLInfoRuleMatch struct {
	// For internal use.
	Banning bool `json:"banning"`
	// For internal use.
	Blocking bool `json:"blocking"`
	// Description of the signature that matched.
	Description string `json:"description"`
	// Name of the signature that matched.
	Name string                            `json:"name"`
	JSON intelPhishingURLInfoRuleMatchJSON `json:"-"`
}

func (*IntelPhishingURLInfoRuleMatch) UnmarshalJSON

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

type IntelPhishingURLInfoScanStatus

type IntelPhishingURLInfoScanStatus struct {
	// Timestamp of when the submission was processed.
	LastProcessed string `json:"last_processed"`
	// For internal use.
	ScanComplete bool `json:"scan_complete"`
	// Status code that the crawler received when loading the submitted URL.
	StatusCode int64 `json:"status_code"`
	// ID of the most recent submission.
	SubmissionID int64                              `json:"submission_id"`
	JSON         intelPhishingURLInfoScanStatusJSON `json:"-"`
}

Status of the most recent scan found.

func (*IntelPhishingURLInfoScanStatus) UnmarshalJSON

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

type IntelPhishingURLSubmit

type IntelPhishingURLSubmit struct {
	// URLs that were excluded from scanning because their domain is in our no-scan
	// list.
	ExcludedURLs []IntelPhishingURLSubmitExcludedURL `json:"excluded_urls"`
	// URLs that were skipped because the same URL is currently being scanned
	SkippedURLs []IntelPhishingURLSubmitSkippedURL `json:"skipped_urls"`
	// URLs that were successfully submitted for scanning.
	SubmittedURLs []IntelPhishingURLSubmitSubmittedURL `json:"submitted_urls"`
	JSON          intelPhishingURLSubmitJSON           `json:"-"`
}

func (*IntelPhishingURLSubmit) UnmarshalJSON

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

type IntelPhishingURLSubmitExcludedURL

type IntelPhishingURLSubmitExcludedURL struct {
	// URL that was excluded.
	URL  string                                `json:"url"`
	JSON intelPhishingURLSubmitExcludedURLJSON `json:"-"`
}

func (*IntelPhishingURLSubmitExcludedURL) UnmarshalJSON

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

type IntelPhishingURLSubmitSkippedURL

type IntelPhishingURLSubmitSkippedURL struct {
	// URL that was skipped.
	URL string `json:"url"`
	// ID of the submission of that URL that is currently scanning.
	URLID int64                                `json:"url_id"`
	JSON  intelPhishingURLSubmitSkippedURLJSON `json:"-"`
}

func (*IntelPhishingURLSubmitSkippedURL) UnmarshalJSON

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

type IntelPhishingURLSubmitSubmittedURL

type IntelPhishingURLSubmitSubmittedURL struct {
	// URL that was submitted.
	URL string `json:"url"`
	// ID assigned to this URL submission. Used to retrieve scanning results.
	URLID int64                                  `json:"url_id"`
	JSON  intelPhishingURLSubmitSubmittedURLJSON `json:"-"`
}

func (*IntelPhishingURLSubmitSubmittedURL) UnmarshalJSON

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

Jump to

Keyboard shortcuts

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