Documentation ¶
Overview ¶
Package examplecom_library is a generated protocol buffer package.
It is generated from these files:
examplecom/library/book_service.proto
It has these top-level messages:
Book GetBookRequest QueryBooksRequest
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterBookServiceServer ¶
func RegisterBookServiceServer(s *grpc.Server, srv BookServiceServer)
Types ¶
type Book ¶
type Book struct { Isbn int64 `protobuf:"varint,1,opt,name=isbn" json:"isbn,omitempty"` Title string `protobuf:"bytes,2,opt,name=title" json:"title,omitempty"` Author string `protobuf:"bytes,3,opt,name=author" json:"author,omitempty"` }
func (*Book) Descriptor ¶
func (*Book) ProtoMessage ¶
func (*Book) ProtoMessage()
type BookServiceClient ¶
type BookServiceClient interface { GetBook(ctx context.Context, in *GetBookRequest, opts ...grpc.CallOption) (*Book, error) QueryBooks(ctx context.Context, in *QueryBooksRequest, opts ...grpc.CallOption) (BookService_QueryBooksClient, error) }
func NewBookServiceClient ¶
func NewBookServiceClient(cc *grpc.ClientConn) BookServiceClient
type BookServiceServer ¶
type BookServiceServer interface { GetBook(context.Context, *GetBookRequest) (*Book, error) QueryBooks(*QueryBooksRequest, BookService_QueryBooksServer) error }
type BookService_QueryBooksClient ¶
type BookService_QueryBooksClient interface { Recv() (*Book, error) grpc.ClientStream }
type BookService_QueryBooksServer ¶
type BookService_QueryBooksServer interface { Send(*Book) error grpc.ServerStream }
type GetBookRequest ¶
type GetBookRequest struct {
Isbn int64 `protobuf:"varint,1,opt,name=isbn" json:"isbn,omitempty"`
}
func (*GetBookRequest) Descriptor ¶
func (*GetBookRequest) Descriptor() ([]byte, []int)
func (*GetBookRequest) GetIsbn ¶
func (m *GetBookRequest) GetIsbn() int64
func (*GetBookRequest) ProtoMessage ¶
func (*GetBookRequest) ProtoMessage()
func (*GetBookRequest) Reset ¶
func (m *GetBookRequest) Reset()
func (*GetBookRequest) String ¶
func (m *GetBookRequest) String() string
type QueryBooksRequest ¶
type QueryBooksRequest struct {
AuthorPrefix string `protobuf:"bytes,1,opt,name=author_prefix,json=authorPrefix" json:"author_prefix,omitempty"`
}
func (*QueryBooksRequest) Descriptor ¶
func (*QueryBooksRequest) Descriptor() ([]byte, []int)
func (*QueryBooksRequest) GetAuthorPrefix ¶
func (m *QueryBooksRequest) GetAuthorPrefix() string
func (*QueryBooksRequest) ProtoMessage ¶
func (*QueryBooksRequest) ProtoMessage()
func (*QueryBooksRequest) Reset ¶
func (m *QueryBooksRequest) Reset()
func (*QueryBooksRequest) String ¶
func (m *QueryBooksRequest) String() string
Click to show internal directories.
Click to hide internal directories.