genproto: google.golang.org/genproto/googleapis/cloud/webrisk/v1 Index | Files

package webrisk

import "google.golang.org/genproto/googleapis/cloud/webrisk/v1"

Index

Package Files

webrisk.pb.go

Variables

var (
    ThreatType_name = map[int32]string{
        0:  "THREAT_TYPE_UNSPECIFIED",
        1:  "MALWARE",
        2:  "SOCIAL_ENGINEERING",
        3:  "UNWANTED_SOFTWARE",
    }
    ThreatType_value = map[string]int32{
        "THREAT_TYPE_UNSPECIFIED": 0,
        "MALWARE":                 1,
        "SOCIAL_ENGINEERING":      2,
        "UNWANTED_SOFTWARE":       3,
    }
)

Enum value maps for ThreatType.

var (
    CompressionType_name = map[int32]string{
        0:  "COMPRESSION_TYPE_UNSPECIFIED",
        1:  "RAW",
        2:  "RICE",
    }
    CompressionType_value = map[string]int32{
        "COMPRESSION_TYPE_UNSPECIFIED": 0,
        "RAW":                          1,
        "RICE":                         2,
    }
)

Enum value maps for CompressionType.

var (
    ComputeThreatListDiffResponse_ResponseType_name = map[int32]string{
        0:  "RESPONSE_TYPE_UNSPECIFIED",
        1:  "DIFF",
        2:  "RESET",
    }
    ComputeThreatListDiffResponse_ResponseType_value = map[string]int32{
        "RESPONSE_TYPE_UNSPECIFIED": 0,
        "DIFF":                      1,
        "RESET":                     2,
    }
)

Enum value maps for ComputeThreatListDiffResponse_ResponseType.

var File_google_cloud_webrisk_v1_webrisk_proto protoreflect.FileDescriptor

func RegisterWebRiskServiceServer Uses

func RegisterWebRiskServiceServer(s *grpc.Server, srv WebRiskServiceServer)

type CompressionType Uses

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) Descriptor Uses

func (CompressionType) Descriptor() protoreflect.EnumDescriptor

func (CompressionType) Enum Uses

func (x CompressionType) Enum() *CompressionType

func (CompressionType) EnumDescriptor Uses

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

Deprecated: Use CompressionType.Descriptor instead.

func (CompressionType) Number Uses

func (x CompressionType) Number() protoreflect.EnumNumber

func (CompressionType) String Uses

func (x CompressionType) String() string

func (CompressionType) Type Uses

func (CompressionType) Type() protoreflect.EnumType

type ComputeThreatListDiffRequest Uses

type ComputeThreatListDiffRequest struct {

    // Required. The threat list to update. Only a single ThreatType should be specified.
    ThreatType ThreatType `protobuf:"varint,1,opt,name=threat_type,json=threatType,proto3,enum=google.cloud.webrisk.v1.ThreatType" json:"threat_type,omitempty"`
    // The current version token of the client for the requested list (the
    // client version that was received from the last successful diff).
    // If the client does not have a version token (this is the first time calling
    // ComputeThreatListDiff), this may be left empty and a full database
    // snapshot will be returned.
    VersionToken []byte `protobuf:"bytes,2,opt,name=version_token,json=versionToken,proto3" json:"version_token,omitempty"`
    // Required. The constraints associated with this request.
    Constraints *ComputeThreatListDiffRequest_Constraints `protobuf:"bytes,3,opt,name=constraints,proto3" json:"constraints,omitempty"`
    // contains filtered or unexported fields
}

Describes an API diff request.

func (*ComputeThreatListDiffRequest) Descriptor Uses

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

Deprecated: Use ComputeThreatListDiffRequest.ProtoReflect.Descriptor instead.

func (*ComputeThreatListDiffRequest) GetConstraints Uses

func (x *ComputeThreatListDiffRequest) GetConstraints() *ComputeThreatListDiffRequest_Constraints

func (*ComputeThreatListDiffRequest) GetThreatType Uses

func (x *ComputeThreatListDiffRequest) GetThreatType() ThreatType

func (*ComputeThreatListDiffRequest) GetVersionToken Uses

func (x *ComputeThreatListDiffRequest) GetVersionToken() []byte

func (*ComputeThreatListDiffRequest) ProtoMessage Uses

func (*ComputeThreatListDiffRequest) ProtoMessage()

func (*ComputeThreatListDiffRequest) ProtoReflect Uses

func (x *ComputeThreatListDiffRequest) ProtoReflect() protoreflect.Message

func (*ComputeThreatListDiffRequest) Reset Uses

func (x *ComputeThreatListDiffRequest) Reset()

func (*ComputeThreatListDiffRequest) String Uses

func (x *ComputeThreatListDiffRequest) String() string

type ComputeThreatListDiffRequest_Constraints Uses

