safebrowsing_proto

package
v0.0.0-...-98addd5 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2017 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package safebrowsing_proto is a generated protocol buffer package.

It is generated from these files:

safebrowsing.proto

It has these top-level messages:

ThreatInfo
ThreatMatch
FindThreatMatchesRequest
FindThreatMatchesResponse
FetchThreatListUpdatesRequest
FetchThreatListUpdatesResponse
FindFullHashesRequest
FindFullHashesResponse
ClientInfo
Checksum
ThreatEntry
ThreatEntrySet
RawIndices
RawHashes
RiceDeltaEncoding
ThreatEntryMetadata
ThreatListDescriptor
ListThreatListsResponse
Duration

Index

Constants

This section is empty.

Variables

View Source
var CompressionType_name = map[int32]string{
	0: "COMPRESSION_TYPE_UNSPECIFIED",
	1: "RAW",
	2: "RICE",
}
View Source
var CompressionType_value = map[string]int32{
	"COMPRESSION_TYPE_UNSPECIFIED": 0,
	"RAW":                          1,
	"RICE":                         2,
}
View Source
var FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_name = map[int32]string{
	0: "RESPONSE_TYPE_UNSPECIFIED",
	1: "PARTIAL_UPDATE",
	2: "FULL_UPDATE",
}
View Source
var FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType_value = map[string]int32{
	"RESPONSE_TYPE_UNSPECIFIED": 0,
	"PARTIAL_UPDATE":            1,
	"FULL_UPDATE":               2,
}
View Source
var PlatformType_name = map[int32]string{
	0: "PLATFORM_TYPE_UNSPECIFIED",
	1: "WINDOWS",
	2: "LINUX",
	3: "ANDROID",
	4: "OSX",
	5: "IOS",
	6: "ANY_PLATFORM",
	7: "ALL_PLATFORMS",
	8: "CHROME",
}
View Source
var PlatformType_value = map[string]int32{
	"PLATFORM_TYPE_UNSPECIFIED": 0,
	"WINDOWS":                   1,
	"LINUX":                     2,
	"ANDROID":                   3,
	"OSX":                       4,
	"IOS":                       5,
	"ANY_PLATFORM":              6,
	"ALL_PLATFORMS":             7,
	"CHROME":                    8,
}
View Source
var ThreatEntryType_name = map[int32]string{
	0: "THREAT_ENTRY_TYPE_UNSPECIFIED",
	1: "URL",
	2: "EXECUTABLE",
	3: "IP_RANGE",
}
View Source
var ThreatEntryType_value = map[string]int32{
	"THREAT_ENTRY_TYPE_UNSPECIFIED": 0,
	"URL":                           1,
	"EXECUTABLE":                    2,
	"IP_RANGE":                      3,
}
View Source
var ThreatType_name = map[int32]string{
	0: "THREAT_TYPE_UNSPECIFIED",
	1: "MALWARE",
	2: "SOCIAL_ENGINEERING",
	3: "UNWANTED_SOFTWARE",
	4: "POTENTIALLY_HARMFUL_APPLICATION",
}
View Source
var ThreatType_value = map[string]int32{
	"THREAT_TYPE_UNSPECIFIED":         0,
	"MALWARE":                         1,
	"SOCIAL_ENGINEERING":              2,
	"UNWANTED_SOFTWARE":               3,
	"POTENTIALLY_HARMFUL_APPLICATION": 4,
}

Functions

This section is empty.

Types

type Checksum

type Checksum struct {
	// The SHA256 hash of the client state; that is, of the sorted list of all
	// hashes present in the database.
	Sha256 []byte `protobuf:"bytes,1,opt,name=sha256,proto3" json:"sha256,omitempty"`
}

The expected state of a client's local database.

func (*Checksum) Descriptor

func (*Checksum) Descriptor() ([]byte, []int)

func (*Checksum) ProtoMessage

func (*Checksum) ProtoMessage()

func (*Checksum) Reset

func (m *Checksum) Reset()

func (*Checksum) String

func (m *Checksum) String() string

type ClientInfo

type ClientInfo struct {
	// A client ID that (hopefully) uniquely identifies the client implementation
	// of the Safe Browsing API.
	ClientId string `protobuf:"bytes,1,opt,name=client_id,json=clientId" json:"client_id,omitempty"`
	// The version of the client implementation.
	ClientVersion string `protobuf:"bytes,2,opt,name=client_version,json=clientVersion" json:"client_version,omitempty"`
}

