/
chaincode_shim.pb.go
1184 lines (1061 loc) · 42.8 KB
/
chaincode_shim.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
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
//此源码被清华学神尹成大魔王专业翻译分析并修改
//尹成QQ77025077
//尹成微信18510341407
//尹成所在QQ群721929980
//尹成邮箱 yinc13@mails.tsinghua.edu.cn
//尹成毕业于清华大学,微软区块链领域全球最有价值专家
//https://mvp.microsoft.com/zh-cn/PublicProfile/4033620
//由Protoc Gen Go生成的代码。不要编辑。
//来源:peer/chaincode\u shim.proto
package peer //导入“github.com/hyperledger/fabric/protos/peer”
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import timestamp "github.com/golang/protobuf/ptypes/timestamp"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
//引用导入以禁止错误(如果未使用)。
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
//这是一个编译时断言,以确保生成的文件
//与正在编译的proto包兼容。
//此行的编译错误可能意味着您的
//需要更新proto包。
const _ = proto.ProtoPackageIsVersion2 //请升级proto包
type ChaincodeMessage_Type int32
const (
ChaincodeMessage_UNDEFINED ChaincodeMessage_Type = 0
ChaincodeMessage_REGISTER ChaincodeMessage_Type = 1
ChaincodeMessage_REGISTERED ChaincodeMessage_Type = 2
ChaincodeMessage_INIT ChaincodeMessage_Type = 3
ChaincodeMessage_READY ChaincodeMessage_Type = 4
ChaincodeMessage_TRANSACTION ChaincodeMessage_Type = 5
ChaincodeMessage_COMPLETED ChaincodeMessage_Type = 6
ChaincodeMessage_ERROR ChaincodeMessage_Type = 7
ChaincodeMessage_GET_STATE ChaincodeMessage_Type = 8
ChaincodeMessage_PUT_STATE ChaincodeMessage_Type = 9
ChaincodeMessage_DEL_STATE ChaincodeMessage_Type = 10
ChaincodeMessage_INVOKE_CHAINCODE ChaincodeMessage_Type = 11
ChaincodeMessage_RESPONSE ChaincodeMessage_Type = 13
ChaincodeMessage_GET_STATE_BY_RANGE ChaincodeMessage_Type = 14
ChaincodeMessage_GET_QUERY_RESULT ChaincodeMessage_Type = 15
ChaincodeMessage_QUERY_STATE_NEXT ChaincodeMessage_Type = 16
ChaincodeMessage_QUERY_STATE_CLOSE ChaincodeMessage_Type = 17
ChaincodeMessage_KEEPALIVE ChaincodeMessage_Type = 18
ChaincodeMessage_GET_HISTORY_FOR_KEY ChaincodeMessage_Type = 19
ChaincodeMessage_GET_STATE_METADATA ChaincodeMessage_Type = 20
ChaincodeMessage_PUT_STATE_METADATA ChaincodeMessage_Type = 21
)
var ChaincodeMessage_Type_name = map[int32]string{
0: "UNDEFINED",
1: "REGISTER",
2: "REGISTERED",
3: "INIT",
4: "READY",
5: "TRANSACTION",
6: "COMPLETED",
7: "ERROR",
8: "GET_STATE",
9: "PUT_STATE",
10: "DEL_STATE",
11: "INVOKE_CHAINCODE",
13: "RESPONSE",
14: "GET_STATE_BY_RANGE",
15: "GET_QUERY_RESULT",
16: "QUERY_STATE_NEXT",
17: "QUERY_STATE_CLOSE",
18: "KEEPALIVE",
19: "GET_HISTORY_FOR_KEY",
20: "GET_STATE_METADATA",
21: "PUT_STATE_METADATA",
}
var ChaincodeMessage_Type_value = map[string]int32{
"UNDEFINED": 0,
"REGISTER": 1,
"REGISTERED": 2,
"INIT": 3,
"READY": 4,
"TRANSACTION": 5,
"COMPLETED": 6,
"ERROR": 7,
"GET_STATE": 8,
"PUT_STATE": 9,
"DEL_STATE": 10,
"INVOKE_CHAINCODE": 11,
"RESPONSE": 13,
"GET_STATE_BY_RANGE": 14,
"GET_QUERY_RESULT": 15,
"QUERY_STATE_NEXT": 16,
"QUERY_STATE_CLOSE": 17,
"KEEPALIVE": 18,
"GET_HISTORY_FOR_KEY": 19,
"GET_STATE_METADATA": 20,
"PUT_STATE_METADATA": 21,
}
func (x ChaincodeMessage_Type) String() string {
return proto.EnumName(ChaincodeMessage_Type_name, int32(x))
}
func (ChaincodeMessage_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{0, 0}
}
type ChaincodeMessage struct {
Type ChaincodeMessage_Type `protobuf:"varint,1,opt,name=type,proto3,enum=protos.ChaincodeMessage_Type" json:"type,omitempty"`
Timestamp *timestamp.Timestamp `protobuf:"bytes,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
Txid string `protobuf:"bytes,4,opt,name=txid,proto3" json:"txid,omitempty"`
Proposal *SignedProposal `protobuf:"bytes,5,opt,name=proposal,proto3" json:"proposal,omitempty"`
//由链码发出的事件。仅与init或invoke一起使用。
//然后存储此事件(当前)
//使用block.nonhashdata.TransactionResult
ChaincodeEvent *ChaincodeEvent `protobuf:"bytes,6,opt,name=chaincode_event,json=chaincodeEvent,proto3" json:"chaincode_event,omitempty"`
//通道标识
ChannelId string `protobuf:"bytes,7,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ChaincodeMessage) Reset() { *m = ChaincodeMessage{} }
func (m *ChaincodeMessage) String() string { return proto.CompactTextString(m) }
func (*ChaincodeMessage) ProtoMessage() {}
func (*ChaincodeMessage) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{0}
}
func (m *ChaincodeMessage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ChaincodeMessage.Unmarshal(m, b)
}
func (m *ChaincodeMessage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ChaincodeMessage.Marshal(b, m, deterministic)
}
func (dst *ChaincodeMessage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ChaincodeMessage.Merge(dst, src)
}
func (m *ChaincodeMessage) XXX_Size() int {
return xxx_messageInfo_ChaincodeMessage.Size(m)
}
func (m *ChaincodeMessage) XXX_DiscardUnknown() {
xxx_messageInfo_ChaincodeMessage.DiscardUnknown(m)
}
var xxx_messageInfo_ChaincodeMessage proto.InternalMessageInfo
func (m *ChaincodeMessage) GetType() ChaincodeMessage_Type {
if m != nil {
return m.Type
}
return ChaincodeMessage_UNDEFINED
}
func (m *ChaincodeMessage) GetTimestamp() *timestamp.Timestamp {
if m != nil {
return m.Timestamp
}
return nil
}
func (m *ChaincodeMessage) GetPayload() []byte {
if m != nil {
return m.Payload
}
return nil
}
func (m *ChaincodeMessage) GetTxid() string {
if m != nil {
return m.Txid
}
return ""
}
func (m *ChaincodeMessage) GetProposal() *SignedProposal {
if m != nil {
return m.Proposal
}
return nil
}
func (m *ChaincodeMessage) GetChaincodeEvent() *ChaincodeEvent {
if m != nil {
return m.ChaincodeEvent
}
return nil
}
func (m *ChaincodeMessage) GetChannelId() string {
if m != nil {
return m.ChannelId
}
return ""
}
//GetState是链式代码消息的有效负载。它包含一把钥匙,
//将从分类帐中提取。如果指定了集合,则键
//将从集合中提取(即,私有状态)
type GetState struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetState) Reset() { *m = GetState{} }
func (m *GetState) String() string { return proto.CompactTextString(m) }
func (*GetState) ProtoMessage() {}
func (*GetState) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{1}
}
func (m *GetState) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetState.Unmarshal(m, b)
}
func (m *GetState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetState.Marshal(b, m, deterministic)
}
func (dst *GetState) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetState.Merge(dst, src)
}
func (m *GetState) XXX_Size() int {
return xxx_messageInfo_GetState.Size(m)
}
func (m *GetState) XXX_DiscardUnknown() {
xxx_messageInfo_GetState.DiscardUnknown(m)
}
var xxx_messageInfo_GetState proto.InternalMessageInfo
func (m *GetState) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *GetState) GetCollection() string {
if m != nil {
return m.Collection
}
return ""
}
type GetStateMetadata struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetStateMetadata) Reset() { *m = GetStateMetadata{} }
func (m *GetStateMetadata) String() string { return proto.CompactTextString(m) }
func (*GetStateMetadata) ProtoMessage() {}
func (*GetStateMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{2}
}
func (m *GetStateMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetStateMetadata.Unmarshal(m, b)
}
func (m *GetStateMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetStateMetadata.Marshal(b, m, deterministic)
}
func (dst *GetStateMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetStateMetadata.Merge(dst, src)
}
func (m *GetStateMetadata) XXX_Size() int {
return xxx_messageInfo_GetStateMetadata.Size(m)
}
func (m *GetStateMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_GetStateMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_GetStateMetadata proto.InternalMessageInfo
func (m *GetStateMetadata) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *GetStateMetadata) GetCollection() string {
if m != nil {
return m.Collection
}
return ""
}
//putstate是chaincodemessage的有效负载。它包含一个键和值
//需要写入事务的写入集。如果集合是
//指定后,密钥和值将写入事务的私有
//写集。
type PutState struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
Collection string `protobuf:"bytes,3,opt,name=collection,proto3" json:"collection,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PutState) Reset() { *m = PutState{} }
func (m *PutState) String() string { return proto.CompactTextString(m) }
func (*PutState) ProtoMessage() {}
func (*PutState) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{3}
}
func (m *PutState) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PutState.Unmarshal(m, b)
}
func (m *PutState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PutState.Marshal(b, m, deterministic)
}
func (dst *PutState) XXX_Merge(src proto.Message) {
xxx_messageInfo_PutState.Merge(dst, src)
}
func (m *PutState) XXX_Size() int {
return xxx_messageInfo_PutState.Size(m)
}
func (m *PutState) XXX_DiscardUnknown() {
xxx_messageInfo_PutState.DiscardUnknown(m)
}
var xxx_messageInfo_PutState proto.InternalMessageInfo
func (m *PutState) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *PutState) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
func (m *PutState) GetCollection() string {
if m != nil {
return m.Collection
}
return ""
}
type PutStateMetadata struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Collection string `protobuf:"bytes,3,opt,name=collection,proto3" json:"collection,omitempty"`
Metadata *StateMetadata `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *PutStateMetadata) Reset() { *m = PutStateMetadata{} }
func (m *PutStateMetadata) String() string { return proto.CompactTextString(m) }
func (*PutStateMetadata) ProtoMessage() {}
func (*PutStateMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{4}
}
func (m *PutStateMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PutStateMetadata.Unmarshal(m, b)
}
func (m *PutStateMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PutStateMetadata.Marshal(b, m, deterministic)
}
func (dst *PutStateMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_PutStateMetadata.Merge(dst, src)
}
func (m *PutStateMetadata) XXX_Size() int {
return xxx_messageInfo_PutStateMetadata.Size(m)
}
func (m *PutStateMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_PutStateMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_PutStateMetadata proto.InternalMessageInfo
func (m *PutStateMetadata) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *PutStateMetadata) GetCollection() string {
if m != nil {
return m.Collection
}
return ""
}
func (m *PutStateMetadata) GetMetadata() *StateMetadata {
if m != nil {
return m.Metadata
}
return nil
}
//delstate是chaincodemessage的有效负载。它包含一把钥匙,
//需要在事务的写入集中记录为删除操作。
//如果指定了集合,则需要在
//事务的私有写入设置为删除操作。
type DelState struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *DelState) Reset() { *m = DelState{} }
func (m *DelState) String() string { return proto.CompactTextString(m) }
func (*DelState) ProtoMessage() {}
func (*DelState) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{5}
}
func (m *DelState) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_DelState.Unmarshal(m, b)
}
func (m *DelState) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_DelState.Marshal(b, m, deterministic)
}
func (dst *DelState) XXX_Merge(src proto.Message) {
xxx_messageInfo_DelState.Merge(dst, src)
}
func (m *DelState) XXX_Size() int {
return xxx_messageInfo_DelState.Size(m)
}
func (m *DelState) XXX_DiscardUnknown() {
xxx_messageInfo_DelState.DiscardUnknown(m)
}
var xxx_messageInfo_DelState proto.InternalMessageInfo
func (m *DelState) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
func (m *DelState) GetCollection() string {
if m != nil {
return m.Collection
}
return ""
}
//GetStateByRange是链式代码消息的有效负载。它包含一个开始键和
//执行范围查询所需的结束键。如果指定了集合,
//需要对私有数据执行范围查询。元数据保留
//querymetadata的字节表示形式。
type GetStateByRange struct {
StartKey string `protobuf:"bytes,1,opt,name=startKey,proto3" json:"startKey,omitempty"`
EndKey string `protobuf:"bytes,2,opt,name=endKey,proto3" json:"endKey,omitempty"`
Collection string `protobuf:"bytes,3,opt,name=collection,proto3" json:"collection,omitempty"`
Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetStateByRange) Reset() { *m = GetStateByRange{} }
func (m *GetStateByRange) String() string { return proto.CompactTextString(m) }
func (*GetStateByRange) ProtoMessage() {}
func (*GetStateByRange) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{6}
}
func (m *GetStateByRange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetStateByRange.Unmarshal(m, b)
}
func (m *GetStateByRange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetStateByRange.Marshal(b, m, deterministic)
}
func (dst *GetStateByRange) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetStateByRange.Merge(dst, src)
}
func (m *GetStateByRange) XXX_Size() int {
return xxx_messageInfo_GetStateByRange.Size(m)
}
func (m *GetStateByRange) XXX_DiscardUnknown() {
xxx_messageInfo_GetStateByRange.DiscardUnknown(m)
}
var xxx_messageInfo_GetStateByRange proto.InternalMessageInfo
func (m *GetStateByRange) GetStartKey() string {
if m != nil {
return m.StartKey
}
return ""
}
func (m *GetStateByRange) GetEndKey() string {
if m != nil {
return m.EndKey
}
return ""
}
func (m *GetStateByRange) GetCollection() string {
if m != nil {
return m.Collection
}
return ""
}
func (m *GetStateByRange) GetMetadata() []byte {
if m != nil {
return m.Metadata
}
return nil
}
//GetQueryResult是chaincodeMessage的有效负载。它包含一个查询
//基础状态数据库支持的窗体中的字符串。
//如果指定了集合,则需要在
//私有数据。元数据包含querymetadata的字节表示形式。
type GetQueryResult struct {
Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
Collection string `protobuf:"bytes,2,opt,name=collection,proto3" json:"collection,omitempty"`
Metadata []byte `protobuf:"bytes,3,opt,name=metadata,proto3" json:"metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetQueryResult) Reset() { *m = GetQueryResult{} }
func (m *GetQueryResult) String() string { return proto.CompactTextString(m) }
func (*GetQueryResult) ProtoMessage() {}
func (*GetQueryResult) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{7}
}
func (m *GetQueryResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetQueryResult.Unmarshal(m, b)
}
func (m *GetQueryResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetQueryResult.Marshal(b, m, deterministic)
}
func (dst *GetQueryResult) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetQueryResult.Merge(dst, src)
}
func (m *GetQueryResult) XXX_Size() int {
return xxx_messageInfo_GetQueryResult.Size(m)
}
func (m *GetQueryResult) XXX_DiscardUnknown() {
xxx_messageInfo_GetQueryResult.DiscardUnknown(m)
}
var xxx_messageInfo_GetQueryResult proto.InternalMessageInfo
func (m *GetQueryResult) GetQuery() string {
if m != nil {
return m.Query
}
return ""
}
func (m *GetQueryResult) GetCollection() string {
if m != nil {
return m.Collection
}
return ""
}
func (m *GetQueryResult) GetMetadata() []byte {
if m != nil {
return m.Metadata
}
return nil
}
//QueryMetadata是GetStateByRange和GetQueryResult的元数据。
//它包含一个页面大小,表示要提取的记录数。
//还有书签。
type QueryMetadata struct {
PageSize int32 `protobuf:"varint,1,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
Bookmark string `protobuf:"bytes,2,opt,name=bookmark,proto3" json:"bookmark,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryMetadata) Reset() { *m = QueryMetadata{} }
func (m *QueryMetadata) String() string { return proto.CompactTextString(m) }
func (*QueryMetadata) ProtoMessage() {}
func (*QueryMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{8}
}
func (m *QueryMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryMetadata.Unmarshal(m, b)
}
func (m *QueryMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryMetadata.Marshal(b, m, deterministic)
}
func (dst *QueryMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryMetadata.Merge(dst, src)
}
func (m *QueryMetadata) XXX_Size() int {
return xxx_messageInfo_QueryMetadata.Size(m)
}
func (m *QueryMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_QueryMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_QueryMetadata proto.InternalMessageInfo
func (m *QueryMetadata) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *QueryMetadata) GetBookmark() string {
if m != nil {
return m.Bookmark
}
return ""
}
//GetHistoryForkey是链式代码消息的有效负载。它包含一把钥匙
//需要检索历史值。
type GetHistoryForKey struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *GetHistoryForKey) Reset() { *m = GetHistoryForKey{} }
func (m *GetHistoryForKey) String() string { return proto.CompactTextString(m) }
func (*GetHistoryForKey) ProtoMessage() {}
func (*GetHistoryForKey) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{9}
}
func (m *GetHistoryForKey) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_GetHistoryForKey.Unmarshal(m, b)
}
func (m *GetHistoryForKey) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_GetHistoryForKey.Marshal(b, m, deterministic)
}
func (dst *GetHistoryForKey) XXX_Merge(src proto.Message) {
xxx_messageInfo_GetHistoryForKey.Merge(dst, src)
}
func (m *GetHistoryForKey) XXX_Size() int {
return xxx_messageInfo_GetHistoryForKey.Size(m)
}
func (m *GetHistoryForKey) XXX_DiscardUnknown() {
xxx_messageInfo_GetHistoryForKey.DiscardUnknown(m)
}
var xxx_messageInfo_GetHistoryForKey proto.InternalMessageInfo
func (m *GetHistoryForKey) GetKey() string {
if m != nil {
return m.Key
}
return ""
}
type QueryStateNext struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryStateNext) Reset() { *m = QueryStateNext{} }
func (m *QueryStateNext) String() string { return proto.CompactTextString(m) }
func (*QueryStateNext) ProtoMessage() {}
func (*QueryStateNext) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{10}
}
func (m *QueryStateNext) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryStateNext.Unmarshal(m, b)
}
func (m *QueryStateNext) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryStateNext.Marshal(b, m, deterministic)
}
func (dst *QueryStateNext) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryStateNext.Merge(dst, src)
}
func (m *QueryStateNext) XXX_Size() int {
return xxx_messageInfo_QueryStateNext.Size(m)
}
func (m *QueryStateNext) XXX_DiscardUnknown() {
xxx_messageInfo_QueryStateNext.DiscardUnknown(m)
}
var xxx_messageInfo_QueryStateNext proto.InternalMessageInfo
func (m *QueryStateNext) GetId() string {
if m != nil {
return m.Id
}
return ""
}
type QueryStateClose struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryStateClose) Reset() { *m = QueryStateClose{} }
func (m *QueryStateClose) String() string { return proto.CompactTextString(m) }
func (*QueryStateClose) ProtoMessage() {}
func (*QueryStateClose) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{11}
}
func (m *QueryStateClose) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryStateClose.Unmarshal(m, b)
}
func (m *QueryStateClose) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryStateClose.Marshal(b, m, deterministic)
}
func (dst *QueryStateClose) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryStateClose.Merge(dst, src)
}
func (m *QueryStateClose) XXX_Size() int {
return xxx_messageInfo_QueryStateClose.Size(m)
}
func (m *QueryStateClose) XXX_DiscardUnknown() {
xxx_messageInfo_QueryStateClose.DiscardUnknown(m)
}
var xxx_messageInfo_QueryStateClose proto.InternalMessageInfo
func (m *QueryStateClose) GetId() string {
if m != nil {
return m.Id
}
return ""
}
//queryresultBytes保留对等方返回的记录的字节表示形式。
type QueryResultBytes struct {
ResultBytes []byte `protobuf:"bytes,1,opt,name=resultBytes,proto3" json:"resultBytes,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryResultBytes) Reset() { *m = QueryResultBytes{} }
func (m *QueryResultBytes) String() string { return proto.CompactTextString(m) }
func (*QueryResultBytes) ProtoMessage() {}
func (*QueryResultBytes) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{12}
}
func (m *QueryResultBytes) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryResultBytes.Unmarshal(m, b)
}
func (m *QueryResultBytes) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryResultBytes.Marshal(b, m, deterministic)
}
func (dst *QueryResultBytes) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryResultBytes.Merge(dst, src)
}
func (m *QueryResultBytes) XXX_Size() int {
return xxx_messageInfo_QueryResultBytes.Size(m)
}
func (m *QueryResultBytes) XXX_DiscardUnknown() {
xxx_messageInfo_QueryResultBytes.DiscardUnknown(m)
}
var xxx_messageInfo_QueryResultBytes proto.InternalMessageInfo
func (m *QueryResultBytes) GetResultBytes() []byte {
if m != nil {
return m.ResultBytes
}
return nil
}
//对等端作为getStateByRange的结果返回queryResponse,
//GetQueryResult和GetHistoryForkey。里面有一堆记录
//结果字段,指示是否需要从中提取更多结果的标志。
//中的对等机具有更多字段、ID字段中的事务ID和QueryResponseMetadata
//在元数据字段中。
type QueryResponse struct {
Results []*QueryResultBytes `protobuf:"bytes,1,rep,name=results,proto3" json:"results,omitempty"`
HasMore bool `protobuf:"varint,2,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"`
Id string `protobuf:"bytes,3,opt,name=id,proto3" json:"id,omitempty"`
Metadata []byte `protobuf:"bytes,4,opt,name=metadata,proto3" json:"metadata,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryResponse) Reset() { *m = QueryResponse{} }
func (m *QueryResponse) String() string { return proto.CompactTextString(m) }
func (*QueryResponse) ProtoMessage() {}
func (*QueryResponse) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{13}
}
func (m *QueryResponse) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryResponse.Unmarshal(m, b)
}
func (m *QueryResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryResponse.Marshal(b, m, deterministic)
}
func (dst *QueryResponse) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryResponse.Merge(dst, src)
}
func (m *QueryResponse) XXX_Size() int {
return xxx_messageInfo_QueryResponse.Size(m)
}
func (m *QueryResponse) XXX_DiscardUnknown() {
xxx_messageInfo_QueryResponse.DiscardUnknown(m)
}
var xxx_messageInfo_QueryResponse proto.InternalMessageInfo
func (m *QueryResponse) GetResults() []*QueryResultBytes {
if m != nil {
return m.Results
}
return nil
}
func (m *QueryResponse) GetHasMore() bool {
if m != nil {
return m.HasMore
}
return false
}
func (m *QueryResponse) GetId() string {
if m != nil {
return m.Id
}
return ""
}
func (m *QueryResponse) GetMetadata() []byte {
if m != nil {
return m.Metadata
}
return nil
}
//QueryResponseMetadata是QueryResponse的元数据。它包含一个计数
//它表示从分类帐和书签中提取的记录数。
type QueryResponseMetadata struct {
FetchedRecordsCount int32 `protobuf:"varint,1,opt,name=fetched_records_count,json=fetchedRecordsCount,proto3" json:"fetched_records_count,omitempty"`
Bookmark string `protobuf:"bytes,2,opt,name=bookmark,proto3" json:"bookmark,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryResponseMetadata) Reset() { *m = QueryResponseMetadata{} }
func (m *QueryResponseMetadata) String() string { return proto.CompactTextString(m) }
func (*QueryResponseMetadata) ProtoMessage() {}
func (*QueryResponseMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{14}
}
func (m *QueryResponseMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryResponseMetadata.Unmarshal(m, b)
}
func (m *QueryResponseMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryResponseMetadata.Marshal(b, m, deterministic)
}
func (dst *QueryResponseMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryResponseMetadata.Merge(dst, src)
}
func (m *QueryResponseMetadata) XXX_Size() int {
return xxx_messageInfo_QueryResponseMetadata.Size(m)
}
func (m *QueryResponseMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_QueryResponseMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_QueryResponseMetadata proto.InternalMessageInfo
func (m *QueryResponseMetadata) GetFetchedRecordsCount() int32 {
if m != nil {
return m.FetchedRecordsCount
}
return 0
}
func (m *QueryResponseMetadata) GetBookmark() string {
if m != nil {
return m.Bookmark
}
return ""
}
type StateMetadata struct {
Metakey string `protobuf:"bytes,1,opt,name=metakey,proto3" json:"metakey,omitempty"`
Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StateMetadata) Reset() { *m = StateMetadata{} }
func (m *StateMetadata) String() string { return proto.CompactTextString(m) }
func (*StateMetadata) ProtoMessage() {}
func (*StateMetadata) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{15}
}
func (m *StateMetadata) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StateMetadata.Unmarshal(m, b)
}
func (m *StateMetadata) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StateMetadata.Marshal(b, m, deterministic)
}
func (dst *StateMetadata) XXX_Merge(src proto.Message) {
xxx_messageInfo_StateMetadata.Merge(dst, src)
}
func (m *StateMetadata) XXX_Size() int {
return xxx_messageInfo_StateMetadata.Size(m)
}
func (m *StateMetadata) XXX_DiscardUnknown() {
xxx_messageInfo_StateMetadata.DiscardUnknown(m)
}
var xxx_messageInfo_StateMetadata proto.InternalMessageInfo
func (m *StateMetadata) GetMetakey() string {
if m != nil {
return m.Metakey
}
return ""
}
func (m *StateMetadata) GetValue() []byte {
if m != nil {
return m.Value
}
return nil
}
type StateMetadataResult struct {
Entries []*StateMetadata `protobuf:"bytes,1,rep,name=entries,proto3" json:"entries,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *StateMetadataResult) Reset() { *m = StateMetadataResult{} }
func (m *StateMetadataResult) String() string { return proto.CompactTextString(m) }
func (*StateMetadataResult) ProtoMessage() {}
func (*StateMetadataResult) Descriptor() ([]byte, []int) {
return fileDescriptor_chaincode_shim_3c6cdf1ba834f673, []int{16}
}
func (m *StateMetadataResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StateMetadataResult.Unmarshal(m, b)
}
func (m *StateMetadataResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StateMetadataResult.Marshal(b, m, deterministic)
}
func (dst *StateMetadataResult) XXX_Merge(src proto.Message) {
xxx_messageInfo_StateMetadataResult.Merge(dst, src)
}
func (m *StateMetadataResult) XXX_Size() int {
return xxx_messageInfo_StateMetadataResult.Size(m)
}
func (m *StateMetadataResult) XXX_DiscardUnknown() {
xxx_messageInfo_StateMetadataResult.DiscardUnknown(m)
}
var xxx_messageInfo_StateMetadataResult proto.InternalMessageInfo
func (m *StateMetadataResult) GetEntries() []*StateMetadata {
if m != nil {
return m.Entries
}
return nil
}
func init() {
proto.RegisterType((*ChaincodeMessage)(nil), "protos.ChaincodeMessage")
proto.RegisterType((*GetState)(nil), "protos.GetState")
proto.RegisterType((*GetStateMetadata)(nil), "protos.GetStateMetadata")
proto.RegisterType((*PutState)(nil), "protos.PutState")
proto.RegisterType((*PutStateMetadata)(nil), "protos.PutStateMetadata")
proto.RegisterType((*DelState)(nil), "protos.DelState")
proto.RegisterType((*GetStateByRange)(nil), "protos.GetStateByRange")
proto.RegisterType((*GetQueryResult)(nil), "protos.GetQueryResult")
proto.RegisterType((*QueryMetadata)(nil), "protos.QueryMetadata")
proto.RegisterType((*GetHistoryForKey)(nil), "protos.GetHistoryForKey")
proto.RegisterType((*QueryStateNext)(nil), "protos.QueryStateNext")