type ComputeThreatListDiffRequest_Constraints struct {

    // The maximum size in number of entries. The diff will not contain more
    // entries than this value.  This should be a power of 2 between 2**10 and
    // 2**20.  If zero, no diff size limit is set.
    MaxDiffEntries int32 `protobuf:"varint,1,opt,name=max_diff_entries,json=maxDiffEntries,proto3" json:"max_diff_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,proto3" json:"max_database_entries,omitempty"`
    // The compression types supported by the client.
    SupportedCompressions []CompressionType `protobuf:"varint,3,rep,packed,name=supported_compressions,json=supportedCompressions,proto3,enum=google.cloud.webrisk.v1.CompressionType" json:"supported_compressions,omitempty"`
    // contains filtered or unexported fields
}

The constraints for this diff.

func (*ComputeThreatListDiffRequest_Constraints) Descriptor Uses

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

Deprecated: Use ComputeThreatListDiffRequest_Constraints.ProtoReflect.Descriptor instead.

func (*ComputeThreatListDiffRequest_Constraints) GetMaxDatabaseEntries Uses

func (x *ComputeThreatListDiffRequest_Constraints) GetMaxDatabaseEntries() int32

func (*ComputeThreatListDiffRequest_Constraints) GetMaxDiffEntries Uses

func (x *ComputeThreatListDiffRequest_Constraints) GetMaxDiffEntries() int32

func (*ComputeThreatListDiffRequest_Constraints) GetSupportedCompressions Uses

func (x *ComputeThreatListDiffRequest_Constraints) GetSupportedCompressions() []CompressionType

func (*ComputeThreatListDiffRequest_Constraints) ProtoMessage Uses

func (*ComputeThreatListDiffRequest_Constraints) ProtoMessage()

func (*ComputeThreatListDiffRequest_Constraints) ProtoReflect Uses

func (x *ComputeThreatListDiffRequest_Constraints) ProtoReflect() protoreflect.Message

func (*ComputeThreatListDiffRequest_Constraints) Reset Uses

func (x *ComputeThreatListDiffRequest_Constraints) Reset()

func (*ComputeThreatListDiffRequest_Constraints) String Uses

func (x *ComputeThreatListDiffRequest_Constraints) String() string

type ComputeThreatListDiffResponse Uses

type ComputeThreatListDiffResponse struct {

    // The type of response. This may indicate that an action must be taken by the
    // client when the response is received.
    ResponseType ComputeThreatListDiffResponse_ResponseType `protobuf:"varint,4,opt,name=response_type,json=responseType,proto3,enum=google.cloud.webrisk.v1.ComputeThreatListDiffResponse_ResponseType" json:"response_type,omitempty"`
    // A set of entries to add to a local threat type's list.
    Additions *ThreatEntryAdditions `protobuf:"bytes,5,opt,name=additions,proto3" json:"additions,omitempty"`
    // A set of entries to remove from a local threat type's list.
    // This field may be empty.
    Removals *ThreatEntryRemovals `protobuf:"bytes,6,opt,name=removals,proto3" json:"removals,omitempty"`
    // The new opaque client version token. This should be retained by the client
    // and passed into the next call of ComputeThreatListDiff as 'version_token'.
    // A separate version token should be stored and used for each threatList.
    NewVersionToken []byte `protobuf:"bytes,7,opt,name=new_version_token,json=newVersionToken,proto3" json:"new_version_token,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 diff.
    // If the client state doesn't match the expected state, the client must
    // discard this diff and retry later.
    Checksum *ComputeThreatListDiffResponse_Checksum `protobuf:"bytes,8,opt,name=checksum,proto3" json:"checksum,omitempty"`
    // The soonest the client should wait before issuing any diff
    // request. Querying sooner is unlikely to produce a meaningful diff.
    // Waiting longer is acceptable considering the use case.
    // If this field is not set clients may update as soon as they want.
    RecommendedNextDiff *timestamp.Timestamp `protobuf:"bytes,2,opt,name=recommended_next_diff,json=recommendedNextDiff,proto3" json:"recommended_next_diff,omitempty"`
    // contains filtered or unexported fields
}

func (*ComputeThreatListDiffResponse) Descriptor Uses

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

Deprecated: Use ComputeThreatListDiffResponse.ProtoReflect.Descriptor instead.

func (*ComputeThreatListDiffResponse) GetAdditions Uses

func (x *ComputeThreatListDiffResponse) GetAdditions() *ThreatEntryAdditions

func (*ComputeThreatListDiffResponse) GetChecksum Uses

func (x *ComputeThreatListDiffResponse) GetChecksum() *ComputeThreatListDiffResponse_Checksum

func (*ComputeThreatListDiffResponse) GetNewVersionToken Uses

func (x *ComputeThreatListDiffResponse) GetNewVersionToken() []byte

func (*ComputeThreatListDiffResponse) GetRecommendedNextDiff Uses

func (x *ComputeThreatListDiffResponse) GetRecommendedNextDiff() *timestamp.Timestamp

func (*ComputeThreatListDiffResponse) GetRemovals Uses

func (x *ComputeThreatListDiffResponse) GetRemovals() *ThreatEntryRemovals

func (*ComputeThreatListDiffResponse) GetResponseType Uses

func (x *ComputeThreatListDiffResponse) GetResponseType() ComputeThreatListDiffResponse_ResponseType

func (*ComputeThreatListDiffResponse) ProtoMessage Uses

func (*ComputeThreatListDiffResponse) ProtoMessage()

func (*ComputeThreatListDiffResponse) ProtoReflect Uses

func (x *ComputeThreatListDiffResponse) ProtoReflect() protoreflect.Message

func (*ComputeThreatListDiffResponse) Reset Uses

func (x *ComputeThreatListDiffResponse) Reset()

func (*ComputeThreatListDiffResponse) String Uses

func (x *ComputeThreatListDiffResponse) String() string

type ComputeThreatListDiffResponse_Checksum Uses

type ComputeThreatListDiffResponse_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"`
    // contains filtered or unexported fields
}