The client metadata associated with Safe Browsing API requests.

func (*ClientInfo) Descriptor

func (*ClientInfo) Descriptor() ([]byte, []int)

func (*ClientInfo) ProtoMessage

func (*ClientInfo) ProtoMessage()

func (*ClientInfo) Reset

func (m *ClientInfo) Reset()

func (*ClientInfo) String

func (m *ClientInfo) String() string

type CompressionType

type CompressionType int32

The ways in which threat entry sets can be compressed.

const (
	// Unknown.
	CompressionType_COMPRESSION_TYPE_UNSPECIFIED CompressionType = 0
	// Raw, uncompressed data.
	CompressionType_RAW CompressionType = 1
	// Rice-Golomb encoded data.
	CompressionType_RICE CompressionType = 2
)

func (CompressionType) EnumDescriptor

func (CompressionType) EnumDescriptor() ([]byte, []int)

func (CompressionType) String

func (x CompressionType) String() string

type Duration

type Duration struct {
	// Signed seconds of the span of time. Must be from -315,576,000,000
	// to +315,576,000,000 inclusive.
	Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
	// Signed fractions of a second at nanosecond resolution of the span
	// of time. Durations less than one second are represented with a 0
	// `seconds` field and a positive or negative `nanos` field. For durations
	// of one second or more, a non-zero value for the `nanos` field must be
	// of the same sign as the `seconds` field. Must be from -999,999,999
	// to +999,999,999 inclusive.
	Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
}

A Duration represents a signed, fixed-length span of time represented as a count of seconds and fractions of seconds at nanosecond resolution. It is independent of any calendar and concepts like "day" or "month". It is related to Timestamp in that the difference between two Timestamp values is a Duration and it can be added or subtracted from a Timestamp. Range is approximately +-10,000 years.

func (*Duration) Descriptor

func (*Duration) Descriptor() ([]byte, []int)

func (*Duration) ProtoMessage

func (*Duration) ProtoMessage()

func (*Duration) Reset

func (m *Duration) Reset()

func (*Duration) String

func (m *Duration) String() string

type FetchThreatListUpdatesRequest

type FetchThreatListUpdatesRequest struct {
	// The client metadata.
	Client *ClientInfo `protobuf:"bytes,1,opt,name=client" json:"client,omitempty"`
	// The requested threat list updates.
	ListUpdateRequests []*FetchThreatListUpdatesRequest_ListUpdateRequest `protobuf:"bytes,3,rep,name=list_update_requests,json=listUpdateRequests" json:"list_update_requests,omitempty"`
}

Describes a Safe Browsing API update request. Clients can request updates for multiple lists in a single request. NOTE: Field index 2 is unused.

func (*FetchThreatListUpdatesRequest) Descriptor

func (*FetchThreatListUpdatesRequest) Descriptor() ([]byte, []int)

func (*FetchThreatListUpdatesRequest) GetClient

func (m *FetchThreatListUpdatesRequest) GetClient() *ClientInfo

func (*FetchThreatListUpdatesRequest) GetListUpdateRequests

func (*FetchThreatListUpdatesRequest) ProtoMessage

func (*FetchThreatListUpdatesRequest) ProtoMessage()

func (*FetchThreatListUpdatesRequest) Reset

func (m *FetchThreatListUpdatesRequest) Reset()

func (*FetchThreatListUpdatesRequest) String

type FetchThreatListUpdatesRequest_ListUpdateRequest

type FetchThreatListUpdatesRequest_ListUpdateRequest struct {
	// The type of threat posed by entries present in the list.
	ThreatType ThreatType `protobuf:"varint,1,opt,name=threat_type,json=threatType,enum=safebrowsing_proto.ThreatType" json:"threat_type,omitempty"`
	// The type of platform at risk by entries present in the list.
	PlatformType PlatformType `` /* 128-byte string literal not displayed */
	// The types of entries present in the list.
	ThreatEntryType ThreatEntryType `` /* 142-byte string literal not displayed */
	// The current state of the client for the requested list (the encrypted
	// ClientState that was sent to the client from the previous update
	// request).
	State []byte `protobuf:"bytes,3,opt,name=state,proto3" json:"state,omitempty"`
	// The constraints associated with this request.
	Constraints *FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints `protobuf:"bytes,4,opt,name=constraints" json:"constraints,omitempty"`
}

A single list update request.

func (*FetchThreatListUpdatesRequest_ListUpdateRequest) Descriptor

func (*FetchThreatListUpdatesRequest_ListUpdateRequest) GetConstraints

