ovt

package module
v0.0.0-...-9d10732 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2022 License: Apache-2.0 Imports: 21 Imported by: 0

README

ovt

Go Reference

A Go library for interfacing with the VirusTotal v3 API.

Features

  • typed objects and routes
  • generation of an OpenAPI specification in JSON and YAML
Generation

The _tools/generate.py script scrapes and parses the developers.virustotal.com reference documentation and creates an OpenAPI specification from it.

The specification and library can be regenerated from scratch with go generate (you will need Python 3.5+ with dependencies installed from requirements.txt and the ogen OpenAPI generator).

Supported objects
Supported routes
  • GET /files/{id}
  • GET /urls/{id}

Disclaimer

This library is in no way affiliated with nor endorsed by VirusTotal.

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client implements OAS client.

func NewClient

func NewClient(serverURL string, opts ...Option) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) FileInfo

func (c *Client) FileInfo(ctx context.Context, params FileInfoParams) (res FileInfoRes, err error)

FileInfo invokes file-info operation.

Retrieve information about a file.

GET /files/{id}

func (*Client) URLInfo

func (c *Client) URLInfo(ctx context.Context, params URLInfoParams) (res URLInfoRes, err error)

URLInfo invokes url-info operation.

Returns a URL object.

GET /urls/{id}

type Error

type Error struct {
	// * `BadRequestError` (400) - The API request is invalid or malformed. The message usually provides
	// details about why the request is not valid.
	// * `WrongCredentialsError` (401) - The provided API key is incorrect.
	// * `AuthenticationRequiredError` (401) - The operation requires an authenticated user. Verify that
	// you have provided your API key.
	// * `TooManyRequestsError` (429) - Too many requests.
	// * `ForbiddenError` (403) - You are not allowed to perform the requested operation.
	// * `NotFoundError` (404) - The requested resource was not found.
	// * `QuotaExceededError` (429) - You have exceeded one of your quotas (minute, daily or monthly).
	// Daily quotas are reset every day at 00:00 UTC.
	// You may have run out of disk space and/or number of files on your VirusTotal Monitor account.
	// * `UserNotActiveError` (401) - The user account is not active. Make sure you properly activated
	// your account by following the link sent to your email.
	// * `InvalidArgumentError` (400) - Some of the provided arguments are incorrect.
	// * `AlreadyExistsError` (409) - The resource already exists.
	// * `TransientError` (503) - Transient server error.  Retry might work.
	// * `UnselectiveContentQueryError` (400) - Content search query is not selective enough.
	// * `UnsupportedContentQueryError` (400) - Unsupported content search query.
	// * `NotAvailableYet` (400) - The resource is not available yet, but will become available later.
	// * `FailedDependencyError` (424) - The request depended on another request and that request failed.
	// * `DeadlineExceededError` (504) - The operation took too long to complete.
	Code    ErrorCode `json:"code"`
	Message string    `json:"message"`
}

The VirusTotal API follows the conventional HTTP response codes to indicate success or failure. Codes in the `2xx` range indicate success. Codes in the `4xx` range indicate an error in the request (e.g. a missing parameter, a resource was not found). Codes in the `5xx` range indicate an error in VirusTotal's servers and should be rare. Unsuccessful requests return additional information about the error in JSON format. Ref: #/components/schemas/Error

func (*Error) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (Error) Encode

func (s Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (Error) GetCode

func (s Error) GetCode() ErrorCode

GetCode returns the value of Code.

func (Error) GetMessage

func (s Error) GetMessage() string

GetMessage returns the value of Message.

func (Error) MarshalJSON

func (s Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetCode

func (s *Error) SetCode(val ErrorCode)

SetCode sets the value of Code.

func (*Error) SetMessage

func (s *Error) SetMessage(val string)

SetMessage sets the value of Message.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (Error) Validate

func (s Error) Validate() error

type ErrorCode

type ErrorCode string

* `BadRequestError` (400) - The API request is invalid or malformed. The message usually provides details about why the request is not valid. * `WrongCredentialsError` (401) - The provided API key is incorrect. * `AuthenticationRequiredError` (401) - The operation requires an authenticated user. Verify that you have provided your API key. * `TooManyRequestsError` (429) - Too many requests. * `ForbiddenError` (403) - You are not allowed to perform the requested operation. * `NotFoundError` (404) - The requested resource was not found. * `QuotaExceededError` (429) - You have exceeded one of your quotas (minute, daily or monthly). Daily quotas are reset every day at 00:00 UTC. You may have run out of disk space and/or number of files on your VirusTotal Monitor account. * `UserNotActiveError` (401) - The user account is not active. Make sure you properly activated your account by following the link sent to your email. * `InvalidArgumentError` (400) - Some of the provided arguments are incorrect. * `AlreadyExistsError` (409) - The resource already exists. * `TransientError` (503) - Transient server error. Retry might work. * `UnselectiveContentQueryError` (400) - Content search query is not selective enough. * `UnsupportedContentQueryError` (400) - Unsupported content search query. * `NotAvailableYet` (400) - The resource is not available yet, but will become available later. * `FailedDependencyError` (424) - The request depended on another request and that request failed. * `DeadlineExceededError` (504) - The operation took too long to complete.

const (
	ErrorCodeBadRequestError              ErrorCode = "BadRequestError"
	ErrorCodeWrongCredentialsError        ErrorCode = "WrongCredentialsError"
	ErrorCodeAuthenticationRequiredError  ErrorCode = "AuthenticationRequiredError"
	ErrorCodeTooManyRequestsError         ErrorCode = "TooManyRequestsError"
	ErrorCodeForbiddenError               ErrorCode = "ForbiddenError"
	ErrorCodeNotFoundError                ErrorCode = "NotFoundError"
	ErrorCodeQuotaExceededError           ErrorCode = "QuotaExceededError"
	ErrorCodeUserNotActiveError           ErrorCode = "UserNotActiveError"
	ErrorCodeInvalidArgumentError         ErrorCode = "InvalidArgumentError"
	ErrorCodeAlreadyExistsError           ErrorCode = "AlreadyExistsError"
	ErrorCodeTransientError               ErrorCode = "TransientError"
	ErrorCodeUnselectiveContentQueryError ErrorCode = "UnselectiveContentQueryError"
	ErrorCodeUnsupportedContentQueryError ErrorCode = "UnsupportedContentQueryError"
	ErrorCodeNotAvailableYet              ErrorCode = "NotAvailableYet"
	ErrorCodeFailedDependencyError        ErrorCode = "FailedDependencyError"
	ErrorCodeDeadlineExceededError        ErrorCode = "DeadlineExceededError"
)

func (*ErrorCode) Decode

func (s *ErrorCode) Decode(d *jx.Decoder) error

Decode decodes ErrorCode from json.

func (ErrorCode) Encode

func (s ErrorCode) Encode(e *jx.Encoder)

Encode encodes ErrorCode as json.

func (ErrorCode) MarshalJSON

func (s ErrorCode) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ErrorCode) UnmarshalJSON

func (s *ErrorCode) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (ErrorCode) Validate

func (s ErrorCode) Validate() error

type FileInfoBadRequest

type FileInfoBadRequest struct {
	Error Error `json:"error"`
}

func (*FileInfoBadRequest) Decode

func (s *FileInfoBadRequest) Decode(d *jx.Decoder) error

Decode decodes FileInfoBadRequest from json.

func (FileInfoBadRequest) Encode

func (s FileInfoBadRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FileInfoBadRequest) GetError

func (s FileInfoBadRequest) GetError() Error

GetError returns the value of Error.

func (FileInfoBadRequest) MarshalJSON

func (s FileInfoBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileInfoBadRequest) SetError

func (s *FileInfoBadRequest) SetError(val Error)

SetError sets the value of Error.

func (*FileInfoBadRequest) UnmarshalJSON

func (s *FileInfoBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (FileInfoBadRequest) Validate

func (s FileInfoBadRequest) Validate() error

type FileInfoOK

type FileInfoOK struct {
	Data FileInfoOKData `json:"data"`
}

func (*FileInfoOK) Decode

func (s *FileInfoOK) Decode(d *jx.Decoder) error

Decode decodes FileInfoOK from json.

func (FileInfoOK) Encode

func (s FileInfoOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FileInfoOK) GetData

func (s FileInfoOK) GetData() FileInfoOKData

GetData returns the value of Data.

func (FileInfoOK) MarshalJSON

func (s FileInfoOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileInfoOK) SetData

func (s *FileInfoOK) SetData(val FileInfoOKData)

SetData sets the value of Data.

func (*FileInfoOK) UnmarshalJSON

func (s *FileInfoOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (FileInfoOK) Validate

func (s FileInfoOK) Validate() error

type FileInfoOKData

type FileInfoOKData struct {
	Attributes FileObject `json:"attributes"`
	// Object ID.
	ID            string                         `json:"id"`
	Links         FileInfoOKDataLinks            `json:"links"`
	Relationships OptFileInfoOKDataRelationships `json:"relationships"`
	// Object type.
	Type FileInfoOKDataType `json:"type"`
}

func (*FileInfoOKData) Decode

func (s *FileInfoOKData) Decode(d *jx.Decoder) error

Decode decodes FileInfoOKData from json.

func (FileInfoOKData) Encode

func (s FileInfoOKData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FileInfoOKData) GetAttributes

func (s FileInfoOKData) GetAttributes() FileObject

GetAttributes returns the value of Attributes.

func (FileInfoOKData) GetID

func (s FileInfoOKData) GetID() string

GetID returns the value of ID.

func (s FileInfoOKData) GetLinks() FileInfoOKDataLinks

GetLinks returns the value of Links.

func (FileInfoOKData) GetRelationships

func (s FileInfoOKData) GetRelationships() OptFileInfoOKDataRelationships

GetRelationships returns the value of Relationships.

func (FileInfoOKData) GetType

func (s FileInfoOKData) GetType() FileInfoOKDataType

GetType returns the value of Type.

func (FileInfoOKData) MarshalJSON

func (s FileInfoOKData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileInfoOKData) SetAttributes

func (s *FileInfoOKData) SetAttributes(val FileObject)

SetAttributes sets the value of Attributes.

func (*FileInfoOKData) SetID

func (s *FileInfoOKData) SetID(val string)

SetID sets the value of ID.

func (s *FileInfoOKData) SetLinks(val FileInfoOKDataLinks)

SetLinks sets the value of Links.

func (*FileInfoOKData) SetRelationships

func (s *FileInfoOKData) SetRelationships(val OptFileInfoOKDataRelationships)

SetRelationships sets the value of Relationships.

func (*FileInfoOKData) SetType

func (s *FileInfoOKData) SetType(val FileInfoOKDataType)

SetType sets the value of Type.

func (*FileInfoOKData) UnmarshalJSON

func (s *FileInfoOKData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (FileInfoOKData) Validate

func (s FileInfoOKData) Validate() error
type FileInfoOKDataLinks struct {
	// Link to the object.
	Self            string `json:"self"`
	AdditionalProps FileInfoOKDataLinksAdditional
}

func (*FileInfoOKDataLinks) Decode

func (s *FileInfoOKDataLinks) Decode(d *jx.Decoder) error

Decode decodes FileInfoOKDataLinks from json.

func (FileInfoOKDataLinks) Encode

func (s FileInfoOKDataLinks) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FileInfoOKDataLinks) GetAdditionalProps

func (s FileInfoOKDataLinks) GetAdditionalProps() FileInfoOKDataLinksAdditional

GetAdditionalProps returns the value of AdditionalProps.

func (FileInfoOKDataLinks) GetSelf

func (s FileInfoOKDataLinks) GetSelf() string

GetSelf returns the value of Self.

func (FileInfoOKDataLinks) MarshalJSON

func (s FileInfoOKDataLinks) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileInfoOKDataLinks) SetAdditionalProps

func (s *FileInfoOKDataLinks) SetAdditionalProps(val FileInfoOKDataLinksAdditional)

SetAdditionalProps sets the value of AdditionalProps.

func (*FileInfoOKDataLinks) SetSelf

func (s *FileInfoOKDataLinks) SetSelf(val string)

SetSelf sets the value of Self.

func (*FileInfoOKDataLinks) UnmarshalJSON

func (s *FileInfoOKDataLinks) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FileInfoOKDataLinksAdditional

type FileInfoOKDataLinksAdditional map[string]jx.Raw

func (*FileInfoOKDataLinksAdditional) Decode

Decode decodes FileInfoOKDataLinksAdditional from json.

func (FileInfoOKDataLinksAdditional) Encode

Encode implements json.Marshaler.

func (FileInfoOKDataLinksAdditional) MarshalJSON

func (s FileInfoOKDataLinksAdditional) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileInfoOKDataLinksAdditional) UnmarshalJSON

func (s *FileInfoOKDataLinksAdditional) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FileInfoOKDataRelationships

type FileInfoOKDataRelationships map[string]jx.Raw

func (*FileInfoOKDataRelationships) Decode

Decode decodes FileInfoOKDataRelationships from json.

func (FileInfoOKDataRelationships) Encode

func (s FileInfoOKDataRelationships) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FileInfoOKDataRelationships) MarshalJSON