The expected state of a client's local database.

func (*ComputeThreatListDiffResponse_Checksum) Descriptor Uses

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

Deprecated: Use ComputeThreatListDiffResponse_Checksum.ProtoReflect.Descriptor instead.

func (*ComputeThreatListDiffResponse_Checksum) GetSha256 Uses

func (x *ComputeThreatListDiffResponse_Checksum) GetSha256() []byte

func (*ComputeThreatListDiffResponse_Checksum) ProtoMessage Uses

func (*ComputeThreatListDiffResponse_Checksum) ProtoMessage()

func (*ComputeThreatListDiffResponse_Checksum) ProtoReflect Uses

func (x *ComputeThreatListDiffResponse_Checksum) ProtoReflect() protoreflect.Message

func (*ComputeThreatListDiffResponse_Checksum) Reset Uses

func (x *ComputeThreatListDiffResponse_Checksum) Reset()

func (*ComputeThreatListDiffResponse_Checksum) String Uses

func (x *ComputeThreatListDiffResponse_Checksum) String() string

type ComputeThreatListDiffResponse_ResponseType Uses

type ComputeThreatListDiffResponse_ResponseType int32

The type of response sent to the client.

const (
    // Unknown.
    ComputeThreatListDiffResponse_RESPONSE_TYPE_UNSPECIFIED ComputeThreatListDiffResponse_ResponseType = 0
    // Partial updates are applied to the client's existing local database.
    ComputeThreatListDiffResponse_DIFF ComputeThreatListDiffResponse_ResponseType = 1
    // Full updates resets the client's entire local database. This means
    // that either the client had no state, was seriously out-of-date,
    // or the client is believed to be corrupt.
    ComputeThreatListDiffResponse_RESET ComputeThreatListDiffResponse_ResponseType = 2
)

func (ComputeThreatListDiffResponse_ResponseType) Descriptor Uses

func (ComputeThreatListDiffResponse_ResponseType) Descriptor() protoreflect.EnumDescriptor

func (ComputeThreatListDiffResponse_ResponseType) Enum Uses

func (x ComputeThreatListDiffResponse_ResponseType) Enum() *ComputeThreatListDiffResponse_ResponseType

func (ComputeThreatListDiffResponse_ResponseType) EnumDescriptor Uses

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

Deprecated: Use ComputeThreatListDiffResponse_ResponseType.Descriptor instead.

func (ComputeThreatListDiffResponse_ResponseType) Number Uses

func (x ComputeThreatListDiffResponse_ResponseType) Number() protoreflect.EnumNumber

func (ComputeThreatListDiffResponse_ResponseType) String Uses

func (x ComputeThreatListDiffResponse_ResponseType) String() string

func (ComputeThreatListDiffResponse_ResponseType) Type Uses

func (ComputeThreatListDiffResponse_ResponseType) Type() protoreflect.EnumType

type CreateSubmissionRequest Uses

type CreateSubmissionRequest struct {

    // Required. The name of the project that is making the submission. This string is in
    // the format "projects/{project_number}".
    Parent string `protobuf:"bytes,1,opt,name=parent,proto3" json:"parent,omitempty"`
    // Required. The submission that contains the content of the phishing report.
    Submission *Submission `protobuf:"bytes,2,opt,name=submission,proto3" json:"submission,omitempty"`
    // contains filtered or unexported fields
}

Request to send a potentially phishy URI to WebRisk.

func (*CreateSubmissionRequest) Descriptor Uses

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

Deprecated: Use CreateSubmissionRequest.ProtoReflect.Descriptor instead.

