Documentation ¶
Index ¶
- Variables
- func RegisterAbuseStoreServer(s *grpc.Server, srv AbuseStoreServer)
- type AbuseStoreClient
- type AbuseStoreServer
- type CheckReply
- type CheckRequest
- type PushReply
- type PushRequest
- func (*PushRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PushRequest) GetCause() PushRequest_Cause
- func (x *PushRequest) GetDescription() string
- func (x *PushRequest) GetEmail() string
- func (x *PushRequest) GetFilename() string
- func (x *PushRequest) GetInfohash() string
- func (x *PushRequest) GetNoticeId() string
- func (x *PushRequest) GetSource() PushRequest_Source
- func (x *PushRequest) GetStartedAt() int64
- func (x *PushRequest) GetSubject() string
- func (x *PushRequest) GetWork() string
- func (*PushRequest) ProtoMessage()
- func (x *PushRequest) ProtoReflect() protoreflect.Message
- func (x *PushRequest) Reset()
- func (x *PushRequest) String() string
- type PushRequest_Cause
- func (PushRequest_Cause) Descriptor() protoreflect.EnumDescriptor
- func (x PushRequest_Cause) Enum() *PushRequest_Cause
- func (PushRequest_Cause) EnumDescriptor() ([]byte, []int)deprecated
- func (x PushRequest_Cause) Number() protoreflect.EnumNumber
- func (x PushRequest_Cause) String() string
- func (PushRequest_Cause) Type() protoreflect.EnumType
- type PushRequest_Source
- func (PushRequest_Source) Descriptor() protoreflect.EnumDescriptor
- func (x PushRequest_Source) Enum() *PushRequest_Source
- func (PushRequest_Source) EnumDescriptor() ([]byte, []int)deprecated
- func (x PushRequest_Source) Number() protoreflect.EnumNumber
- func (x PushRequest_Source) String() string
- func (PushRequest_Source) Type() protoreflect.EnumType
- type UnimplementedAbuseStoreServer
Constants ¶
This section is empty.
Variables ¶
var ( PushRequest_Cause_name = map[int32]string{ 0: "ILLEGAL_CONTENT", 1: "MALWARE", 2: "APP_ERROR", 3: "QUESTION", } PushRequest_Cause_value = map[string]int32{ "ILLEGAL_CONTENT": 0, "MALWARE": 1, "APP_ERROR": 2, "QUESTION": 3, } )
Enum value maps for PushRequest_Cause.
var ( PushRequest_Source_name = map[int32]string{ 0: "MAIL", 1: "FORM", } PushRequest_Source_value = map[string]int32{ "MAIL": 0, "FORM": 1, } )
Enum value maps for PushRequest_Source.
var File_abuse_store_proto protoreflect.FileDescriptor
Functions ¶
func RegisterAbuseStoreServer ¶
func RegisterAbuseStoreServer(s *grpc.Server, srv AbuseStoreServer)
Types ¶
type AbuseStoreClient ¶
type AbuseStoreClient interface { // Pushes abuse to the store Push(ctx context.Context, in *PushRequest, opts ...grpc.CallOption) (*PushReply, error) // Check abuse in the store for existence Check(ctx context.Context, in *CheckRequest, opts ...grpc.CallOption) (*CheckReply, error) }
AbuseStoreClient is the client API for AbuseStore service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewAbuseStoreClient ¶
func NewAbuseStoreClient(cc grpc.ClientConnInterface) AbuseStoreClient
type AbuseStoreServer ¶
type AbuseStoreServer interface { // Pushes abuse to the store Push(context.Context, *PushRequest) (*PushReply, error) // Check abuse in the store for existence Check(context.Context, *CheckRequest) (*CheckReply, error) }
AbuseStoreServer is the server API for AbuseStore service.
type CheckReply ¶
type CheckReply struct { Exists bool `protobuf:"varint,1,opt,name=exists,proto3" json:"exists,omitempty"` // contains filtered or unexported fields }
The check response message containing existance flag
func (*CheckReply) Descriptor
deprecated
func (*CheckReply) Descriptor() ([]byte, []int)
Deprecated: Use CheckReply.ProtoReflect.Descriptor instead.
func (*CheckReply) GetExists ¶
func (x *CheckReply) GetExists() bool
func (*CheckReply) ProtoMessage ¶
func (*CheckReply) ProtoMessage()
func (*CheckReply) ProtoReflect ¶
func (x *CheckReply) ProtoReflect() protoreflect.Message
func (*CheckReply) Reset ¶
func (x *CheckReply) Reset()
func (*CheckReply) String ¶
func (x *CheckReply) String() string
type CheckRequest ¶
type CheckRequest struct { Infohash string `protobuf:"bytes,1,opt,name=infohash,proto3" json:"infohash,omitempty"` // contains filtered or unexported fields }
The check request message containing the infoHash
func (*CheckRequest) Descriptor
deprecated
func (*CheckRequest) Descriptor() ([]byte, []int)
Deprecated: Use CheckRequest.ProtoReflect.Descriptor instead.
func (*CheckRequest) GetInfohash ¶
func (x *CheckRequest) GetInfohash() string
func (*CheckRequest) ProtoMessage ¶
func (*CheckRequest) ProtoMessage()
func (*CheckRequest) ProtoReflect ¶
func (x *CheckRequest) ProtoReflect() protoreflect.Message
func (*CheckRequest) Reset ¶
func (x *CheckRequest) Reset()
func (*CheckRequest) String ¶
func (x *CheckRequest) String() string
type PushReply ¶
type PushReply struct {
// contains filtered or unexported fields
}
The push response message containing
func (*PushReply) Descriptor
deprecated
func (*PushReply) ProtoMessage ¶
func (*PushReply) ProtoMessage()
func (*PushReply) ProtoReflect ¶
func (x *PushReply) ProtoReflect() protoreflect.Message
type PushRequest ¶
type PushRequest struct { NoticeId string `protobuf:"bytes,1,opt,name=notice_id,json=noticeId,proto3" json:"notice_id,omitempty"` Infohash string `protobuf:"bytes,2,opt,name=infohash,proto3" json:"infohash,omitempty"` Filename string `protobuf:"bytes,3,opt,name=filename,proto3" json:"filename,omitempty"` Work string `protobuf:"bytes,4,opt,name=work,proto3" json:"work,omitempty"` StartedAt int64 `protobuf:"varint,5,opt,name=started_at,json=startedAt,proto3" json:"started_at,omitempty"` Email string `protobuf:"bytes,6,opt,name=email,proto3" json:"email,omitempty"` Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` Subject string `protobuf:"bytes,8,opt,name=subject,proto3" json:"subject,omitempty"` Cause PushRequest_Cause `protobuf:"varint,9,opt,name=cause,proto3,enum=PushRequest_Cause" json:"cause,omitempty"` Source PushRequest_Source `protobuf:"varint,10,opt,name=source,proto3,enum=PushRequest_Source" json:"source,omitempty"` // contains filtered or unexported fields }
The push request message
func (*PushRequest) Descriptor
deprecated
func (*PushRequest) Descriptor() ([]byte, []int)
Deprecated: Use PushRequest.ProtoReflect.Descriptor instead.
func (*PushRequest) GetCause ¶
func (x *PushRequest) GetCause() PushRequest_Cause
func (*PushRequest) GetDescription ¶
func (x *PushRequest) GetDescription() string
func (*PushRequest) GetEmail ¶
func (x *PushRequest) GetEmail() string
func (*PushRequest) GetFilename ¶
func (x *PushRequest) GetFilename() string
func (*PushRequest) GetInfohash ¶
func (x *PushRequest) GetInfohash() string
func (*PushRequest) GetNoticeId ¶
func (x *PushRequest) GetNoticeId() string
func (*PushRequest) GetSource ¶
func (x *PushRequest) GetSource() PushRequest_Source
func (*PushRequest) GetStartedAt ¶
func (x *PushRequest) GetStartedAt() int64
func (*PushRequest) GetSubject ¶
func (x *PushRequest) GetSubject() string
func (*PushRequest) GetWork ¶
func (x *PushRequest) GetWork() string
func (*PushRequest) ProtoMessage ¶
func (*PushRequest) ProtoMessage()
func (*PushRequest) ProtoReflect ¶
func (x *PushRequest) ProtoReflect() protoreflect.Message
func (*PushRequest) Reset ¶
func (x *PushRequest) Reset()
func (*PushRequest) String ¶
func (x *PushRequest) String() string
type PushRequest_Cause ¶
type PushRequest_Cause int32
const ( PushRequest_ILLEGAL_CONTENT PushRequest_Cause = 0 PushRequest_MALWARE PushRequest_Cause = 1 PushRequest_APP_ERROR PushRequest_Cause = 2 PushRequest_QUESTION PushRequest_Cause = 3 )
func (PushRequest_Cause) Descriptor ¶
func (PushRequest_Cause) Descriptor() protoreflect.EnumDescriptor
func (PushRequest_Cause) Enum ¶
func (x PushRequest_Cause) Enum() *PushRequest_Cause
func (PushRequest_Cause) EnumDescriptor
deprecated
func (PushRequest_Cause) EnumDescriptor() ([]byte, []int)
Deprecated: Use PushRequest_Cause.Descriptor instead.
func (PushRequest_Cause) Number ¶
func (x PushRequest_Cause) Number() protoreflect.EnumNumber
func (PushRequest_Cause) String ¶
func (x PushRequest_Cause) String() string
func (PushRequest_Cause) Type ¶
func (PushRequest_Cause) Type() protoreflect.EnumType
type PushRequest_Source ¶
type PushRequest_Source int32
const ( PushRequest_MAIL PushRequest_Source = 0 PushRequest_FORM PushRequest_Source = 1 )
func (PushRequest_Source) Descriptor ¶
func (PushRequest_Source) Descriptor() protoreflect.EnumDescriptor
func (PushRequest_Source) Enum ¶
func (x PushRequest_Source) Enum() *PushRequest_Source
func (PushRequest_Source) EnumDescriptor
deprecated
func (PushRequest_Source) EnumDescriptor() ([]byte, []int)
Deprecated: Use PushRequest_Source.Descriptor instead.
func (PushRequest_Source) Number ¶
func (x PushRequest_Source) Number() protoreflect.EnumNumber
func (PushRequest_Source) String ¶
func (x PushRequest_Source) String() string
func (PushRequest_Source) Type ¶
func (PushRequest_Source) Type() protoreflect.EnumType
type UnimplementedAbuseStoreServer ¶
type UnimplementedAbuseStoreServer struct { }
UnimplementedAbuseStoreServer can be embedded to have forward compatible implementations.
func (*UnimplementedAbuseStoreServer) Check ¶
func (*UnimplementedAbuseStoreServer) Check(context.Context, *CheckRequest) (*CheckReply, error)
func (*UnimplementedAbuseStoreServer) Push ¶
func (*UnimplementedAbuseStoreServer) Push(context.Context, *PushRequest) (*PushReply, error)