Documentation
¶
Index ¶
- Constants
- type ASN
- type ASNParam
- type AuditLog
- type AuditLogAction
- type AuditLogActor
- type AuditLogActorType
- type AuditLogOwner
- type AuditLogResource
- type CertificateCA
- type CertificateRequestType
- type CloudflareTunnel
- type CloudflareTunnelConnection
- type CloudflareTunnelTunType
- type Error
- type ErrorData
- type Member
- type MemberParam
- type MemberRole
- type MemberRoleParam
- type MemberRolesPermissions
- type MemberRolesPermissionsParam
- type MemberUser
- type MemberUserParam
- type Permission
- type PermissionGrant
- type PermissionGrantParam
- type ResponseInfo
- type Role
- type ScanGetResponse
- type ScanGetResponseEnvelope
- type ScanGetResponseEnvelopeErrors
- type ScanGetResponseEnvelopeMessages
- type ScanGetResponseScan
- type ScanGetResponseScanASNs
- type ScanGetResponseScanASNsASN
- type ScanGetResponseScanCertificate
- type ScanGetResponseScanDomains
- type ScanGetResponseScanDomainsExampleCom
- type ScanGetResponseScanDomainsExampleComCategories
- type ScanGetResponseScanDomainsExampleComCategoriesInherited
- type ScanGetResponseScanDomainsExampleComDNS
- type ScanGetResponseScanDomainsExampleComRank
- type ScanGetResponseScanGeo
- type ScanGetResponseScanIPs
- type ScanGetResponseScanIPsIP
- type ScanGetResponseScanLinks
- type ScanGetResponseScanLinksLink
- type ScanGetResponseScanMeta
- type ScanGetResponseScanMetaProcessors
- type ScanGetResponseScanMetaProcessorsCategories
- type ScanGetResponseScanMetaProcessorsCategoriesRisk
- type ScanGetResponseScanMetaProcessorsRank
- type ScanGetResponseScanMetaProcessorsTech
- type ScanGetResponseScanMetaProcessorsTechCategory
- type ScanGetResponseScanMetaProcessorsTechEvidence
- type ScanGetResponseScanMetaProcessorsTechEvidencePattern
- type ScanGetResponseScanPage
- type ScanGetResponseScanPageConsole
- type ScanGetResponseScanPageCookie
- type ScanGetResponseScanPageJS
- type ScanGetResponseScanPageJSVariable
- type ScanGetResponseScanPageSecurityViolation
- type ScanGetResponseScanPerformance
- type ScanGetResponseScanTask
- type ScanGetResponseScanTaskClientType
- type ScanGetResponseScanTaskError
- type ScanGetResponseScanTaskScannedFrom
- type ScanGetResponseScanTaskStatus
- type ScanGetResponseScanTaskVisibility
- type ScanGetResponseScanVerdicts
- type ScanGetResponseScanVerdictsOverall
- type ScanGetResponseScanVerdictsOverallCategory
- type ScanHarResponse
- type ScanHarResponseEnvelope
- type ScanHarResponseEnvelopeErrors
- type ScanHarResponseEnvelopeMessages
- type ScanHarResponseHar
- type ScanHarResponseHarLog
- type ScanHarResponseHarLogCreator
- type ScanHarResponseHarLogEntriesRequest
- type ScanHarResponseHarLogEntriesResponse
- type ScanHarResponseHarLogEntriesResponseContent
- type ScanHarResponseHarLogEntry
- type ScanHarResponseHarLogPage
- type ScanHarResponseHarLogPagesPageTimings
- type ScanNewParams
- type ScanNewParamsScreenshotsResolution
- type ScanNewParamsVisibility
- type ScanNewResponse
- type ScanNewResponseEnvelope
- type ScanNewResponseEnvelopeErrors
- type ScanNewResponseEnvelopeMessages
- type ScanScreenshotParams
- type ScanScreenshotParamsResolution
- type ScanService
- func (r *ScanService) Get(ctx context.Context, accountID string, scanID string, ...) (res *ScanGetResponse, err error)
- func (r *ScanService) Har(ctx context.Context, accountID string, scanID string, ...) (res *ScanHarResponse, err error)
- func (r *ScanService) New(ctx context.Context, accountID string, body ScanNewParams, ...) (res *ScanNewResponse, err error)
- func (r *ScanService) Screenshot(ctx context.Context, accountID string, scanID string, ...) (res *http.Response, err error)
- type SortDirection
- type URLScannerDomain
- type URLScannerScanParams
- type URLScannerScanResponse
- type URLScannerScanResponseEnvelope
- type URLScannerScanResponseEnvelopeErrors
- type URLScannerScanResponseEnvelopeMessages
- type URLScannerScanResponseTask
- type URLScannerService
Constants ¶
const AuditLogActorTypeAdmin = shared.AuditLogActorTypeAdmin
This is an alias to an internal value.
const AuditLogActorTypeCloudflare = shared.AuditLogActorTypeCloudflare
This is an alias to an internal value.
const AuditLogActorTypeUser = shared.AuditLogActorTypeUser
This is an alias to an internal value.
const CertificateCADigicert = shared.CertificateCADigicert
This is an alias to an internal value.
const CertificateCAGoogle = shared.CertificateCAGoogle
This is an alias to an internal value.
const CertificateCALetsEncrypt = shared.CertificateCALetsEncrypt
This is an alias to an internal value.
const CertificateRequestTypeKeylessCertificate = shared.CertificateRequestTypeKeylessCertificate
This is an alias to an internal value.
const CertificateRequestTypeOriginECC = shared.CertificateRequestTypeOriginECC
This is an alias to an internal value.
const CertificateRequestTypeOriginRSA = shared.CertificateRequestTypeOriginRSA
This is an alias to an internal value.
const CloudflareTunnelTunTypeCNI = shared.CloudflareTunnelTunTypeCNI
This is an alias to an internal value.
const CloudflareTunnelTunTypeCfdTunnel = shared.CloudflareTunnelTunTypeCfdTunnel
This is an alias to an internal value.
const CloudflareTunnelTunTypeGRE = shared.CloudflareTunnelTunTypeGRE
This is an alias to an internal value.
const CloudflareTunnelTunTypeIPSec = shared.CloudflareTunnelTunTypeIPSec
This is an alias to an internal value.
const CloudflareTunnelTunTypeWARPConnector = shared.CloudflareTunnelTunTypeWARPConnector
This is an alias to an internal value.
const SortDirectionAsc = shared.SortDirectionAsc
This is an alias to an internal value.
const SortDirectionDesc = shared.SortDirectionDesc
This is an alias to an internal value.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuditLogAction ¶
type AuditLogAction = shared.AuditLogAction
This is an alias to an internal type.
type AuditLogActor ¶
type AuditLogActor = shared.AuditLogActor
This is an alias to an internal type.
type AuditLogActorType ¶
type AuditLogActorType = shared.AuditLogActorType
The type of actor, whether a User, Cloudflare Admin, or an Automated System.
This is an alias to an internal type.
type AuditLogOwner ¶
type AuditLogOwner = shared.AuditLogOwner
This is an alias to an internal type.
type AuditLogResource ¶
type AuditLogResource = shared.AuditLogResource
This is an alias to an internal type.
type CertificateCA ¶ added in v2.2.0
type CertificateCA = shared.CertificateCA
The Certificate Authority that will issue the certificate
This is an alias to an internal type.
type CertificateRequestType ¶ added in v2.2.0
type CertificateRequestType = shared.CertificateRequestType
Signature type desired on certificate ("origin-rsa" (rsa), "origin-ecc" (ecdsa), or "keyless-certificate" (for Keyless SSL servers).
This is an alias to an internal type.
type CloudflareTunnel ¶
type CloudflareTunnel = shared.CloudflareTunnel
A Cloudflare Tunnel that connects your origin to Cloudflare's edge.
This is an alias to an internal type.
type CloudflareTunnelConnection ¶
type CloudflareTunnelConnection = shared.CloudflareTunnelConnection
This is an alias to an internal type.
type CloudflareTunnelTunType ¶
type CloudflareTunnelTunType = shared.CloudflareTunnelTunType
The type of tunnel.
This is an alias to an internal type.
type MemberParam ¶ added in v2.1.0
type MemberParam = shared.MemberParam
This is an alias to an internal type.
type MemberRole ¶ added in v2.1.0
type MemberRole = shared.MemberRole
This is an alias to an internal type.
type MemberRoleParam ¶ added in v2.1.0
type MemberRoleParam = shared.MemberRoleParam
This is an alias to an internal type.
type MemberRolesPermissions ¶ added in v2.1.0
type MemberRolesPermissions = shared.MemberRolesPermissions
This is an alias to an internal type.
type MemberRolesPermissionsParam ¶ added in v2.1.0
type MemberRolesPermissionsParam = shared.MemberRolesPermissionsParam
This is an alias to an internal type.
type MemberUser ¶ added in v2.1.0
type MemberUser = shared.MemberUser
This is an alias to an internal type.
type MemberUserParam ¶ added in v2.1.0
type MemberUserParam = shared.MemberUserParam
This is an alias to an internal type.
type PermissionGrant ¶
type PermissionGrant = shared.PermissionGrant
This is an alias to an internal type.
type PermissionGrantParam ¶
type PermissionGrantParam = shared.PermissionGrantParam
This is an alias to an internal type.
type ScanGetResponse ¶
type ScanGetResponse struct {
Scan ScanGetResponseScan `json:"scan,required"`
JSON scanGetResponseJSON `json:"-"`
}
func (*ScanGetResponse) UnmarshalJSON ¶
func (r *ScanGetResponse) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseEnvelope ¶
type ScanGetResponseEnvelope struct {
Errors []ScanGetResponseEnvelopeErrors `json:"errors,required"`
Messages []ScanGetResponseEnvelopeMessages `json:"messages,required"`
Result ScanGetResponse `json:"result,required"`
// Whether request was successful or not
Success bool `json:"success,required"`
JSON scanGetResponseEnvelopeJSON `json:"-"`
}
func (*ScanGetResponseEnvelope) UnmarshalJSON ¶
func (r *ScanGetResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseEnvelopeErrors ¶
type ScanGetResponseEnvelopeErrors struct {
Message string `json:"message,required"`
JSON scanGetResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ScanGetResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ScanGetResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseEnvelopeMessages ¶
type ScanGetResponseEnvelopeMessages struct {
Message string `json:"message,required"`
JSON scanGetResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ScanGetResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ScanGetResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScan ¶
type ScanGetResponseScan struct {
Certificates []ScanGetResponseScanCertificate `json:"certificates,required"`
Geo ScanGetResponseScanGeo `json:"geo,required"`
Meta ScanGetResponseScanMeta `json:"meta,required"`
Page ScanGetResponseScanPage `json:"page,required"`
Performance []ScanGetResponseScanPerformance `json:"performance,required"`
Task ScanGetResponseScanTask `json:"task,required"`
Verdicts ScanGetResponseScanVerdicts `json:"verdicts,required"`
// Dictionary of Autonomous System Numbers where ASN's are the keys
ASNs ScanGetResponseScanASNs `json:"asns"`
Domains ScanGetResponseScanDomains `json:"domains"`
IPs ScanGetResponseScanIPs `json:"ips"`
Links ScanGetResponseScanLinks `json:"links"`
JSON scanGetResponseScanJSON `json:"-"`
}
func (*ScanGetResponseScan) UnmarshalJSON ¶
func (r *ScanGetResponseScan) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanASNs ¶
type ScanGetResponseScanASNs struct {
// ASN's contacted
ASN ScanGetResponseScanASNsASN `json:"asn"`
JSON scanGetResponseScanASNsJSON `json:"-"`
}
Dictionary of Autonomous System Numbers where ASN's are the keys
func (*ScanGetResponseScanASNs) UnmarshalJSON ¶
func (r *ScanGetResponseScanASNs) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanASNsASN ¶
type ScanGetResponseScanASNsASN struct {
ASN string `json:"asn,required"`
Description string `json:"description,required"`
LocationAlpha2 string `json:"location_alpha2,required"`
Name string `json:"name,required"`
OrgName string `json:"org_name,required"`
JSON scanGetResponseScanASNsASNJSON `json:"-"`
}
ASN's contacted
func (*ScanGetResponseScanASNsASN) UnmarshalJSON ¶
func (r *ScanGetResponseScanASNsASN) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanCertificate ¶
type ScanGetResponseScanCertificate struct {
Issuer string `json:"issuer,required"`
SubjectName string `json:"subjectName,required"`
ValidFrom float64 `json:"validFrom,required"`
ValidTo float64 `json:"validTo,required"`
JSON scanGetResponseScanCertificateJSON `json:"-"`
}
func (*ScanGetResponseScanCertificate) UnmarshalJSON ¶
func (r *ScanGetResponseScanCertificate) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanDomains ¶
type ScanGetResponseScanDomains struct {
ExampleCom ScanGetResponseScanDomainsExampleCom `json:"example.com"`
JSON scanGetResponseScanDomainsJSON `json:"-"`
}
func (*ScanGetResponseScanDomains) UnmarshalJSON ¶
func (r *ScanGetResponseScanDomains) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanDomainsExampleCom ¶
type ScanGetResponseScanDomainsExampleCom struct {
Categories ScanGetResponseScanDomainsExampleComCategories `json:"categories,required"`
DNS []ScanGetResponseScanDomainsExampleComDNS `json:"dns,required"`
Name string `json:"name,required"`
Rank ScanGetResponseScanDomainsExampleComRank `json:"rank,required"`
Type string `json:"type,required"`
JSON scanGetResponseScanDomainsExampleComJSON `json:"-"`
}
func (*ScanGetResponseScanDomainsExampleCom) UnmarshalJSON ¶
func (r *ScanGetResponseScanDomainsExampleCom) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanDomainsExampleComCategories ¶
type ScanGetResponseScanDomainsExampleComCategories struct {
Inherited ScanGetResponseScanDomainsExampleComCategoriesInherited `json:"inherited,required"`
Content []URLScannerDomain `json:"content"`
Risks []URLScannerDomain `json:"risks"`
JSON scanGetResponseScanDomainsExampleComCategoriesJSON `json:"-"`
}
func (*ScanGetResponseScanDomainsExampleComCategories) UnmarshalJSON ¶
func (r *ScanGetResponseScanDomainsExampleComCategories) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanDomainsExampleComCategoriesInherited ¶
type ScanGetResponseScanDomainsExampleComCategoriesInherited struct {
Content []URLScannerDomain `json:"content"`
From string `json:"from"`
Risks []URLScannerDomain `json:"risks"`
JSON scanGetResponseScanDomainsExampleComCategoriesInheritedJSON `json:"-"`
}
func (*ScanGetResponseScanDomainsExampleComCategoriesInherited) UnmarshalJSON ¶
func (r *ScanGetResponseScanDomainsExampleComCategoriesInherited) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanDomainsExampleComDNS ¶
type ScanGetResponseScanDomainsExampleComDNS struct {
Address string `json:"address,required"`
DNSSECValid bool `json:"dnssec_valid,required"`
Name string `json:"name,required"`
Type string `json:"type,required"`
JSON scanGetResponseScanDomainsExampleComDNSJSON `json:"-"`
}
func (*ScanGetResponseScanDomainsExampleComDNS) UnmarshalJSON ¶
func (r *ScanGetResponseScanDomainsExampleComDNS) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanDomainsExampleComRank ¶
type ScanGetResponseScanDomainsExampleComRank struct {
Bucket string `json:"bucket,required"`
Name string `json:"name,required"`
// Rank in the Global Radar Rank, if set. See more at
// https://blog.cloudflare.com/radar-domain-rankings/
Rank int64 `json:"rank"`
JSON scanGetResponseScanDomainsExampleComRankJSON `json:"-"`
}
func (*ScanGetResponseScanDomainsExampleComRank) UnmarshalJSON ¶
func (r *ScanGetResponseScanDomainsExampleComRank) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanGeo ¶
type ScanGetResponseScanGeo struct {
// GeoIP continent location
Continents []string `json:"continents,required"`
// GeoIP country location
Locations []string `json:"locations,required"`
JSON scanGetResponseScanGeoJSON `json:"-"`
}
func (*ScanGetResponseScanGeo) UnmarshalJSON ¶
func (r *ScanGetResponseScanGeo) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanIPs ¶
type ScanGetResponseScanIPs struct {
IP ScanGetResponseScanIPsIP `json:"ip"`
JSON scanGetResponseScanIPsJSON `json:"-"`
}
func (*ScanGetResponseScanIPs) UnmarshalJSON ¶
func (r *ScanGetResponseScanIPs) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanIPsIP ¶
type ScanGetResponseScanIPsIP struct {
ASN string `json:"asn,required"`
ASNDescription string `json:"asnDescription,required"`
ASNLocationAlpha2 string `json:"asnLocationAlpha2,required"`
ASNName string `json:"asnName,required"`
ASNOrgName string `json:"asnOrgName,required"`
Continent string `json:"continent,required"`
GeonameID string `json:"geonameId,required"`
IP string `json:"ip,required"`
IPVersion string `json:"ipVersion,required"`
Latitude string `json:"latitude,required"`
LocationAlpha2 string `json:"locationAlpha2,required"`
LocationName string `json:"locationName,required"`
Longitude string `json:"longitude,required"`
Subdivision1Name string `json:"subdivision1Name,required"`
Subdivision2Name string `json:"subdivision2Name,required"`
JSON scanGetResponseScanIPsIPJSON `json:"-"`
}
func (*ScanGetResponseScanIPsIP) UnmarshalJSON ¶
func (r *ScanGetResponseScanIPsIP) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanLinks ¶
type ScanGetResponseScanLinks struct {
Link ScanGetResponseScanLinksLink `json:"link"`
JSON scanGetResponseScanLinksJSON `json:"-"`
}
func (*ScanGetResponseScanLinks) UnmarshalJSON ¶
func (r *ScanGetResponseScanLinks) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanLinksLink ¶
type ScanGetResponseScanLinksLink struct {
// Outgoing link detected in the DOM
Href string `json:"href,required"`
Text string `json:"text,required"`
JSON scanGetResponseScanLinksLinkJSON `json:"-"`
}
func (*ScanGetResponseScanLinksLink) UnmarshalJSON ¶
func (r *ScanGetResponseScanLinksLink) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanMeta ¶
type ScanGetResponseScanMeta struct {
Processors ScanGetResponseScanMetaProcessors `json:"processors,required"`
JSON scanGetResponseScanMetaJSON `json:"-"`
}
func (*ScanGetResponseScanMeta) UnmarshalJSON ¶
func (r *ScanGetResponseScanMeta) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanMetaProcessors ¶
type ScanGetResponseScanMetaProcessors struct {
Categories ScanGetResponseScanMetaProcessorsCategories `json:"categories,required"`
Phishing []string `json:"phishing,required"`
Rank ScanGetResponseScanMetaProcessorsRank `json:"rank,required"`
Tech []ScanGetResponseScanMetaProcessorsTech `json:"tech,required"`
JSON scanGetResponseScanMetaProcessorsJSON `json:"-"`
}
func (*ScanGetResponseScanMetaProcessors) UnmarshalJSON ¶
func (r *ScanGetResponseScanMetaProcessors) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanMetaProcessorsCategories ¶
type ScanGetResponseScanMetaProcessorsCategories struct {
Content []URLScannerDomain `json:"content,required"`
Risks []ScanGetResponseScanMetaProcessorsCategoriesRisk `json:"risks,required"`
JSON scanGetResponseScanMetaProcessorsCategoriesJSON `json:"-"`
}
func (*ScanGetResponseScanMetaProcessorsCategories) UnmarshalJSON ¶
func (r *ScanGetResponseScanMetaProcessorsCategories) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanMetaProcessorsCategoriesRisk ¶
type ScanGetResponseScanMetaProcessorsCategoriesRisk struct {
ID int64 `json:"id,required"`
Name string `json:"name,required"`
SuperCategoryID int64 `json:"super_category_id,required"`
JSON scanGetResponseScanMetaProcessorsCategoriesRiskJSON `json:"-"`
}
func (*ScanGetResponseScanMetaProcessorsCategoriesRisk) UnmarshalJSON ¶
func (r *ScanGetResponseScanMetaProcessorsCategoriesRisk) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanMetaProcessorsRank ¶
type ScanGetResponseScanMetaProcessorsRank struct {
Bucket string `json:"bucket,required"`
Name string `json:"name,required"`
// Rank in the Global Radar Rank, if set. See more at
// https://blog.cloudflare.com/radar-domain-rankings/
Rank int64 `json:"rank"`
JSON scanGetResponseScanMetaProcessorsRankJSON `json:"-"`
}
func (*ScanGetResponseScanMetaProcessorsRank) UnmarshalJSON ¶
func (r *ScanGetResponseScanMetaProcessorsRank) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanMetaProcessorsTech ¶
type ScanGetResponseScanMetaProcessorsTech struct {
Categories []ScanGetResponseScanMetaProcessorsTechCategory `json:"categories,required"`
Confidence int64 `json:"confidence,required"`
Evidence ScanGetResponseScanMetaProcessorsTechEvidence `json:"evidence,required"`
Icon string `json:"icon,required"`
Name string `json:"name,required"`
Slug string `json:"slug,required"`
Website string `json:"website,required"`
Description string `json:"description"`
JSON scanGetResponseScanMetaProcessorsTechJSON `json:"-"`
}
func (*ScanGetResponseScanMetaProcessorsTech) UnmarshalJSON ¶
func (r *ScanGetResponseScanMetaProcessorsTech) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanMetaProcessorsTechCategory ¶
type ScanGetResponseScanMetaProcessorsTechCategory struct {
ID int64 `json:"id,required"`
Groups []int64 `json:"groups,required"`
Name string `json:"name,required"`
Priority int64 `json:"priority,required"`
Slug string `json:"slug,required"`
JSON scanGetResponseScanMetaProcessorsTechCategoryJSON `json:"-"`
}
func (*ScanGetResponseScanMetaProcessorsTechCategory) UnmarshalJSON ¶
func (r *ScanGetResponseScanMetaProcessorsTechCategory) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanMetaProcessorsTechEvidence ¶
type ScanGetResponseScanMetaProcessorsTechEvidence struct {
ImpliedBy []string `json:"impliedBy,required"`
Patterns []ScanGetResponseScanMetaProcessorsTechEvidencePattern `json:"patterns,required"`
JSON scanGetResponseScanMetaProcessorsTechEvidenceJSON `json:"-"`
}
func (*ScanGetResponseScanMetaProcessorsTechEvidence) UnmarshalJSON ¶
func (r *ScanGetResponseScanMetaProcessorsTechEvidence) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanMetaProcessorsTechEvidencePattern ¶
type ScanGetResponseScanMetaProcessorsTechEvidencePattern struct {
Confidence int64 `json:"confidence,required"`
Excludes []string `json:"excludes,required"`
Implies []string `json:"implies,required"`
Match string `json:"match,required"`
// Header or Cookie name when set
Name string `json:"name,required"`
Regex string `json:"regex,required"`
Type string `json:"type,required"`
Value string `json:"value,required"`
Version string `json:"version,required"`
JSON scanGetResponseScanMetaProcessorsTechEvidencePatternJSON `json:"-"`
}
func (*ScanGetResponseScanMetaProcessorsTechEvidencePattern) UnmarshalJSON ¶
func (r *ScanGetResponseScanMetaProcessorsTechEvidencePattern) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanPage ¶
type ScanGetResponseScanPage struct {
ASN string `json:"asn,required"`
ASNLocationAlpha2 string `json:"asnLocationAlpha2,required"`
Asnname string `json:"asnname,required"`
Console []ScanGetResponseScanPageConsole `json:"console,required"`
Cookies []ScanGetResponseScanPageCookie `json:"cookies,required"`
Country string `json:"country,required"`
CountryLocationAlpha2 string `json:"countryLocationAlpha2,required"`
Domain string `json:"domain,required"`
Headers []radar.Browser `json:"headers,required"`
IP string `json:"ip,required"`
JS ScanGetResponseScanPageJS `json:"js,required"`
SecurityViolations []ScanGetResponseScanPageSecurityViolation `json:"securityViolations,required"`
Status float64 `json:"status,required"`
Subdivision1Name string `json:"subdivision1Name,required"`
Subdivision2name string `json:"subdivision2name,required"`
URL string `json:"url,required"`
JSON scanGetResponseScanPageJSON `json:"-"`
}
func (*ScanGetResponseScanPage) UnmarshalJSON ¶
func (r *ScanGetResponseScanPage) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanPageConsole ¶
type ScanGetResponseScanPageConsole struct {
Category string `json:"category,required"`
Text string `json:"text,required"`
Type string `json:"type,required"`
URL string `json:"url"`
JSON scanGetResponseScanPageConsoleJSON `json:"-"`
}
func (*ScanGetResponseScanPageConsole) UnmarshalJSON ¶
func (r *ScanGetResponseScanPageConsole) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanPageCookie ¶ added in v2.1.0
type ScanGetResponseScanPageCookie struct {
Domain string `json:"domain,required"`
Expires float64 `json:"expires,required"`
HTTPOnly bool `json:"httpOnly,required"`
Name string `json:"name,required"`
Path string `json:"path,required"`
SameParty bool `json:"sameParty,required"`
Secure bool `json:"secure,required"`
Session bool `json:"session,required"`
Size float64 `json:"size,required"`
SourcePort float64 `json:"sourcePort,required"`
SourceScheme string `json:"sourceScheme,required"`
Value string `json:"value,required"`
Priority string `json:"priority"`
JSON scanGetResponseScanPageCookieJSON `json:"-"`
}
func (*ScanGetResponseScanPageCookie) UnmarshalJSON ¶ added in v2.1.0
func (r *ScanGetResponseScanPageCookie) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanPageJS ¶
type ScanGetResponseScanPageJS struct {
Variables []ScanGetResponseScanPageJSVariable `json:"variables,required"`
JSON scanGetResponseScanPageJSJSON `json:"-"`
}
func (*ScanGetResponseScanPageJS) UnmarshalJSON ¶
func (r *ScanGetResponseScanPageJS) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanPageJSVariable ¶
type ScanGetResponseScanPageJSVariable struct {
Name string `json:"name,required"`
Type string `json:"type,required"`
JSON scanGetResponseScanPageJSVariableJSON `json:"-"`
}
func (*ScanGetResponseScanPageJSVariable) UnmarshalJSON ¶
func (r *ScanGetResponseScanPageJSVariable) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanPageSecurityViolation ¶
type ScanGetResponseScanPageSecurityViolation struct {
Category string `json:"category,required"`
Text string `json:"text,required"`
URL string `json:"url,required"`
JSON scanGetResponseScanPageSecurityViolationJSON `json:"-"`
}
func (*ScanGetResponseScanPageSecurityViolation) UnmarshalJSON ¶
func (r *ScanGetResponseScanPageSecurityViolation) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanPerformance ¶
type ScanGetResponseScanPerformance struct {
ConnectEnd float64 `json:"connectEnd,required"`
ConnectStart float64 `json:"connectStart,required"`
DecodedBodySize float64 `json:"decodedBodySize,required"`
DomainLookupEnd float64 `json:"domainLookupEnd,required"`
DomainLookupStart float64 `json:"domainLookupStart,required"`
DomComplete float64 `json:"domComplete,required"`
DomContentLoadedEventEnd float64 `json:"domContentLoadedEventEnd,required"`
DomContentLoadedEventStart float64 `json:"domContentLoadedEventStart,required"`
DomInteractive float64 `json:"domInteractive,required"`
Duration float64 `json:"duration,required"`
EncodedBodySize float64 `json:"encodedBodySize,required"`
EntryType string `json:"entryType,required"`
FetchStart float64 `json:"fetchStart,required"`
InitiatorType string `json:"initiatorType,required"`
LoadEventEnd float64 `json:"loadEventEnd,required"`
LoadEventStart float64 `json:"loadEventStart,required"`
Name string `json:"name,required"`
NextHopProtocol string `json:"nextHopProtocol,required"`
RedirectCount float64 `json:"redirectCount,required"`
RedirectEnd float64 `json:"redirectEnd,required"`
RedirectStart float64 `json:"redirectStart,required"`
RequestStart float64 `json:"requestStart,required"`
ResponseEnd float64 `json:"responseEnd,required"`
ResponseStart float64 `json:"responseStart,required"`
SecureConnectionStart float64 `json:"secureConnectionStart,required"`
StartTime float64 `json:"startTime,required"`
TransferSize float64 `json:"transferSize,required"`
Type string `json:"type,required"`
UnloadEventEnd float64 `json:"unloadEventEnd,required"`
UnloadEventStart float64 `json:"unloadEventStart,required"`
WorkerStart float64 `json:"workerStart,required"`
JSON scanGetResponseScanPerformanceJSON `json:"-"`
}
func (*ScanGetResponseScanPerformance) UnmarshalJSON ¶
func (r *ScanGetResponseScanPerformance) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanTask ¶
type ScanGetResponseScanTask struct {
// Submitter location
ClientLocation string `json:"clientLocation,required"`
ClientType ScanGetResponseScanTaskClientType `json:"clientType,required"`
// URL of the primary request, after all HTTP redirects
EffectiveURL string `json:"effectiveUrl,required"`
Errors []ScanGetResponseScanTaskError `json:"errors,required"`
ScannedFrom ScanGetResponseScanTaskScannedFrom `json:"scannedFrom,required"`
Status ScanGetResponseScanTaskStatus `json:"status,required"`
Success bool `json:"success,required"`
Time string `json:"time,required"`
TimeEnd string `json:"timeEnd,required"`
// Submitted URL
URL string `json:"url,required"`
// Scan ID
UUID string `json:"uuid,required"`
Visibility ScanGetResponseScanTaskVisibility `json:"visibility,required"`
JSON scanGetResponseScanTaskJSON `json:"-"`
}
func (*ScanGetResponseScanTask) UnmarshalJSON ¶
func (r *ScanGetResponseScanTask) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanTaskClientType ¶
type ScanGetResponseScanTaskClientType string
const ( ScanGetResponseScanTaskClientTypeSite ScanGetResponseScanTaskClientType = "Site" ScanGetResponseScanTaskClientTypeAutomatic ScanGetResponseScanTaskClientType = "Automatic" ScanGetResponseScanTaskClientTypeAPI ScanGetResponseScanTaskClientType = "Api" )
func (ScanGetResponseScanTaskClientType) IsKnown ¶
func (r ScanGetResponseScanTaskClientType) IsKnown() bool
type ScanGetResponseScanTaskError ¶
type ScanGetResponseScanTaskError struct {
Message string `json:"message,required"`
JSON scanGetResponseScanTaskErrorJSON `json:"-"`
}
func (*ScanGetResponseScanTaskError) UnmarshalJSON ¶
func (r *ScanGetResponseScanTaskError) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanTaskScannedFrom ¶
type ScanGetResponseScanTaskScannedFrom struct {
// IATA code of Cloudflare datacenter
Colo string `json:"colo,required"`
JSON scanGetResponseScanTaskScannedFromJSON `json:"-"`
}
func (*ScanGetResponseScanTaskScannedFrom) UnmarshalJSON ¶
func (r *ScanGetResponseScanTaskScannedFrom) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanTaskStatus ¶
type ScanGetResponseScanTaskStatus string
const ( ScanGetResponseScanTaskStatusQueued ScanGetResponseScanTaskStatus = "Queued" ScanGetResponseScanTaskStatusInProgress ScanGetResponseScanTaskStatus = "InProgress" ScanGetResponseScanTaskStatusInPostProcessing ScanGetResponseScanTaskStatus = "InPostProcessing" ScanGetResponseScanTaskStatusFinished ScanGetResponseScanTaskStatus = "Finished" )
func (ScanGetResponseScanTaskStatus) IsKnown ¶
func (r ScanGetResponseScanTaskStatus) IsKnown() bool
type ScanGetResponseScanTaskVisibility ¶
type ScanGetResponseScanTaskVisibility string
const ( ScanGetResponseScanTaskVisibilityPublic ScanGetResponseScanTaskVisibility = "Public" ScanGetResponseScanTaskVisibilityUnlisted ScanGetResponseScanTaskVisibility = "Unlisted" )
func (ScanGetResponseScanTaskVisibility) IsKnown ¶
func (r ScanGetResponseScanTaskVisibility) IsKnown() bool
type ScanGetResponseScanVerdicts ¶
type ScanGetResponseScanVerdicts struct {
Overall ScanGetResponseScanVerdictsOverall `json:"overall,required"`
JSON scanGetResponseScanVerdictsJSON `json:"-"`
}
func (*ScanGetResponseScanVerdicts) UnmarshalJSON ¶
func (r *ScanGetResponseScanVerdicts) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanVerdictsOverall ¶
type ScanGetResponseScanVerdictsOverall struct {
Categories []ScanGetResponseScanVerdictsOverallCategory `json:"categories,required"`
// At least one of our subsystems marked the site as potentially malicious at the
// time of the scan.
Malicious bool `json:"malicious,required"`
Phishing []string `json:"phishing,required"`
JSON scanGetResponseScanVerdictsOverallJSON `json:"-"`
}
func (*ScanGetResponseScanVerdictsOverall) UnmarshalJSON ¶
func (r *ScanGetResponseScanVerdictsOverall) UnmarshalJSON(data []byte) (err error)
type ScanGetResponseScanVerdictsOverallCategory ¶
type ScanGetResponseScanVerdictsOverallCategory struct {
ID float64 `json:"id,required"`
Name string `json:"name,required"`
SuperCategoryID float64 `json:"super_category_id,required"`
JSON scanGetResponseScanVerdictsOverallCategoryJSON `json:"-"`
}
func (*ScanGetResponseScanVerdictsOverallCategory) UnmarshalJSON ¶
func (r *ScanGetResponseScanVerdictsOverallCategory) UnmarshalJSON(data []byte) (err error)
type ScanHarResponse ¶
type ScanHarResponse struct {
Har ScanHarResponseHar `json:"har,required"`
JSON scanHarResponseJSON `json:"-"`
}
func (*ScanHarResponse) UnmarshalJSON ¶
func (r *ScanHarResponse) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseEnvelope ¶
type ScanHarResponseEnvelope struct {
Errors []ScanHarResponseEnvelopeErrors `json:"errors,required"`
Messages []ScanHarResponseEnvelopeMessages `json:"messages,required"`
Result ScanHarResponse `json:"result,required"`
// Whether search request was successful or not
Success bool `json:"success,required"`
JSON scanHarResponseEnvelopeJSON `json:"-"`
}
func (*ScanHarResponseEnvelope) UnmarshalJSON ¶
func (r *ScanHarResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseEnvelopeErrors ¶
type ScanHarResponseEnvelopeErrors struct {
Message string `json:"message,required"`
JSON scanHarResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ScanHarResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ScanHarResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseEnvelopeMessages ¶
type ScanHarResponseEnvelopeMessages struct {
Message string `json:"message,required"`
JSON scanHarResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ScanHarResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ScanHarResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseHar ¶
type ScanHarResponseHar struct {
Log ScanHarResponseHarLog `json:"log,required"`
JSON scanHarResponseHarJSON `json:"-"`
}
func (*ScanHarResponseHar) UnmarshalJSON ¶
func (r *ScanHarResponseHar) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseHarLog ¶
type ScanHarResponseHarLog struct {
Creator ScanHarResponseHarLogCreator `json:"creator,required"`
Entries []ScanHarResponseHarLogEntry `json:"entries,required"`
Pages []ScanHarResponseHarLogPage `json:"pages,required"`
Version string `json:"version,required"`
JSON scanHarResponseHarLogJSON `json:"-"`
}
func (*ScanHarResponseHarLog) UnmarshalJSON ¶
func (r *ScanHarResponseHarLog) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseHarLogCreator ¶
type ScanHarResponseHarLogCreator struct {
Comment string `json:"comment,required"`
Name string `json:"name,required"`
Version string `json:"version,required"`
JSON scanHarResponseHarLogCreatorJSON `json:"-"`
}
func (*ScanHarResponseHarLogCreator) UnmarshalJSON ¶
func (r *ScanHarResponseHarLogCreator) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseHarLogEntriesRequest ¶
type ScanHarResponseHarLogEntriesRequest struct {
BodySize float64 `json:"bodySize,required"`
Headers []radar.Browser `json:"headers,required"`
HeadersSize float64 `json:"headersSize,required"`
HTTPVersion string `json:"httpVersion,required"`
Method string `json:"method,required"`
URL string `json:"url,required"`
JSON scanHarResponseHarLogEntriesRequestJSON `json:"-"`
}
func (*ScanHarResponseHarLogEntriesRequest) UnmarshalJSON ¶
func (r *ScanHarResponseHarLogEntriesRequest) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseHarLogEntriesResponse ¶
type ScanHarResponseHarLogEntriesResponse struct {
TransferSize float64 `json:"_transferSize,required"`
BodySize float64 `json:"bodySize,required"`
Content ScanHarResponseHarLogEntriesResponseContent `json:"content,required"`
Headers []radar.Browser `json:"headers,required"`
HeadersSize float64 `json:"headersSize,required"`
HTTPVersion string `json:"httpVersion,required"`
RedirectURL string `json:"redirectURL,required"`
Status float64 `json:"status,required"`
StatusText string `json:"statusText,required"`
JSON scanHarResponseHarLogEntriesResponseJSON `json:"-"`
}
func (*ScanHarResponseHarLogEntriesResponse) UnmarshalJSON ¶
func (r *ScanHarResponseHarLogEntriesResponse) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseHarLogEntriesResponseContent ¶
type ScanHarResponseHarLogEntriesResponseContent struct {
MimeType string `json:"mimeType,required"`
Size float64 `json:"size,required"`
Compression int64 `json:"compression"`
JSON scanHarResponseHarLogEntriesResponseContentJSON `json:"-"`
}
func (*ScanHarResponseHarLogEntriesResponseContent) UnmarshalJSON ¶
func (r *ScanHarResponseHarLogEntriesResponseContent) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseHarLogEntry ¶
type ScanHarResponseHarLogEntry struct {
InitialPriority string `json:"_initialPriority,required"`
InitiatorType string `json:"_initiator_type,required"`
Priority string `json:"_priority,required"`
RequestID string `json:"_requestId,required"`
RequestTime float64 `json:"_requestTime,required"`
ResourceType string `json:"_resourceType,required"`
Cache interface{} `json:"cache,required"`
Connection string `json:"connection,required"`
Pageref string `json:"pageref,required"`
Request ScanHarResponseHarLogEntriesRequest `json:"request,required"`
Response ScanHarResponseHarLogEntriesResponse `json:"response,required"`
ServerIPAddress string `json:"serverIPAddress,required"`
StartedDateTime string `json:"startedDateTime,required"`
Time float64 `json:"time,required"`
JSON scanHarResponseHarLogEntryJSON `json:"-"`
}
func (*ScanHarResponseHarLogEntry) UnmarshalJSON ¶
func (r *ScanHarResponseHarLogEntry) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseHarLogPage ¶
type ScanHarResponseHarLogPage struct {
ID string `json:"id,required"`
PageTimings ScanHarResponseHarLogPagesPageTimings `json:"pageTimings,required"`
StartedDateTime string `json:"startedDateTime,required"`
Title string `json:"title,required"`
JSON scanHarResponseHarLogPageJSON `json:"-"`
}
func (*ScanHarResponseHarLogPage) UnmarshalJSON ¶
func (r *ScanHarResponseHarLogPage) UnmarshalJSON(data []byte) (err error)
type ScanHarResponseHarLogPagesPageTimings ¶
type ScanHarResponseHarLogPagesPageTimings struct {
OnContentLoad float64 `json:"onContentLoad,required"`
OnLoad float64 `json:"onLoad,required"`
JSON scanHarResponseHarLogPagesPageTimingsJSON `json:"-"`
}
func (*ScanHarResponseHarLogPagesPageTimings) UnmarshalJSON ¶
func (r *ScanHarResponseHarLogPagesPageTimings) UnmarshalJSON(data []byte) (err error)
type ScanNewParams ¶
type ScanNewParams struct {
URL param.Field[string] `json:"url,required"`
// Set custom headers
CustomHeaders param.Field[map[string]string] `json:"customHeaders"`
// Take multiple screenshots targeting different device types
ScreenshotsResolutions param.Field[[]ScanNewParamsScreenshotsResolution] `json:"screenshotsResolutions"`
// The option `Public` means it will be included in listings like recent scans and
// search results. `Unlisted` means it will not be included in the aforementioned
// listings, users will need to have the scan's ID to access it. A a scan will be
// automatically marked as unlisted if it fails, if it contains potential PII or
// other sensitive material.
Visibility param.Field[ScanNewParamsVisibility] `json:"visibility"`
}
func (ScanNewParams) MarshalJSON ¶
func (r ScanNewParams) MarshalJSON() (data []byte, err error)
type ScanNewParamsScreenshotsResolution ¶
type ScanNewParamsScreenshotsResolution string
Device resolutions.
const ( ScanNewParamsScreenshotsResolutionDesktop ScanNewParamsScreenshotsResolution = "desktop" ScanNewParamsScreenshotsResolutionMobile ScanNewParamsScreenshotsResolution = "mobile" ScanNewParamsScreenshotsResolutionTablet ScanNewParamsScreenshotsResolution = "tablet" )
func (ScanNewParamsScreenshotsResolution) IsKnown ¶
func (r ScanNewParamsScreenshotsResolution) IsKnown() bool
type ScanNewParamsVisibility ¶
type ScanNewParamsVisibility string
The option `Public` means it will be included in listings like recent scans and search results. `Unlisted` means it will not be included in the aforementioned listings, users will need to have the scan's ID to access it. A a scan will be automatically marked as unlisted if it fails, if it contains potential PII or other sensitive material.
const ( ScanNewParamsVisibilityPublic ScanNewParamsVisibility = "Public" ScanNewParamsVisibilityUnlisted ScanNewParamsVisibility = "Unlisted" )
func (ScanNewParamsVisibility) IsKnown ¶
func (r ScanNewParamsVisibility) IsKnown() bool
type ScanNewResponse ¶
type ScanNewResponse struct {
// Time when url was submitted for scanning.
Time time.Time `json:"time,required" format:"date-time"`
// Canonical form of submitted URL. Use this if you want to later search by URL.
URL string `json:"url,required"`
// Scan ID.
UUID string `json:"uuid,required" format:"uuid"`
// Submitted visibility status.
Visibility string `json:"visibility,required"`
JSON scanNewResponseJSON `json:"-"`
}
func (*ScanNewResponse) UnmarshalJSON ¶
func (r *ScanNewResponse) UnmarshalJSON(data []byte) (err error)
type ScanNewResponseEnvelope ¶
type ScanNewResponseEnvelope struct {
Errors []ScanNewResponseEnvelopeErrors `json:"errors,required"`
Messages []ScanNewResponseEnvelopeMessages `json:"messages,required"`
Result ScanNewResponse `json:"result,required"`
Success bool `json:"success,required"`
JSON scanNewResponseEnvelopeJSON `json:"-"`
}
func (*ScanNewResponseEnvelope) UnmarshalJSON ¶
func (r *ScanNewResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type ScanNewResponseEnvelopeErrors ¶
type ScanNewResponseEnvelopeErrors struct {
Message string `json:"message,required"`
JSON scanNewResponseEnvelopeErrorsJSON `json:"-"`
}
func (*ScanNewResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *ScanNewResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type ScanNewResponseEnvelopeMessages ¶
type ScanNewResponseEnvelopeMessages struct {
Message string `json:"message,required"`
JSON scanNewResponseEnvelopeMessagesJSON `json:"-"`
}
func (*ScanNewResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *ScanNewResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type ScanScreenshotParams ¶
type ScanScreenshotParams struct {
// Target device type
Resolution param.Field[ScanScreenshotParamsResolution] `query:"resolution"`
}
func (ScanScreenshotParams) URLQuery ¶
func (r ScanScreenshotParams) URLQuery() (v url.Values)
URLQuery serializes ScanScreenshotParams's query parameters as `url.Values`.
type ScanScreenshotParamsResolution ¶
type ScanScreenshotParamsResolution string
Target device type
const ( ScanScreenshotParamsResolutionDesktop ScanScreenshotParamsResolution = "desktop" ScanScreenshotParamsResolutionMobile ScanScreenshotParamsResolution = "mobile" ScanScreenshotParamsResolutionTablet ScanScreenshotParamsResolution = "tablet" )
func (ScanScreenshotParamsResolution) IsKnown ¶
func (r ScanScreenshotParamsResolution) IsKnown() bool
type ScanService ¶
type ScanService struct {
Options []option.RequestOption
}
ScanService 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 NewScanService method instead.
func NewScanService ¶
func NewScanService(opts ...option.RequestOption) (r *ScanService)
NewScanService 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 (*ScanService) Get ¶
func (r *ScanService) Get(ctx context.Context, accountID string, scanID string, opts ...option.RequestOption) (res *ScanGetResponse, err error)
Get URL scan by uuid
func (*ScanService) Har ¶
func (r *ScanService) Har(ctx context.Context, accountID string, scanID string, opts ...option.RequestOption) (res *ScanHarResponse, err error)
Get a URL scan's HAR file. See HAR spec at http://www.softwareishard.com/blog/har-12-spec/.
func (*ScanService) New ¶
func (r *ScanService) New(ctx context.Context, accountID string, body ScanNewParams, opts ...option.RequestOption) (res *ScanNewResponse, err error)
Submit a URL to scan. You can also set some options, like the visibility level and custom headers. Accounts are limited to 1 new scan every 10 seconds and 8000 per month. If you need more, please reach out.
func (*ScanService) Screenshot ¶
func (r *ScanService) Screenshot(ctx context.Context, accountID string, scanID string, query ScanScreenshotParams, opts ...option.RequestOption) (res *http.Response, err error)
Get scan's screenshot by resolution (desktop/mobile/tablet).
type SortDirection ¶ added in v2.2.0
type SortDirection = shared.SortDirection
Direction to order DNS records in.
This is an alias to an internal type.
type URLScannerDomain ¶
type URLScannerDomain struct {
ID int64 `json:"id,required"`
Name string `json:"name,required"`
SuperCategoryID int64 `json:"super_category_id"`
JSON urlScannerDomainJSON `json:"-"`
}
func (*URLScannerDomain) UnmarshalJSON ¶
func (r *URLScannerDomain) UnmarshalJSON(data []byte) (err error)
type URLScannerScanParams ¶
type URLScannerScanParams struct {
// Return only scans created by account.
AccountScans param.Field[bool] `query:"account_scans"`
// Filter scans by Autonomous System Number (ASN) of _any_ request made by the
// webpage.
ASN param.Field[string] `query:"asn"`
// Filter scans requested before date (inclusive).
DateEnd param.Field[time.Time] `query:"date_end" format:"date-time"`
// Filter scans requested after date (inclusive).
DateStart param.Field[time.Time] `query:"date_start" format:"date-time"`
// Filter scans by hash of any html/js/css request made by the webpage.
Hash param.Field[string] `query:"hash"`
// Filter scans by hostname of _any_ request made by the webpage.
Hostname param.Field[string] `query:"hostname"`
// Filter scans by IP address (IPv4 or IPv6) of _any_ request made by the webpage.
IP param.Field[string] `query:"ip"`
// Filter scans by malicious verdict.
IsMalicious param.Field[bool] `query:"is_malicious"`
// Limit the number of objects in the response.
Limit param.Field[int64] `query:"limit"`
// Pagination cursor to get the next set of results.
NextCursor param.Field[string] `query:"next_cursor"`
// Filter scans by main page Autonomous System Number (ASN).
PageASN param.Field[string] `query:"page_asn"`
// Filter scans by main page hostname (domain of effective URL).
PageHostname param.Field[string] `query:"page_hostname"`
// Filter scans by main page IP address (IPv4 or IPv6).
PageIP param.Field[string] `query:"page_ip"`
// Filter scans by exact match of effective URL path (also supports suffix search).
PagePath param.Field[string] `query:"page_path"`
// Filter scans by submitted or scanned URL
PageURL param.Field[string] `query:"page_url"`
// Filter scans by url path of _any_ request made by the webpage.
Path param.Field[string] `query:"path"`
// Scan uuid
ScanID param.Field[string] `query:"scanId" format:"uuid"`
// Filter scans by URL of _any_ request made by the webpage
URL param.Field[string] `query:"url"`
}
func (URLScannerScanParams) URLQuery ¶
func (r URLScannerScanParams) URLQuery() (v url.Values)
URLQuery serializes URLScannerScanParams's query parameters as `url.Values`.
type URLScannerScanResponse ¶
type URLScannerScanResponse struct {
Tasks []URLScannerScanResponseTask `json:"tasks,required"`
JSON urlScannerScanResponseJSON `json:"-"`
}
func (*URLScannerScanResponse) UnmarshalJSON ¶
func (r *URLScannerScanResponse) UnmarshalJSON(data []byte) (err error)
type URLScannerScanResponseEnvelope ¶
type URLScannerScanResponseEnvelope struct {
Errors []URLScannerScanResponseEnvelopeErrors `json:"errors,required"`
Messages []URLScannerScanResponseEnvelopeMessages `json:"messages,required"`
Result URLScannerScanResponse `json:"result,required"`
// Whether search request was successful or not
Success bool `json:"success,required"`
JSON urlScannerScanResponseEnvelopeJSON `json:"-"`
}
func (*URLScannerScanResponseEnvelope) UnmarshalJSON ¶
func (r *URLScannerScanResponseEnvelope) UnmarshalJSON(data []byte) (err error)
type URLScannerScanResponseEnvelopeErrors ¶
type URLScannerScanResponseEnvelopeErrors struct {
Message string `json:"message,required"`
JSON urlScannerScanResponseEnvelopeErrorsJSON `json:"-"`
}
func (*URLScannerScanResponseEnvelopeErrors) UnmarshalJSON ¶
func (r *URLScannerScanResponseEnvelopeErrors) UnmarshalJSON(data []byte) (err error)
type URLScannerScanResponseEnvelopeMessages ¶
type URLScannerScanResponseEnvelopeMessages struct {
Message string `json:"message,required"`
JSON urlScannerScanResponseEnvelopeMessagesJSON `json:"-"`
}
func (*URLScannerScanResponseEnvelopeMessages) UnmarshalJSON ¶
func (r *URLScannerScanResponseEnvelopeMessages) UnmarshalJSON(data []byte) (err error)
type URLScannerScanResponseTask ¶
type URLScannerScanResponseTask struct {
// Alpha-2 country code
Country string `json:"country,required"`
// Whether scan was successful or not
Success bool `json:"success,required"`
// When scan was submitted (UTC)
Time time.Time `json:"time,required" format:"date-time"`
// Scan url (after redirects)
URL string `json:"url,required"`
// Scan id
UUID string `json:"uuid,required" format:"uuid"`
// Visibility status.
Visibility string `json:"visibility,required"`
JSON urlScannerScanResponseTaskJSON `json:"-"`
}
func (*URLScannerScanResponseTask) UnmarshalJSON ¶
func (r *URLScannerScanResponseTask) UnmarshalJSON(data []byte) (err error)
type URLScannerService ¶
type URLScannerService struct {
Options []option.RequestOption
Scans *ScanService
}
URLScannerService 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 NewURLScannerService method instead.
func NewURLScannerService ¶
func NewURLScannerService(opts ...option.RequestOption) (r *URLScannerService)
NewURLScannerService 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 (*URLScannerService) Scan ¶
func (r *URLScannerService) Scan(ctx context.Context, accountID string, query URLScannerScanParams, opts ...option.RequestOption) (res *URLScannerScanResponse, err error)
Search scans by date and webpages' requests, including full URL (after redirects), hostname, and path. <br/> A successful scan will appear in search results a few minutes after finishing but may take much longer if the system in under load. By default, only successfully completed scans will appear in search results, unless searching by `scanId`. Please take into account that older scans may be removed from the search index at an unspecified time.