func (*FetchThreatListUpdatesRequest_ListUpdateRequest) ProtoMessage

func (*FetchThreatListUpdatesRequest_ListUpdateRequest) Reset

func (*FetchThreatListUpdatesRequest_ListUpdateRequest) String

type FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints

type FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints struct {
	// The maximum size in number of entries. The update will not contain more
	// entries than this value.  This should be a power of 2 between 2**10 and
	// 2**20.  If zero, no update size limit is set.
	MaxUpdateEntries int32 `protobuf:"varint,1,opt,name=max_update_entries,json=maxUpdateEntries" json:"max_update_entries,omitempty"`
	// Sets the maximum number of entries that the client is willing to have
	// in the local database. This should be a power of 2 between 2**10 and
	// 2**20. If zero, no database size limit is set.
	MaxDatabaseEntries int32 `protobuf:"varint,2,opt,name=max_database_entries,json=maxDatabaseEntries" json:"max_database_entries,omitempty"`
	// Requests the list for a specific geographic location. If not set the
	// server may pick that value based on the user's IP address. Expects ISO
	// 3166-1 alpha-2 format.
	Region string `protobuf:"bytes,3,opt,name=region" json:"region,omitempty"`
	// The compression types supported by the client.
	SupportedCompressions []CompressionType `` /* 158-byte string literal not displayed */
}

The constraints for this update.

func (*FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints) Descriptor

func (*FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints) ProtoMessage

func (*FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints) Reset

func (*FetchThreatListUpdatesRequest_ListUpdateRequest_Constraints) String

type FetchThreatListUpdatesResponse

type FetchThreatListUpdatesResponse struct {
	// The list updates requested by the clients.
	ListUpdateResponses []*FetchThreatListUpdatesResponse_ListUpdateResponse `protobuf:"bytes,1,rep,name=list_update_responses,json=listUpdateResponses" json:"list_update_responses,omitempty"`
	// The minimum duration the client must wait before issuing any update
	// request. If this field is not set clients may update as soon as they want.
	MinimumWaitDuration *Duration `protobuf:"bytes,2,opt,name=minimum_wait_duration,json=minimumWaitDuration" json:"minimum_wait_duration,omitempty"`
}

Response type for threat list update requests.

func (*FetchThreatListUpdatesResponse) Descriptor

func (*FetchThreatListUpdatesResponse) Descriptor() ([]byte, []int)

func (*FetchThreatListUpdatesResponse) GetListUpdateResponses

func (*FetchThreatListUpdatesResponse) GetMinimumWaitDuration

func (m *FetchThreatListUpdatesResponse) GetMinimumWaitDuration() *Duration

func (*FetchThreatListUpdatesResponse) ProtoMessage

func (*FetchThreatListUpdatesResponse) ProtoMessage()

func (*FetchThreatListUpdatesResponse) Reset

func (m *FetchThreatListUpdatesResponse) Reset()

func (*FetchThreatListUpdatesResponse) String

type FetchThreatListUpdatesResponse_ListUpdateResponse

type FetchThreatListUpdatesResponse_ListUpdateResponse struct {
	// The threat type for which data is returned.
	ThreatType ThreatType `protobuf:"varint,1,opt,name=threat_type,json=threatType,enum=safebrowsing_proto.ThreatType" json:"threat_type,omitempty"`
	// The format of the threats.
	ThreatEntryType ThreatEntryType `` /* 142-byte string literal not displayed */
	// The platform type for which data is returned.
	PlatformType PlatformType `` /* 128-byte string literal not displayed */
	// The type of response. This may indicate that an action is required by the
	// client when the response is received.
	ResponseType FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType `` /* 178-byte string literal not displayed */
	// A set of entries to add to a local threat type's list. Repeated to allow
	// for a combination of compressed and raw data to be sent in a single
	// response.
	Additions []*ThreatEntrySet `protobuf:"bytes,5,rep,name=additions" json:"additions,omitempty"`
	// A set of entries to remove from a local threat type's list. Repeated for
	// the same reason as above.
	Removals []*ThreatEntrySet `protobuf:"bytes,6,rep,name=removals" json:"removals,omitempty"`
	// The new client state, in encrypted format. Opaque to clients.
	NewClientState []byte `protobuf:"bytes,7,opt,name=new_client_state,json=newClientState,proto3" json:"new_client_state,omitempty"`
	// The expected SHA256 hash of the client state; that is, of the sorted list
	// of all hashes present in the database after applying the provided update.
	// If the client state doesn't match the expected state, the client must
	// disregard this update and retry later.
	Checksum *Checksum `protobuf:"bytes,8,opt,name=checksum" json:"checksum,omitempty"`
}