func (s FileInfoOKDataRelationships) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileInfoOKDataRelationships) UnmarshalJSON

func (s *FileInfoOKDataRelationships) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FileInfoOKDataType

type FileInfoOKDataType string

Object type.

const (
	FileInfoOKDataTypeFile FileInfoOKDataType = "file"
)

func (*FileInfoOKDataType) Decode

func (s *FileInfoOKDataType) Decode(d *jx.Decoder) error

Decode decodes FileInfoOKDataType from json.

func (FileInfoOKDataType) Encode

func (s FileInfoOKDataType) Encode(e *jx.Encoder)

Encode encodes FileInfoOKDataType as json.

func (FileInfoOKDataType) MarshalJSON

func (s FileInfoOKDataType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileInfoOKDataType) UnmarshalJSON

func (s *FileInfoOKDataType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (FileInfoOKDataType) Validate

func (s FileInfoOKDataType) Validate() error

type FileInfoParams

type FileInfoParams struct {
	// SHA-256, SHA-1 or MD5 identifying the file.
	ID string
	// Your API key.
	XApikey string
}

FileInfoParams is parameters of file-info operation.

type FileInfoRes

type FileInfoRes interface {
	// contains filtered or unexported methods
}

type FileObject

type FileObject struct {
	// List of representative tags related to the file's capabilities. Only available for Premium API
	// users.
	CapabilitiesTags []string `json:"capabilities_tags"`
	// Extracted when possible from the file's metadata. Indicates when it was built or compiled. It can
	// also be faked by malware creators. UTC timestamp.
	CreationDate int `json:"creation_date"`
	// True if the file can be downloaded, false otherwise. Only available for Premium API users.
	Downloadable bool `json:"downloadable"`
	// Date when the file was first seen in VirusTotal. UTC timestamp.
	FirstSubmissionDate int `json:"first_submission_date"`
	// Most recent scan date. UTC timestamp.
	LastAnalysisDate int `json:"last_analysis_date"`
	// Latest scan results. For more information about its format, check the [Analysis](#analyses-object)
	// object `results` attribute.
	LastAnalysisResults FileObjectLastAnalysisResults `json:"last_analysis_results"`
	// A summary of the latest scan results. For more information about its format, check the
	// [Analysis](#analyses-object) object `stats` attribute.
	LastAnalysisStats FileObjectLastAnalysisStats `json:"last_analysis_stats"`
	// Date when the object itself was last modified. UTC timestamp.
	LastModificationDate int `json:"last_modification_date"`
	// Most recent date the file was posted to VirusTotal. UTC timestamp.
	LastSubmissionDate int `json:"last_submission_date"`
	// Icon's relevant hashes, the dictionary contains two keys:.
	MainIcon FileObjectMainIcon `json:"main_icon"`
	// File's MD5 hash.
	MD5 string `json:"md5"`
	// The most interesting name out of all file's names.
	MeaningfulName string `json:"meaningful_name"`
	// All file names associated with the file.
	Names []string `json:"names"`
	// File's score calculated from all votes posted by the VirusTotal community. To know more about how
	// reputation is calculated, check [this article](https://support.virustotal.
	// com/hc/en-us/articles/115002146769-Vote-comment).
	Reputation int `json:"reputation"`
	// File's SHA1 hash.
	SHA1 string `json:"sha1"`
	// File's SHA256 hash.
	SHA256 string `json:"sha256"`
	// Dictionary containing the number of matched sigma rules group by its severity, same as
	// `sigma_analysis_stats` but split by ruleset. Dictionary key is the ruleset name and value is the
	// stats for that specific ruleset.
	SigmaAnalysisSummary FileObjectSigmaAnalysisSummary `json:"sigma_analysis_summary"`
	// File size in bytes.
	Size int `json:"size"`
	// List of representative attributes.
	Tags []string `json:"tags"`
	// Number of times the file has been posted to VirusTotal.
	TimesSubmitted int `json:"times_submitted"`
	// Unweighted number of total votes from the community, divided in "harmless" and "malicious":.
	TotalVotes FileObjectTotalVotes `json:"total_votes"`
	// Describes the file type.
	TypeDescription string `json:"type_description"`
	// Specifies file extension.
	TypeExtension string `json:"type_extension"`
	// Tag representing the file type. Can be used to filter by file type in [VirusTotal intelligence
	// searches](https://support.virustotal.com/hc/en-us/articles/360001387057).
	TypeTag string `json:"type_tag"`
	// Indicates from how many different sources the file has been posted from.
	UniqueSources int `json:"unique_sources"`
	// In-house similarity clustering algorithm value, based on a simple structural feature hash allows
	// you to find similar files.
	Vhash string `json:"vhash"`
}

Files are one of the most important type of objects in the VirusTotal API. We have a huge dataset of more than 2 billion files that have been analysed by VirusTotal over the years. A file object can be obtained either by [uploading a new file](ref:files-scan) to VirusTotal, by [searching for an already existing file hash](ref:file-info) or by other meanings when searching in [VT Enterprise services](ref:search). A file object ID is its SHA256 hash. Ref: #/components/schemas/FileObject

func (*FileObject) Decode

func (s *FileObject) Decode(d *jx.Decoder) error

Decode decodes FileObject from json.

func (FileObject) Encode

func (s FileObject) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FileObject) GetCapabilitiesTags