func (*CreateSubmissionRequest) GetParent Uses

func (x *CreateSubmissionRequest) GetParent() string

func (*CreateSubmissionRequest) GetSubmission Uses

func (x *CreateSubmissionRequest) GetSubmission() *Submission

func (*CreateSubmissionRequest) ProtoMessage Uses

func (*CreateSubmissionRequest) ProtoMessage()

func (*CreateSubmissionRequest) ProtoReflect Uses

func (x *CreateSubmissionRequest) ProtoReflect() protoreflect.Message

func (*CreateSubmissionRequest) Reset Uses

func (x *CreateSubmissionRequest) Reset()

func (*CreateSubmissionRequest) String Uses

func (x *CreateSubmissionRequest) String() string

type RawHashes Uses

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).
    // In practice this is almost always 4, except in exceptional circumstances.
    PrefixSize int32 `protobuf:"varint,1,opt,name=prefix_size,json=prefixSize,proto3" json:"prefix_size,omitempty"`
    // The hashes, in binary format, concatenated into one long string. Hashes are
    // sorted in lexicographic order. For JSON API users, hashes are
    // base64-encoded.
    RawHashes []byte `protobuf:"bytes,2,opt,name=raw_hashes,json=rawHashes,proto3" json:"raw_hashes,omitempty"`
    // contains filtered or unexported fields
}

The uncompressed threat entries in hash format. 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 URI.

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

func (*RawHashes) Descriptor Uses

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

Deprecated: Use RawHashes.ProtoReflect.Descriptor instead.

func (*RawHashes) GetPrefixSize Uses

func (x *RawHashes) GetPrefixSize() int32

func (*RawHashes) GetRawHashes Uses

func (x *RawHashes) GetRawHashes() []byte

func (*RawHashes) ProtoMessage Uses

func (*RawHashes) ProtoMessage()

func (*RawHashes) ProtoReflect Uses

func (x *RawHashes) ProtoReflect() protoreflect.Message

func (*RawHashes) Reset Uses

func (x *RawHashes) Reset()

func (*RawHashes) String Uses

func (x *RawHashes) String() string

type RawIndices Uses

type RawIndices struct {

    // The indices to remove from a lexicographically-sorted local list.
    Indices []int32 `protobuf:"varint,1,rep,packed,name=indices,proto3" json:"indices,omitempty"`
    // contains filtered or unexported fields
}

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

func (*RawIndices) Descriptor Uses

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

Deprecated: Use RawIndices.ProtoReflect.Descriptor instead.

func (*RawIndices) GetIndices Uses

func (x *RawIndices) GetIndices() []int32

func (*RawIndices) ProtoMessage Uses

func (*RawIndices) ProtoMessage()

func (*RawIndices) ProtoReflect Uses

func (x *RawIndices) ProtoReflect() protoreflect.Message

func (*RawIndices) Reset Uses

func (x *RawIndices) Reset()

func (*RawIndices) String Uses

func (x *RawIndices) String() string

type RiceDeltaEncoding Uses

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. If the field is empty or
    // missing, assume zero.
    FirstValue int64 `protobuf:"varint,1,opt,name=first_value,json=firstValue,proto3" 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,proto3" 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`.
    EntryCount int32 `protobuf:"varint,3,opt,name=entry_count,json=entryCount,proto3" json:"entry_count,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"`
    // contains filtered or unexported fields
}

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

func (*RiceDeltaEncoding) Descriptor Uses

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

Deprecated: Use RiceDeltaEncoding.ProtoReflect.Descriptor instead.

func (*RiceDeltaEncoding) GetEncodedData Uses

func (x *RiceDeltaEncoding) GetEncodedData() []byte

func (*RiceDeltaEncoding) GetEntryCount Uses

func (x *RiceDeltaEncoding) GetEntryCount() int32

func (*RiceDeltaEncoding) GetFirstValue Uses

func (x *RiceDeltaEncoding) GetFirstValue() int64

func (*RiceDeltaEncoding) GetRiceParameter Uses

func (x *RiceDeltaEncoding) GetRiceParameter() int32

func (*RiceDeltaEncoding) ProtoMessage Uses

func (*RiceDeltaEncoding) ProtoMessage()

func (*RiceDeltaEncoding) ProtoReflect Uses

func (x *RiceDeltaEncoding) ProtoReflect() protoreflect.Message

func (*RiceDeltaEncoding) Reset Uses

func (x *RiceDeltaEncoding) Reset()

func (*RiceDeltaEncoding) String Uses

func (x *RiceDeltaEncoding) String() string

type SearchHashesRequest Uses