An update to an individual list.

func (*FetchThreatListUpdatesResponse_ListUpdateResponse) Descriptor

func (*FetchThreatListUpdatesResponse_ListUpdateResponse) GetAdditions

func (*FetchThreatListUpdatesResponse_ListUpdateResponse) GetChecksum

func (*FetchThreatListUpdatesResponse_ListUpdateResponse) GetRemovals

func (*FetchThreatListUpdatesResponse_ListUpdateResponse) ProtoMessage

func (*FetchThreatListUpdatesResponse_ListUpdateResponse) Reset

func (*FetchThreatListUpdatesResponse_ListUpdateResponse) String

type FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType

type FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType int32

The type of response sent to the client.

const (
	// Unknown.
	FetchThreatListUpdatesResponse_ListUpdateResponse_RESPONSE_TYPE_UNSPECIFIED FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType = 0
	// Partial updates are applied to the client's existing local database.
	FetchThreatListUpdatesResponse_ListUpdateResponse_PARTIAL_UPDATE FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType = 1
	// Full updates replace the client's entire local database. This means
	// that either the client was seriously out-of-date or the client is
	// believed to be corrupt.
	FetchThreatListUpdatesResponse_ListUpdateResponse_FULL_UPDATE FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType = 2
)

func (FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType) EnumDescriptor

func (FetchThreatListUpdatesResponse_ListUpdateResponse_ResponseType) String

type FindFullHashesRequest

type FindFullHashesRequest struct {
	// The client metadata.
	Client *ClientInfo `protobuf:"bytes,1,opt,name=client" json:"client,omitempty"`
	// The current client states for each of the client's local threat lists.
	ClientStates [][]byte `protobuf:"bytes,2,rep,name=client_states,json=clientStates,proto3" json:"client_states,omitempty"`
	// The lists and hashes to be checked.
	ThreatInfo *ThreatInfo `protobuf:"bytes,3,opt,name=threat_info,json=threatInfo" json:"threat_info,omitempty"`
}

Request to return full hashes matched by the provided hash prefixes.

func (*FindFullHashesRequest) Descriptor

func (*FindFullHashesRequest) Descriptor() ([]byte, []int)

func (*FindFullHashesRequest) GetClient

func (m *FindFullHashesRequest) GetClient() *ClientInfo

func (*FindFullHashesRequest) GetThreatInfo

func (m *FindFullHashesRequest) GetThreatInfo() *ThreatInfo

func (*FindFullHashesRequest) ProtoMessage

func (*FindFullHashesRequest) ProtoMessage()

func (*FindFullHashesRequest) Reset

func (m *FindFullHashesRequest) Reset()

func (*FindFullHashesRequest) String

func (m *FindFullHashesRequest) String() string

type FindFullHashesResponse

type FindFullHashesResponse struct {
	// The full hashes that matched the requested prefixes.
	Matches []*ThreatMatch `protobuf:"bytes,1,rep,name=matches" json:"matches,omitempty"`
	// The minimum duration the client must wait before issuing any find hashes
	// request. If this field is not set, clients can issue a request as soon as
	// they want.
	MinimumWaitDuration *Duration `protobuf:"bytes,2,opt,name=minimum_wait_duration,json=minimumWaitDuration" json:"minimum_wait_duration,omitempty"`
	// For requested entities that did not match the threat list, how long to
	// cache the response.
	NegativeCacheDuration *Duration `protobuf:"bytes,3,opt,name=negative_cache_duration,json=negativeCacheDuration" json:"negative_cache_duration,omitempty"`
}

Response type for requests to find full hashes.

func (*FindFullHashesResponse) Descriptor

func (*FindFullHashesResponse) Descriptor() ([]byte, []int)

func (*FindFullHashesResponse) GetMatches

func (m *FindFullHashesResponse) GetMatches() []*ThreatMatch

func (*FindFullHashesResponse) GetMinimumWaitDuration

func (m *FindFullHashesResponse) GetMinimumWaitDuration() *Duration

func (*FindFullHashesResponse) GetNegativeCacheDuration

func (m *FindFullHashesResponse) GetNegativeCacheDuration() *Duration

func (*FindFullHashesResponse) ProtoMessage

func (*FindFullHashesResponse) ProtoMessage()

