123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183 |
- // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
- // versions:
- // - protoc-gen-go-grpc v1.3.0
- // - protoc v5.26.1
- // source: prod.proto
- package prod
- import (
- context "context"
- grpc "google.golang.org/grpc"
- codes "google.golang.org/grpc/codes"
- status "google.golang.org/grpc/status"
- )
- // This is a compile-time assertion to ensure that this generated file
- // is compatible with the grpc package it is being compiled against.
- // Requires gRPC-Go v1.32.0 or later.
- const _ = grpc.SupportPackageIsVersion7
- const (
- ProdService_GetProdStock_FullMethodName = "/services.ProdService/GetProdStock"
- ProdService_GetProdStocks_FullMethodName = "/services.ProdService/GetProdStocks"
- ProdService_GetProdInfo_FullMethodName = "/services.ProdService/GetProdInfo"
- )
- // ProdServiceClient is the client API for ProdService 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.
- type ProdServiceClient interface {
- GetProdStock(ctx context.Context, in *ProdRequest, opts ...grpc.CallOption) (*ProdResponse, error)
- GetProdStocks(ctx context.Context, in *QueryProdStocks, opts ...grpc.CallOption) (*ProdStockList, error)
- GetProdInfo(ctx context.Context, in *ProdRequest, opts ...grpc.CallOption) (*ProdModel, error)
- }
- type prodServiceClient struct {
- cc grpc.ClientConnInterface
- }
- func NewProdServiceClient(cc grpc.ClientConnInterface) ProdServiceClient {
- return &prodServiceClient{cc}
- }
- func (c *prodServiceClient) GetProdStock(ctx context.Context, in *ProdRequest, opts ...grpc.CallOption) (*ProdResponse, error) {
- out := new(ProdResponse)
- err := c.cc.Invoke(ctx, ProdService_GetProdStock_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *prodServiceClient) GetProdStocks(ctx context.Context, in *QueryProdStocks, opts ...grpc.CallOption) (*ProdStockList, error) {
- out := new(ProdStockList)
- err := c.cc.Invoke(ctx, ProdService_GetProdStocks_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- func (c *prodServiceClient) GetProdInfo(ctx context.Context, in *ProdRequest, opts ...grpc.CallOption) (*ProdModel, error) {
- out := new(ProdModel)
- err := c.cc.Invoke(ctx, ProdService_GetProdInfo_FullMethodName, in, out, opts...)
- if err != nil {
- return nil, err
- }
- return out, nil
- }
- // ProdServiceServer is the server API for ProdService service.
- // All implementations must embed UnimplementedProdServiceServer
- // for forward compatibility
- type ProdServiceServer interface {
- GetProdStock(context.Context, *ProdRequest) (*ProdResponse, error)
- GetProdStocks(context.Context, *QueryProdStocks) (*ProdStockList, error)
- GetProdInfo(context.Context, *ProdRequest) (*ProdModel, error)
- mustEmbedUnimplementedProdServiceServer()
- }
- // UnimplementedProdServiceServer must be embedded to have forward compatible implementations.
- type UnimplementedProdServiceServer struct {
- }
- func (UnimplementedProdServiceServer) GetProdStock(context.Context, *ProdRequest) (*ProdResponse, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetProdStock not implemented")
- }
- func (UnimplementedProdServiceServer) GetProdStocks(context.Context, *QueryProdStocks) (*ProdStockList, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetProdStocks not implemented")
- }
- func (UnimplementedProdServiceServer) GetProdInfo(context.Context, *ProdRequest) (*ProdModel, error) {
- return nil, status.Errorf(codes.Unimplemented, "method GetProdInfo not implemented")
- }
- func (UnimplementedProdServiceServer) mustEmbedUnimplementedProdServiceServer() {}
- // UnsafeProdServiceServer may be embedded to opt out of forward compatibility for this service.
- // Use of this interface is not recommended, as added methods to ProdServiceServer will
- // result in compilation errors.
- type UnsafeProdServiceServer interface {
- mustEmbedUnimplementedProdServiceServer()
- }
- func RegisterProdServiceServer(s grpc.ServiceRegistrar, srv ProdServiceServer) {
- s.RegisterService(&ProdService_ServiceDesc, srv)
- }
- func _ProdService_GetProdStock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ProdRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(ProdServiceServer).GetProdStock(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: ProdService_GetProdStock_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ProdServiceServer).GetProdStock(ctx, req.(*ProdRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _ProdService_GetProdStocks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(QueryProdStocks)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(ProdServiceServer).GetProdStocks(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: ProdService_GetProdStocks_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ProdServiceServer).GetProdStocks(ctx, req.(*QueryProdStocks))
- }
- return interceptor(ctx, in, info, handler)
- }
- func _ProdService_GetProdInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
- in := new(ProdRequest)
- if err := dec(in); err != nil {
- return nil, err
- }
- if interceptor == nil {
- return srv.(ProdServiceServer).GetProdInfo(ctx, in)
- }
- info := &grpc.UnaryServerInfo{
- Server: srv,
- FullMethod: ProdService_GetProdInfo_FullMethodName,
- }
- handler := func(ctx context.Context, req interface{}) (interface{}, error) {
- return srv.(ProdServiceServer).GetProdInfo(ctx, req.(*ProdRequest))
- }
- return interceptor(ctx, in, info, handler)
- }
- // ProdService_ServiceDesc is the grpc.ServiceDesc for ProdService service.
- // It's only intended for direct use with grpc.RegisterService,
- // and not to be introspected or modified (even as a copy)
- var ProdService_ServiceDesc = grpc.ServiceDesc{
- ServiceName: "services.ProdService",
- HandlerType: (*ProdServiceServer)(nil),
- Methods: []grpc.MethodDesc{
- {
- MethodName: "GetProdStock",
- Handler: _ProdService_GetProdStock_Handler,
- },
- {
- MethodName: "GetProdStocks",
- Handler: _ProdService_GetProdStocks_Handler,
- },
- {
- MethodName: "GetProdInfo",
- Handler: _ProdService_GetProdInfo_Handler,
- },
- },
- Streams: []grpc.StreamDesc{},
- Metadata: "prod.proto",
- }
|