github.com/ZihuaZhang/fabric-protos-go@v1.0.7/peer/peer.pb.go (about) 1 // Code generated by protoc-gen-go. DO NOT EDIT. 2 // source: peer/peer.proto 3 4 package peer 5 6 import ( 7 context "context" 8 fmt "fmt" 9 proto "github.com/golang/protobuf/proto" 10 grpc "google.golang.org/grpc" 11 codes "google.golang.org/grpc/codes" 12 status "google.golang.org/grpc/status" 13 math "math" 14 ) 15 16 // Reference imports to suppress errors if they are not otherwise used. 17 var _ = proto.Marshal 18 var _ = fmt.Errorf 19 var _ = math.Inf 20 21 // This is a compile-time assertion to ensure that this generated file 22 // is compatible with the proto package it is being compiled against. 23 // A compilation error at this line likely means your copy of the 24 // proto package needs to be updated. 25 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package 26 27 func init() { proto.RegisterFile("peer/peer.proto", fileDescriptor_c302117fbb08ad42) } 28 29 var fileDescriptor_c302117fbb08ad42 = []byte{ 30 // 177 bytes of a gzipped FileDescriptorProto 31 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0xb1, 0x0a, 0xc2, 0x30, 32 0x10, 0x86, 0x37, 0x91, 0x2c, 0x85, 0x0a, 0x22, 0xc5, 0xc9, 0xd9, 0xa6, 0xa0, 0x6f, 0xa0, 0x38, 33 0x5b, 0xea, 0xe6, 0x22, 0x6d, 0x73, 0xa6, 0x81, 0x9a, 0x0b, 0x77, 0x75, 0xf0, 0xed, 0xa5, 0xbd, 34 0x06, 0x74, 0x49, 0xe0, 0xfb, 0xbf, 0x3b, 0xee, 0x57, 0x49, 0x00, 0xa0, 0x62, 0x7c, 0x74, 0x20, 35 0x1c, 0x30, 0x5d, 0x4c, 0x1f, 0x67, 0x2b, 0x09, 0x08, 0x03, 0x72, 0xdd, 0x4b, 0x98, 0x6d, 0xff, 36 0xe0, 0x83, 0x80, 0x03, 0x7a, 0x06, 0x49, 0x0f, 0x57, 0xb5, 0xbc, 0x78, 0x83, 0xc4, 0x40, 0xe9, 37 0x59, 0x25, 0x25, 0x61, 0x0b, 0xcc, 0xe5, 0x6c, 0xa7, 0x6b, 0xd1, 0x58, 0xdf, 0x9c, 0xf5, 0x60, 38 0x22, 0xcf, 0x36, 0x91, 0x47, 0x52, 0xcd, 0x6b, 0x4f, 0x95, 0xda, 0x21, 0x59, 0xdd, 0x7d, 0x02, 39 0x50, 0x0f, 0xc6, 0x02, 0xe9, 0x67, 0xdd, 0x90, 0x6b, 0xe3, 0xc4, 0x78, 0xce, 0x7d, 0x6f, 0xdd, 40 0xd0, 0xbd, 0x1b, 0xdd, 0xe2, 0xab, 0xf8, 0x51, 0x0b, 0x51, 0x73, 0x51, 0x73, 0x8b, 0x53, 0xcb, 41 0x46, 0xfa, 0x1d, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xd5, 0x12, 0xef, 0x66, 0xf9, 0x00, 0x00, 42 0x00, 43 } 44 45 // Reference imports to suppress errors if they are not otherwise used. 46 var _ context.Context 47 var _ grpc.ClientConn 48 49 // This is a compile-time assertion to ensure that this generated file 50 // is compatible with the grpc package it is being compiled against. 51 const _ = grpc.SupportPackageIsVersion4 52 53 // EndorserClient is the client API for Endorser service. 54 // 55 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 56 type EndorserClient interface { 57 ProcessProposal(ctx context.Context, in *SignedProposal, opts ...grpc.CallOption) (*ProposalResponse, error) 58 } 59 60 type endorserClient struct { 61 cc *grpc.ClientConn 62 } 63 64 func NewEndorserClient(cc *grpc.ClientConn) EndorserClient { 65 return &endorserClient{cc} 66 } 67 68 func (c *endorserClient) ProcessProposal(ctx context.Context, in *SignedProposal, opts ...grpc.CallOption) (*ProposalResponse, error) { 69 out := new(ProposalResponse) 70 err := c.cc.Invoke(ctx, "/protos.Endorser/ProcessProposal", in, out, opts...) 71 if err != nil { 72 return nil, err 73 } 74 return out, nil 75 } 76 77 // EndorserServer is the server API for Endorser service. 78 type EndorserServer interface { 79 ProcessProposal(context.Context, *SignedProposal) (*ProposalResponse, error) 80 } 81 82 // UnimplementedEndorserServer can be embedded to have forward compatible implementations. 83 type UnimplementedEndorserServer struct { 84 } 85 86 func (*UnimplementedEndorserServer) ProcessProposal(ctx context.Context, req *SignedProposal) (*ProposalResponse, error) { 87 return nil, status.Errorf(codes.Unimplemented, "method ProcessProposal not implemented") 88 } 89 90 func RegisterEndorserServer(s *grpc.Server, srv EndorserServer) { 91 s.RegisterService(&_Endorser_serviceDesc, srv) 92 } 93 94 func _Endorser_ProcessProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 95 in := new(SignedProposal) 96 if err := dec(in); err != nil { 97 return nil, err 98 } 99 if interceptor == nil { 100 return srv.(EndorserServer).ProcessProposal(ctx, in) 101 } 102 info := &grpc.UnaryServerInfo{ 103 Server: srv, 104 FullMethod: "/protos.Endorser/ProcessProposal", 105 } 106 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 107 return srv.(EndorserServer).ProcessProposal(ctx, req.(*SignedProposal)) 108 } 109 return interceptor(ctx, in, info, handler) 110 } 111 112 var _Endorser_serviceDesc = grpc.ServiceDesc{ 113 ServiceName: "protos.Endorser", 114 HandlerType: (*EndorserServer)(nil), 115 Methods: []grpc.MethodDesc{ 116 { 117 MethodName: "ProcessProposal", 118 Handler: _Endorser_ProcessProposal_Handler, 119 }, 120 }, 121 Streams: []grpc.StreamDesc{}, 122 Metadata: "peer/peer.proto", 123 }