func (*FindFullHashesResponse) Reset

func (m *FindFullHashesResponse) Reset()

func (*FindFullHashesResponse) String

func (m *FindFullHashesResponse) String() string

type FindThreatMatchesRequest

type FindThreatMatchesRequest struct {
	// The client metadata.
	Client *ClientInfo `protobuf:"bytes,1,opt,name=client" json:"client,omitempty"`
	// The lists and entries to be checked for matches.
	ThreatInfo *ThreatInfo `protobuf:"bytes,2,opt,name=threat_info,json=threatInfo" json:"threat_info,omitempty"`
}

Request to check entries against lists.

func (*FindThreatMatchesRequest) Descriptor

func (*FindThreatMatchesRequest) Descriptor() ([]byte, []int)

func (*FindThreatMatchesRequest) GetClient

func (m *FindThreatMatchesRequest) GetClient() *ClientInfo

func (*FindThreatMatchesRequest) GetThreatInfo

func (m *FindThreatMatchesRequest) GetThreatInfo() *ThreatInfo

func (*FindThreatMatchesRequest) ProtoMessage

func (*FindThreatMatchesRequest) ProtoMessage()

func (*FindThreatMatchesRequest) Reset

func (m *FindThreatMatchesRequest) Reset()

func (*FindThreatMatchesRequest) String

func (m *FindThreatMatchesRequest) String() string

type FindThreatMatchesResponse

type FindThreatMatchesResponse struct {
	// The threat list matches.
	Matches []*ThreatMatch `protobuf:"bytes,1,rep,name=matches" json:"matches,omitempty"`
}

Response type for requests to find threat matches.

func (*FindThreatMatchesResponse) Descriptor

func (*FindThreatMatchesResponse) Descriptor() ([]byte, []int)

func (*FindThreatMatchesResponse) GetMatches

func (m *FindThreatMatchesResponse) GetMatches() []*ThreatMatch

func (*FindThreatMatchesResponse) ProtoMessage

func (*FindThreatMatchesResponse) ProtoMessage()

func (*FindThreatMatchesResponse) Reset

func (m *FindThreatMatchesResponse) Reset()

func (*FindThreatMatchesResponse) String

func (m *FindThreatMatchesResponse) String() string

type ListThreatListsResponse

type ListThreatListsResponse struct {
	// The lists available for download by the client.
	ThreatLists []*ThreatListDescriptor `protobuf:"bytes,1,rep,name=threat_lists,json=threatLists" json:"threat_lists,omitempty"`
}

A collection of lists available for download by the client.

func (*ListThreatListsResponse) Descriptor

func (*ListThreatListsResponse) Descriptor() ([]byte, []int)

func (*ListThreatListsResponse) GetThreatLists

func (m *ListThreatListsResponse) GetThreatLists() []*ThreatListDescriptor

func (*ListThreatListsResponse) ProtoMessage

func (*ListThreatListsResponse) ProtoMessage()

func (*ListThreatListsResponse) Reset

func (m *ListThreatListsResponse) Reset()

func (*ListThreatListsResponse) String

func (m *ListThreatListsResponse) String() string

type PlatformType

type PlatformType int32

Types of platforms.

const (
	// Unknown platform.
	PlatformType_PLATFORM_TYPE_UNSPECIFIED PlatformType = 0
	// Threat posed to Windows.
	PlatformType_WINDOWS PlatformType = 1
	// Threat posed to Linux.
	PlatformType_LINUX PlatformType = 2
	// Threat posed to Android.
	PlatformType_ANDROID PlatformType = 3
	// Threat posed to OSX.
	PlatformType_OSX PlatformType = 4
	// Threat posed to iOS.
	PlatformType_IOS PlatformType = 5
	// Threat posed to at least one of the defined platforms.
	PlatformType_ANY_PLATFORM PlatformType = 6
	// Threat posed to all defined platforms.
	PlatformType_ALL_PLATFORMS PlatformType = 7
	// Threat posed to Chrome.
	PlatformType_CHROME PlatformType = 8
)

func (PlatformType) EnumDescriptor

func (PlatformType) EnumDescriptor() ([]byte, []int)

func (PlatformType) String

func (x PlatformType) String() string

type RawHashes

