Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- type Error
- func (s *Error) Decode(d *jx.Decoder) error
- func (s Error) Encode(e *jx.Encoder)
- func (s Error) GetCode() ErrorCode
- func (s Error) GetMessage() string
- func (s Error) MarshalJSON() ([]byte, error)
- func (s *Error) SetCode(val ErrorCode)
- func (s *Error) SetMessage(val string)
- func (s *Error) UnmarshalJSON(data []byte) error
- func (s Error) Validate() error
- type ErrorCode
- type FileInfoBadRequest
- func (s *FileInfoBadRequest) Decode(d *jx.Decoder) error
- func (s FileInfoBadRequest) Encode(e *jx.Encoder)
- func (s FileInfoBadRequest) GetError() Error
- func (s FileInfoBadRequest) MarshalJSON() ([]byte, error)
- func (s *FileInfoBadRequest) SetError(val Error)
- func (s *FileInfoBadRequest) UnmarshalJSON(data []byte) error
- func (s FileInfoBadRequest) Validate() error
- type FileInfoOK
- func (s *FileInfoOK) Decode(d *jx.Decoder) error
- func (s FileInfoOK) Encode(e *jx.Encoder)
- func (s FileInfoOK) GetData() FileInfoOKData
- func (s FileInfoOK) MarshalJSON() ([]byte, error)
- func (s *FileInfoOK) SetData(val FileInfoOKData)
- func (s *FileInfoOK) UnmarshalJSON(data []byte) error
- func (s FileInfoOK) Validate() error
- type FileInfoOKData
- func (s *FileInfoOKData) Decode(d *jx.Decoder) error
- func (s FileInfoOKData) Encode(e *jx.Encoder)
- func (s FileInfoOKData) GetAttributes() FileObject
- func (s FileInfoOKData) GetID() string
- func (s FileInfoOKData) GetLinks() FileInfoOKDataLinks
- func (s FileInfoOKData) GetRelationships() OptFileInfoOKDataRelationships
- func (s FileInfoOKData) GetType() FileInfoOKDataType
- func (s FileInfoOKData) MarshalJSON() ([]byte, error)
- func (s *FileInfoOKData) SetAttributes(val FileObject)
- func (s *FileInfoOKData) SetID(val string)
- func (s *FileInfoOKData) SetLinks(val FileInfoOKDataLinks)
- func (s *FileInfoOKData) SetRelationships(val OptFileInfoOKDataRelationships)
- func (s *FileInfoOKData) SetType(val FileInfoOKDataType)
- func (s *FileInfoOKData) UnmarshalJSON(data []byte) error
- func (s FileInfoOKData) Validate() error
- type FileInfoOKDataLinks
- func (s *FileInfoOKDataLinks) Decode(d *jx.Decoder) error
- func (s FileInfoOKDataLinks) Encode(e *jx.Encoder)
- func (s FileInfoOKDataLinks) GetAdditionalProps() FileInfoOKDataLinksAdditional
- func (s FileInfoOKDataLinks) GetSelf() string
- func (s FileInfoOKDataLinks) MarshalJSON() ([]byte, error)
- func (s *FileInfoOKDataLinks) SetAdditionalProps(val FileInfoOKDataLinksAdditional)
- func (s *FileInfoOKDataLinks) SetSelf(val string)
- func (s *FileInfoOKDataLinks) UnmarshalJSON(data []byte) error
- type FileInfoOKDataLinksAdditional
- type FileInfoOKDataRelationships
- type FileInfoOKDataType
- type FileInfoParams
- type FileInfoRes
- type FileObject
- func (s *FileObject) Decode(d *jx.Decoder) error
- func (s FileObject) Encode(e *jx.Encoder)
- func (s FileObject) GetCapabilitiesTags() []string
- func (s FileObject) GetCreationDate() int
- func (s FileObject) GetDownloadable() bool
- func (s FileObject) GetFirstSubmissionDate() int
- func (s FileObject) GetLastAnalysisDate() int
- func (s FileObject) GetLastAnalysisResults() FileObjectLastAnalysisResults
- func (s FileObject) GetLastAnalysisStats() FileObjectLastAnalysisStats
- func (s FileObject) GetLastModificationDate() int
- func (s FileObject) GetLastSubmissionDate() int
- func (s FileObject) GetMD5() string
- func (s FileObject) GetMainIcon() FileObjectMainIcon
- func (s FileObject) GetMeaningfulName() string
- func (s FileObject) GetNames() []string
- func (s FileObject) GetReputation() int
- func (s FileObject) GetSHA1() string
- func (s FileObject) GetSHA256() string
- func (s FileObject) GetSigmaAnalysisSummary() FileObjectSigmaAnalysisSummary
- func (s FileObject) GetSize() int
- func (s FileObject) GetTags() []string
- func (s FileObject) GetTimesSubmitted() int
- func (s FileObject) GetTotalVotes() FileObjectTotalVotes
- func (s FileObject) GetTypeDescription() string
- func (s FileObject) GetTypeExtension() string
- func (s FileObject) GetTypeTag() string
- func (s FileObject) GetUniqueSources() int
- func (s FileObject) GetVhash() string
- func (s FileObject) MarshalJSON() ([]byte, error)
- func (s *FileObject) SetCapabilitiesTags(val []string)
- func (s *FileObject) SetCreationDate(val int)
- func (s *FileObject) SetDownloadable(val bool)
- func (s *FileObject) SetFirstSubmissionDate(val int)
- func (s *FileObject) SetLastAnalysisDate(val int)
- func (s *FileObject) SetLastAnalysisResults(val FileObjectLastAnalysisResults)
- func (s *FileObject) SetLastAnalysisStats(val FileObjectLastAnalysisStats)
- func (s *FileObject) SetLastModificationDate(val int)
- func (s *FileObject) SetLastSubmissionDate(val int)
- func (s *FileObject) SetMD5(val string)
- func (s *FileObject) SetMainIcon(val FileObjectMainIcon)
- func (s *FileObject) SetMeaningfulName(val string)
- func (s *FileObject) SetNames(val []string)
- func (s *FileObject) SetReputation(val int)
- func (s *FileObject) SetSHA1(val string)
- func (s *FileObject) SetSHA256(val string)
- func (s *FileObject) SetSigmaAnalysisSummary(val FileObjectSigmaAnalysisSummary)
- func (s *FileObject) SetSize(val int)
- func (s *FileObject) SetTags(val []string)
- func (s *FileObject) SetTimesSubmitted(val int)
- func (s *FileObject) SetTotalVotes(val FileObjectTotalVotes)
- func (s *FileObject) SetTypeDescription(val string)
- func (s *FileObject) SetTypeExtension(val string)
- func (s *FileObject) SetTypeTag(val string)
- func (s *FileObject) SetUniqueSources(val int)
- func (s *FileObject) SetVhash(val string)
- func (s *FileObject) UnmarshalJSON(data []byte) error
- func (s FileObject) Validate() error
- type FileObjectLastAnalysisResults
- type FileObjectLastAnalysisStats
- type FileObjectMainIcon
- func (s *FileObjectMainIcon) Decode(d *jx.Decoder) error
- func (s FileObjectMainIcon) Encode(e *jx.Encoder)
- func (s FileObjectMainIcon) GetDhash() string
- func (s FileObjectMainIcon) GetRawMD5() string
- func (s FileObjectMainIcon) MarshalJSON() ([]byte, error)
- func (s *FileObjectMainIcon) SetDhash(val string)
- func (s *FileObjectMainIcon) SetRawMD5(val string)
- func (s *FileObjectMainIcon) UnmarshalJSON(data []byte) error
- type FileObjectSigmaAnalysisSummary
- type FileObjectTotalVotes
- func (s *FileObjectTotalVotes) Decode(d *jx.Decoder) error
- func (s FileObjectTotalVotes) Encode(e *jx.Encoder)
- func (s FileObjectTotalVotes) GetHarmless() int
- func (s FileObjectTotalVotes) GetMalicious() int
- func (s FileObjectTotalVotes) MarshalJSON() ([]byte, error)
- func (s *FileObjectTotalVotes) SetHarmless(val int)
- func (s *FileObjectTotalVotes) SetMalicious(val int)
- func (s *FileObjectTotalVotes) UnmarshalJSON(data []byte) error
- type OptFileInfoOKDataRelationships
- func (o *OptFileInfoOKDataRelationships) Decode(d *jx.Decoder) error
- func (o OptFileInfoOKDataRelationships) Encode(e *jx.Encoder)
- func (o OptFileInfoOKDataRelationships) Get() (v FileInfoOKDataRelationships, ok bool)
- func (o OptFileInfoOKDataRelationships) IsSet() bool
- func (s OptFileInfoOKDataRelationships) MarshalJSON() ([]byte, error)
- func (o OptFileInfoOKDataRelationships) Or(d FileInfoOKDataRelationships) FileInfoOKDataRelationships
- func (o *OptFileInfoOKDataRelationships) Reset()
- func (o *OptFileInfoOKDataRelationships) SetTo(v FileInfoOKDataRelationships)
- func (s *OptFileInfoOKDataRelationships) UnmarshalJSON(data []byte) error
- type OptURLInfoOKDataRelationships
- func (o *OptURLInfoOKDataRelationships) Decode(d *jx.Decoder) error
- func (o OptURLInfoOKDataRelationships) Encode(e *jx.Encoder)
- func (o OptURLInfoOKDataRelationships) Get() (v URLInfoOKDataRelationships, ok bool)
- func (o OptURLInfoOKDataRelationships) IsSet() bool
- func (s OptURLInfoOKDataRelationships) MarshalJSON() ([]byte, error)
- func (o OptURLInfoOKDataRelationships) Or(d URLInfoOKDataRelationships) URLInfoOKDataRelationships
- func (o *OptURLInfoOKDataRelationships) Reset()
- func (o *OptURLInfoOKDataRelationships) SetTo(v URLInfoOKDataRelationships)
- func (s *OptURLInfoOKDataRelationships) UnmarshalJSON(data []byte) error
- type Option
- type URLInfoBadRequest
- func (s *URLInfoBadRequest) Decode(d *jx.Decoder) error
- func (s URLInfoBadRequest) Encode(e *jx.Encoder)
- func (s URLInfoBadRequest) GetError() Error
- func (s URLInfoBadRequest) MarshalJSON() ([]byte, error)
- func (s *URLInfoBadRequest) SetError(val Error)
- func (s *URLInfoBadRequest) UnmarshalJSON(data []byte) error
- func (s URLInfoBadRequest) Validate() error
- type URLInfoOK
- func (s *URLInfoOK) Decode(d *jx.Decoder) error
- func (s URLInfoOK) Encode(e *jx.Encoder)
- func (s URLInfoOK) GetData() URLInfoOKData
- func (s URLInfoOK) MarshalJSON() ([]byte, error)
- func (s *URLInfoOK) SetData(val URLInfoOKData)
- func (s *URLInfoOK) UnmarshalJSON(data []byte) error
- func (s URLInfoOK) Validate() error
- type URLInfoOKData
- func (s *URLInfoOKData) Decode(d *jx.Decoder) error
- func (s URLInfoOKData) Encode(e *jx.Encoder)
- func (s URLInfoOKData) GetAttributes() URLObject
- func (s URLInfoOKData) GetID() string
- func (s URLInfoOKData) GetLinks() URLInfoOKDataLinks
- func (s URLInfoOKData) GetRelationships() OptURLInfoOKDataRelationships
- func (s URLInfoOKData) GetType() URLInfoOKDataType
- func (s URLInfoOKData) MarshalJSON() ([]byte, error)
- func (s *URLInfoOKData) SetAttributes(val URLObject)
- func (s *URLInfoOKData) SetID(val string)
- func (s *URLInfoOKData) SetLinks(val URLInfoOKDataLinks)
- func (s *URLInfoOKData) SetRelationships(val OptURLInfoOKDataRelationships)
- func (s *URLInfoOKData) SetType(val URLInfoOKDataType)
- func (s *URLInfoOKData) UnmarshalJSON(data []byte) error
- func (s URLInfoOKData) Validate() error
- type URLInfoOKDataLinks
- func (s *URLInfoOKDataLinks) Decode(d *jx.Decoder) error
- func (s URLInfoOKDataLinks) Encode(e *jx.Encoder)
- func (s URLInfoOKDataLinks) GetAdditionalProps() URLInfoOKDataLinksAdditional
- func (s URLInfoOKDataLinks) GetSelf() string
- func (s URLInfoOKDataLinks) MarshalJSON() ([]byte, error)
- func (s *URLInfoOKDataLinks) SetAdditionalProps(val URLInfoOKDataLinksAdditional)
- func (s *URLInfoOKDataLinks) SetSelf(val string)
- func (s *URLInfoOKDataLinks) UnmarshalJSON(data []byte) error
- type URLInfoOKDataLinksAdditional
- type URLInfoOKDataRelationships
- type URLInfoOKDataType
- type URLInfoParams
- type URLInfoRes
- type URLObject
- func (s *URLObject) Decode(d *jx.Decoder) error
- func (s URLObject) Encode(e *jx.Encoder)
- func (s URLObject) GetCategories() URLObjectCategories
- func (s URLObject) GetFavicon() URLObjectFavicon
- func (s URLObject) GetFirstSubmissionDate() int
- func (s URLObject) GetHTMLMeta() URLObjectHTMLMeta
- func (s URLObject) GetLastAnalysisDate() int
- func (s URLObject) GetLastAnalysisResults() URLObjectLastAnalysisResults
- func (s URLObject) GetLastAnalysisStats() URLObjectLastAnalysisStats
- func (s URLObject) GetLastFinalURL() string
- func (s URLObject) GetLastHTTPResponseCode() int
- func (s URLObject) GetLastHTTPResponseContentLength() int
- func (s URLObject) GetLastHTTPResponseContentSHA256() string
- func (s URLObject) GetLastHTTPResponseCookies() URLObjectLastHTTPResponseCookies
- func (s URLObject) GetLastHTTPResponseHeaders() URLObjectLastHTTPResponseHeaders
- func (s URLObject) GetLastModificationDate() int
- func (s URLObject) GetLastSubmissionDate() int
- func (s URLObject) GetOutgoingLinks() []string
- func (s URLObject) GetRedirectionChain() []string
- func (s URLObject) GetReputation() int
- func (s URLObject) GetTags() []string
- func (s URLObject) GetTargetedBrand() URLObjectTargetedBrand
- func (s URLObject) GetTimesSubmitted() int
- func (s URLObject) GetTitle() string
- func (s URLObject) GetTotalVotes() URLObjectTotalVotes
- func (s URLObject) GetTrackers() URLObjectTrackers
- func (s URLObject) GetURL() string
- func (s URLObject) MarshalJSON() ([]byte, error)
- func (s *URLObject) SetCategories(val URLObjectCategories)
- func (s *URLObject) SetFavicon(val URLObjectFavicon)
- func (s *URLObject) SetFirstSubmissionDate(val int)
- func (s *URLObject) SetHTMLMeta(val URLObjectHTMLMeta)
- func (s *URLObject) SetLastAnalysisDate(val int)
- func (s *URLObject) SetLastAnalysisResults(val URLObjectLastAnalysisResults)
- func (s *URLObject) SetLastAnalysisStats(val URLObjectLastAnalysisStats)
- func (s *URLObject) SetLastFinalURL(val string)
- func (s *URLObject) SetLastHTTPResponseCode(val int)
- func (s *URLObject) SetLastHTTPResponseContentLength(val int)
- func (s *URLObject) SetLastHTTPResponseContentSHA256(val string)
- func (s *URLObject) SetLastHTTPResponseCookies(val URLObjectLastHTTPResponseCookies)
- func (s *URLObject) SetLastHTTPResponseHeaders(val URLObjectLastHTTPResponseHeaders)
- func (s *URLObject) SetLastModificationDate(val int)
- func (s *URLObject) SetLastSubmissionDate(val int)
- func (s *URLObject) SetOutgoingLinks(val []string)
- func (s *URLObject) SetRedirectionChain(val []string)
- func (s *URLObject) SetReputation(val int)
- func (s *URLObject) SetTags(val []string)
- func (s *URLObject) SetTargetedBrand(val URLObjectTargetedBrand)
- func (s *URLObject) SetTimesSubmitted(val int)
- func (s *URLObject) SetTitle(val string)
- func (s *URLObject) SetTotalVotes(val URLObjectTotalVotes)
- func (s *URLObject) SetTrackers(val URLObjectTrackers)
- func (s *URLObject) SetURL(val string)
- func (s *URLObject) UnmarshalJSON(data []byte) error
- func (s URLObject) Validate() error
- type URLObjectCategories
- type URLObjectFavicon
- func (s *URLObjectFavicon) Decode(d *jx.Decoder) error
- func (s URLObjectFavicon) Encode(e *jx.Encoder)
- func (s URLObjectFavicon) GetDhash() string
- func (s URLObjectFavicon) GetRawMD5() string
- func (s URLObjectFavicon) MarshalJSON() ([]byte, error)
- func (s *URLObjectFavicon) SetDhash(val string)
- func (s *URLObjectFavicon) SetRawMD5(val string)
- func (s *URLObjectFavicon) UnmarshalJSON(data []byte) error
- type URLObjectHTMLMeta
- type URLObjectLastAnalysisResults
- func (s *URLObjectLastAnalysisResults) Decode(d *jx.Decoder) error
- func (s URLObjectLastAnalysisResults) Encode(e *jx.Encoder)
- func (s URLObjectLastAnalysisResults) GetCategory() URLObjectLastAnalysisResultsCategory
- func (s URLObjectLastAnalysisResults) GetEngineName() string
- func (s URLObjectLastAnalysisResults) GetMethod() string
- func (s URLObjectLastAnalysisResults) GetResult() string
- func (s URLObjectLastAnalysisResults) MarshalJSON() ([]byte, error)
- func (s *URLObjectLastAnalysisResults) SetCategory(val URLObjectLastAnalysisResultsCategory)
- func (s *URLObjectLastAnalysisResults) SetEngineName(val string)
- func (s *URLObjectLastAnalysisResults) SetMethod(val string)
- func (s *URLObjectLastAnalysisResults) SetResult(val string)
- func (s *URLObjectLastAnalysisResults) UnmarshalJSON(data []byte) error
- func (s URLObjectLastAnalysisResults) Validate() error
- type URLObjectLastAnalysisResultsCategory
- func (s *URLObjectLastAnalysisResultsCategory) Decode(d *jx.Decoder) error
- func (s URLObjectLastAnalysisResultsCategory) Encode(e *jx.Encoder)
- func (s URLObjectLastAnalysisResultsCategory) MarshalJSON() ([]byte, error)
- func (s *URLObjectLastAnalysisResultsCategory) UnmarshalJSON(data []byte) error
- func (s URLObjectLastAnalysisResultsCategory) Validate() error
- type URLObjectLastAnalysisStats
- func (s *URLObjectLastAnalysisStats) Decode(d *jx.Decoder) error
- func (s URLObjectLastAnalysisStats) Encode(e *jx.Encoder)
- func (s URLObjectLastAnalysisStats) GetHarmless() int
- func (s URLObjectLastAnalysisStats) GetMalicious() int
- func (s URLObjectLastAnalysisStats) GetSuspicious() int
- func (s URLObjectLastAnalysisStats) GetTimeout() int
- func (s URLObjectLastAnalysisStats) GetUndetected() int
- func (s URLObjectLastAnalysisStats) MarshalJSON() ([]byte, error)
- func (s *URLObjectLastAnalysisStats) SetHarmless(val int)
- func (s *URLObjectLastAnalysisStats) SetMalicious(val int)
- func (s *URLObjectLastAnalysisStats) SetSuspicious(val int)
- func (s *URLObjectLastAnalysisStats) SetTimeout(val int)
- func (s *URLObjectLastAnalysisStats) SetUndetected(val int)
- func (s *URLObjectLastAnalysisStats) UnmarshalJSON(data []byte) error
- type URLObjectLastHTTPResponseCookies
- type URLObjectLastHTTPResponseHeaders
- type URLObjectTargetedBrand
- type URLObjectTotalVotes
- func (s *URLObjectTotalVotes) Decode(d *jx.Decoder) error
- func (s URLObjectTotalVotes) Encode(e *jx.Encoder)
- func (s URLObjectTotalVotes) GetHarmless() int
- func (s URLObjectTotalVotes) GetMalicious() int
- func (s URLObjectTotalVotes) MarshalJSON() ([]byte, error)
- func (s *URLObjectTotalVotes) SetHarmless(val int)
- func (s *URLObjectTotalVotes) SetMalicious(val int)
- func (s *URLObjectTotalVotes) UnmarshalJSON(data []byte) error
- type URLObjectTrackers
- func (s *URLObjectTrackers) Decode(d *jx.Decoder) error
- func (s URLObjectTrackers) Encode(e *jx.Encoder)
- func (s URLObjectTrackers) GetID() string
- func (s URLObjectTrackers) GetTimestamp() int
- func (s URLObjectTrackers) GetURL() string
- func (s URLObjectTrackers) MarshalJSON() ([]byte, error)
- func (s *URLObjectTrackers) SetID(val string)
- func (s *URLObjectTrackers) SetTimestamp(val int)
- func (s *URLObjectTrackers) SetURL(val string)
- func (s *URLObjectTrackers) UnmarshalJSON(data []byte) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
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) GetMessage ¶
GetMessage returns the value of Message.
func (Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) SetMessage ¶
SetMessage sets the value of Message.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*ErrorCode) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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) GetLinks ¶
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 (*FileInfoOKData) SetLinks ¶
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 ¶
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 ¶
func (*FileInfoOKDataLinksAdditional) Decode ¶
func (s *FileInfoOKDataLinksAdditional) Decode(d *jx.Decoder) error
Decode decodes FileInfoOKDataLinksAdditional from json.
func (FileInfoOKDataLinksAdditional) Encode ¶
func (s FileInfoOKDataLinksAdditional) Encode(e *jx.Encoder)
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 ¶
func (*FileInfoOKDataRelationships) Decode ¶
func (s *FileInfoOKDataRelationships) Decode(d *jx.Decoder) error
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) 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) 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) 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) 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) 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 ¶
Latest scan results. For more information about its format, check the [Analysis](#analyses-object) object `results` attribute.
func (*FileObjectLastAnalysisResults) Decode ¶
func (s *FileObjectLastAnalysisResults) Decode(d *jx.Decoder) error
Decode decodes FileObjectLastAnalysisResults from json.
func (FileObjectLastAnalysisResults) Encode ¶
func (s FileObjectLastAnalysisResults) Encode(e *jx.Encoder)
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 ¶
A summary of the latest scan results. For more information about its format, check the [Analysis](#analyses-object) object `stats` attribute.
func (*FileObjectLastAnalysisStats) Decode ¶
func (s *FileObjectLastAnalysisStats) Decode(d *jx.Decoder) error
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 ¶
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 ¶
func (s *FileObjectSigmaAnalysisSummary) Decode(d *jx.Decoder) error
Decode decodes FileObjectSigmaAnalysisSummary from json.
func (FileObjectSigmaAnalysisSummary) Encode ¶
func (s FileObjectSigmaAnalysisSummary) Encode(e *jx.Encoder)
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 ¶
func (o *OptFileInfoOKDataRelationships) Decode(d *jx.Decoder) error
Decode decodes FileInfoOKDataRelationships from json.
func (OptFileInfoOKDataRelationships) Encode ¶
func (o OptFileInfoOKDataRelationships) Encode(e *jx.Encoder)
Encode encodes FileInfoOKDataRelationships as json.
func (OptFileInfoOKDataRelationships) Get ¶
func (o OptFileInfoOKDataRelationships) Get() (v FileInfoOKDataRelationships, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptFileInfoOKDataRelationships) IsSet ¶
func (o OptFileInfoOKDataRelationships) IsSet() bool
IsSet returns true if OptFileInfoOKDataRelationships was set.
func (OptFileInfoOKDataRelationships) MarshalJSON ¶
func (s OptFileInfoOKDataRelationships) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (OptFileInfoOKDataRelationships) Or ¶
func (o OptFileInfoOKDataRelationships) Or(d FileInfoOKDataRelationships) FileInfoOKDataRelationships
Or returns value if set, or given parameter if does not.
func (*OptFileInfoOKDataRelationships) Reset ¶
func (o *OptFileInfoOKDataRelationships) Reset()
Reset unsets value.
func (*OptFileInfoOKDataRelationships) SetTo ¶
func (o *OptFileInfoOKDataRelationships) SetTo(v FileInfoOKDataRelationships)
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 ¶
func (o *OptURLInfoOKDataRelationships) Decode(d *jx.Decoder) error
Decode decodes URLInfoOKDataRelationships from json.
func (OptURLInfoOKDataRelationships) Encode ¶
func (o OptURLInfoOKDataRelationships) Encode(e *jx.Encoder)
Encode encodes URLInfoOKDataRelationships as json.
func (OptURLInfoOKDataRelationships) Get ¶
func (o OptURLInfoOKDataRelationships) Get() (v URLInfoOKDataRelationships, ok bool)
Get returns value and boolean that denotes whether value was set.
func (OptURLInfoOKDataRelationships) IsSet ¶
func (o OptURLInfoOKDataRelationships) IsSet() bool
IsSet returns true if OptURLInfoOKDataRelationships was set.
func (OptURLInfoOKDataRelationships) MarshalJSON ¶
func (s OptURLInfoOKDataRelationships) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*OptURLInfoOKDataRelationships) Reset ¶
func (o *OptURLInfoOKDataRelationships) Reset()
Reset unsets value.
func (*OptURLInfoOKDataRelationships) SetTo ¶
func (o *OptURLInfoOKDataRelationships) SetTo(v URLInfoOKDataRelationships)
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 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) GetData ¶
func (s URLInfoOK) GetData() URLInfoOKData
GetData returns the value of Data.
func (URLInfoOK) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*URLInfoOK) SetData ¶
func (s *URLInfoOK) SetData(val URLInfoOKData)
SetData sets the value of Data.
func (*URLInfoOK) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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) GetLinks ¶
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) SetLinks ¶
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 ¶
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 ¶
func (*URLInfoOKDataLinksAdditional) Decode ¶
func (s *URLInfoOKDataLinksAdditional) Decode(d *jx.Decoder) error
Decode decodes URLInfoOKDataLinksAdditional from json.
func (URLInfoOKDataLinksAdditional) Encode ¶
func (s URLInfoOKDataLinksAdditional) Encode(e *jx.Encoder)
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 ¶
func (*URLInfoOKDataRelationships) Decode ¶
func (s *URLInfoOKDataRelationships) Decode(d *jx.Decoder) error
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) 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 ¶
GetFirstSubmissionDate returns the value of FirstSubmissionDate.
func (URLObject) GetHTMLMeta ¶
func (s URLObject) GetHTMLMeta() URLObjectHTMLMeta
GetHTMLMeta returns the value of HTMLMeta.
func (URLObject) GetLastAnalysisDate ¶
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 ¶
GetLastFinalURL returns the value of LastFinalURL.
func (URLObject) GetLastHTTPResponseCode ¶
GetLastHTTPResponseCode returns the value of LastHTTPResponseCode.
func (URLObject) GetLastHTTPResponseContentLength ¶
GetLastHTTPResponseContentLength returns the value of LastHTTPResponseContentLength.
func (URLObject) GetLastHTTPResponseContentSHA256 ¶
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 ¶
GetLastModificationDate returns the value of LastModificationDate.
func (URLObject) GetLastSubmissionDate ¶
GetLastSubmissionDate returns the value of LastSubmissionDate.
func (URLObject) GetOutgoingLinks ¶
GetOutgoingLinks returns the value of OutgoingLinks.
func (URLObject) GetRedirectionChain ¶
GetRedirectionChain returns the value of RedirectionChain.
func (URLObject) GetReputation ¶
GetReputation returns the value of Reputation.
func (URLObject) GetTargetedBrand ¶
func (s URLObject) GetTargetedBrand() URLObjectTargetedBrand
GetTargetedBrand returns the value of TargetedBrand.
func (URLObject) GetTimesSubmitted ¶
GetTimesSubmitted returns the value of TimesSubmitted.
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) MarshalJSON ¶
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 ¶
SetFirstSubmissionDate sets the value of FirstSubmissionDate.
func (*URLObject) SetHTMLMeta ¶
func (s *URLObject) SetHTMLMeta(val URLObjectHTMLMeta)
SetHTMLMeta sets the value of HTMLMeta.
func (*URLObject) SetLastAnalysisDate ¶
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 ¶
SetLastFinalURL sets the value of LastFinalURL.
func (*URLObject) SetLastHTTPResponseCode ¶
SetLastHTTPResponseCode sets the value of LastHTTPResponseCode.
func (*URLObject) SetLastHTTPResponseContentLength ¶
SetLastHTTPResponseContentLength sets the value of LastHTTPResponseContentLength.
func (*URLObject) SetLastHTTPResponseContentSHA256 ¶
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 ¶
SetLastModificationDate sets the value of LastModificationDate.
func (*URLObject) SetLastSubmissionDate ¶
SetLastSubmissionDate sets the value of LastSubmissionDate.
func (*URLObject) SetOutgoingLinks ¶
SetOutgoingLinks sets the value of OutgoingLinks.
func (*URLObject) SetRedirectionChain ¶
SetRedirectionChain sets the value of RedirectionChain.
func (*URLObject) SetReputation ¶
SetReputation sets the value of Reputation.
func (*URLObject) SetTargetedBrand ¶
func (s *URLObject) SetTargetedBrand(val URLObjectTargetedBrand)
SetTargetedBrand sets the value of TargetedBrand.
func (*URLObject) SetTimesSubmitted ¶
SetTimesSubmitted sets the value of TimesSubmitted.
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) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type URLObjectCategories ¶
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 ¶
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 ¶
func (s *URLObjectLastAnalysisResults) Decode(d *jx.Decoder) error
Decode decodes URLObjectLastAnalysisResults from json.
func (URLObjectLastAnalysisResults) Encode ¶
func (s URLObjectLastAnalysisResults) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (URLObjectLastAnalysisResults) GetCategory ¶
func (s URLObjectLastAnalysisResults) GetCategory() URLObjectLastAnalysisResultsCategory
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 ¶
func (s *URLObjectLastAnalysisResults) SetCategory(val URLObjectLastAnalysisResultsCategory)
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 ¶
func (s *URLObjectLastAnalysisResultsCategory) Decode(d *jx.Decoder) error
Decode decodes URLObjectLastAnalysisResultsCategory from json.
func (URLObjectLastAnalysisResultsCategory) Encode ¶
func (s URLObjectLastAnalysisResultsCategory) Encode(e *jx.Encoder)
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 ¶
func (s URLObjectLastAnalysisResultsCategory) Validate() error
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 ¶
func (s *URLObjectLastAnalysisStats) Decode(d *jx.Decoder) error
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 ¶
Containing the website's cookies.
func (*URLObjectLastHTTPResponseCookies) Decode ¶
func (s *URLObjectLastHTTPResponseCookies) Decode(d *jx.Decoder) error
Decode decodes URLObjectLastHTTPResponseCookies from json.
func (URLObjectLastHTTPResponseCookies) Encode ¶
func (s URLObjectLastHTTPResponseCookies) Encode(e *jx.Encoder)
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 ¶
Containing headers and values of last HTTP response.
func (*URLObjectLastHTTPResponseHeaders) Decode ¶
func (s *URLObjectLastHTTPResponseHeaders) Decode(d *jx.Decoder) error
Decode decodes URLObjectLastHTTPResponseHeaders from json.
func (URLObjectLastHTTPResponseHeaders) Encode ¶
func (s URLObjectLastHTTPResponseHeaders) Encode(e *jx.Encoder)
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 ¶
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.