-
Notifications
You must be signed in to change notification settings - Fork 0
/
peer.pb.go
207 lines (180 loc) · 7.3 KB
/
peer.pb.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: peer/peer.proto
package peer // import "github.com/hyperledger/fabric/protos/peer"
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type PeerID struct {
Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PeerID) Reset() { *m = PeerID{} }
func (m *PeerID) String() string { return proto.CompactTextString(m) }
func (*PeerID) ProtoMessage() {}
func (*PeerID) Descriptor() ([]byte, []int) {
return fileDescriptor_peer_f225b6e437338532, []int{0}
}
func (m *PeerID) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PeerID.Unmarshal(m, b)
}
func (m *PeerID) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PeerID.Marshal(b, m, deterministic)
}
func (dst *PeerID) XXX_Merge(src proto.Message) {
xxx_messageInfo_PeerID.Merge(dst, src)
}
func (m *PeerID) XXX_Size() int {
return xxx_messageInfo_PeerID.Size(m)
}
func (m *PeerID) XXX_DiscardUnknown() {
xxx_messageInfo_PeerID.DiscardUnknown(m)
}
var xxx_messageInfo_PeerID proto.InternalMessageInfo
func (m *PeerID) GetName() string {
if m != nil {
return m.Name
}
return ""
}
type PeerEndpoint struct {
Id *PeerID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PeerEndpoint) Reset() { *m = PeerEndpoint{} }
func (m *PeerEndpoint) String() string { return proto.CompactTextString(m) }
func (*PeerEndpoint) ProtoMessage() {}
func (*PeerEndpoint) Descriptor() ([]byte, []int) {
return fileDescriptor_peer_f225b6e437338532, []int{1}
}
func (m *PeerEndpoint) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PeerEndpoint.Unmarshal(m, b)
}
func (m *PeerEndpoint) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PeerEndpoint.Marshal(b, m, deterministic)
}
func (dst *PeerEndpoint) XXX_Merge(src proto.Message) {
xxx_messageInfo_PeerEndpoint.Merge(dst, src)
}
func (m *PeerEndpoint) XXX_Size() int {
return xxx_messageInfo_PeerEndpoint.Size(m)
}
func (m *PeerEndpoint) XXX_DiscardUnknown() {
xxx_messageInfo_PeerEndpoint.DiscardUnknown(m)
}
var xxx_messageInfo_PeerEndpoint proto.InternalMessageInfo
func (m *PeerEndpoint) GetId() *PeerID {
if m != nil {
return m.Id
}
return nil
}
func (m *PeerEndpoint) GetAddress() string {
if m != nil {
return m.Address
}
return ""
}
func init() {
proto.RegisterType((*PeerID)(nil), "protos.PeerID")
proto.RegisterType((*PeerEndpoint)(nil), "protos.PeerEndpoint")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// EndorserClient is the client API for Endorser service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type EndorserClient interface {
ProcessProposal(ctx context.Context, in *SignedProposal, opts ...grpc.CallOption) (*ProposalResponse, error)
}
type endorserClient struct {
cc *grpc.ClientConn
}
func NewEndorserClient(cc *grpc.ClientConn) EndorserClient {
return &endorserClient{cc}
}
func (c *endorserClient) ProcessProposal(ctx context.Context, in *SignedProposal, opts ...grpc.CallOption) (*ProposalResponse, error) {
out := new(ProposalResponse)
err := c.cc.Invoke(ctx, "/protos.Endorser/ProcessProposal", in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// EndorserServer is the server API for Endorser service.
type EndorserServer interface {
ProcessProposal(context.Context, *SignedProposal) (*ProposalResponse, error)
}
func RegisterEndorserServer(s *grpc.Server, srv EndorserServer) {
s.RegisterService(&_Endorser_serviceDesc, srv)
}
func _Endorser_ProcessProposal_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SignedProposal)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(EndorserServer).ProcessProposal(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protos.Endorser/ProcessProposal",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(EndorserServer).ProcessProposal(ctx, req.(*SignedProposal))
}
return interceptor(ctx, in, info, handler)
}
var _Endorser_serviceDesc = grpc.ServiceDesc{
ServiceName: "protos.Endorser",
HandlerType: (*EndorserServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "ProcessProposal",
Handler: _Endorser_ProcessProposal_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "peer/peer.proto",
}
func init() { proto.RegisterFile("peer/peer.proto", fileDescriptor_peer_f225b6e437338532) }
var fileDescriptor_peer_f225b6e437338532 = []byte{
// 246 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x90, 0x4f, 0x4b, 0xc4, 0x30,
0x10, 0xc5, 0xdd, 0x22, 0xab, 0x8e, 0xe2, 0x42, 0x04, 0x29, 0x65, 0x11, 0xe9, 0x49, 0x2f, 0x29,
0xac, 0xdf, 0x40, 0x2c, 0xe8, 0xc9, 0x5a, 0x6f, 0x5e, 0xa4, 0x6d, 0xc6, 0x6e, 0x60, 0x37, 0x13,
0x66, 0xea, 0xc1, 0x6f, 0x2f, 0x4d, 0x5a, 0x71, 0x2f, 0xf9, 0xf3, 0xde, 0x6f, 0x5e, 0x26, 0x03,
0x2b, 0x8f, 0xc8, 0xc5, 0xb8, 0x68, 0xcf, 0x34, 0x90, 0x5a, 0x86, 0x4d, 0xb2, 0xab, 0x68, 0x30,
0x79, 0x92, 0x66, 0x17, 0xcd, 0x6c, 0x7d, 0x20, 0x7e, 0x32, 0x8a, 0x27, 0x27, 0x18, 0xdd, 0x7c,
0x0d, 0xcb, 0x0a, 0x91, 0x5f, 0x9e, 0x94, 0x82, 0x63, 0xd7, 0xec, 0x31, 0x5d, 0xdc, 0x2e, 0xee,
0xce, 0xea, 0x70, 0xce, 0x9f, 0xe1, 0x62, 0x74, 0x4b, 0x67, 0x3c, 0x59, 0x37, 0xa8, 0x1b, 0x48,
0xac, 0x09, 0xc4, 0xf9, 0xe6, 0x32, 0x26, 0x88, 0x8e, 0xf5, 0x75, 0x62, 0x8d, 0x4a,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