type RawHashes struct {
	// The number of bytes for each prefix encoded below.  This field can be
	// anywhere from 4 (shortest prefix) to 32 (full SHA256 hash).
	PrefixSize int32 `protobuf:"varint,1,opt,name=prefix_size,json=prefixSize" json:"prefix_size,omitempty"`
	// The hashes, all concatenated into one long string.  Each hash has a prefix
	// size of |prefix_size| above. Hashes are sorted in lexicographic order.
	RawHashes []byte `protobuf:"bytes,2,opt,name=raw_hashes,json=rawHashes,proto3" json:"raw_hashes,omitempty"`
}

The uncompressed threat entries in hash format of a particular prefix length. Hashes can be anywhere from 4 to 32 bytes in size. A large majority are 4 bytes, but some hashes are lengthened if they collide with the hash of a popular URL.

Used for sending ThreatEntrySet to clients that do not support compression, or when sending non-4-byte hashes to clients that do support compression.

func (*RawHashes) Descriptor

func (*RawHashes) Descriptor() ([]byte, []int)

func (*RawHashes) ProtoMessage

func (*RawHashes) ProtoMessage()

func (*RawHashes) Reset

func (m *RawHashes) Reset()

func (*RawHashes) String

func (m *RawHashes) String() string

type RawIndices

type RawIndices struct {
	// The indices to remove from a lexicographically-sorted local list.
	Indices []int32 `protobuf:"varint,1,rep,name=indices" json:"indices,omitempty"`
}

A set of raw indices to remove from a local list.

func (*RawIndices) Descriptor

func (*RawIndices) Descriptor() ([]byte, []int)

func (*RawIndices) ProtoMessage

func (*RawIndices) ProtoMessage()

func (*RawIndices) Reset

func (m *RawIndices) Reset()

func (*RawIndices) String

func (m *RawIndices) String() string

type RiceDeltaEncoding

type RiceDeltaEncoding struct {
	// The offset of the first entry in the encoded data, or, if only a single
	// integer was encoded, that single integer's value.
	FirstValue int64 `protobuf:"varint,1,opt,name=first_value,json=firstValue" json:"first_value,omitempty"`
	// The Golomb-Rice parameter which is a number between 2 and 28. This field
	// is missing (that is, zero) if num_entries is zero.
	RiceParameter int32 `protobuf:"varint,2,opt,name=rice_parameter,json=riceParameter" json:"rice_parameter,omitempty"`
	// The number of entries that are delta encoded in the encoded data. If only a
	// single integer was encoded, this will be zero and the single value will be
	// stored in first_value.
	NumEntries int32 `protobuf:"varint,3,opt,name=num_entries,json=numEntries" json:"num_entries,omitempty"`
	// The encoded deltas that are encoded using the Golomb-Rice coder.
	EncodedData []byte `protobuf:"bytes,4,opt,name=encoded_data,json=encodedData,proto3" json:"encoded_data,omitempty"`
}

The Rice-Golomb encoded data. Used for sending compressed 4-byte hashes or compressed removal indices.

func (*RiceDeltaEncoding) Descriptor

func (*RiceDeltaEncoding) Descriptor() ([]byte, []int)

func (*RiceDeltaEncoding) ProtoMessage

func (*RiceDeltaEncoding) ProtoMessage()

func (*RiceDeltaEncoding) Reset

func (m *RiceDeltaEncoding) Reset()

func (*RiceDeltaEncoding) String

func (m *RiceDeltaEncoding) String() string

type ThreatEntry

type ThreatEntry struct {
	// A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
	// hash.
	Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
	// A URL.
	Url string `protobuf:"bytes,2,opt,name=url" json:"url,omitempty"`
}

An individual threat; for example, a malicious URL or its hash representation. Only one of these fields should be set.

func (*ThreatEntry) Descriptor

func (*ThreatEntry) Descriptor() ([]byte, []int)

func (*ThreatEntry) ProtoMessage

func (*ThreatEntry) ProtoMessage()

func (*ThreatEntry) Reset

func (m *ThreatEntry) Reset()

func (*ThreatEntry) String

func (m *ThreatEntry) String() string

type ThreatEntryMetadata

type ThreatEntryMetadata struct {
	// The metadata entries.
	Entries []*ThreatEntryMetadata_MetadataEntry `protobuf:"bytes,1,rep,name=entries" json:"entries,omitempty"`
}

The metadata associated with a specific threat entry. The client is expected to know the metadata key/value pairs associated with each threat type.

func (*ThreatEntryMetadata) Descriptor

func (*ThreatEntryMetadata) Descriptor() ([]byte, []int)

func (*ThreatEntryMetadata) GetEntries

func (*ThreatEntryMetadata) ProtoMessage