type SearchHashesRequest struct {

    // A hash prefix, consisting of the most significant 4-32 bytes of a SHA256
    // hash. For JSON requests, this field is base64-encoded.
    HashPrefix []byte `protobuf:"bytes,1,opt,name=hash_prefix,json=hashPrefix,proto3" json:"hash_prefix,omitempty"`
    // Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
    ThreatTypes []ThreatType `protobuf:"varint,2,rep,packed,name=threat_types,json=threatTypes,proto3,enum=google.cloud.webrisk.v1.ThreatType" json:"threat_types,omitempty"`
    // contains filtered or unexported fields
}

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

func (*SearchHashesRequest) Descriptor Uses

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

Deprecated: Use SearchHashesRequest.ProtoReflect.Descriptor instead.

func (*SearchHashesRequest) GetHashPrefix Uses

func (x *SearchHashesRequest) GetHashPrefix() []byte

func (*SearchHashesRequest) GetThreatTypes Uses

func (x *SearchHashesRequest) GetThreatTypes() []ThreatType

func (*SearchHashesRequest) ProtoMessage Uses

func (*SearchHashesRequest) ProtoMessage()

func (*SearchHashesRequest) ProtoReflect Uses

func (x *SearchHashesRequest) ProtoReflect() protoreflect.Message

func (*SearchHashesRequest) Reset Uses

func (x *SearchHashesRequest) Reset()

func (*SearchHashesRequest) String Uses

func (x *SearchHashesRequest) String() string

type SearchHashesResponse Uses

type SearchHashesResponse struct {

    // The full hashes that matched the requested prefixes.
    // The hash will be populated in the key.
    Threats []*SearchHashesResponse_ThreatHash `protobuf:"bytes,1,rep,name=threats,proto3" json:"threats,omitempty"`
    // For requested entities that did not match the threat list, how long to
    // cache the response until.
    NegativeExpireTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=negative_expire_time,json=negativeExpireTime,proto3" json:"negative_expire_time,omitempty"`
    // contains filtered or unexported fields
}

func (*SearchHashesResponse) Descriptor Uses

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

Deprecated: Use SearchHashesResponse.ProtoReflect.Descriptor instead.

func (*SearchHashesResponse) GetNegativeExpireTime Uses

func (x *SearchHashesResponse) GetNegativeExpireTime() *timestamp.Timestamp

func (*SearchHashesResponse) GetThreats Uses

func (x *SearchHashesResponse) GetThreats() []*SearchHashesResponse_ThreatHash

func (*SearchHashesResponse) ProtoMessage Uses

func (*SearchHashesResponse) ProtoMessage()

func (*SearchHashesResponse) ProtoReflect Uses

func (x *SearchHashesResponse) ProtoReflect() protoreflect.Message

func (*SearchHashesResponse) Reset Uses

func (x *SearchHashesResponse) Reset()

func (*SearchHashesResponse) String Uses

func (x *SearchHashesResponse) String() string

type SearchHashesResponse_ThreatHash Uses

type SearchHashesResponse_ThreatHash struct {

    // The ThreatList this threat belongs to.
    // This must contain at least one entry.
    ThreatTypes []ThreatType `protobuf:"varint,1,rep,packed,name=threat_types,json=threatTypes,proto3,enum=google.cloud.webrisk.v1.ThreatType" json:"threat_types,omitempty"`
    // A 32 byte SHA256 hash. This field is in binary format. For JSON
    // requests, hashes are base64-encoded.
    Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
    // The cache lifetime for the returned match. Clients must not cache this
    // response past this timestamp to avoid false positives.
    ExpireTime *timestamp.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
    // contains filtered or unexported fields
}

Contains threat information on a matching hash.

func (*SearchHashesResponse_ThreatHash) Descriptor Uses

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

Deprecated: Use SearchHashesResponse_ThreatHash.ProtoReflect.Descriptor instead.

func (*SearchHashesResponse_ThreatHash) GetExpireTime Uses

func (x *SearchHashesResponse_ThreatHash) GetExpireTime() *timestamp.Timestamp

func (*SearchHashesResponse_ThreatHash) GetHash Uses

func (x *SearchHashesResponse_ThreatHash) GetHash() []byte

func (*SearchHashesResponse_ThreatHash) GetThreatTypes Uses

func (x *SearchHashesResponse_ThreatHash) GetThreatTypes() []ThreatType

func (*SearchHashesResponse_ThreatHash) ProtoMessage Uses

func (*SearchHashesResponse_ThreatHash) ProtoMessage()

func (*SearchHashesResponse_ThreatHash) ProtoReflect Uses

func (x *SearchHashesResponse_ThreatHash) ProtoReflect() protoreflect.Message

func (*SearchHashesResponse_ThreatHash) Reset Uses

func (x *SearchHashesResponse_ThreatHash) Reset()

func (*SearchHashesResponse_ThreatHash) String Uses

func (x *SearchHashesResponse_ThreatHash) String() string

type SearchUrisRequest Uses

