forked from hyperledger/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.pb.go
324 lines (292 loc) · 10.9 KB
/
api.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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
// Code generated by protoc-gen-go.
// source: api.proto
// DO NOT EDIT!
/*
Package protos is a generated protocol buffer package.
It is generated from these files:
api.proto
chaincodeevent.proto
chaincode.proto
devops.proto
events.proto
fabric.proto
server_admin.proto
It has these top-level messages:
BlockNumber
BlockCount
ChaincodeEvent
ChaincodeID
ChaincodeInput
ChaincodeSpec
ChaincodeDeploymentSpec
ChaincodeInvocationSpec
ChaincodeSecurityContext
ChaincodeMessage
PutStateInfo
RangeQueryState
RangeQueryStateNext
RangeQueryStateClose
RangeQueryStateKeyValue
RangeQueryStateResponse
Secret
SigmaInput
ExecuteWithBinding
SigmaOutput
BuildResult
TransactionRequest
ChaincodeReg
Interest
Register
Rejection
Unregister
Event
Transaction
TransactionBlock
TransactionResult
Block
BlockchainInfo
NonHashData
PeerAddress
PeerID
PeerEndpoint
PeersMessage
PeersAddresses
HelloMessage
Message
Response
BlockState
SyncBlockRange
SyncBlocks
SyncStateSnapshotRequest
SyncStateSnapshot
SyncStateDeltasRequest
SyncStateDeltas
ServerStatus
*/
package protos
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import google_protobuf1 "github.com/golang/protobuf/ptypes/empty"
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
// Specifies the block number to be returned from the blockchain.
type BlockNumber struct {
Number uint64 `protobuf:"varint,1,opt,name=number" json:"number,omitempty"`
}
func (m *BlockNumber) Reset() { *m = BlockNumber{} }
func (m *BlockNumber) String() string { return proto.CompactTextString(m) }
func (*BlockNumber) ProtoMessage() {}
func (*BlockNumber) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
// Specifies the current number of blocks in the blockchain.
type BlockCount struct {
Count uint64 `protobuf:"varint,1,opt,name=count" json:"count,omitempty"`
}
func (m *BlockCount) Reset() { *m = BlockCount{} }
func (m *BlockCount) String() string { return proto.CompactTextString(m) }
func (*BlockCount) ProtoMessage() {}
func (*BlockCount) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func init() {
proto.RegisterType((*BlockNumber)(nil), "protos.BlockNumber")
proto.RegisterType((*BlockCount)(nil), "protos.BlockCount")
}
// 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.SupportPackageIsVersion3
// Client API for Openchain service
type OpenchainClient interface {
// GetBlockchainInfo returns information about the blockchain ledger such as
// height, current block hash, and previous block hash.
GetBlockchainInfo(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*BlockchainInfo, error)
// GetBlockByNumber returns the data contained within a specific block in the
// blockchain. The genesis block is block zero.
GetBlockByNumber(ctx context.Context, in *BlockNumber, opts ...grpc.CallOption) (*Block, error)
// GetBlockCount returns the current number of blocks in the blockchain data
// structure.
GetBlockCount(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*BlockCount, error)
// GetPeers returns a list of all peer nodes currently connected to the target
// peer.
GetPeers(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*PeersMessage, error)
}
type openchainClient struct {
cc *grpc.ClientConn
}
func NewOpenchainClient(cc *grpc.ClientConn) OpenchainClient {
return &openchainClient{cc}
}
func (c *openchainClient) GetBlockchainInfo(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*BlockchainInfo, error) {
out := new(BlockchainInfo)
err := grpc.Invoke(ctx, "/protos.Openchain/GetBlockchainInfo", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *openchainClient) GetBlockByNumber(ctx context.Context, in *BlockNumber, opts ...grpc.CallOption) (*Block, error) {
out := new(Block)
err := grpc.Invoke(ctx, "/protos.Openchain/GetBlockByNumber", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *openchainClient) GetBlockCount(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*BlockCount, error) {
out := new(BlockCount)
err := grpc.Invoke(ctx, "/protos.Openchain/GetBlockCount", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *openchainClient) GetPeers(ctx context.Context, in *google_protobuf1.Empty, opts ...grpc.CallOption) (*PeersMessage, error) {
out := new(PeersMessage)
err := grpc.Invoke(ctx, "/protos.Openchain/GetPeers", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Openchain service
type OpenchainServer interface {
// GetBlockchainInfo returns information about the blockchain ledger such as
// height, current block hash, and previous block hash.
GetBlockchainInfo(context.Context, *google_protobuf1.Empty) (*BlockchainInfo, error)
// GetBlockByNumber returns the data contained within a specific block in the
// blockchain. The genesis block is block zero.
GetBlockByNumber(context.Context, *BlockNumber) (*Block, error)
// GetBlockCount returns the current number of blocks in the blockchain data
// structure.
GetBlockCount(context.Context, *google_protobuf1.Empty) (*BlockCount, error)
// GetPeers returns a list of all peer nodes currently connected to the target
// peer.
GetPeers(context.Context, *google_protobuf1.Empty) (*PeersMessage, error)
}
func RegisterOpenchainServer(s *grpc.Server, srv OpenchainServer) {
s.RegisterService(&_Openchain_serviceDesc, srv)
}
func _Openchain_GetBlockchainInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(google_protobuf1.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OpenchainServer).GetBlockchainInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protos.Openchain/GetBlockchainInfo",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OpenchainServer).GetBlockchainInfo(ctx, req.(*google_protobuf1.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Openchain_GetBlockByNumber_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(BlockNumber)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OpenchainServer).GetBlockByNumber(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protos.Openchain/GetBlockByNumber",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OpenchainServer).GetBlockByNumber(ctx, req.(*BlockNumber))
}
return interceptor(ctx, in, info, handler)
}
func _Openchain_GetBlockCount_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(google_protobuf1.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OpenchainServer).GetBlockCount(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protos.Openchain/GetBlockCount",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OpenchainServer).GetBlockCount(ctx, req.(*google_protobuf1.Empty))
}
return interceptor(ctx, in, info, handler)
}
func _Openchain_GetPeers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(google_protobuf1.Empty)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(OpenchainServer).GetPeers(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/protos.Openchain/GetPeers",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(OpenchainServer).GetPeers(ctx, req.(*google_protobuf1.Empty))
}
return interceptor(ctx, in, info, handler)
}
var _Openchain_serviceDesc = grpc.ServiceDesc{
ServiceName: "protos.Openchain",
HandlerType: (*OpenchainServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetBlockchainInfo",
Handler: _Openchain_GetBlockchainInfo_Handler,
},
{
MethodName: "GetBlockByNumber",
Handler: _Openchain_GetBlockByNumber_Handler,
},
{
MethodName: "GetBlockCount",
Handler: _Openchain_GetBlockCount_Handler,
},
{
MethodName: "GetPeers",
Handler: _Openchain_GetPeers_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: fileDescriptor0,
}
func init() { proto.RegisterFile("api.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
// 244 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0xe2,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, 0x5b, 0x71, 0x71, 0x00, 0xb5, 0x07, 0xa4, 0xa6, 0x16,
0x15, 0xe3, 0xd4, 0x29, 0x02, 0xd3, 0x09, 0x56, 0xe6, 0x9b, 0x5a, 0x5c, 0x9c, 0x98, 0x9e, 0xaa,
0xc4, 0x90, 0x04, 0x89, 0x07, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x41, 0xce, 0xa8, 0xc9,
0x9b, 0x01, 0x00, 0x00,
}