Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
- type GetProductRequest
- type GetProductResponse
- func (*GetProductResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetProductResponse) GetTitle() string
- func (*GetProductResponse) ProtoMessage()
- func (x *GetProductResponse) ProtoReflect() protoreflect.Message
- func (x *GetProductResponse) Reset()
- func (x *GetProductResponse) String() string
- type ProductServiceClient
- type ProductServiceServer
- type UnimplementedProductServiceServer
- type UnsafeProductServiceServer
Constants ¶
const (
ProductService_Get_FullMethodName = "/ProductService/Get"
)
Variables ¶
var File_product_proto protoreflect.FileDescriptor
var ProductService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "ProductService", HandlerType: (*ProductServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Get", Handler: _ProductService_Get_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "product.proto", }
ProductService_ServiceDesc is the grpc.ServiceDesc for ProductService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterProductServiceServer ¶
func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
Types ¶
type GetProductRequest ¶
type GetProductRequest struct { ProductId int32 `protobuf:"varint,1,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` // contains filtered or unexported fields }
func (*GetProductRequest) Descriptor
deprecated
func (*GetProductRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetProductRequest.ProtoReflect.Descriptor instead.
func (*GetProductRequest) GetProductId ¶
func (x *GetProductRequest) GetProductId() int32
func (*GetProductRequest) ProtoMessage ¶
func (*GetProductRequest) ProtoMessage()
func (*GetProductRequest) ProtoReflect ¶
func (x *GetProductRequest) ProtoReflect() protoreflect.Message
func (*GetProductRequest) Reset ¶
func (x *GetProductRequest) Reset()
func (*GetProductRequest) String ¶
func (x *GetProductRequest) String() string
type GetProductResponse ¶
type GetProductResponse struct { Title string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"` // contains filtered or unexported fields }
func (*GetProductResponse) Descriptor
deprecated
func (*GetProductResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetProductResponse.ProtoReflect.Descriptor instead.
func (*GetProductResponse) GetTitle ¶
func (x *GetProductResponse) GetTitle() string
func (*GetProductResponse) ProtoMessage ¶
func (*GetProductResponse) ProtoMessage()
func (*GetProductResponse) ProtoReflect ¶
func (x *GetProductResponse) ProtoReflect() protoreflect.Message
func (*GetProductResponse) Reset ¶
func (x *GetProductResponse) Reset()
func (*GetProductResponse) String ¶
func (x *GetProductResponse) String() string
type ProductServiceClient ¶
type ProductServiceClient interface {
Get(ctx context.Context, in *GetProductRequest, opts ...grpc.CallOption) (*GetProductResponse, error)
}
ProductServiceClient is the client API for ProductService 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 NewProductServiceClient ¶
func NewProductServiceClient(cc grpc.ClientConnInterface) ProductServiceClient
type ProductServiceServer ¶
type ProductServiceServer interface { Get(context.Context, *GetProductRequest) (*GetProductResponse, error) // contains filtered or unexported methods }
ProductServiceServer is the server API for ProductService service. All implementations must embed UnimplementedProductServiceServer for forward compatibility.
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct{}
UnimplementedProductServiceServer 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 (UnimplementedProductServiceServer) Get ¶
func (UnimplementedProductServiceServer) Get(context.Context, *GetProductRequest) (*GetProductResponse, error)
type UnsafeProductServiceServer ¶
type UnsafeProductServiceServer interface {
// contains filtered or unexported methods
}
UnsafeProductServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductServiceServer will result in compilation errors.