type SearchUrisRequest struct {

    // Required. The URI to be checked for matches.
    Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
    // Required. The ThreatLists to search in. Multiple ThreatLists may be specified.
    ThreatTypes []ThreatType `protobuf:"varint,2,rep,packed,name=threat_types,json=threatTypes,proto3,enum=google.cloud.webrisk.v1.ThreatType" json:"threat_types,omitempty"`
    // contains filtered or unexported fields
}

Request to check URI entries against threatLists.

func (*SearchUrisRequest) Descriptor Uses

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

Deprecated: Use SearchUrisRequest.ProtoReflect.Descriptor instead.

func (*SearchUrisRequest) GetThreatTypes Uses

func (x *SearchUrisRequest) GetThreatTypes() []ThreatType

func (*SearchUrisRequest) GetUri Uses

func (x *SearchUrisRequest) GetUri() string

func (*SearchUrisRequest) ProtoMessage Uses

func (*SearchUrisRequest) ProtoMessage()

func (*SearchUrisRequest) ProtoReflect Uses

func (x *SearchUrisRequest) ProtoReflect() protoreflect.Message

func (*SearchUrisRequest) Reset Uses

func (x *SearchUrisRequest) Reset()

func (*SearchUrisRequest) String Uses

func (x *SearchUrisRequest) String() string

type SearchUrisResponse Uses

type SearchUrisResponse struct {

    // The threat list matches. This may be empty if the URI is on no list.
    Threat *SearchUrisResponse_ThreatUri `protobuf:"bytes,1,opt,name=threat,proto3" json:"threat,omitempty"`
    // contains filtered or unexported fields
}

func (*SearchUrisResponse) Descriptor Uses

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

Deprecated: Use SearchUrisResponse.ProtoReflect.Descriptor instead.

func (*SearchUrisResponse) GetThreat Uses

func (x *SearchUrisResponse) GetThreat() *SearchUrisResponse_ThreatUri

func (*SearchUrisResponse) ProtoMessage Uses

func (*SearchUrisResponse) ProtoMessage()

func (*SearchUrisResponse) ProtoReflect Uses

func (x *SearchUrisResponse) ProtoReflect() protoreflect.Message

func (*SearchUrisResponse) Reset Uses

func (x *SearchUrisResponse) Reset()

func (*SearchUrisResponse) String Uses

func (x *SearchUrisResponse) String() string

type SearchUrisResponse_ThreatUri Uses

type SearchUrisResponse_ThreatUri struct {

    // The ThreatList this threat belongs to.
    ThreatTypes []ThreatType `protobuf:"varint,1,rep,packed,name=threat_types,json=threatTypes,proto3,enum=google.cloud.webrisk.v1.ThreatType" json:"threat_types,omitempty"`
    // The cache lifetime for the returned match. Clients must not cache this
    // response past this timestamp to avoid false positives.
    ExpireTime *timestamp.Timestamp `protobuf:"bytes,2,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
    // contains filtered or unexported fields
}

Contains threat information on a matching uri.

func (*SearchUrisResponse_ThreatUri) Descriptor Uses

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

Deprecated: Use SearchUrisResponse_ThreatUri.ProtoReflect.Descriptor instead.

func (*SearchUrisResponse_ThreatUri) GetExpireTime Uses

func (x *SearchUrisResponse_ThreatUri) GetExpireTime() *timestamp.Timestamp

func (*SearchUrisResponse_ThreatUri) GetThreatTypes Uses

func (x *SearchUrisResponse_ThreatUri) GetThreatTypes() []ThreatType

func (*SearchUrisResponse_ThreatUri) ProtoMessage Uses

func (*SearchUrisResponse_ThreatUri) ProtoMessage()

func (*SearchUrisResponse_ThreatUri) ProtoReflect Uses

func (x *SearchUrisResponse_ThreatUri) ProtoReflect() protoreflect.Message

func (*SearchUrisResponse_ThreatUri) Reset Uses

func (x *SearchUrisResponse_ThreatUri) Reset()

func (*SearchUrisResponse_ThreatUri) String Uses

func (x *SearchUrisResponse_ThreatUri) String() string

type Submission Uses

type Submission struct {

    // Required. The URI that is being reported for phishing content to be analyzed.
    Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"`
    // contains filtered or unexported fields
}

Wraps a URI that might be displaying phishing content.

func (*Submission) Descriptor Uses

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

Deprecated: Use Submission.ProtoReflect.Descriptor instead.

func (*Submission) GetUri Uses

func (x *Submission) GetUri() string

func (*Submission) ProtoMessage Uses

func (*Submission) ProtoMessage()

func (*Submission) ProtoReflect Uses

func (x *Submission) ProtoReflect() protoreflect.Message

func (*Submission) Reset Uses

func (x *Submission) Reset()

func (*Submission) String Uses

func (x *Submission) String() string

type ThreatEntryAdditions Uses

