Documentation ¶
Index ¶
- Variables
- func RegisterDCSServer(s grpc.ServiceRegistrar, srv DCSServer)
- type DCSClient
- type DCSServer
- type DCS_ResultsClient
- type DCS_ResultsServer
- type DCS_SearchClient
- type DCS_SearchServer
- type Error
- type Error_ErrorType
- func (Error_ErrorType) Descriptor() protoreflect.EnumDescriptor
- func (x Error_ErrorType) Enum() *Error_ErrorType
- func (Error_ErrorType) EnumDescriptor() ([]byte, []int)deprecated
- func (x Error_ErrorType) Number() protoreflect.EnumNumber
- func (x Error_ErrorType) String() string
- func (Error_ErrorType) Type() protoreflect.EnumType
- type Event
- func (*Event) Descriptor() ([]byte, []int)deprecated
- func (m *Event) GetData() isEvent_Data
- func (x *Event) GetError() *Error
- func (x *Event) GetMatch() *sourcebackendpb.Match
- func (x *Event) GetPagination() *Pagination
- func (x *Event) GetProgress() *Progress
- func (*Event) ProtoMessage()
- func (x *Event) ProtoReflect() protoreflect.Message
- func (x *Event) Reset()
- func (x *Event) String() string
- type Event_Error
- type Event_Match
- type Event_Pagination
- type Event_Progress
- type Event_Type
- type Pagination
- type Progress
- func (*Progress) Descriptor() ([]byte, []int)deprecated
- func (x *Progress) GetFilesProcessed() int64
- func (x *Progress) GetFilesTotal() int64
- func (x *Progress) GetQueryId() string
- func (x *Progress) GetResults() int64
- func (*Progress) ProtoMessage()
- func (x *Progress) ProtoReflect() protoreflect.Message
- func (x *Progress) Reset()
- func (x *Progress) String() string
- type ResultsRequest
- func (*ResultsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ResultsRequest) GetApikey() string
- func (x *ResultsRequest) GetQueryId() string
- func (*ResultsRequest) ProtoMessage()
- func (x *ResultsRequest) ProtoReflect() protoreflect.Message
- func (x *ResultsRequest) Reset()
- func (x *ResultsRequest) String() string
- type SearchRequest
- func (*SearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *SearchRequest) GetApikey() string
- func (x *SearchRequest) GetLiteral() bool
- func (x *SearchRequest) GetQuery() string
- func (*SearchRequest) ProtoMessage()
- func (x *SearchRequest) ProtoReflect() protoreflect.Message
- func (x *SearchRequest) Reset()
- func (x *SearchRequest) String() string
- type UnimplementedDCSServer
- type UnsafeDCSServer
Constants ¶
This section is empty.
Variables ¶
var ( Error_ErrorType_name = map[int32]string{ 0: "CANCELLED", 1: "BACKEND_UNAVAILABLE", 2: "FAILED", 3: "INVALID_QUERY", } Error_ErrorType_value = map[string]int32{ "CANCELLED": 0, "BACKEND_UNAVAILABLE": 1, "FAILED": 2, "INVALID_QUERY": 3, } )
Enum value maps for Error_ErrorType.
var ( Event_Type_name = map[int32]string{ 0: "ERROR", 1: "PROGRESS", 2: "MATCH", 3: "PAGINATION", 4: "DONE", } Event_Type_value = map[string]int32{ "ERROR": 0, "PROGRESS": 1, "MATCH": 2, "PAGINATION": 3, "DONE": 4, } )
Enum value maps for Event_Type.
var DCS_ServiceDesc = grpc.ServiceDesc{ ServiceName: "dcspb.DCS", HandlerType: (*DCSServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "Search", Handler: _DCS_Search_Handler, ServerStreams: true, }, { StreamName: "Results", Handler: _DCS_Results_Handler, ServerStreams: true, }, }, Metadata: "dcs.proto", }
DCS_ServiceDesc is the grpc.ServiceDesc for DCS service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_dcs_proto protoreflect.FileDescriptor
Functions ¶
func RegisterDCSServer ¶
func RegisterDCSServer(s grpc.ServiceRegistrar, srv DCSServer)
Types ¶
type DCSClient ¶
type DCSClient interface { Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (DCS_SearchClient, error) Results(ctx context.Context, in *ResultsRequest, opts ...grpc.CallOption) (DCS_ResultsClient, error) }
DCSClient is the client API for DCS service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewDCSClient ¶
func NewDCSClient(cc grpc.ClientConnInterface) DCSClient
type DCSServer ¶
type DCSServer interface { Search(*SearchRequest, DCS_SearchServer) error Results(*ResultsRequest, DCS_ResultsServer) error // contains filtered or unexported methods }
DCSServer is the server API for DCS service. All implementations must embed UnimplementedDCSServer for forward compatibility
type DCS_ResultsClient ¶
type DCS_ResultsClient interface { Recv() (*sourcebackendpb.Match, error) grpc.ClientStream }
type DCS_ResultsServer ¶
type DCS_ResultsServer interface { Send(*sourcebackendpb.Match) error grpc.ServerStream }
type DCS_SearchClient ¶
type DCS_SearchClient interface { Recv() (*Event, error) grpc.ClientStream }
type DCS_SearchServer ¶
type DCS_SearchServer interface { Send(*Event) error grpc.ServerStream }
type Error ¶
type Error struct { Type Error_ErrorType `protobuf:"varint,1,opt,name=type,proto3,enum=dcspb.Error_ErrorType" json:"type,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) GetType ¶
func (x *Error) GetType() Error_ErrorType
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type Error_ErrorType ¶
type Error_ErrorType int32
const ( Error_CANCELLED Error_ErrorType = 0 Error_BACKEND_UNAVAILABLE Error_ErrorType = 1 Error_FAILED Error_ErrorType = 2 // TODO: is this reasonable? Error_INVALID_QUERY Error_ErrorType = 3 )
func (Error_ErrorType) Descriptor ¶
func (Error_ErrorType) Descriptor() protoreflect.EnumDescriptor
func (Error_ErrorType) Enum ¶
func (x Error_ErrorType) Enum() *Error_ErrorType
func (Error_ErrorType) EnumDescriptor
deprecated
func (Error_ErrorType) EnumDescriptor() ([]byte, []int)
Deprecated: Use Error_ErrorType.Descriptor instead.
func (Error_ErrorType) Number ¶
func (x Error_ErrorType) Number() protoreflect.EnumNumber
func (Error_ErrorType) String ¶
func (x Error_ErrorType) String() string
func (Error_ErrorType) Type ¶
func (Error_ErrorType) Type() protoreflect.EnumType
type Event ¶
type Event struct { // Types that are assignable to Data: // *Event_Error // *Event_Progress // *Event_Match // *Event_Pagination Data isEvent_Data `protobuf_oneof:"data"` // contains filtered or unexported fields }
func (*Event) Descriptor
deprecated
func (*Event) GetMatch ¶
func (x *Event) GetMatch() *sourcebackendpb.Match
func (*Event) GetPagination ¶
func (x *Event) GetPagination() *Pagination
func (*Event) GetProgress ¶
func (*Event) ProtoMessage ¶
func (*Event) ProtoMessage()
func (*Event) ProtoReflect ¶
func (x *Event) ProtoReflect() protoreflect.Message
type Event_Error ¶
type Event_Error struct {
Error *Error `protobuf:"bytes,1,opt,name=error,proto3,oneof"`
}
type Event_Match ¶
type Event_Match struct {
Match *sourcebackendpb.Match `protobuf:"bytes,3,opt,name=match,proto3,oneof"`
}
type Event_Pagination ¶
type Event_Pagination struct {
Pagination *Pagination `protobuf:"bytes,4,opt,name=pagination,proto3,oneof"`
}
type Event_Progress ¶
type Event_Progress struct {
Progress *Progress `protobuf:"bytes,2,opt,name=progress,proto3,oneof"`
}
type Event_Type ¶
type Event_Type int32
const ( Event_ERROR Event_Type = 0 Event_PROGRESS Event_Type = 1 Event_MATCH Event_Type = 2 Event_PAGINATION Event_Type = 3 Event_DONE Event_Type = 4 )
func (Event_Type) Descriptor ¶
func (Event_Type) Descriptor() protoreflect.EnumDescriptor
func (Event_Type) Enum ¶
func (x Event_Type) Enum() *Event_Type
func (Event_Type) EnumDescriptor
deprecated
func (Event_Type) EnumDescriptor() ([]byte, []int)
Deprecated: Use Event_Type.Descriptor instead.
func (Event_Type) Number ¶
func (x Event_Type) Number() protoreflect.EnumNumber
func (Event_Type) String ¶
func (x Event_Type) String() string
func (Event_Type) Type ¶
func (Event_Type) Type() protoreflect.EnumType
type Pagination ¶
type Pagination struct { QueryId string `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` ResultPages int64 `protobuf:"varint,2,opt,name=result_pages,json=resultPages,proto3" json:"result_pages,omitempty"` // contains filtered or unexported fields }
func (*Pagination) Descriptor
deprecated
func (*Pagination) Descriptor() ([]byte, []int)
Deprecated: Use Pagination.ProtoReflect.Descriptor instead.
func (*Pagination) GetQueryId ¶
func (x *Pagination) GetQueryId() string
func (*Pagination) GetResultPages ¶
func (x *Pagination) GetResultPages() int64
func (*Pagination) ProtoMessage ¶
func (*Pagination) ProtoMessage()
func (*Pagination) ProtoReflect ¶
func (x *Pagination) ProtoReflect() protoreflect.Message
func (*Pagination) Reset ¶
func (x *Pagination) Reset()
func (*Pagination) String ¶
func (x *Pagination) String() string
type Progress ¶
type Progress struct { QueryId string `protobuf:"bytes,1,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` FilesProcessed int64 `protobuf:"varint,2,opt,name=files_processed,json=filesProcessed,proto3" json:"files_processed,omitempty"` FilesTotal int64 `protobuf:"varint,3,opt,name=files_total,json=filesTotal,proto3" json:"files_total,omitempty"` Results int64 `protobuf:"varint,4,opt,name=results,proto3" json:"results,omitempty"` // contains filtered or unexported fields }
func (*Progress) Descriptor
deprecated
func (*Progress) GetFilesProcessed ¶
func (*Progress) GetFilesTotal ¶
func (*Progress) GetQueryId ¶
func (*Progress) GetResults ¶
func (*Progress) ProtoMessage ¶
func (*Progress) ProtoMessage()
func (*Progress) ProtoReflect ¶
func (x *Progress) ProtoReflect() protoreflect.Message
type ResultsRequest ¶
type ResultsRequest struct { // See https://codesearch.debian.net/apikeys/ Apikey string `protobuf:"bytes,1,opt,name=apikey,proto3" json:"apikey,omitempty"` QueryId string `protobuf:"bytes,2,opt,name=query_id,json=queryId,proto3" json:"query_id,omitempty"` // contains filtered or unexported fields }
func (*ResultsRequest) Descriptor
deprecated
func (*ResultsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ResultsRequest.ProtoReflect.Descriptor instead.
func (*ResultsRequest) GetApikey ¶
func (x *ResultsRequest) GetApikey() string
func (*ResultsRequest) GetQueryId ¶
func (x *ResultsRequest) GetQueryId() string
func (*ResultsRequest) ProtoMessage ¶
func (*ResultsRequest) ProtoMessage()
func (*ResultsRequest) ProtoReflect ¶
func (x *ResultsRequest) ProtoReflect() protoreflect.Message
func (*ResultsRequest) Reset ¶
func (x *ResultsRequest) Reset()
func (*ResultsRequest) String ¶
func (x *ResultsRequest) String() string
type SearchRequest ¶
type SearchRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` Literal bool `protobuf:"varint,2,opt,name=literal,proto3" json:"literal,omitempty"` // See https://codesearch.debian.net/apikeys/ Apikey string `protobuf:"bytes,3,opt,name=apikey,proto3" json:"apikey,omitempty"` // contains filtered or unexported fields }
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetApikey ¶
func (x *SearchRequest) GetApikey() string
func (*SearchRequest) GetLiteral ¶
func (x *SearchRequest) GetLiteral() bool
func (*SearchRequest) GetQuery ¶
func (x *SearchRequest) GetQuery() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
type UnimplementedDCSServer ¶
type UnimplementedDCSServer struct { }
UnimplementedDCSServer must be embedded to have forward compatible implementations.
func (UnimplementedDCSServer) Results ¶
func (UnimplementedDCSServer) Results(*ResultsRequest, DCS_ResultsServer) error
func (UnimplementedDCSServer) Search ¶
func (UnimplementedDCSServer) Search(*SearchRequest, DCS_SearchServer) error
type UnsafeDCSServer ¶
type UnsafeDCSServer interface {
// contains filtered or unexported methods
}
UnsafeDCSServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to DCSServer will result in compilation errors.