Documentation ¶
Index ¶
- func RegisterBookServiceServer(s *grpc.Server, srv BookServiceServer)
- type Book
- func (*Book) Descriptor() ([]byte, []int)
- func (m *Book) GetAuthor() string
- func (m *Book) GetIsbn() int64
- func (m *Book) GetTitle() string
- func (*Book) ProtoMessage()
- func (m *Book) Reset()
- func (m *Book) String() string
- func (m *Book) XXX_DiscardUnknown()
- func (m *Book) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *Book) XXX_Merge(src proto.Message)
- func (m *Book) XXX_Size() int
- func (m *Book) XXX_Unmarshal(b []byte) error
- type BookServiceClient
- type BookServiceServer
- type BookService_QueryBooksClient
- type BookService_QueryBooksServer
- type GetBookRequest
- func (*GetBookRequest) Descriptor() ([]byte, []int)
- func (m *GetBookRequest) GetIsbn() int64
- func (*GetBookRequest) ProtoMessage()
- func (m *GetBookRequest) Reset()
- func (m *GetBookRequest) String() string
- func (m *GetBookRequest) XXX_DiscardUnknown()
- func (m *GetBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *GetBookRequest) XXX_Merge(src proto.Message)
- func (m *GetBookRequest) XXX_Size() int
- func (m *GetBookRequest) XXX_Unmarshal(b []byte) error
- type QueryBooksRequest
- func (*QueryBooksRequest) Descriptor() ([]byte, []int)
- func (m *QueryBooksRequest) GetAuthorPrefix() string
- func (*QueryBooksRequest) ProtoMessage()
- func (m *QueryBooksRequest) Reset()
- func (m *QueryBooksRequest) String() string
- func (m *QueryBooksRequest) XXX_DiscardUnknown()
- func (m *QueryBooksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (m *QueryBooksRequest) XXX_Merge(src proto.Message)
- func (m *QueryBooksRequest) XXX_Size() int
- func (m *QueryBooksRequest) XXX_Unmarshal(b []byte) error
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,proto3" json:"isbn,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Author string `protobuf:"bytes,3,opt,name=author,proto3" json:"author,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Book) Descriptor ¶
func (*Book) ProtoMessage ¶
func (*Book) ProtoMessage()
func (*Book) XXX_DiscardUnknown ¶ added in v0.14.0
func (m *Book) XXX_DiscardUnknown()
func (*Book) XXX_Marshal ¶ added in v0.14.0
func (*Book) XXX_Unmarshal ¶ added in v0.14.0
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) }
BookServiceClient is the client API for BookService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewBookServiceClient ¶
func NewBookServiceClient(cc *grpc.ClientConn) BookServiceClient
type BookServiceServer ¶
type BookServiceServer interface { GetBook(context.Context, *GetBookRequest) (*Book, error) QueryBooks(*QueryBooksRequest, BookService_QueryBooksServer) error }
BookServiceServer is the server API for BookService service.
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,proto3" json:"isbn,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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
func (*GetBookRequest) XXX_DiscardUnknown ¶ added in v0.14.0
func (m *GetBookRequest) XXX_DiscardUnknown()
func (*GetBookRequest) XXX_Marshal ¶ added in v0.14.0
func (m *GetBookRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*GetBookRequest) XXX_Merge ¶ added in v0.14.0
func (m *GetBookRequest) XXX_Merge(src proto.Message)
func (*GetBookRequest) XXX_Size ¶ added in v0.14.0
func (m *GetBookRequest) XXX_Size() int
func (*GetBookRequest) XXX_Unmarshal ¶ added in v0.14.0
func (m *GetBookRequest) XXX_Unmarshal(b []byte) error
type QueryBooksRequest ¶
type QueryBooksRequest struct { AuthorPrefix string `protobuf:"bytes,1,opt,name=author_prefix,json=authorPrefix,proto3" json:"author_prefix,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
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
func (*QueryBooksRequest) XXX_DiscardUnknown ¶ added in v0.14.0
func (m *QueryBooksRequest) XXX_DiscardUnknown()
func (*QueryBooksRequest) XXX_Marshal ¶ added in v0.14.0
func (m *QueryBooksRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*QueryBooksRequest) XXX_Merge ¶ added in v0.14.0
func (m *QueryBooksRequest) XXX_Merge(src proto.Message)
func (*QueryBooksRequest) XXX_Size ¶ added in v0.14.0
func (m *QueryBooksRequest) XXX_Size() int
func (*QueryBooksRequest) XXX_Unmarshal ¶ added in v0.14.0
func (m *QueryBooksRequest) XXX_Unmarshal(b []byte) error
Click to show internal directories.
Click to hide internal directories.