func (s FileObject) GetCapabilitiesTags() []string

GetCapabilitiesTags returns the value of CapabilitiesTags.

func (FileObject) GetCreationDate

func (s FileObject) GetCreationDate() int

GetCreationDate returns the value of CreationDate.

func (FileObject) GetDownloadable

func (s FileObject) GetDownloadable() bool

GetDownloadable returns the value of Downloadable.

func (FileObject) GetFirstSubmissionDate

func (s FileObject) GetFirstSubmissionDate() int

GetFirstSubmissionDate returns the value of FirstSubmissionDate.

func (FileObject) GetLastAnalysisDate

func (s FileObject) GetLastAnalysisDate() int

GetLastAnalysisDate returns the value of LastAnalysisDate.

func (FileObject) GetLastAnalysisResults

func (s FileObject) GetLastAnalysisResults() FileObjectLastAnalysisResults

GetLastAnalysisResults returns the value of LastAnalysisResults.

func (FileObject) GetLastAnalysisStats

func (s FileObject) GetLastAnalysisStats() FileObjectLastAnalysisStats

GetLastAnalysisStats returns the value of LastAnalysisStats.

func (FileObject) GetLastModificationDate

func (s FileObject) GetLastModificationDate() int

GetLastModificationDate returns the value of LastModificationDate.

func (FileObject) GetLastSubmissionDate

func (s FileObject) GetLastSubmissionDate() int

GetLastSubmissionDate returns the value of LastSubmissionDate.

func (FileObject) GetMD5

func (s FileObject) GetMD5() string

GetMD5 returns the value of MD5.

func (FileObject) GetMainIcon

func (s FileObject) GetMainIcon() FileObjectMainIcon

GetMainIcon returns the value of MainIcon.

func (FileObject) GetMeaningfulName

func (s FileObject) GetMeaningfulName() string

GetMeaningfulName returns the value of MeaningfulName.

func (FileObject) GetNames

func (s FileObject) GetNames() []string

GetNames returns the value of Names.

func (FileObject) GetReputation

func (s FileObject) GetReputation() int

GetReputation returns the value of Reputation.

func (FileObject) GetSHA1

func (s FileObject) GetSHA1() string

GetSHA1 returns the value of SHA1.

func (FileObject) GetSHA256

func (s FileObject) GetSHA256() string

GetSHA256 returns the value of SHA256.

func (FileObject) GetSigmaAnalysisSummary

func (s FileObject) GetSigmaAnalysisSummary() FileObjectSigmaAnalysisSummary

GetSigmaAnalysisSummary returns the value of SigmaAnalysisSummary.

func (FileObject) GetSize

func (s FileObject) GetSize() int

GetSize returns the value of Size.

func (FileObject) GetTags

func (s FileObject) GetTags() []string

GetTags returns the value of Tags.

func (FileObject) GetTimesSubmitted

func (s FileObject) GetTimesSubmitted() int

GetTimesSubmitted returns the value of TimesSubmitted.

func (FileObject) GetTotalVotes

func (s FileObject) GetTotalVotes() FileObjectTotalVotes

GetTotalVotes returns the value of TotalVotes.

func (FileObject) GetTypeDescription

func (s FileObject) GetTypeDescription() string

GetTypeDescription returns the value of TypeDescription.

func (FileObject) GetTypeExtension

func (s FileObject) GetTypeExtension() string

GetTypeExtension returns the value of TypeExtension.

func (FileObject) GetTypeTag

func (s FileObject) GetTypeTag() string

GetTypeTag returns the value of TypeTag.

func (FileObject) GetUniqueSources

func (s FileObject) GetUniqueSources() int

GetUniqueSources returns the value of UniqueSources.

func (FileObject) GetVhash

func (s FileObject) GetVhash() string

GetVhash returns the value of Vhash.

func (FileObject) MarshalJSON

func (s FileObject) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileObject) SetCapabilitiesTags

func (s *FileObject) SetCapabilitiesTags(val []string)

SetCapabilitiesTags sets the value of CapabilitiesTags.

func (*FileObject) SetCreationDate

func (s *FileObject) SetCreationDate(val int)

SetCreationDate sets the value of CreationDate.

func (*FileObject) SetDownloadable

func (s *FileObject) SetDownloadable(val bool)

SetDownloadable sets the value of Downloadable.

func (*FileObject) SetFirstSubmissionDate

func (s *FileObject) SetFirstSubmissionDate(val int)

SetFirstSubmissionDate sets the value of FirstSubmissionDate.

func (*FileObject) SetLastAnalysisDate

func (s *FileObject) SetLastAnalysisDate(val int)

SetLastAnalysisDate sets the value of LastAnalysisDate.

func (*FileObject) SetLastAnalysisResults

func (s *FileObject) SetLastAnalysisResults(val FileObjectLastAnalysisResults)

SetLastAnalysisResults sets the value of LastAnalysisResults.

func (*FileObject) SetLastAnalysisStats

func (s *FileObject) SetLastAnalysisStats(val FileObjectLastAnalysisStats)

SetLastAnalysisStats sets the value of LastAnalysisStats.

func (*FileObject) SetLastModificationDate

func (s *FileObject) SetLastModificationDate(val int)

SetLastModificationDate sets the value of LastModificationDate.

func (*FileObject) SetLastSubmissionDate

func (s *FileObject) SetLastSubmissionDate(val int)

SetLastSubmissionDate sets the value of LastSubmissionDate.

func (*FileObject) SetMD5

func (s *FileObject) SetMD5(val string)

SetMD5 sets the value of MD5.

func (*FileObject) SetMainIcon

func (s *FileObject) SetMainIcon(val FileObjectMainIcon)

SetMainIcon sets the value of MainIcon.

func (*FileObject) SetMeaningfulName

func (s *FileObject) SetMeaningfulName(val string)

SetMeaningfulName sets the value of MeaningfulName.

func (*FileObject) SetNames

func (s *FileObject) SetNames(val []string)

SetNames sets the value of Names.

func (*FileObject) SetReputation

func (s *FileObject) SetReputation(val int)

SetReputation sets the value of Reputation.

func (*FileObject) SetSHA1

func (s *FileObject) SetSHA1(val string)

SetSHA1 sets the value of SHA1.

func (*FileObject) SetSHA256

func (s *FileObject) SetSHA256(val string)

SetSHA256 sets the value of SHA256.

func (*FileObject) SetSigmaAnalysisSummary

func (s *FileObject) SetSigmaAnalysisSummary(val FileObjectSigmaAnalysisSummary)

SetSigmaAnalysisSummary sets the value of SigmaAnalysisSummary.

func (*FileObject) SetSize

func (s *FileObject) SetSize(val int)

SetSize sets the value of Size.

func (*FileObject) SetTags

func (s *FileObject) SetTags(val []string)

SetTags sets the value of Tags.

func (*FileObject) SetTimesSubmitted

func (s *FileObject) SetTimesSubmitted(val int)

SetTimesSubmitted sets the value of TimesSubmitted.

func (*FileObject) SetTotalVotes