type ThreatEntryAdditions struct {

    // The raw SHA256-formatted entries.
    // Repeated to allow returning sets of hashes with different prefix sizes.
    RawHashes []*RawHashes `protobuf:"bytes,1,rep,name=raw_hashes,json=rawHashes,proto3" json:"raw_hashes,omitempty"`
    // The encoded 4-byte prefixes of SHA256-formatted entries, using a
    // Golomb-Rice encoding. The hashes are converted to uint32, sorted in
    // ascending order, then delta encoded and stored as encoded_data.
    RiceHashes *RiceDeltaEncoding `protobuf:"bytes,2,opt,name=rice_hashes,json=riceHashes,proto3" json:"rice_hashes,omitempty"`
    // contains filtered or unexported fields
}

Contains the set of entries to add to a local database. May contain a combination of compressed and raw data in a single response.

func (*ThreatEntryAdditions) Descriptor Uses

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

Deprecated: Use ThreatEntryAdditions.ProtoReflect.Descriptor instead.

func (*ThreatEntryAdditions) GetRawHashes Uses

func (x *ThreatEntryAdditions) GetRawHashes() []*RawHashes

func (*ThreatEntryAdditions) GetRiceHashes Uses

func (x *ThreatEntryAdditions) GetRiceHashes() *RiceDeltaEncoding

func (*ThreatEntryAdditions) ProtoMessage Uses

func (*ThreatEntryAdditions) ProtoMessage()

func (*ThreatEntryAdditions) ProtoReflect Uses

func (x *ThreatEntryAdditions) ProtoReflect() protoreflect.Message

func (*ThreatEntryAdditions) Reset Uses

func (x *ThreatEntryAdditions) Reset()

func (*ThreatEntryAdditions) String Uses

func (x *ThreatEntryAdditions) String() string

type ThreatEntryRemovals Uses

type ThreatEntryRemovals struct {

    // The raw removal indices for a local list.
    RawIndices *RawIndices `protobuf:"bytes,1,opt,name=raw_indices,json=rawIndices,proto3" json:"raw_indices,omitempty"`
    // The encoded local, lexicographically-sorted list indices, using a
    // Golomb-Rice encoding. Used for sending compressed removal indices. The
    // removal indices (uint32) are sorted in ascending order, then delta encoded
    // and stored as encoded_data.
    RiceIndices *RiceDeltaEncoding `protobuf:"bytes,2,opt,name=rice_indices,json=riceIndices,proto3" json:"rice_indices,omitempty"`
    // contains filtered or unexported fields
}

Contains the set of entries to remove from a local database.

func (*ThreatEntryRemovals) Descriptor Uses

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

Deprecated: Use ThreatEntryRemovals.ProtoReflect.Descriptor instead.

func (*ThreatEntryRemovals) GetRawIndices Uses

func (x *ThreatEntryRemovals) GetRawIndices() *RawIndices

func (*ThreatEntryRemovals) GetRiceIndices Uses

func (x *ThreatEntryRemovals) GetRiceIndices() *RiceDeltaEncoding

func (*ThreatEntryRemovals) ProtoMessage Uses

func (*ThreatEntryRemovals) ProtoMessage()

func (*ThreatEntryRemovals) ProtoReflect Uses

func (x *ThreatEntryRemovals) ProtoReflect() protoreflect.Message

func (*ThreatEntryRemovals) Reset Uses

func (x *ThreatEntryRemovals) Reset()

func (*ThreatEntryRemovals) String Uses

func (x *ThreatEntryRemovals) String() string

type ThreatType Uses

type ThreatType int32

The type of threat. This maps dirrectly to the threat list a threat may belong to.

const (
    // Unknown.
    ThreatType_THREAT_TYPE_UNSPECIFIED ThreatType = 0
    // Malware targeting any platform.
    ThreatType_MALWARE ThreatType = 1
    // Social engineering targeting any platform.
    ThreatType_SOCIAL_ENGINEERING ThreatType = 2
    // Unwanted software targeting any platform.
    ThreatType_UNWANTED_SOFTWARE ThreatType = 3
)

func (ThreatType) Descriptor Uses

func (ThreatType) Descriptor() protoreflect.EnumDescriptor

func (ThreatType) Enum Uses

func (x ThreatType) Enum() *ThreatType

func (ThreatType) EnumDescriptor Uses

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

Deprecated: Use ThreatType.Descriptor instead.

func (ThreatType) Number Uses

func (x ThreatType) Number() protoreflect.EnumNumber

func (ThreatType) String Uses

func (x ThreatType) String() string

func (ThreatType) Type Uses

func (ThreatType) Type() protoreflect.EnumType

type UnimplementedWebRiskServiceServer Uses

type UnimplementedWebRiskServiceServer struct {
}

UnimplementedWebRiskServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedWebRiskServiceServer) ComputeThreatListDiff Uses

