Documentation ¶
Index ¶
- Variables
- func RegisterProductServer(s grpc.ServiceRegistrar, srv ProductServer)
- type ProductClient
- type ProductSearchReply
- func (*ProductSearchReply) Descriptor() ([]byte, []int)deprecated
- func (x *ProductSearchReply) GetMessage() string
- func (*ProductSearchReply) ProtoMessage()
- func (x *ProductSearchReply) ProtoReflect() protoreflect.Message
- func (x *ProductSearchReply) Reset()
- func (x *ProductSearchReply) String() string
- type ProductSearchRequest
- func (*ProductSearchRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ProductSearchRequest) GetProduct() string
- func (*ProductSearchRequest) ProtoMessage()
- func (x *ProductSearchRequest) ProtoReflect() protoreflect.Message
- func (x *ProductSearchRequest) Reset()
- func (x *ProductSearchRequest) String() string
- type ProductServer
- type UnimplementedProductServer
- type UnsafeProductServer
Constants ¶
This section is empty.
Variables ¶
var File_protof_product_proto protoreflect.FileDescriptor
var Product_ServiceDesc = grpc.ServiceDesc{ ServiceName: "protof.Product", HandlerType: (*ProductServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "search", Handler: _Product_Search_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "protof/product.proto", }
Product_ServiceDesc is the grpc.ServiceDesc for Product service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProductServer ¶
func RegisterProductServer(s grpc.ServiceRegistrar, srv ProductServer)
Types ¶
type ProductClient ¶
type ProductClient interface { // Sends a product name to search for Search(ctx context.Context, in *ProductSearchRequest, opts ...grpc.CallOption) (*ProductSearchReply, error) }
ProductClient is the client API for Product 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 NewProductClient ¶
func NewProductClient(cc grpc.ClientConnInterface) ProductClient
type ProductSearchReply ¶
type ProductSearchReply struct { Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"` // contains filtered or unexported fields }
The response message containing the search status
func (*ProductSearchReply) Descriptor
deprecated
func (*ProductSearchReply) Descriptor() ([]byte, []int)
Deprecated: Use ProductSearchReply.ProtoReflect.Descriptor instead.
func (*ProductSearchReply) GetMessage ¶
func (x *ProductSearchReply) GetMessage() string
func (*ProductSearchReply) ProtoMessage ¶
func (*ProductSearchReply) ProtoMessage()
func (*ProductSearchReply) ProtoReflect ¶
func (x *ProductSearchReply) ProtoReflect() protoreflect.Message
func (*ProductSearchReply) Reset ¶
func (x *ProductSearchReply) Reset()
func (*ProductSearchReply) String ¶
func (x *ProductSearchReply) String() string
type ProductSearchRequest ¶
type ProductSearchRequest struct { Product string `protobuf:"bytes,1,opt,name=product,proto3" json:"product,omitempty"` // contains filtered or unexported fields }
The request message containing client's search.
func (*ProductSearchRequest) Descriptor
deprecated
func (*ProductSearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use ProductSearchRequest.ProtoReflect.Descriptor instead.
func (*ProductSearchRequest) GetProduct ¶
func (x *ProductSearchRequest) GetProduct() string
func (*ProductSearchRequest) ProtoMessage ¶
func (*ProductSearchRequest) ProtoMessage()
func (*ProductSearchRequest) ProtoReflect ¶
func (x *ProductSearchRequest) ProtoReflect() protoreflect.Message
func (*ProductSearchRequest) Reset ¶
func (x *ProductSearchRequest) Reset()
func (*ProductSearchRequest) String ¶
func (x *ProductSearchRequest) String() string
type ProductServer ¶
type ProductServer interface { // Sends a product name to search for Search(context.Context, *ProductSearchRequest) (*ProductSearchReply, error) // contains filtered or unexported methods }
ProductServer is the server API for Product service. All implementations must embed UnimplementedProductServer for forward compatibility
type UnimplementedProductServer ¶
type UnimplementedProductServer struct { }
UnimplementedProductServer must be embedded to have forward compatible implementations.
func (UnimplementedProductServer) Search ¶
func (UnimplementedProductServer) Search(context.Context, *ProductSearchRequest) (*ProductSearchReply, error)
type UnsafeProductServer ¶
type UnsafeProductServer interface {
// contains filtered or unexported methods
}
UnsafeProductServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductServer will result in compilation errors.