func (s *FileObject) SetTotalVotes(val FileObjectTotalVotes)

SetTotalVotes sets the value of TotalVotes.

func (*FileObject) SetTypeDescription

func (s *FileObject) SetTypeDescription(val string)

SetTypeDescription sets the value of TypeDescription.

func (*FileObject) SetTypeExtension

func (s *FileObject) SetTypeExtension(val string)

SetTypeExtension sets the value of TypeExtension.

func (*FileObject) SetTypeTag

func (s *FileObject) SetTypeTag(val string)

SetTypeTag sets the value of TypeTag.

func (*FileObject) SetUniqueSources

func (s *FileObject) SetUniqueSources(val int)

SetUniqueSources sets the value of UniqueSources.

func (*FileObject) SetVhash

func (s *FileObject) SetVhash(val string)

SetVhash sets the value of Vhash.

func (*FileObject) UnmarshalJSON

func (s *FileObject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (FileObject) Validate

func (s FileObject) Validate() error

type FileObjectLastAnalysisResults

type FileObjectLastAnalysisResults map[string]jx.Raw

Latest scan results. For more information about its format, check the [Analysis](#analyses-object) object `results` attribute.

func (*FileObjectLastAnalysisResults) Decode

Decode decodes FileObjectLastAnalysisResults from json.

func (FileObjectLastAnalysisResults) Encode

Encode implements json.Marshaler.

func (FileObjectLastAnalysisResults) MarshalJSON

func (s FileObjectLastAnalysisResults) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileObjectLastAnalysisResults) UnmarshalJSON

func (s *FileObjectLastAnalysisResults) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FileObjectLastAnalysisStats

type FileObjectLastAnalysisStats map[string]jx.Raw

A summary of the latest scan results. For more information about its format, check the [Analysis](#analyses-object) object `stats` attribute.

func (*FileObjectLastAnalysisStats) Decode

Decode decodes FileObjectLastAnalysisStats from json.

func (FileObjectLastAnalysisStats) Encode

func (s FileObjectLastAnalysisStats) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FileObjectLastAnalysisStats) MarshalJSON

func (s FileObjectLastAnalysisStats) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileObjectLastAnalysisStats) UnmarshalJSON

func (s *FileObjectLastAnalysisStats) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FileObjectMainIcon

type FileObjectMainIcon struct {
	// Icon's difference hash. It can be used to search for files with similar icons using the
	// [/intelligence/search](#intelligence-search) endpoint.
	Dhash string `json:"dhash"`
	// Icon's MD5 hash.
	RawMD5 string `json:"raw_md5"`
}

Icon's relevant hashes, the dictionary contains two keys:.

func (*FileObjectMainIcon) Decode

func (s *FileObjectMainIcon) Decode(d *jx.Decoder) error

Decode decodes FileObjectMainIcon from json.

func (FileObjectMainIcon) Encode

func (s FileObjectMainIcon) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FileObjectMainIcon) GetDhash

func (s FileObjectMainIcon) GetDhash() string

GetDhash returns the value of Dhash.

func (FileObjectMainIcon) GetRawMD5

func (s FileObjectMainIcon) GetRawMD5() string

GetRawMD5 returns the value of RawMD5.

func (FileObjectMainIcon) MarshalJSON

func (s FileObjectMainIcon) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileObjectMainIcon) SetDhash

func (s *FileObjectMainIcon) SetDhash(val string)

SetDhash sets the value of Dhash.

func (*FileObjectMainIcon) SetRawMD5

func (s *FileObjectMainIcon) SetRawMD5(val string)

SetRawMD5 sets the value of RawMD5.

func (*FileObjectMainIcon) UnmarshalJSON

func (s *FileObjectMainIcon) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FileObjectSigmaAnalysisSummary

type FileObjectSigmaAnalysisSummary map[string]jx.Raw

Dictionary containing the number of matched sigma rules group by its severity, same as `sigma_analysis_stats` but split by ruleset. Dictionary key is the ruleset name and value is the stats for that specific ruleset.

func (*FileObjectSigmaAnalysisSummary) Decode

Decode decodes FileObjectSigmaAnalysisSummary from json.

func (FileObjectSigmaAnalysisSummary) Encode

Encode implements json.Marshaler.

func (FileObjectSigmaAnalysisSummary) MarshalJSON

func (s FileObjectSigmaAnalysisSummary) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileObjectSigmaAnalysisSummary) UnmarshalJSON

func (s *FileObjectSigmaAnalysisSummary) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type FileObjectTotalVotes

type FileObjectTotalVotes struct {
	// Number of positive votes.
	Harmless int `json:"harmless"`
	// Number of negative votes.
	Malicious int `json:"malicious"`
}

Unweighted number of total votes from the community, divided in "harmless" and "malicious":.

func (*FileObjectTotalVotes) Decode

func (s *FileObjectTotalVotes) Decode(d *jx.Decoder) error

Decode decodes FileObjectTotalVotes from json.

func (FileObjectTotalVotes) Encode

func (s FileObjectTotalVotes) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (FileObjectTotalVotes) GetHarmless

func (s FileObjectTotalVotes) GetHarmless() int

GetHarmless returns the value of Harmless.

func (FileObjectTotalVotes) GetMalicious

func (s FileObjectTotalVotes) GetMalicious() int

GetMalicious returns the value of Malicious.

func (FileObjectTotalVotes) MarshalJSON

func (s FileObjectTotalVotes) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*FileObjectTotalVotes) SetHarmless

func (s *FileObjectTotalVotes) SetHarmless(val int)

SetHarmless sets the value of Harmless.

func (*FileObjectTotalVotes) SetMalicious

func (s *FileObjectTotalVotes) SetMalicious(val int)

SetMalicious sets the value of Malicious.

func (*FileObjectTotalVotes) UnmarshalJSON

func (s *FileObjectTotalVotes) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptFileInfoOKDataRelationships

type OptFileInfoOKDataRelationships struct {
	Value FileInfoOKDataRelationships
	Set   bool
}

OptFileInfoOKDataRelationships is optional FileInfoOKDataRelationships.

func NewOptFileInfoOKDataRelationships

func NewOptFileInfoOKDataRelationships(v FileInfoOKDataRelationships) OptFileInfoOKDataRelationships

NewOptFileInfoOKDataRelationships returns new OptFileInfoOKDataRelationships with value set to v.

func (*OptFileInfoOKDataRelationships) Decode

Decode decodes FileInfoOKDataRelationships from json.

func (OptFileInfoOKDataRelationships) Encode

Encode encodes FileInfoOKDataRelationships as json.

func (OptFileInfoOKDataRelationships) Get

Get returns value and boolean that denotes whether value was set.

func (OptFileInfoOKDataRelationships) IsSet

IsSet returns true if OptFileInfoOKDataRelationships was set.

func (OptFileInfoOKDataRelationships) MarshalJSON

func (s OptFileInfoOKDataRelationships) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptFileInfoOKDataRelationships) Or

Or returns value if set, or given parameter if does not.

func (*OptFileInfoOKDataRelationships) Reset

func (o *OptFileInfoOKDataRelationships) Reset()

Reset unsets value.

func (*OptFileInfoOKDataRelationships) SetTo

SetTo sets value to v.

func (*OptFileInfoOKDataRelationships) UnmarshalJSON

func (s *OptFileInfoOKDataRelationships) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptURLInfoOKDataRelationships

type OptURLInfoOKDataRelationships struct {
	Value URLInfoOKDataRelationships
	Set   bool
}

OptURLInfoOKDataRelationships is optional URLInfoOKDataRelationships.

func NewOptURLInfoOKDataRelationships

func NewOptURLInfoOKDataRelationships(v URLInfoOKDataRelationships) OptURLInfoOKDataRelationships

NewOptURLInfoOKDataRelationships returns new OptURLInfoOKDataRelationships with value set to v.

func (*OptURLInfoOKDataRelationships) Decode

Decode decodes URLInfoOKDataRelationships from json.

func (OptURLInfoOKDataRelationships) Encode

Encode encodes URLInfoOKDataRelationships as json.

func (OptURLInfoOKDataRelationships) Get

Get returns value and boolean that denotes whether value was set.

func (OptURLInfoOKDataRelationships) IsSet

IsSet returns true if OptURLInfoOKDataRelationships was set.

func (OptURLInfoOKDataRelationships) MarshalJSON

func (s OptURLInfoOKDataRelationships) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptURLInfoOKDataRelationships) Or

Or returns value if set, or given parameter if does not.

func (*OptURLInfoOKDataRelationships) Reset