func (*UnimplementedWebRiskServiceServer) ComputeThreatListDiff(context.Context, *ComputeThreatListDiffRequest) (*ComputeThreatListDiffResponse, error)

func (*UnimplementedWebRiskServiceServer) CreateSubmission Uses

func (*UnimplementedWebRiskServiceServer) CreateSubmission(context.Context, *CreateSubmissionRequest) (*Submission, error)

func (*UnimplementedWebRiskServiceServer) SearchHashes Uses

func (*UnimplementedWebRiskServiceServer) SearchHashes(context.Context, *SearchHashesRequest) (*SearchHashesResponse, error)

func (*UnimplementedWebRiskServiceServer) SearchUris Uses

func (*UnimplementedWebRiskServiceServer) SearchUris(context.Context, *SearchUrisRequest) (*SearchUrisResponse, error)

type WebRiskServiceClient Uses

type WebRiskServiceClient interface {
    // Gets the most recent threat list diffs. These diffs should be applied to
    // a local database of hashes to keep it up-to-date. If the local database is
    // empty or excessively out-of-date, a complete snapshot of the database will
    // be returned. This Method only updates a single ThreatList at a time. To
    // update multiple ThreatList databases, this method needs to be called once
    // for each list.
    ComputeThreatListDiff(ctx context.Context, in *ComputeThreatListDiffRequest, opts ...grpc.CallOption) (*ComputeThreatListDiffResponse, error)
    // This method is used to check whether a URI is on a given threatList.
    // Multiple threatLists may be searched in a single query.
    // The response will list all requested threatLists the URI was found to
    // match. If the URI is not found on any of the requested ThreatList an
    // empty response will be returned.
    SearchUris(ctx context.Context, in *SearchUrisRequest, opts ...grpc.CallOption) (*SearchUrisResponse, error)
    // Gets the full hashes that match the requested hash prefix.
    // This is used after a hash prefix is looked up in a threatList
    // and there is a match. The client side threatList only holds partial hashes
    // so the client must query this method to determine if there is a full
    // hash match of a threat.
    SearchHashes(ctx context.Context, in *SearchHashesRequest, opts ...grpc.CallOption) (*SearchHashesResponse, error)
    // Creates a Submission of a URI suspected of containing phishing content to
    // be reviewed. If the result verifies the existence of malicious phishing
    // content, the site will be added to the [Google's Social Engineering
    // lists](https://support.google.com/webmasters/answer/6350487/) in order to
    // protect users that could get exposed to this threat in the future. Only
    // projects with CREATE_SUBMISSION_USERS visibility can use this method.
    CreateSubmission(ctx context.Context, in *CreateSubmissionRequest, opts ...grpc.CallOption) (*Submission, error)
}

WebRiskServiceClient is the client API for WebRiskService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewWebRiskServiceClient Uses

func NewWebRiskServiceClient(cc grpc.ClientConnInterface) WebRiskServiceClient

type WebRiskServiceServer Uses

type WebRiskServiceServer interface {
    // Gets the most recent threat list diffs. These diffs should be applied to
    // a local database of hashes to keep it up-to-date. If the local database is
    // empty or excessively out-of-date, a complete snapshot of the database will
    // be returned. This Method only updates a single ThreatList at a time. To
    // update multiple ThreatList databases, this method needs to be called once
    // for each list.
    ComputeThreatListDiff(context.Context, *ComputeThreatListDiffRequest) (*ComputeThreatListDiffResponse, error)
    // This method is used to check whether a URI is on a given threatList.
    // Multiple threatLists may be searched in a single query.
    // The response will list all requested threatLists the URI was found to
    // match. If the URI is not found on any of the requested ThreatList an
    // empty response will be returned.
    SearchUris(context.Context, *SearchUrisRequest) (*SearchUrisResponse, error)
    // Gets the full hashes that match the requested hash prefix.
    // This is used after a hash prefix is looked up in a threatList
    // and there is a match. The client side threatList only holds partial hashes
    // so the client must query this method to determine if there is a full
    // hash match of a threat.
    SearchHashes(context.Context, *SearchHashesRequest) (*SearchHashesResponse, error)
    // Creates a Submission of a URI suspected of containing phishing content to
    // be reviewed. If the result verifies the existence of malicious phishing
    // content, the site will be added to the [Google's Social Engineering
    // lists](https://support.google.com/webmasters/answer/6350487/) in order to
    // protect users that could get exposed to this threat in the future. Only
    // projects with CREATE_SUBMISSION_USERS visibility can use this method.
    CreateSubmission(context.Context, *CreateSubmissionRequest) (*Submission, error)
}

WebRiskServiceServer is the server API for WebRiskService service.

Package webrisk imports 11 packages (graph). Updated 2020-08-13. Refresh now. Tools for package owners.