func (*ThreatEntryMetadata) ProtoMessage()

func (*ThreatEntryMetadata) Reset

func (m *ThreatEntryMetadata) Reset()

func (*ThreatEntryMetadata) String

func (m *ThreatEntryMetadata) String() string

type ThreatEntryMetadata_MetadataEntry

type ThreatEntryMetadata_MetadataEntry struct {
	// The metadata entry key.
	Key []byte `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// The metadata entry value.
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
}

A single metadata entry.

func (*ThreatEntryMetadata_MetadataEntry) Descriptor

func (*ThreatEntryMetadata_MetadataEntry) Descriptor() ([]byte, []int)

func (*ThreatEntryMetadata_MetadataEntry) ProtoMessage

func (*ThreatEntryMetadata_MetadataEntry) ProtoMessage()

func (*ThreatEntryMetadata_MetadataEntry) Reset

func (*ThreatEntryMetadata_MetadataEntry) String

type ThreatEntrySet

type ThreatEntrySet struct {
	// The compression type for the entries in this set.
	CompressionType CompressionType `` /* 140-byte string literal not displayed */
	// The raw SHA256-formatted entries.
	RawHashes *RawHashes `protobuf:"bytes,2,opt,name=raw_hashes,json=rawHashes" json:"raw_hashes,omitempty"`
	// The raw removal indices for a local list.
	RawIndices *RawIndices `protobuf:"bytes,3,opt,name=raw_indices,json=rawIndices" json:"raw_indices,omitempty"`
	// The encoded 4-byte prefixes of SHA256-formatted entries, using a
	// Golomb-Rice encoding.
	RiceHashes *RiceDeltaEncoding `protobuf:"bytes,4,opt,name=rice_hashes,json=riceHashes" json:"rice_hashes,omitempty"`
	// The encoded local, lexicographically-sorted list indices, using a
	// Golomb-Rice encoding. Used for sending compressed removal indices.
	RiceIndices *RiceDeltaEncoding `protobuf:"bytes,5,opt,name=rice_indices,json=riceIndices" json:"rice_indices,omitempty"`
}

A set of threats that should be added or removed from a client's local database.

func (*ThreatEntrySet) Descriptor

func (*ThreatEntrySet) Descriptor() ([]byte, []int)

func (*ThreatEntrySet) GetRawHashes

func (m *ThreatEntrySet) GetRawHashes() *RawHashes

func (*ThreatEntrySet) GetRawIndices

func (m *ThreatEntrySet) GetRawIndices() *RawIndices

func (*ThreatEntrySet) GetRiceHashes

func (m *ThreatEntrySet) GetRiceHashes() *RiceDeltaEncoding

func (*ThreatEntrySet) GetRiceIndices

func (m *ThreatEntrySet) GetRiceIndices() *RiceDeltaEncoding

func (*ThreatEntrySet) ProtoMessage

func (*ThreatEntrySet) ProtoMessage()

func (*ThreatEntrySet) Reset

func (m *ThreatEntrySet) Reset()

func (*ThreatEntrySet) String

func (m *ThreatEntrySet) String() string

type ThreatEntryType

type ThreatEntryType int32

Types of entries that pose threats. Threat lists are collections of entries of a single type.

const (
	// Unspecified.
	ThreatEntryType_THREAT_ENTRY_TYPE_UNSPECIFIED ThreatEntryType = 0
	// A URL.
	ThreatEntryType_URL ThreatEntryType = 1
	// An executable program.
	ThreatEntryType_EXECUTABLE ThreatEntryType = 2
	// An IP range.
	ThreatEntryType_IP_RANGE ThreatEntryType = 3
)

func (ThreatEntryType) EnumDescriptor

func (ThreatEntryType) EnumDescriptor() ([]byte, []int)

func (ThreatEntryType) String

func (x ThreatEntryType) String() string

type ThreatInfo

type ThreatInfo struct {
	// The threat types to be checked.
	ThreatTypes []ThreatType `protobuf:"varint,1,rep,name=threat_types,json=threatTypes,enum=safebrowsing_proto.ThreatType" json:"threat_types,omitempty"`
	// The platform types to be checked.
	PlatformTypes []PlatformType `` /* 131-byte string literal not displayed */
	// The entry types to be checked.
	ThreatEntryTypes []ThreatEntryType `` /* 145-byte string literal not displayed */
	// The threat entries to be checked.
	ThreatEntries []*ThreatEntry `protobuf:"bytes,3,rep,name=threat_entries,json=threatEntries" json:"threat_entries,omitempty"`
}

The information regarding one or more threats that a client submits when checking for matches in threat lists.

func (*ThreatInfo) Descriptor

func (*ThreatInfo) Descriptor() ([]byte, []int)

func (*ThreatInfo) GetThreatEntries

func (m *ThreatInfo) GetThreatEntries() []*ThreatEntry

func (*ThreatInfo) ProtoMessage

func (*ThreatInfo) ProtoMessage()

func (*ThreatInfo) Reset

func (m *ThreatInfo) Reset()

func (*ThreatInfo) String

func (m *ThreatInfo) String() string

type ThreatListDescriptor

type ThreatListDescriptor struct {
	// The threat type posed by the list's entries.
	ThreatType ThreatType `protobuf:"varint,1,opt,name=threat_type,json=threatType,enum=safebrowsing_proto.ThreatType" json:"threat_type,omitempty"`
	// The platform type targeted by the list's entries.
	PlatformType PlatformType `` /* 128-byte string literal not displayed */
	// The entry types contained in the list.
	ThreatEntryType ThreatEntryType `` /* 142-byte string literal not displayed */
}

Describes an individual threat list. A list is defined by three parameters: the type of threat posed, the type of platform targeted by the threat, and the type of entries in the list.

func (*ThreatListDescriptor) Descriptor

func (*ThreatListDescriptor) Descriptor() ([]byte, []int)

func (*ThreatListDescriptor) ProtoMessage

func (*ThreatListDescriptor) ProtoMessage()

func (*ThreatListDescriptor) Reset

func (m *ThreatListDescriptor) Reset()

func (*ThreatListDescriptor) String

func (m *ThreatListDescriptor) String() string

type ThreatMatch

type ThreatMatch struct {
	// The threat type matching this threat.
	ThreatType ThreatType `protobuf:"varint,1,opt,name=threat_type,json=threatType,enum=safebrowsing_proto.ThreatType" json:"threat_type,omitempty"`
	// The platform type matching this threat.
	PlatformType PlatformType `` /* 128-byte string literal not displayed */
	// The threat entry type matching this threat.
	ThreatEntryType ThreatEntryType `` /* 142-byte string literal not displayed */
	// The threat matching this threat.
	Threat *ThreatEntry `protobuf:"bytes,3,opt,name=threat" json:"threat,omitempty"`
	// Optional metadata associated with this threat.
	ThreatEntryMetadata *ThreatEntryMetadata `protobuf:"bytes,4,opt,name=threat_entry_metadata,json=threatEntryMetadata" json:"threat_entry_metadata,omitempty"`
	// The cache lifetime for the returned match. Clients must not cache this
	// response for more than this duration to avoid false positives.
	CacheDuration *Duration `protobuf:"bytes,5,opt,name=cache_duration,json=cacheDuration" json:"cache_duration,omitempty"`
}

A match when checking a threat entry in the Safe Browsing threat lists.

func (*ThreatMatch) Descriptor

func (*ThreatMatch) Descriptor() ([]byte, []int)

func (*ThreatMatch) GetCacheDuration

func (m *ThreatMatch) GetCacheDuration() *Duration

func (*ThreatMatch) GetThreat

func (m *ThreatMatch) GetThreat() *ThreatEntry

func (*ThreatMatch) GetThreatEntryMetadata

func (m *ThreatMatch) GetThreatEntryMetadata() *ThreatEntryMetadata

func (*ThreatMatch) ProtoMessage

func (*ThreatMatch) ProtoMessage()

func (*ThreatMatch) Reset

func (m *ThreatMatch) Reset()

func (*ThreatMatch) String

func (m *ThreatMatch) String() string

type ThreatType

type ThreatType int32

Types of threats.

const (
	// Unknown.
	ThreatType_THREAT_TYPE_UNSPECIFIED ThreatType = 0
	// Malware threat type.
	ThreatType_MALWARE ThreatType = 1
	// Social engineering threat type.
	ThreatType_SOCIAL_ENGINEERING ThreatType = 2
	// Unwanted software threat type.
	ThreatType_UNWANTED_SOFTWARE ThreatType = 3
	// Potentially harmful application threat type.
	ThreatType_POTENTIALLY_HARMFUL_APPLICATION ThreatType = 4
)

func (ThreatType) EnumDescriptor

func (ThreatType) EnumDescriptor() ([]byte, []int)

func (ThreatType) String

func (x ThreatType) String() string

Jump to

Keyboard shortcuts

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