func (o *OptURLInfoOKDataRelationships) Reset()

Reset unsets value.

func (*OptURLInfoOKDataRelationships) SetTo

SetTo sets value to v.

func (*OptURLInfoOKDataRelationships) UnmarshalJSON

func (s *OptURLInfoOKDataRelationships) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	// contains filtered or unexported methods
}

Option is config option.

func WithClient

func WithClient(client ht.Client) Option

WithClient specifies http client to use.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the metric.NewNoopMeterProvider is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type URLInfoBadRequest

type URLInfoBadRequest struct {
	Error Error `json:"error"`
}

func (*URLInfoBadRequest) Decode

func (s *URLInfoBadRequest) Decode(d *jx.Decoder) error

Decode decodes URLInfoBadRequest from json.

func (URLInfoBadRequest) Encode

func (s URLInfoBadRequest) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLInfoBadRequest) GetError

func (s URLInfoBadRequest) GetError() Error

GetError returns the value of Error.

func (URLInfoBadRequest) MarshalJSON

func (s URLInfoBadRequest) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLInfoBadRequest) SetError

func (s *URLInfoBadRequest) SetError(val Error)

SetError sets the value of Error.

func (*URLInfoBadRequest) UnmarshalJSON

func (s *URLInfoBadRequest) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (URLInfoBadRequest) Validate

func (s URLInfoBadRequest) Validate() error

type URLInfoOK

type URLInfoOK struct {
	Data URLInfoOKData `json:"data"`
}

func (*URLInfoOK) Decode

func (s *URLInfoOK) Decode(d *jx.Decoder) error

Decode decodes URLInfoOK from json.

func (URLInfoOK) Encode

func (s URLInfoOK) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLInfoOK) GetData

func (s URLInfoOK) GetData() URLInfoOKData

GetData returns the value of Data.

func (URLInfoOK) MarshalJSON

func (s URLInfoOK) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLInfoOK) SetData

func (s *URLInfoOK) SetData(val URLInfoOKData)

SetData sets the value of Data.

func (*URLInfoOK) UnmarshalJSON

func (s *URLInfoOK) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (URLInfoOK) Validate

func (s URLInfoOK) Validate() error

type URLInfoOKData

type URLInfoOKData struct {
	Attributes URLObject `json:"attributes"`
	// Object ID.
	ID            string                        `json:"id"`
	Links         URLInfoOKDataLinks            `json:"links"`
	Relationships OptURLInfoOKDataRelationships `json:"relationships"`
	// Object type.
	Type URLInfoOKDataType `json:"type"`
}

func (*URLInfoOKData) Decode

func (s *URLInfoOKData) Decode(d *jx.Decoder) error

Decode decodes URLInfoOKData from json.

func (URLInfoOKData) Encode

func (s URLInfoOKData) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLInfoOKData) GetAttributes

func (s URLInfoOKData) GetAttributes() URLObject

GetAttributes returns the value of Attributes.

func (URLInfoOKData) GetID

func (s URLInfoOKData) GetID() string

GetID returns the value of ID.

func (s URLInfoOKData) GetLinks() URLInfoOKDataLinks

GetLinks returns the value of Links.

func (URLInfoOKData) GetRelationships

func (s URLInfoOKData) GetRelationships() OptURLInfoOKDataRelationships

GetRelationships returns the value of Relationships.

func (URLInfoOKData) GetType

func (s URLInfoOKData) GetType() URLInfoOKDataType

GetType returns the value of Type.

func (URLInfoOKData) MarshalJSON

func (s URLInfoOKData) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLInfoOKData) SetAttributes

func (s *URLInfoOKData) SetAttributes(val URLObject)

SetAttributes sets the value of Attributes.

func (*URLInfoOKData) SetID

func (s *URLInfoOKData) SetID(val string)

SetID sets the value of ID.

func (s *URLInfoOKData) SetLinks(val URLInfoOKDataLinks)

SetLinks sets the value of Links.

func (*URLInfoOKData) SetRelationships

func (s *URLInfoOKData) SetRelationships(val OptURLInfoOKDataRelationships)

SetRelationships sets the value of Relationships.

func (*URLInfoOKData) SetType

func (s *URLInfoOKData) SetType(val URLInfoOKDataType)

SetType sets the value of Type.

func (*URLInfoOKData) UnmarshalJSON

func (s *URLInfoOKData) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (URLInfoOKData) Validate

func (s URLInfoOKData) Validate() error
type URLInfoOKDataLinks struct {
	// Link to the object.
	Self            string `json:"self"`
	AdditionalProps URLInfoOKDataLinksAdditional
}

func (*URLInfoOKDataLinks) Decode

func (s *URLInfoOKDataLinks) Decode(d *jx.Decoder) error

Decode decodes URLInfoOKDataLinks from json.

func (URLInfoOKDataLinks) Encode

func (s URLInfoOKDataLinks) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLInfoOKDataLinks) GetAdditionalProps

func (s URLInfoOKDataLinks) GetAdditionalProps() URLInfoOKDataLinksAdditional

GetAdditionalProps returns the value of AdditionalProps.

func (URLInfoOKDataLinks) GetSelf

func (s URLInfoOKDataLinks) GetSelf() string

GetSelf returns the value of Self.

func (URLInfoOKDataLinks) MarshalJSON

func (s URLInfoOKDataLinks) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLInfoOKDataLinks) SetAdditionalProps

func (s *URLInfoOKDataLinks) SetAdditionalProps(val URLInfoOKDataLinksAdditional)

SetAdditionalProps sets the value of AdditionalProps.

func (*URLInfoOKDataLinks) SetSelf

func (s *URLInfoOKDataLinks) SetSelf(val string)

SetSelf sets the value of Self.

func (*URLInfoOKDataLinks) UnmarshalJSON

func (s *URLInfoOKDataLinks) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLInfoOKDataLinksAdditional

type URLInfoOKDataLinksAdditional map[string]jx.Raw

func (*URLInfoOKDataLinksAdditional) Decode

Decode decodes URLInfoOKDataLinksAdditional from json.

func (URLInfoOKDataLinksAdditional) Encode

Encode implements json.Marshaler.

func (URLInfoOKDataLinksAdditional) MarshalJSON

func (s URLInfoOKDataLinksAdditional) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLInfoOKDataLinksAdditional) UnmarshalJSON

func (s *URLInfoOKDataLinksAdditional) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLInfoOKDataRelationships

type URLInfoOKDataRelationships map[string]jx.Raw

func (*URLInfoOKDataRelationships) Decode

Decode decodes URLInfoOKDataRelationships from json.

func (URLInfoOKDataRelationships) Encode

func (s URLInfoOKDataRelationships) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLInfoOKDataRelationships) MarshalJSON

func (s URLInfoOKDataRelationships) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLInfoOKDataRelationships) UnmarshalJSON

func (s *URLInfoOKDataRelationships) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLInfoOKDataType

type URLInfoOKDataType string

Object type.

const (
	URLInfoOKDataTypeURL URLInfoOKDataType = "url"
)

func (*URLInfoOKDataType) Decode

func (s *URLInfoOKDataType) Decode(d *jx.Decoder) error

Decode decodes URLInfoOKDataType from json.

func (URLInfoOKDataType) Encode

func (s URLInfoOKDataType) Encode(e *jx.Encoder)

Encode encodes URLInfoOKDataType as json.

func (URLInfoOKDataType) MarshalJSON

func (s URLInfoOKDataType) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLInfoOKDataType) UnmarshalJSON

func (s *URLInfoOKDataType) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (URLInfoOKDataType) Validate

func (s URLInfoOKDataType) Validate() error

type URLInfoParams

type URLInfoParams struct {
	// Your API key.
	XApikey string
	// URL identifier or base64 representation of URL to scan (w/o padding).
	ID string
}

URLInfoParams is parameters of url-info operation.

type URLInfoRes

type URLInfoRes interface {
	// contains filtered or unexported methods
}

type URLObject

