Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterBookGrpcServiceServer(s grpc.ServiceRegistrar, srv BookGrpcServiceServer)
- type Book
- func (*Book) Descriptor() ([]byte, []int)deprecated
- func (x *Book) GetAuthorName() string
- func (x *Book) GetCoverImagePath() string
- func (x *Book) GetFilePath() string
- func (x *Book) GetId() uint64
- func (x *Book) GetPrice() uint64
- func (x *Book) GetTags() []*Tags
- func (x *Book) GetTitle() string
- func (*Book) ProtoMessage()
- func (x *Book) ProtoReflect() protoreflect.Message
- func (x *Book) Reset()
- func (x *Book) String() string
- type BookGrpcServiceClient
- type BookGrpcServiceServer
- type FindBooksInIdsReq
- type FindBooksInIdsRes
- type Tags
- type UnimplementedBookGrpcServiceServer
- type UnsafeBookGrpcServiceServer
Constants ¶
const (
BookGrpcService_FindBooksInIds_FullMethodName = "/bookPb.BookGrpcService/FindBooksInIds"
)
Variables ¶
var BookGrpcService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bookPb.BookGrpcService", HandlerType: (*BookGrpcServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "FindBooksInIds", Handler: _BookGrpcService_FindBooksInIds_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "module/book/bookPb/bookPb.proto", }
BookGrpcService_ServiceDesc is the grpc.ServiceDesc for BookGrpcService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_module_book_bookPb_bookPb_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBookGrpcServiceServer ¶
func RegisterBookGrpcServiceServer(s grpc.ServiceRegistrar, srv BookGrpcServiceServer)
Types ¶
type Book ¶
type Book struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Title string `protobuf:"bytes,2,opt,name=title,proto3" json:"title,omitempty"` Price uint64 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"` FilePath string `protobuf:"bytes,4,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"` CoverImagePath string `protobuf:"bytes,5,opt,name=cover_image_path,json=coverImagePath,proto3" json:"cover_image_path,omitempty"` AuthorName string `protobuf:"bytes,6,opt,name=author_name,json=authorName,proto3" json:"author_name,omitempty"` Tags []*Tags `protobuf:"bytes,7,rep,name=tags,proto3" json:"tags,omitempty"` // contains filtered or unexported fields }
func (*Book) Descriptor
deprecated
func (*Book) GetAuthorName ¶
func (*Book) GetCoverImagePath ¶
func (*Book) GetFilePath ¶
func (*Book) ProtoMessage ¶
func (*Book) ProtoMessage()
func (*Book) ProtoReflect ¶
func (x *Book) ProtoReflect() protoreflect.Message
type BookGrpcServiceClient ¶
type BookGrpcServiceClient interface {
FindBooksInIds(ctx context.Context, in *FindBooksInIdsReq, opts ...grpc.CallOption) (*FindBooksInIdsRes, error)
}
BookGrpcServiceClient is the client API for BookGrpcService 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 NewBookGrpcServiceClient ¶
func NewBookGrpcServiceClient(cc grpc.ClientConnInterface) BookGrpcServiceClient
type BookGrpcServiceServer ¶
type BookGrpcServiceServer interface { FindBooksInIds(context.Context, *FindBooksInIdsReq) (*FindBooksInIdsRes, error) // contains filtered or unexported methods }
BookGrpcServiceServer is the server API for BookGrpcService service. All implementations must embed UnimplementedBookGrpcServiceServer for forward compatibility.
type FindBooksInIdsReq ¶
type FindBooksInIdsReq struct { Ids []uint64 `protobuf:"varint,1,rep,packed,name=ids,proto3" json:"ids,omitempty"` // contains filtered or unexported fields }
func (*FindBooksInIdsReq) Descriptor
deprecated
func (*FindBooksInIdsReq) Descriptor() ([]byte, []int)
Deprecated: Use FindBooksInIdsReq.ProtoReflect.Descriptor instead.
func (*FindBooksInIdsReq) GetIds ¶
func (x *FindBooksInIdsReq) GetIds() []uint64
func (*FindBooksInIdsReq) ProtoMessage ¶
func (*FindBooksInIdsReq) ProtoMessage()
func (*FindBooksInIdsReq) ProtoReflect ¶
func (x *FindBooksInIdsReq) ProtoReflect() protoreflect.Message
func (*FindBooksInIdsReq) Reset ¶
func (x *FindBooksInIdsReq) Reset()
func (*FindBooksInIdsReq) String ¶
func (x *FindBooksInIdsReq) String() string
type FindBooksInIdsRes ¶
type FindBooksInIdsRes struct { Book []*Book `protobuf:"bytes,1,rep,name=book,proto3" json:"book,omitempty"` // contains filtered or unexported fields }
func (*FindBooksInIdsRes) Descriptor
deprecated
func (*FindBooksInIdsRes) Descriptor() ([]byte, []int)
Deprecated: Use FindBooksInIdsRes.ProtoReflect.Descriptor instead.
func (*FindBooksInIdsRes) GetBook ¶
func (x *FindBooksInIdsRes) GetBook() []*Book
func (*FindBooksInIdsRes) ProtoMessage ¶
func (*FindBooksInIdsRes) ProtoMessage()
func (*FindBooksInIdsRes) ProtoReflect ¶
func (x *FindBooksInIdsRes) ProtoReflect() protoreflect.Message
func (*FindBooksInIdsRes) Reset ¶
func (x *FindBooksInIdsRes) Reset()
func (*FindBooksInIdsRes) String ¶
func (x *FindBooksInIdsRes) String() string
type Tags ¶
type Tags struct { Id uint64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*Tags) Descriptor
deprecated
func (*Tags) ProtoMessage ¶
func (*Tags) ProtoMessage()
func (*Tags) ProtoReflect ¶
func (x *Tags) ProtoReflect() protoreflect.Message
type UnimplementedBookGrpcServiceServer ¶
type UnimplementedBookGrpcServiceServer struct{}
UnimplementedBookGrpcServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedBookGrpcServiceServer) FindBooksInIds ¶
func (UnimplementedBookGrpcServiceServer) FindBooksInIds(context.Context, *FindBooksInIdsReq) (*FindBooksInIdsRes, error)
type UnsafeBookGrpcServiceServer ¶
type UnsafeBookGrpcServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBookGrpcServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BookGrpcServiceServer will result in compilation errors.