potato/proto/basic/vendor_grpc.pb.go

102 lines
3.6 KiB
Go

// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
package basic
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
// VendorServiceClient is the client API for VendorService 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 VendorServiceClient interface {
GetVendorList(ctx context.Context, in *GetVendorListRequest, opts ...grpc.CallOption) (*GetVendorListReply, error)
}
type vendorServiceClient struct {
cc grpc.ClientConnInterface
}
func NewVendorServiceClient(cc grpc.ClientConnInterface) VendorServiceClient {
return &vendorServiceClient{cc}
}
func (c *vendorServiceClient) GetVendorList(ctx context.Context, in *GetVendorListRequest, opts ...grpc.CallOption) (*GetVendorListReply, error) {
out := new(GetVendorListReply)
err := c.cc.Invoke(ctx, "/VendorService/GetVendorList", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// VendorServiceServer is the server API for VendorService service.
// All implementations must embed UnimplementedVendorServiceServer
// for forward compatibility
type VendorServiceServer interface {
GetVendorList(context.Context, *GetVendorListRequest) (*GetVendorListReply, error)
mustEmbedUnimplementedVendorServiceServer()
}
// UnimplementedVendorServiceServer must be embedded to have forward compatible implementations.
type UnimplementedVendorServiceServer struct {
}
func (UnimplementedVendorServiceServer) GetVendorList(context.Context, *GetVendorListRequest) (*GetVendorListReply, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetVendorList not implemented")
}
func (UnimplementedVendorServiceServer) mustEmbedUnimplementedVendorServiceServer() {}
// UnsafeVendorServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to VendorServiceServer will
// result in compilation errors.
type UnsafeVendorServiceServer interface {
mustEmbedUnimplementedVendorServiceServer()
}
func RegisterVendorServiceServer(s grpc.ServiceRegistrar, srv VendorServiceServer) {
s.RegisterService(&VendorService_ServiceDesc, srv)
}
func _VendorService_GetVendorList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetVendorListRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(VendorServiceServer).GetVendorList(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/VendorService/GetVendorList",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(VendorServiceServer).GetVendorList(ctx, req.(*GetVendorListRequest))
}
return interceptor(ctx, in, info, handler)
}
// VendorService_ServiceDesc is the grpc.ServiceDesc for VendorService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var VendorService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "VendorService",
HandlerType: (*VendorServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetVendorList",
Handler: _VendorService_GetVendorList_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "proto/basic/vendor.proto",
}