type URLObject struct {
	// They key is the partner who categorised the URL and the value is the URL's category according to
	// that partner.
	Categories URLObjectCategories `json:"categories"`
	// Dictionary including difference hash and md5 hash of the URL's favicon. Only returned in premium
	// API.
	Favicon URLObjectFavicon `json:"favicon"`
	// UTC timestamp of the date where the URL was first submitted to VirusTotal.
	FirstSubmissionDate int `json:"first_submission_date"`
	// Containing all meta tags (only for URLs downloading a HTML). Keys are the meta tag name and value
	// is a list containing all values of that meta tag.
	HTMLMeta URLObjectHTMLMeta `json:"html_meta"`
	// UTC timestamp representing last time the URL was scanned.
	LastAnalysisDate int `json:"last_analysis_date"`
	// Result from URL scanners. dict with scanner name as key and a dict with notes/result from that
	// scanner as value.
	LastAnalysisResults URLObjectLastAnalysisResults `json:"last_analysis_results"`
	// Number of different results from this scans.
	LastAnalysisStats URLObjectLastAnalysisStats `json:"last_analysis_stats"`
	// If the original URL redirects, where does it end.
	LastFinalURL string `json:"last_final_url"`
	// HTTP response code of the last response.
	LastHTTPResponseCode int `json:"last_http_response_code"`
	// Length in bytes of the content received.
	LastHTTPResponseContentLength int `json:"last_http_response_content_length"`
	// URL response body's SHA256 hash.
	LastHTTPResponseContentSHA256 string `json:"last_http_response_content_sha256"`
	// Containing the website's cookies.
	LastHTTPResponseCookies URLObjectLastHTTPResponseCookies `json:"last_http_response_cookies"`
	// Containing headers and values of last HTTP response.
	LastHTTPResponseHeaders URLObjectLastHTTPResponseHeaders `json:"last_http_response_headers"`
	// UTC timestamp representing last modification date.
	LastModificationDate int `json:"last_modification_date"`
	// UTC timestamp representing last time it was sent to be analysed.
	LastSubmissionDate int `json:"last_submission_date"`
	// Containing links to different domains.
	OutgoingLinks []string `json:"outgoing_links"`
	// History of redirections followed when visiting a given URL. The last URL of the chain is not
	// included in the list since it is available at the `last_final_url` attribute.
	RedirectionChain []string `json:"redirection_chain"`
	// Value of votes from VT community.
	Reputation int `json:"reputation"`
	// Tags.
	Tags []string `json:"tags"`
	// Targeted brand info extracted from phishing engines.
	TargetedBrand URLObjectTargetedBrand `json:"targeted_brand"`
	// Number of times that URL has been checked.
	TimesSubmitted int `json:"times_submitted"`
	// Webpage title.
	Title string `json:"title"`
	// Containing the number of positive ("harmless") and negative ("malicious") votes received from VT
	// community.
	TotalVotes URLObjectTotalVotes `json:"total_votes"`
	// Contains all found trackers in that URL in a historical manner. Every key is a tracker name, which
	// is a dictionary containing:.
	Trackers URLObjectTrackers `json:"trackers"`
	// Original URL to be scanned.
	URL string `json:"url"`
}

URLs doesn't only represent information by themselves, but also can give contextual information about files and other elements on VT. Different URL calls may return different URL-related objects that we list here. Ref: #/components/schemas/URLObject

func (*URLObject) Decode

func (s *URLObject) Decode(d *jx.Decoder) error

Decode decodes URLObject from json.

func (URLObject) Encode

func (s URLObject) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLObject) GetCategories

func (s URLObject) GetCategories() URLObjectCategories

GetCategories returns the value of Categories.

func (URLObject) GetFavicon

func (s URLObject) GetFavicon() URLObjectFavicon

GetFavicon returns the value of Favicon.

func (URLObject) GetFirstSubmissionDate

func (s URLObject) GetFirstSubmissionDate() int

GetFirstSubmissionDate returns the value of FirstSubmissionDate.

func (URLObject) GetHTMLMeta

func (s URLObject) GetHTMLMeta() URLObjectHTMLMeta

GetHTMLMeta returns the value of HTMLMeta.

func (URLObject) GetLastAnalysisDate

func (s URLObject) GetLastAnalysisDate() int

GetLastAnalysisDate returns the value of LastAnalysisDate.

func (URLObject) GetLastAnalysisResults

func (s URLObject) GetLastAnalysisResults() URLObjectLastAnalysisResults

GetLastAnalysisResults returns the value of LastAnalysisResults.

func (URLObject) GetLastAnalysisStats

func (s URLObject) GetLastAnalysisStats() URLObjectLastAnalysisStats

GetLastAnalysisStats returns the value of LastAnalysisStats.

func (URLObject) GetLastFinalURL

func (s URLObject) GetLastFinalURL() string

GetLastFinalURL returns the value of LastFinalURL.

func (URLObject) GetLastHTTPResponseCode

func (s URLObject) GetLastHTTPResponseCode() int

GetLastHTTPResponseCode returns the value of LastHTTPResponseCode.

func (URLObject) GetLastHTTPResponseContentLength

func (s URLObject) GetLastHTTPResponseContentLength() int

GetLastHTTPResponseContentLength returns the value of LastHTTPResponseContentLength.

func (URLObject) GetLastHTTPResponseContentSHA256

func (s URLObject) GetLastHTTPResponseContentSHA256() string

GetLastHTTPResponseContentSHA256 returns the value of LastHTTPResponseContentSHA256.

func (URLObject) GetLastHTTPResponseCookies

func (s URLObject) GetLastHTTPResponseCookies() URLObjectLastHTTPResponseCookies

GetLastHTTPResponseCookies returns the value of LastHTTPResponseCookies.

func (URLObject) GetLastHTTPResponseHeaders

func (s URLObject) GetLastHTTPResponseHeaders() URLObjectLastHTTPResponseHeaders

GetLastHTTPResponseHeaders returns the value of LastHTTPResponseHeaders.

func (URLObject) GetLastModificationDate

func (s URLObject) GetLastModificationDate() int

GetLastModificationDate returns the value of LastModificationDate.

func (URLObject) GetLastSubmissionDate

func (s URLObject) GetLastSubmissionDate() int

GetLastSubmissionDate returns the value of LastSubmissionDate.

func (s URLObject) GetOutgoingLinks() []string

GetOutgoingLinks returns the value of OutgoingLinks.

func (URLObject) GetRedirectionChain

func (s URLObject) GetRedirectionChain() []string

GetRedirectionChain returns the value of RedirectionChain.

func (URLObject) GetReputation

func (s URLObject) GetReputation() int

GetReputation returns the value of Reputation.

func (URLObject) GetTags

func (s URLObject) GetTags() []string

GetTags returns the value of Tags.

func (URLObject) GetTargetedBrand

func (s URLObject) GetTargetedBrand() URLObjectTargetedBrand

GetTargetedBrand returns the value of TargetedBrand.

func (URLObject) GetTimesSubmitted

func (s URLObject) GetTimesSubmitted() int

GetTimesSubmitted returns the value of TimesSubmitted.

func (URLObject) GetTitle

func (s URLObject) GetTitle() string

GetTitle returns the value of Title.

func (URLObject) GetTotalVotes

func (s URLObject) GetTotalVotes() URLObjectTotalVotes

GetTotalVotes returns the value of TotalVotes.

func (URLObject) GetTrackers

func (s URLObject) GetTrackers() URLObjectTrackers

GetTrackers returns the value of Trackers.

func (URLObject) GetURL

func (s URLObject) GetURL() string

GetURL returns the value of URL.

func (URLObject) MarshalJSON

func (s URLObject) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObject) SetCategories

func (s *URLObject) SetCategories(val URLObjectCategories)

SetCategories sets the value of Categories.

func (*URLObject) SetFavicon

func (s *URLObject) SetFavicon(val URLObjectFavicon)

SetFavicon sets the value of Favicon.

func (*URLObject) SetFirstSubmissionDate

func (s *URLObject) SetFirstSubmissionDate(val int)

SetFirstSubmissionDate sets the value of FirstSubmissionDate.

func (*URLObject) SetHTMLMeta

func (s *URLObject) SetHTMLMeta(val URLObjectHTMLMeta)

SetHTMLMeta sets the value of HTMLMeta.

func (*URLObject) SetLastAnalysisDate

func (s *URLObject) SetLastAnalysisDate(val int)

SetLastAnalysisDate sets the value of LastAnalysisDate.

func (*URLObject) SetLastAnalysisResults

func (s *URLObject) SetLastAnalysisResults(val URLObjectLastAnalysisResults)

SetLastAnalysisResults sets the value of LastAnalysisResults.

func (*URLObject) SetLastAnalysisStats

func (s *URLObject) SetLastAnalysisStats(val URLObjectLastAnalysisStats)

SetLastAnalysisStats sets the value of LastAnalysisStats.

func (*URLObject) SetLastFinalURL

func (s *URLObject) SetLastFinalURL(val string)

SetLastFinalURL sets the value of LastFinalURL.

func (*URLObject) SetLastHTTPResponseCode

