Documentation ¶
Index ¶
- Variables
- func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
- type GreeterClient
- type GreeterServer
- type HelloReply
- type HelloRequest
- func (*HelloRequest) Descriptor() ([]byte, []int)deprecated
- func (x *HelloRequest) GetAges() []int32
- func (x *HelloRequest) GetName() string
- func (x *HelloRequest) GetPageNumber() int32
- func (*HelloRequest) ProtoMessage()
- func (x *HelloRequest) ProtoReflect() protoreflect.Message
- func (x *HelloRequest) Reset()
- func (x *HelloRequest) String() string
- type SearchResponse
- func (*SearchResponse) Descriptor() ([]byte, []int)deprecated
- func (x *SearchResponse) GetCount() int32
- func (x *SearchResponse) GetIsOk() bool
- func (x *SearchResponse) GetPadding() []byte
- func (*SearchResponse) ProtoMessage()
- func (x *SearchResponse) ProtoReflect() protoreflect.Message
- func (x *SearchResponse) Reset()
- func (x *SearchResponse) String() string
- type SearchResult
- func (*SearchResult) Descriptor() ([]byte, []int)deprecated
- func (x *SearchResult) GetCorpus() SearchResult_Corpus
- func (x *SearchResult) GetPageNumber() int32
- func (x *SearchResult) GetQuery() string
- func (x *SearchResult) GetResult() *SearchResponse
- func (x *SearchResult) GetResultMap() map[string]*SearchResponse
- func (x *SearchResult) GetResultPerPage() int32
- func (*SearchResult) ProtoMessage()
- func (x *SearchResult) ProtoReflect() protoreflect.Message
- func (x *SearchResult) Reset()
- func (x *SearchResult) String() string
- type SearchResult_Corpus
- func (SearchResult_Corpus) Descriptor() protoreflect.EnumDescriptor
- func (x SearchResult_Corpus) Enum() *SearchResult_Corpus
- func (SearchResult_Corpus) EnumDescriptor() ([]byte, []int)deprecated
- func (x SearchResult_Corpus) Number() protoreflect.EnumNumber
- func (x SearchResult_Corpus) String() string
- func (SearchResult_Corpus) Type() protoreflect.EnumType
- type UnimplementedGreeterServer
Constants ¶
This section is empty.
Variables ¶
var ( SearchResult_Corpus_name = map[int32]string{ 0: "UNIVERSAL", 1: "WEB", 2: "IMAGES", } SearchResult_Corpus_value = map[string]int32{ "UNIVERSAL": 0, "WEB": 1, "IMAGES": 2, "RUNNING": 2, } )
Enum value maps for SearchResult_Corpus.
var File_hello_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterGreeterServer ¶
func RegisterGreeterServer(s *grpc.Server, srv GreeterServer)
Types ¶
type GreeterClient ¶
type GreeterClient interface {
SayHello(ctx context.Context, in *HelloRequest, opts ...grpc.CallOption) (*HelloReply, error)
}
GreeterClient is the client API for Greeter service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewGreeterClient ¶
func NewGreeterClient(cc grpc.ClientConnInterface) GreeterClient
type GreeterServer ¶
type GreeterServer interface {
SayHello(context.Context, *HelloRequest) (*HelloReply, error)
}
GreeterServer is the server API for Greeter service.
type HelloReply ¶
type HelloReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
func (*HelloReply) Descriptor
deprecated
func (*HelloReply) Descriptor() ([]byte, []int)
Deprecated: Use HelloReply.ProtoReflect.Descriptor instead.
func (*HelloReply) GetMessage ¶
func (x *HelloReply) GetMessage() string
func (*HelloReply) ProtoMessage ¶
func (*HelloReply) ProtoMessage()
func (*HelloReply) ProtoReflect ¶
func (x *HelloReply) ProtoReflect() protoreflect.Message
func (*HelloReply) Reset ¶
func (x *HelloReply) Reset()
func (*HelloReply) String ¶
func (x *HelloReply) String() string
type HelloRequest ¶
type HelloRequest struct { Name string `protobuf:"bytes,100,opt,name=name,proto3" json:"name,omitempty"` PageNumber int32 `protobuf:"varint,101,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` Ages []int32 `protobuf:"varint,102,rep,packed,name=ages,proto3" json:"ages,omitempty"` // contains filtered or unexported fields }
func (*HelloRequest) Descriptor
deprecated
func (*HelloRequest) Descriptor() ([]byte, []int)
Deprecated: Use HelloRequest.ProtoReflect.Descriptor instead.
func (*HelloRequest) GetAges ¶
func (x *HelloRequest) GetAges() []int32
func (*HelloRequest) GetName ¶
func (x *HelloRequest) GetName() string
func (*HelloRequest) GetPageNumber ¶
func (x *HelloRequest) GetPageNumber() int32
func (*HelloRequest) ProtoMessage ¶
func (*HelloRequest) ProtoMessage()
func (*HelloRequest) ProtoReflect ¶
func (x *HelloRequest) ProtoReflect() protoreflect.Message
func (*HelloRequest) Reset ¶
func (x *HelloRequest) Reset()
func (*HelloRequest) String ¶
func (x *HelloRequest) String() string
type SearchResponse ¶
type SearchResponse struct { Count int32 `protobuf:"varint,16,opt,name=count,proto3" json:"count,omitempty"` IsOk bool `protobuf:"varint,17,opt,name=isOk,proto3" json:"isOk,omitempty"` Padding []byte `protobuf:"bytes,18,opt,name=padding,proto3" json:"padding,omitempty"` // contains filtered or unexported fields }
func (*SearchResponse) Descriptor
deprecated
func (*SearchResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.
func (*SearchResponse) GetCount ¶
func (x *SearchResponse) GetCount() int32
func (*SearchResponse) GetIsOk ¶
func (x *SearchResponse) GetIsOk() bool
func (*SearchResponse) GetPadding ¶
func (x *SearchResponse) GetPadding() []byte
func (*SearchResponse) ProtoMessage ¶
func (*SearchResponse) ProtoMessage()
func (*SearchResponse) ProtoReflect ¶
func (x *SearchResponse) ProtoReflect() protoreflect.Message
func (*SearchResponse) Reset ¶
func (x *SearchResponse) Reset()
func (*SearchResponse) String ¶
func (x *SearchResponse) String() string
type SearchResult ¶
type SearchResult struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` PageNumber int32 `protobuf:"varint,2,opt,name=page_number,json=pageNumber,proto3" json:"page_number,omitempty"` ResultPerPage int32 `protobuf:"varint,3,opt,name=result_per_page,json=resultPerPage,proto3" json:"result_per_page,omitempty"` Corpus SearchResult_Corpus `protobuf:"varint,4,opt,name=corpus,proto3,enum=SearchResult_Corpus" json:"corpus,omitempty"` Result *SearchResponse `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` ResultMap map[string]*SearchResponse `` /* 159-byte string literal not displayed */ // contains filtered or unexported fields }
func (*SearchResult) Descriptor
deprecated
func (*SearchResult) Descriptor() ([]byte, []int)
Deprecated: Use SearchResult.ProtoReflect.Descriptor instead.
func (*SearchResult) GetCorpus ¶
func (x *SearchResult) GetCorpus() SearchResult_Corpus
func (*SearchResult) GetPageNumber ¶
func (x *SearchResult) GetPageNumber() int32
func (*SearchResult) GetQuery ¶
func (x *SearchResult) GetQuery() string
func (*SearchResult) GetResult ¶
func (x *SearchResult) GetResult() *SearchResponse
func (*SearchResult) GetResultMap ¶
func (x *SearchResult) GetResultMap() map[string]*SearchResponse
func (*SearchResult) GetResultPerPage ¶
func (x *SearchResult) GetResultPerPage() int32
func (*SearchResult) ProtoMessage ¶
func (*SearchResult) ProtoMessage()
func (*SearchResult) ProtoReflect ¶
func (x *SearchResult) ProtoReflect() protoreflect.Message
func (*SearchResult) Reset ¶
func (x *SearchResult) Reset()
func (*SearchResult) String ¶
func (x *SearchResult) String() string
type SearchResult_Corpus ¶
type SearchResult_Corpus int32
const ( SearchResult_UNIVERSAL SearchResult_Corpus = 0 SearchResult_WEB SearchResult_Corpus = 1 SearchResult_IMAGES SearchResult_Corpus = 2 SearchResult_RUNNING SearchResult_Corpus = 2 )
func (SearchResult_Corpus) Descriptor ¶
func (SearchResult_Corpus) Descriptor() protoreflect.EnumDescriptor
func (SearchResult_Corpus) Enum ¶
func (x SearchResult_Corpus) Enum() *SearchResult_Corpus
func (SearchResult_Corpus) EnumDescriptor
deprecated
func (SearchResult_Corpus) EnumDescriptor() ([]byte, []int)
Deprecated: Use SearchResult_Corpus.Descriptor instead.
func (SearchResult_Corpus) Number ¶
func (x SearchResult_Corpus) Number() protoreflect.EnumNumber
func (SearchResult_Corpus) String ¶
func (x SearchResult_Corpus) String() string
func (SearchResult_Corpus) Type ¶
func (SearchResult_Corpus) Type() protoreflect.EnumType
type UnimplementedGreeterServer ¶
type UnimplementedGreeterServer struct { }
UnimplementedGreeterServer can be embedded to have forward compatible implementations.
func (*UnimplementedGreeterServer) SayHello ¶
func (*UnimplementedGreeterServer) SayHello(context.Context, *HelloRequest) (*HelloReply, error)