Documentation
¶
Overview ¶
Package books is a generated protocol buffer package.
It is generated from these files:
books.proto
It has these top-level messages:
Empty Book BookList BookIdRequest
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 {
Id int32 `protobuf:"varint,1,opt,name=id" json:"id,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 BookIdRequest ¶
type BookIdRequest struct {
Id int32 `protobuf:"varint,1,opt,name=id" json:"id,omitempty"`
}
func (*BookIdRequest) Descriptor ¶
func (*BookIdRequest) Descriptor() ([]byte, []int)
func (*BookIdRequest) ProtoMessage ¶
func (*BookIdRequest) ProtoMessage()
func (*BookIdRequest) Reset ¶
func (m *BookIdRequest) Reset()
func (*BookIdRequest) String ¶
func (m *BookIdRequest) String() string
type BookList ¶
type BookList struct {
Books []*Book `protobuf:"bytes,1,rep,name=books" json:"books,omitempty"`
}
func (*BookList) Descriptor ¶
func (*BookList) ProtoMessage ¶
func (*BookList) ProtoMessage()
type BookServiceClient ¶
type BookServiceClient interface {
List(ctx context.Context, in *Empty, opts ...grpc.CallOption) (*BookList, error)
Insert(ctx context.Context, in *Book, opts ...grpc.CallOption) (*Empty, error)
Get(ctx context.Context, in *BookIdRequest, opts ...grpc.CallOption) (*Book, error)
Delete(ctx context.Context, in *BookIdRequest, opts ...grpc.CallOption) (*Empty, error)
Watch(ctx context.Context, in *Empty, opts ...grpc.CallOption) (BookService_WatchClient, error)
}
func NewBookServiceClient ¶
func NewBookServiceClient(cc *grpc.ClientConn) BookServiceClient
type BookServiceServer ¶
type BookService_WatchClient ¶
type BookService_WatchClient interface {
Recv() (*Book, error)
grpc.ClientStream
}
type BookService_WatchServer ¶
type BookService_WatchServer interface {
Send(*Book) error
grpc.ServerStream
}
Click to show internal directories.
Click to hide internal directories.