func (s *URLObject) SetLastHTTPResponseCode(val int)

SetLastHTTPResponseCode sets the value of LastHTTPResponseCode.

func (*URLObject) SetLastHTTPResponseContentLength

func (s *URLObject) SetLastHTTPResponseContentLength(val int)

SetLastHTTPResponseContentLength sets the value of LastHTTPResponseContentLength.

func (*URLObject) SetLastHTTPResponseContentSHA256

func (s *URLObject) SetLastHTTPResponseContentSHA256(val string)

SetLastHTTPResponseContentSHA256 sets the value of LastHTTPResponseContentSHA256.

func (*URLObject) SetLastHTTPResponseCookies

func (s *URLObject) SetLastHTTPResponseCookies(val URLObjectLastHTTPResponseCookies)

SetLastHTTPResponseCookies sets the value of LastHTTPResponseCookies.

func (*URLObject) SetLastHTTPResponseHeaders

func (s *URLObject) SetLastHTTPResponseHeaders(val URLObjectLastHTTPResponseHeaders)

SetLastHTTPResponseHeaders sets the value of LastHTTPResponseHeaders.

func (*URLObject) SetLastModificationDate

func (s *URLObject) SetLastModificationDate(val int)

SetLastModificationDate sets the value of LastModificationDate.

func (*URLObject) SetLastSubmissionDate

func (s *URLObject) SetLastSubmissionDate(val int)

SetLastSubmissionDate sets the value of LastSubmissionDate.

func (s *URLObject) SetOutgoingLinks(val []string)

SetOutgoingLinks sets the value of OutgoingLinks.

func (*URLObject) SetRedirectionChain

func (s *URLObject) SetRedirectionChain(val []string)

SetRedirectionChain sets the value of RedirectionChain.

func (*URLObject) SetReputation

func (s *URLObject) SetReputation(val int)

SetReputation sets the value of Reputation.

func (*URLObject) SetTags

func (s *URLObject) SetTags(val []string)

SetTags sets the value of Tags.

func (*URLObject) SetTargetedBrand

func (s *URLObject) SetTargetedBrand(val URLObjectTargetedBrand)

SetTargetedBrand sets the value of TargetedBrand.

func (*URLObject) SetTimesSubmitted

func (s *URLObject) SetTimesSubmitted(val int)

SetTimesSubmitted sets the value of TimesSubmitted.

func (*URLObject) SetTitle

func (s *URLObject) SetTitle(val string)

SetTitle sets the value of Title.

func (*URLObject) SetTotalVotes

func (s *URLObject) SetTotalVotes(val URLObjectTotalVotes)

SetTotalVotes sets the value of TotalVotes.

func (*URLObject) SetTrackers

func (s *URLObject) SetTrackers(val URLObjectTrackers)

SetTrackers sets the value of Trackers.

func (*URLObject) SetURL

func (s *URLObject) SetURL(val string)

SetURL sets the value of URL.

func (*URLObject) UnmarshalJSON

func (s *URLObject) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (URLObject) Validate

func (s URLObject) Validate() error

type URLObjectCategories

type URLObjectCategories map[string]jx.Raw

They key is the partner who categorised the URL and the value is the URL's category according to that partner.

func (*URLObjectCategories) Decode

func (s *URLObjectCategories) Decode(d *jx.Decoder) error

Decode decodes URLObjectCategories from json.

func (URLObjectCategories) Encode

func (s URLObjectCategories) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLObjectCategories) MarshalJSON

func (s URLObjectCategories) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectCategories) UnmarshalJSON

func (s *URLObjectCategories) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLObjectFavicon

type URLObjectFavicon struct {
	// Difference hash.
	Dhash string `json:"dhash"`
	// Favicon's MD5 hash.
	RawMD5 string `json:"raw_md5"`
}

Dictionary including difference hash and md5 hash of the URL's favicon. Only returned in premium API.

func (*URLObjectFavicon) Decode

func (s *URLObjectFavicon) Decode(d *jx.Decoder) error

Decode decodes URLObjectFavicon from json.

func (URLObjectFavicon) Encode

func (s URLObjectFavicon) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLObjectFavicon) GetDhash

func (s URLObjectFavicon) GetDhash() string

GetDhash returns the value of Dhash.

func (URLObjectFavicon) GetRawMD5

func (s URLObjectFavicon) GetRawMD5() string

GetRawMD5 returns the value of RawMD5.

func (URLObjectFavicon) MarshalJSON

func (s URLObjectFavicon) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectFavicon) SetDhash

func (s *URLObjectFavicon) SetDhash(val string)

SetDhash sets the value of Dhash.

func (*URLObjectFavicon) SetRawMD5

func (s *URLObjectFavicon) SetRawMD5(val string)

SetRawMD5 sets the value of RawMD5.

func (*URLObjectFavicon) UnmarshalJSON

func (s *URLObjectFavicon) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLObjectHTMLMeta

type URLObjectHTMLMeta map[string]jx.Raw

Containing all meta tags (only for URLs downloading a HTML). Keys are the meta tag name and value is a list containing all values of that meta tag.

func (*URLObjectHTMLMeta) Decode

func (s *URLObjectHTMLMeta) Decode(d *jx.Decoder) error

Decode decodes URLObjectHTMLMeta from json.

func (URLObjectHTMLMeta) Encode

func (s URLObjectHTMLMeta) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLObjectHTMLMeta) MarshalJSON

func (s URLObjectHTMLMeta) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectHTMLMeta) UnmarshalJSON

func (s *URLObjectHTMLMeta) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLObjectLastAnalysisResults

type URLObjectLastAnalysisResults struct {
	// Normalized result. can be:
	// * `harmless` - (site is not malicious),
	// * `undetected` - (scanner has no opinion about this site),
	// * `suspicious` - (scanner thinks the site is suspicious),
	// * `malicious` - (scanner thinks the site is malicious).
	Category URLObjectLastAnalysisResultsCategory `json:"category"`
	// Complete name of the URL scanning service.
	EngineName string `json:"engine_name"`
	// Type of service given by that URL scanning service (i.e. "blacklist").
	Method string `json:"method"`
	// Raw value returned by the URL scanner ("clean", "malicious", "suspicious", "phishing"). It may
	// vary from scanner to scanner, hence the need for the "category" field for normalisation.
	Result string `json:"result"`
}

Result from URL scanners. dict with scanner name as key and a dict with notes/result from that scanner as value.

func (*URLObjectLastAnalysisResults) Decode

Decode decodes URLObjectLastAnalysisResults from json.

func (URLObjectLastAnalysisResults) Encode

Encode implements json.Marshaler.

func (URLObjectLastAnalysisResults) GetCategory

GetCategory returns the value of Category.

func (URLObjectLastAnalysisResults) GetEngineName

func (s URLObjectLastAnalysisResults) GetEngineName() string

GetEngineName returns the value of EngineName.

func (URLObjectLastAnalysisResults) GetMethod

func (s URLObjectLastAnalysisResults) GetMethod() string

GetMethod returns the value of Method.

func (URLObjectLastAnalysisResults) GetResult

func (s URLObjectLastAnalysisResults) GetResult() string

GetResult returns the value of Result.

func (URLObjectLastAnalysisResults) MarshalJSON

func (s URLObjectLastAnalysisResults) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectLastAnalysisResults) SetCategory

SetCategory sets the value of Category.

func (*URLObjectLastAnalysisResults) SetEngineName

func (s *URLObjectLastAnalysisResults) SetEngineName(val string)

SetEngineName sets the value of EngineName.

func (*URLObjectLastAnalysisResults) SetMethod

func (s *URLObjectLastAnalysisResults) SetMethod(val string)

SetMethod sets the value of Method.

func (*URLObjectLastAnalysisResults) SetResult

func (s *URLObjectLastAnalysisResults) SetResult(val string)

SetResult sets the value of Result.

func (*URLObjectLastAnalysisResults) UnmarshalJSON

func (s *URLObjectLastAnalysisResults) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (URLObjectLastAnalysisResults) Validate

func (s URLObjectLastAnalysisResults) Validate() error

type URLObjectLastAnalysisResultsCategory

type URLObjectLastAnalysisResultsCategory string

Normalized result. can be: * `harmless` - (site is not malicious), * `undetected` - (scanner has no opinion about this site), * `suspicious` - (scanner thinks the site is suspicious), * `malicious` - (scanner thinks the site is malicious).

const (
	URLObjectLastAnalysisResultsCategoryHarmless   URLObjectLastAnalysisResultsCategory = "harmless"
	URLObjectLastAnalysisResultsCategoryUndetected URLObjectLastAnalysisResultsCategory = "undetected"
	URLObjectLastAnalysisResultsCategorySuspicious URLObjectLastAnalysisResultsCategory = "suspicious"
	URLObjectLastAnalysisResultsCategoryMalicious  URLObjectLastAnalysisResultsCategory = "malicious"
)

func (*URLObjectLastAnalysisResultsCategory) Decode

Decode decodes URLObjectLastAnalysisResultsCategory from json.

func (URLObjectLastAnalysisResultsCategory) Encode

Encode encodes URLObjectLastAnalysisResultsCategory as json.

func (URLObjectLastAnalysisResultsCategory) MarshalJSON

func (s URLObjectLastAnalysisResultsCategory) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectLastAnalysisResultsCategory) UnmarshalJSON

func (s *URLObjectLastAnalysisResultsCategory) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (URLObjectLastAnalysisResultsCategory) Validate

type URLObjectLastAnalysisStats

type URLObjectLastAnalysisStats struct {
	// Number of reports saying that is harmless.
	Harmless int `json:"harmless"`
	// Number of reports saying that is malicious.
	Malicious int `json:"malicious"`
	// Number of reports saying that is suspicious.
	Suspicious int `json:"suspicious"`
	// Number of timeouts when checking this URL.
	Timeout int `json:"timeout"`
	// Number of reports saying that is undetected.
	Undetected int `json:"undetected"`
}

Number of different results from this scans.

func (*URLObjectLastAnalysisStats) Decode

Decode decodes URLObjectLastAnalysisStats from json.

func (URLObjectLastAnalysisStats) Encode

func (s URLObjectLastAnalysisStats) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLObjectLastAnalysisStats) GetHarmless

func (s URLObjectLastAnalysisStats) GetHarmless() int

GetHarmless returns the value of Harmless.

func (URLObjectLastAnalysisStats) GetMalicious

func (s URLObjectLastAnalysisStats) GetMalicious() int

GetMalicious returns the value of Malicious.

func (URLObjectLastAnalysisStats) GetSuspicious

func (s URLObjectLastAnalysisStats) GetSuspicious() int

GetSuspicious returns the value of Suspicious.

func (URLObjectLastAnalysisStats) GetTimeout

func (s URLObjectLastAnalysisStats) GetTimeout() int

GetTimeout returns the value of Timeout.

func (URLObjectLastAnalysisStats) GetUndetected

func (s URLObjectLastAnalysisStats) GetUndetected() int

GetUndetected returns the value of Undetected.

func (URLObjectLastAnalysisStats) MarshalJSON

func (s URLObjectLastAnalysisStats) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectLastAnalysisStats) SetHarmless

func (s *URLObjectLastAnalysisStats) SetHarmless(val int)

SetHarmless sets the value of Harmless.

func (*URLObjectLastAnalysisStats) SetMalicious

func (s *URLObjectLastAnalysisStats) SetMalicious(val int)

SetMalicious sets the value of Malicious.

func (*URLObjectLastAnalysisStats) SetSuspicious

func (s *URLObjectLastAnalysisStats) SetSuspicious(val int)

SetSuspicious sets the value of Suspicious.

func (*URLObjectLastAnalysisStats) SetTimeout

func (s *URLObjectLastAnalysisStats) SetTimeout(val int)

SetTimeout sets the value of Timeout.

func (*URLObjectLastAnalysisStats) SetUndetected

func (s *URLObjectLastAnalysisStats) SetUndetected(val int)

SetUndetected sets the value of Undetected.

func (*URLObjectLastAnalysisStats) UnmarshalJSON

func (s *URLObjectLastAnalysisStats) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLObjectLastHTTPResponseCookies

type URLObjectLastHTTPResponseCookies map[string]jx.Raw

Containing the website's cookies.

func (*URLObjectLastHTTPResponseCookies) Decode

Decode decodes URLObjectLastHTTPResponseCookies from json.

func (URLObjectLastHTTPResponseCookies) Encode

Encode implements json.Marshaler.

func (URLObjectLastHTTPResponseCookies) MarshalJSON

func (s URLObjectLastHTTPResponseCookies) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectLastHTTPResponseCookies) UnmarshalJSON

func (s *URLObjectLastHTTPResponseCookies) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLObjectLastHTTPResponseHeaders

type URLObjectLastHTTPResponseHeaders map[string]jx.Raw

Containing headers and values of last HTTP response.

func (*URLObjectLastHTTPResponseHeaders) Decode

Decode decodes URLObjectLastHTTPResponseHeaders from json.

func (URLObjectLastHTTPResponseHeaders) Encode

Encode implements json.Marshaler.

func (URLObjectLastHTTPResponseHeaders) MarshalJSON

func (s URLObjectLastHTTPResponseHeaders) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectLastHTTPResponseHeaders) UnmarshalJSON

func (s *URLObjectLastHTTPResponseHeaders) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLObjectTargetedBrand

type URLObjectTargetedBrand map[string]jx.Raw

Targeted brand info extracted from phishing engines.

func (*URLObjectTargetedBrand) Decode

func (s *URLObjectTargetedBrand) Decode(d *jx.Decoder) error

Decode decodes URLObjectTargetedBrand from json.

func (URLObjectTargetedBrand) Encode

func (s URLObjectTargetedBrand) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLObjectTargetedBrand) MarshalJSON

func (s URLObjectTargetedBrand) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectTargetedBrand) UnmarshalJSON

func (s *URLObjectTargetedBrand) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLObjectTotalVotes

type URLObjectTotalVotes struct {
	// Number of positive votes.
	Harmless int `json:"harmless"`
	// Number of negative votes.
	Malicious int `json:"malicious"`
}

Containing the number of positive ("harmless") and negative ("malicious") votes received from VT community.

func (*URLObjectTotalVotes) Decode

func (s *URLObjectTotalVotes) Decode(d *jx.Decoder) error

Decode decodes URLObjectTotalVotes from json.

func (URLObjectTotalVotes) Encode

func (s URLObjectTotalVotes) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLObjectTotalVotes) GetHarmless

func (s URLObjectTotalVotes) GetHarmless() int

GetHarmless returns the value of Harmless.

func (URLObjectTotalVotes) GetMalicious

func (s URLObjectTotalVotes) GetMalicious() int

GetMalicious returns the value of Malicious.

func (URLObjectTotalVotes) MarshalJSON

func (s URLObjectTotalVotes) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectTotalVotes) SetHarmless

func (s *URLObjectTotalVotes) SetHarmless(val int)

SetHarmless sets the value of Harmless.

func (*URLObjectTotalVotes) SetMalicious

func (s *URLObjectTotalVotes) SetMalicious(val int)

SetMalicious sets the value of Malicious.

func (*URLObjectTotalVotes) UnmarshalJSON

func (s *URLObjectTotalVotes) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type URLObjectTrackers

type URLObjectTrackers struct {
	// Tracker ID, if available.
	ID string `json:"id"`
	// Tracker ingestion date as UNIX timestamp.
	Timestamp int `json:"timestamp"`
	// Tracker script URL.
	URL string `json:"url"`
}

Contains all found trackers in that URL in a historical manner. Every key is a tracker name, which is a dictionary containing:.

func (*URLObjectTrackers) Decode

func (s *URLObjectTrackers) Decode(d *jx.Decoder) error

Decode decodes URLObjectTrackers from json.

func (URLObjectTrackers) Encode

func (s URLObjectTrackers) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (URLObjectTrackers) GetID

func (s URLObjectTrackers) GetID() string

GetID returns the value of ID.

func (URLObjectTrackers) GetTimestamp

func (s URLObjectTrackers) GetTimestamp() int

GetTimestamp returns the value of Timestamp.

func (URLObjectTrackers) GetURL

func (s URLObjectTrackers) GetURL() string

GetURL returns the value of URL.

func (URLObjectTrackers) MarshalJSON

func (s URLObjectTrackers) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*URLObjectTrackers) SetID

func (s *URLObjectTrackers) SetID(val string)

SetID sets the value of ID.

func (*URLObjectTrackers) SetTimestamp

func (s *URLObjectTrackers) SetTimestamp(val int)

SetTimestamp sets the value of Timestamp.

func (*URLObjectTrackers) SetURL

func (s *URLObjectTrackers) SetURL(val string)

SetURL sets the value of URL.

func (*URLObjectTrackers) UnmarshalJSON

func (s *URLObjectTrackers) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

Jump to

Keyboard shortcuts

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