forked from tw-bc-group/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
/
chaincode_stub.go
2878 lines (2663 loc) · 94.8 KB
/
chaincode_stub.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
// Code generated by counterfeiter. DO NOT EDIT.
package mock
import (
sync "sync"
timestamp "github.com/golang/protobuf/ptypes/timestamp"
shim "github.com/hyperledger/fabric/core/chaincode/shim"
peer "github.com/hyperledger/fabric/protos/peer"
)
type ChaincodeStub struct {
CreateCompositeKeyStub func(string, []string) (string, error)
createCompositeKeyMutex sync.RWMutex
createCompositeKeyArgsForCall []struct {
arg1 string
arg2 []string
}
createCompositeKeyReturns struct {
result1 string
result2 error
}
createCompositeKeyReturnsOnCall map[int]struct {
result1 string
result2 error
}
DelPrivateDataStub func(string, string) error
delPrivateDataMutex sync.RWMutex
delPrivateDataArgsForCall []struct {
arg1 string
arg2 string
}
delPrivateDataReturns struct {
result1 error
}
delPrivateDataReturnsOnCall map[int]struct {
result1 error
}
DelStateStub func(string) error
delStateMutex sync.RWMutex
delStateArgsForCall []struct {
arg1 string
}
delStateReturns struct {
result1 error
}
delStateReturnsOnCall map[int]struct {
result1 error
}
GetArgsStub func() [][]byte
getArgsMutex sync.RWMutex
getArgsArgsForCall []struct {
}
getArgsReturns struct {
result1 [][]byte
}
getArgsReturnsOnCall map[int]struct {
result1 [][]byte
}
GetArgsSliceStub func() ([]byte, error)
getArgsSliceMutex sync.RWMutex
getArgsSliceArgsForCall []struct {
}
getArgsSliceReturns struct {
result1 []byte
result2 error
}
getArgsSliceReturnsOnCall map[int]struct {
result1 []byte
result2 error
}
GetBindingStub func() ([]byte, error)
getBindingMutex sync.RWMutex
getBindingArgsForCall []struct {
}
getBindingReturns struct {
result1 []byte
result2 error
}
getBindingReturnsOnCall map[int]struct {
result1 []byte
result2 error
}
GetChannelIDStub func() string
getChannelIDMutex sync.RWMutex
getChannelIDArgsForCall []struct {
}
getChannelIDReturns struct {
result1 string
}
getChannelIDReturnsOnCall map[int]struct {
result1 string
}
GetCreatorStub func() ([]byte, error)
getCreatorMutex sync.RWMutex
getCreatorArgsForCall []struct {
}
getCreatorReturns struct {
result1 []byte
result2 error
}
getCreatorReturnsOnCall map[int]struct {
result1 []byte
result2 error
}
GetDecorationsStub func() map[string][]byte
getDecorationsMutex sync.RWMutex
getDecorationsArgsForCall []struct {
}
getDecorationsReturns struct {
result1 map[string][]byte
}
getDecorationsReturnsOnCall map[int]struct {
result1 map[string][]byte
}
GetFunctionAndParametersStub func() (string, []string)
getFunctionAndParametersMutex sync.RWMutex
getFunctionAndParametersArgsForCall []struct {
}
getFunctionAndParametersReturns struct {
result1 string
result2 []string
}
getFunctionAndParametersReturnsOnCall map[int]struct {
result1 string
result2 []string
}
GetHistoryForKeyStub func(string) (shim.HistoryQueryIteratorInterface, error)
getHistoryForKeyMutex sync.RWMutex
getHistoryForKeyArgsForCall []struct {
arg1 string
}
getHistoryForKeyReturns struct {
result1 shim.HistoryQueryIteratorInterface
result2 error
}
getHistoryForKeyReturnsOnCall map[int]struct {
result1 shim.HistoryQueryIteratorInterface
result2 error
}
GetPrivateDataStub func(string, string) ([]byte, error)
getPrivateDataMutex sync.RWMutex
getPrivateDataArgsForCall []struct {
arg1 string
arg2 string
}
getPrivateDataReturns struct {
result1 []byte
result2 error
}
getPrivateDataReturnsOnCall map[int]struct {
result1 []byte
result2 error
}
GetPrivateDataByPartialCompositeKeyStub func(string, string, []string) (shim.StateQueryIteratorInterface, error)
getPrivateDataByPartialCompositeKeyMutex sync.RWMutex
getPrivateDataByPartialCompositeKeyArgsForCall []struct {
arg1 string
arg2 string
arg3 []string
}
getPrivateDataByPartialCompositeKeyReturns struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
getPrivateDataByPartialCompositeKeyReturnsOnCall map[int]struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
GetPrivateDataByRangeStub func(string, string, string) (shim.StateQueryIteratorInterface, error)
getPrivateDataByRangeMutex sync.RWMutex
getPrivateDataByRangeArgsForCall []struct {
arg1 string
arg2 string
arg3 string
}
getPrivateDataByRangeReturns struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
getPrivateDataByRangeReturnsOnCall map[int]struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
GetPrivateDataHashStub func(string, string) ([]byte, error)
getPrivateDataHashMutex sync.RWMutex
getPrivateDataHashArgsForCall []struct {
arg1 string
arg2 string
}
getPrivateDataHashReturns struct {
result1 []byte
result2 error
}
getPrivateDataHashReturnsOnCall map[int]struct {
result1 []byte
result2 error
}
GetPrivateDataQueryResultStub func(string, string) (shim.StateQueryIteratorInterface, error)
getPrivateDataQueryResultMutex sync.RWMutex
getPrivateDataQueryResultArgsForCall []struct {
arg1 string
arg2 string
}
getPrivateDataQueryResultReturns struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
getPrivateDataQueryResultReturnsOnCall map[int]struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
GetPrivateDataValidationParameterStub func(string, string) ([]byte, error)
getPrivateDataValidationParameterMutex sync.RWMutex
getPrivateDataValidationParameterArgsForCall []struct {
arg1 string
arg2 string
}
getPrivateDataValidationParameterReturns struct {
result1 []byte
result2 error
}
getPrivateDataValidationParameterReturnsOnCall map[int]struct {
result1 []byte
result2 error
}
GetQueryResultStub func(string) (shim.StateQueryIteratorInterface, error)
getQueryResultMutex sync.RWMutex
getQueryResultArgsForCall []struct {
arg1 string
}
getQueryResultReturns struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
getQueryResultReturnsOnCall map[int]struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
GetQueryResultWithPaginationStub func(string, int32, string) (shim.StateQueryIteratorInterface, *peer.QueryResponseMetadata, error)
getQueryResultWithPaginationMutex sync.RWMutex
getQueryResultWithPaginationArgsForCall []struct {
arg1 string
arg2 int32
arg3 string
}
getQueryResultWithPaginationReturns struct {
result1 shim.StateQueryIteratorInterface
result2 *peer.QueryResponseMetadata
result3 error
}
getQueryResultWithPaginationReturnsOnCall map[int]struct {
result1 shim.StateQueryIteratorInterface
result2 *peer.QueryResponseMetadata
result3 error
}
GetSignedProposalStub func() (*peer.SignedProposal, error)
getSignedProposalMutex sync.RWMutex
getSignedProposalArgsForCall []struct {
}
getSignedProposalReturns struct {
result1 *peer.SignedProposal
result2 error
}
getSignedProposalReturnsOnCall map[int]struct {
result1 *peer.SignedProposal
result2 error
}
GetStateStub func(string) ([]byte, error)
getStateMutex sync.RWMutex
getStateArgsForCall []struct {
arg1 string
}
getStateReturns struct {
result1 []byte
result2 error
}
getStateReturnsOnCall map[int]struct {
result1 []byte
result2 error
}
GetStateByPartialCompositeKeyStub func(string, []string) (shim.StateQueryIteratorInterface, error)
getStateByPartialCompositeKeyMutex sync.RWMutex
getStateByPartialCompositeKeyArgsForCall []struct {
arg1 string
arg2 []string
}
getStateByPartialCompositeKeyReturns struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
getStateByPartialCompositeKeyReturnsOnCall map[int]struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
GetStateByPartialCompositeKeyWithPaginationStub func(string, []string, int32, string) (shim.StateQueryIteratorInterface, *peer.QueryResponseMetadata, error)
getStateByPartialCompositeKeyWithPaginationMutex sync.RWMutex
getStateByPartialCompositeKeyWithPaginationArgsForCall []struct {
arg1 string
arg2 []string
arg3 int32
arg4 string
}
getStateByPartialCompositeKeyWithPaginationReturns struct {
result1 shim.StateQueryIteratorInterface
result2 *peer.QueryResponseMetadata
result3 error
}
getStateByPartialCompositeKeyWithPaginationReturnsOnCall map[int]struct {
result1 shim.StateQueryIteratorInterface
result2 *peer.QueryResponseMetadata
result3 error
}
GetStateByRangeStub func(string, string) (shim.StateQueryIteratorInterface, error)
getStateByRangeMutex sync.RWMutex
getStateByRangeArgsForCall []struct {
arg1 string
arg2 string
}
getStateByRangeReturns struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
getStateByRangeReturnsOnCall map[int]struct {
result1 shim.StateQueryIteratorInterface
result2 error
}
GetStateByRangeWithPaginationStub func(string, string, int32, string) (shim.StateQueryIteratorInterface, *peer.QueryResponseMetadata, error)
getStateByRangeWithPaginationMutex sync.RWMutex
getStateByRangeWithPaginationArgsForCall []struct {
arg1 string
arg2 string
arg3 int32
arg4 string
}
getStateByRangeWithPaginationReturns struct {
result1 shim.StateQueryIteratorInterface
result2 *peer.QueryResponseMetadata
result3 error
}
getStateByRangeWithPaginationReturnsOnCall map[int]struct {
result1 shim.StateQueryIteratorInterface
result2 *peer.QueryResponseMetadata
result3 error
}
GetStateValidationParameterStub func(string) ([]byte, error)
getStateValidationParameterMutex sync.RWMutex
getStateValidationParameterArgsForCall []struct {
arg1 string
}
getStateValidationParameterReturns struct {
result1 []byte
result2 error
}
getStateValidationParameterReturnsOnCall map[int]struct {
result1 []byte
result2 error
}
GetStringArgsStub func() []string
getStringArgsMutex sync.RWMutex
getStringArgsArgsForCall []struct {
}
getStringArgsReturns struct {
result1 []string
}
getStringArgsReturnsOnCall map[int]struct {
result1 []string
}
GetTransientStub func() (map[string][]byte, error)
getTransientMutex sync.RWMutex
getTransientArgsForCall []struct {
}
getTransientReturns struct {
result1 map[string][]byte
result2 error
}
getTransientReturnsOnCall map[int]struct {
result1 map[string][]byte
result2 error
}
GetTxIDStub func() string
getTxIDMutex sync.RWMutex
getTxIDArgsForCall []struct {
}
getTxIDReturns struct {
result1 string
}
getTxIDReturnsOnCall map[int]struct {
result1 string
}
GetTxTimestampStub func() (*timestamp.Timestamp, error)
getTxTimestampMutex sync.RWMutex
getTxTimestampArgsForCall []struct {
}
getTxTimestampReturns struct {
result1 *timestamp.Timestamp
result2 error
}
getTxTimestampReturnsOnCall map[int]struct {
result1 *timestamp.Timestamp
result2 error
}
InvokeChaincodeStub func(string, [][]byte, string) peer.Response
invokeChaincodeMutex sync.RWMutex
invokeChaincodeArgsForCall []struct {
arg1 string
arg2 [][]byte
arg3 string
}
invokeChaincodeReturns struct {
result1 peer.Response
}
invokeChaincodeReturnsOnCall map[int]struct {
result1 peer.Response
}
PutPrivateDataStub func(string, string, []byte) error
putPrivateDataMutex sync.RWMutex
putPrivateDataArgsForCall []struct {
arg1 string
arg2 string
arg3 []byte
}
putPrivateDataReturns struct {
result1 error
}
putPrivateDataReturnsOnCall map[int]struct {
result1 error
}
PutStateStub func(string, []byte) error
putStateMutex sync.RWMutex
putStateArgsForCall []struct {
arg1 string
arg2 []byte
}
putStateReturns struct {
result1 error
}
putStateReturnsOnCall map[int]struct {
result1 error
}
SetEventStub func(string, []byte) error
setEventMutex sync.RWMutex
setEventArgsForCall []struct {
arg1 string
arg2 []byte
}
setEventReturns struct {
result1 error
}
setEventReturnsOnCall map[int]struct {
result1 error
}
SetPrivateDataValidationParameterStub func(string, string, []byte) error
setPrivateDataValidationParameterMutex sync.RWMutex
setPrivateDataValidationParameterArgsForCall []struct {
arg1 string
arg2 string
arg3 []byte
}
setPrivateDataValidationParameterReturns struct {
result1 error
}
setPrivateDataValidationParameterReturnsOnCall map[int]struct {
result1 error
}
SetStateValidationParameterStub func(string, []byte) error
setStateValidationParameterMutex sync.RWMutex
setStateValidationParameterArgsForCall []struct {
arg1 string
arg2 []byte
}
setStateValidationParameterReturns struct {
result1 error
}
setStateValidationParameterReturnsOnCall map[int]struct {
result1 error
}
SplitCompositeKeyStub func(string) (string, []string, error)
splitCompositeKeyMutex sync.RWMutex
splitCompositeKeyArgsForCall []struct {
arg1 string
}
splitCompositeKeyReturns struct {
result1 string
result2 []string
result3 error
}
splitCompositeKeyReturnsOnCall map[int]struct {
result1 string
result2 []string
result3 error
}
invocations map[string][][]interface{}
invocationsMutex sync.RWMutex
}
func (fake *ChaincodeStub) CreateCompositeKey(arg1 string, arg2 []string) (string, error) {
var arg2Copy []string
if arg2 != nil {
arg2Copy = make([]string, len(arg2))
copy(arg2Copy, arg2)
}
fake.createCompositeKeyMutex.Lock()
ret, specificReturn := fake.createCompositeKeyReturnsOnCall[len(fake.createCompositeKeyArgsForCall)]
fake.createCompositeKeyArgsForCall = append(fake.createCompositeKeyArgsForCall, struct {
arg1 string
arg2 []string
}{arg1, arg2Copy})
fake.recordInvocation("CreateCompositeKey", []interface{}{arg1, arg2Copy})
fake.createCompositeKeyMutex.Unlock()
if fake.CreateCompositeKeyStub != nil {
return fake.CreateCompositeKeyStub(arg1, arg2)
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.createCompositeKeyReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *ChaincodeStub) CreateCompositeKeyCallCount() int {
fake.createCompositeKeyMutex.RLock()
defer fake.createCompositeKeyMutex.RUnlock()
return len(fake.createCompositeKeyArgsForCall)
}
func (fake *ChaincodeStub) CreateCompositeKeyCalls(stub func(string, []string) (string, error)) {
fake.createCompositeKeyMutex.Lock()
defer fake.createCompositeKeyMutex.Unlock()
fake.CreateCompositeKeyStub = stub
}
func (fake *ChaincodeStub) CreateCompositeKeyArgsForCall(i int) (string, []string) {
fake.createCompositeKeyMutex.RLock()
defer fake.createCompositeKeyMutex.RUnlock()
argsForCall := fake.createCompositeKeyArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
}
func (fake *ChaincodeStub) CreateCompositeKeyReturns(result1 string, result2 error) {
fake.createCompositeKeyMutex.Lock()
defer fake.createCompositeKeyMutex.Unlock()
fake.CreateCompositeKeyStub = nil
fake.createCompositeKeyReturns = struct {
result1 string
result2 error
}{result1, result2}
}
func (fake *ChaincodeStub) CreateCompositeKeyReturnsOnCall(i int, result1 string, result2 error) {
fake.createCompositeKeyMutex.Lock()
defer fake.createCompositeKeyMutex.Unlock()
fake.CreateCompositeKeyStub = nil
if fake.createCompositeKeyReturnsOnCall == nil {
fake.createCompositeKeyReturnsOnCall = make(map[int]struct {
result1 string
result2 error
})
}
fake.createCompositeKeyReturnsOnCall[i] = struct {
result1 string
result2 error
}{result1, result2}
}
func (fake *ChaincodeStub) DelPrivateData(arg1 string, arg2 string) error {
fake.delPrivateDataMutex.Lock()
ret, specificReturn := fake.delPrivateDataReturnsOnCall[len(fake.delPrivateDataArgsForCall)]
fake.delPrivateDataArgsForCall = append(fake.delPrivateDataArgsForCall, struct {
arg1 string
arg2 string
}{arg1, arg2})
fake.recordInvocation("DelPrivateData", []interface{}{arg1, arg2})
fake.delPrivateDataMutex.Unlock()
if fake.DelPrivateDataStub != nil {
return fake.DelPrivateDataStub(arg1, arg2)
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.delPrivateDataReturns
return fakeReturns.result1
}
func (fake *ChaincodeStub) DelPrivateDataCallCount() int {
fake.delPrivateDataMutex.RLock()
defer fake.delPrivateDataMutex.RUnlock()
return len(fake.delPrivateDataArgsForCall)
}
func (fake *ChaincodeStub) DelPrivateDataCalls(stub func(string, string) error) {
fake.delPrivateDataMutex.Lock()
defer fake.delPrivateDataMutex.Unlock()
fake.DelPrivateDataStub = stub
}
func (fake *ChaincodeStub) DelPrivateDataArgsForCall(i int) (string, string) {
fake.delPrivateDataMutex.RLock()
defer fake.delPrivateDataMutex.RUnlock()
argsForCall := fake.delPrivateDataArgsForCall[i]
return argsForCall.arg1, argsForCall.arg2
}
func (fake *ChaincodeStub) DelPrivateDataReturns(result1 error) {
fake.delPrivateDataMutex.Lock()
defer fake.delPrivateDataMutex.Unlock()
fake.DelPrivateDataStub = nil
fake.delPrivateDataReturns = struct {
result1 error
}{result1}
}
func (fake *ChaincodeStub) DelPrivateDataReturnsOnCall(i int, result1 error) {
fake.delPrivateDataMutex.Lock()
defer fake.delPrivateDataMutex.Unlock()
fake.DelPrivateDataStub = nil
if fake.delPrivateDataReturnsOnCall == nil {
fake.delPrivateDataReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.delPrivateDataReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *ChaincodeStub) DelState(arg1 string) error {
fake.delStateMutex.Lock()
ret, specificReturn := fake.delStateReturnsOnCall[len(fake.delStateArgsForCall)]
fake.delStateArgsForCall = append(fake.delStateArgsForCall, struct {
arg1 string
}{arg1})
fake.recordInvocation("DelState", []interface{}{arg1})
fake.delStateMutex.Unlock()
if fake.DelStateStub != nil {
return fake.DelStateStub(arg1)
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.delStateReturns
return fakeReturns.result1
}
func (fake *ChaincodeStub) DelStateCallCount() int {
fake.delStateMutex.RLock()
defer fake.delStateMutex.RUnlock()
return len(fake.delStateArgsForCall)
}
func (fake *ChaincodeStub) DelStateCalls(stub func(string) error) {
fake.delStateMutex.Lock()
defer fake.delStateMutex.Unlock()
fake.DelStateStub = stub
}
func (fake *ChaincodeStub) DelStateArgsForCall(i int) string {
fake.delStateMutex.RLock()
defer fake.delStateMutex.RUnlock()
argsForCall := fake.delStateArgsForCall[i]
return argsForCall.arg1
}
func (fake *ChaincodeStub) DelStateReturns(result1 error) {
fake.delStateMutex.Lock()
defer fake.delStateMutex.Unlock()
fake.DelStateStub = nil
fake.delStateReturns = struct {
result1 error
}{result1}
}
func (fake *ChaincodeStub) DelStateReturnsOnCall(i int, result1 error) {
fake.delStateMutex.Lock()
defer fake.delStateMutex.Unlock()
fake.DelStateStub = nil
if fake.delStateReturnsOnCall == nil {
fake.delStateReturnsOnCall = make(map[int]struct {
result1 error
})
}
fake.delStateReturnsOnCall[i] = struct {
result1 error
}{result1}
}
func (fake *ChaincodeStub) GetArgs() [][]byte {
fake.getArgsMutex.Lock()
ret, specificReturn := fake.getArgsReturnsOnCall[len(fake.getArgsArgsForCall)]
fake.getArgsArgsForCall = append(fake.getArgsArgsForCall, struct {
}{})
fake.recordInvocation("GetArgs", []interface{}{})
fake.getArgsMutex.Unlock()
if fake.GetArgsStub != nil {
return fake.GetArgsStub()
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.getArgsReturns
return fakeReturns.result1
}
func (fake *ChaincodeStub) GetArgsCallCount() int {
fake.getArgsMutex.RLock()
defer fake.getArgsMutex.RUnlock()
return len(fake.getArgsArgsForCall)
}
func (fake *ChaincodeStub) GetArgsCalls(stub func() [][]byte) {
fake.getArgsMutex.Lock()
defer fake.getArgsMutex.Unlock()
fake.GetArgsStub = stub
}
func (fake *ChaincodeStub) GetArgsReturns(result1 [][]byte) {
fake.getArgsMutex.Lock()
defer fake.getArgsMutex.Unlock()
fake.GetArgsStub = nil
fake.getArgsReturns = struct {
result1 [][]byte
}{result1}
}
func (fake *ChaincodeStub) GetArgsReturnsOnCall(i int, result1 [][]byte) {
fake.getArgsMutex.Lock()
defer fake.getArgsMutex.Unlock()
fake.GetArgsStub = nil
if fake.getArgsReturnsOnCall == nil {
fake.getArgsReturnsOnCall = make(map[int]struct {
result1 [][]byte
})
}
fake.getArgsReturnsOnCall[i] = struct {
result1 [][]byte
}{result1}
}
func (fake *ChaincodeStub) GetArgsSlice() ([]byte, error) {
fake.getArgsSliceMutex.Lock()
ret, specificReturn := fake.getArgsSliceReturnsOnCall[len(fake.getArgsSliceArgsForCall)]
fake.getArgsSliceArgsForCall = append(fake.getArgsSliceArgsForCall, struct {
}{})
fake.recordInvocation("GetArgsSlice", []interface{}{})
fake.getArgsSliceMutex.Unlock()
if fake.GetArgsSliceStub != nil {
return fake.GetArgsSliceStub()
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.getArgsSliceReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *ChaincodeStub) GetArgsSliceCallCount() int {
fake.getArgsSliceMutex.RLock()
defer fake.getArgsSliceMutex.RUnlock()
return len(fake.getArgsSliceArgsForCall)
}
func (fake *ChaincodeStub) GetArgsSliceCalls(stub func() ([]byte, error)) {
fake.getArgsSliceMutex.Lock()
defer fake.getArgsSliceMutex.Unlock()
fake.GetArgsSliceStub = stub
}
func (fake *ChaincodeStub) GetArgsSliceReturns(result1 []byte, result2 error) {
fake.getArgsSliceMutex.Lock()
defer fake.getArgsSliceMutex.Unlock()
fake.GetArgsSliceStub = nil
fake.getArgsSliceReturns = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *ChaincodeStub) GetArgsSliceReturnsOnCall(i int, result1 []byte, result2 error) {
fake.getArgsSliceMutex.Lock()
defer fake.getArgsSliceMutex.Unlock()
fake.GetArgsSliceStub = nil
if fake.getArgsSliceReturnsOnCall == nil {
fake.getArgsSliceReturnsOnCall = make(map[int]struct {
result1 []byte
result2 error
})
}
fake.getArgsSliceReturnsOnCall[i] = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *ChaincodeStub) GetBinding() ([]byte, error) {
fake.getBindingMutex.Lock()
ret, specificReturn := fake.getBindingReturnsOnCall[len(fake.getBindingArgsForCall)]
fake.getBindingArgsForCall = append(fake.getBindingArgsForCall, struct {
}{})
fake.recordInvocation("GetBinding", []interface{}{})
fake.getBindingMutex.Unlock()
if fake.GetBindingStub != nil {
return fake.GetBindingStub()
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.getBindingReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *ChaincodeStub) GetBindingCallCount() int {
fake.getBindingMutex.RLock()
defer fake.getBindingMutex.RUnlock()
return len(fake.getBindingArgsForCall)
}
func (fake *ChaincodeStub) GetBindingCalls(stub func() ([]byte, error)) {
fake.getBindingMutex.Lock()
defer fake.getBindingMutex.Unlock()
fake.GetBindingStub = stub
}
func (fake *ChaincodeStub) GetBindingReturns(result1 []byte, result2 error) {
fake.getBindingMutex.Lock()
defer fake.getBindingMutex.Unlock()
fake.GetBindingStub = nil
fake.getBindingReturns = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *ChaincodeStub) GetBindingReturnsOnCall(i int, result1 []byte, result2 error) {
fake.getBindingMutex.Lock()
defer fake.getBindingMutex.Unlock()
fake.GetBindingStub = nil
if fake.getBindingReturnsOnCall == nil {
fake.getBindingReturnsOnCall = make(map[int]struct {
result1 []byte
result2 error
})
}
fake.getBindingReturnsOnCall[i] = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *ChaincodeStub) GetChannelID() string {
fake.getChannelIDMutex.Lock()
ret, specificReturn := fake.getChannelIDReturnsOnCall[len(fake.getChannelIDArgsForCall)]
fake.getChannelIDArgsForCall = append(fake.getChannelIDArgsForCall, struct {
}{})
fake.recordInvocation("GetChannelID", []interface{}{})
fake.getChannelIDMutex.Unlock()
if fake.GetChannelIDStub != nil {
return fake.GetChannelIDStub()
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.getChannelIDReturns
return fakeReturns.result1
}
func (fake *ChaincodeStub) GetChannelIDCallCount() int {
fake.getChannelIDMutex.RLock()
defer fake.getChannelIDMutex.RUnlock()
return len(fake.getChannelIDArgsForCall)
}
func (fake *ChaincodeStub) GetChannelIDCalls(stub func() string) {
fake.getChannelIDMutex.Lock()
defer fake.getChannelIDMutex.Unlock()
fake.GetChannelIDStub = stub
}
func (fake *ChaincodeStub) GetChannelIDReturns(result1 string) {
fake.getChannelIDMutex.Lock()
defer fake.getChannelIDMutex.Unlock()
fake.GetChannelIDStub = nil
fake.getChannelIDReturns = struct {
result1 string
}{result1}
}
func (fake *ChaincodeStub) GetChannelIDReturnsOnCall(i int, result1 string) {
fake.getChannelIDMutex.Lock()
defer fake.getChannelIDMutex.Unlock()
fake.GetChannelIDStub = nil
if fake.getChannelIDReturnsOnCall == nil {
fake.getChannelIDReturnsOnCall = make(map[int]struct {
result1 string
})
}
fake.getChannelIDReturnsOnCall[i] = struct {
result1 string
}{result1}
}
func (fake *ChaincodeStub) GetCreator() ([]byte, error) {
fake.getCreatorMutex.Lock()
ret, specificReturn := fake.getCreatorReturnsOnCall[len(fake.getCreatorArgsForCall)]
fake.getCreatorArgsForCall = append(fake.getCreatorArgsForCall, struct {
}{})
fake.recordInvocation("GetCreator", []interface{}{})
fake.getCreatorMutex.Unlock()
if fake.GetCreatorStub != nil {
return fake.GetCreatorStub()
}
if specificReturn {
return ret.result1, ret.result2
}
fakeReturns := fake.getCreatorReturns
return fakeReturns.result1, fakeReturns.result2
}
func (fake *ChaincodeStub) GetCreatorCallCount() int {
fake.getCreatorMutex.RLock()
defer fake.getCreatorMutex.RUnlock()
return len(fake.getCreatorArgsForCall)
}
func (fake *ChaincodeStub) GetCreatorCalls(stub func() ([]byte, error)) {
fake.getCreatorMutex.Lock()
defer fake.getCreatorMutex.Unlock()
fake.GetCreatorStub = stub
}
func (fake *ChaincodeStub) GetCreatorReturns(result1 []byte, result2 error) {
fake.getCreatorMutex.Lock()
defer fake.getCreatorMutex.Unlock()
fake.GetCreatorStub = nil
fake.getCreatorReturns = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *ChaincodeStub) GetCreatorReturnsOnCall(i int, result1 []byte, result2 error) {
fake.getCreatorMutex.Lock()
defer fake.getCreatorMutex.Unlock()
fake.GetCreatorStub = nil
if fake.getCreatorReturnsOnCall == nil {
fake.getCreatorReturnsOnCall = make(map[int]struct {
result1 []byte
result2 error
})
}
fake.getCreatorReturnsOnCall[i] = struct {
result1 []byte
result2 error
}{result1, result2}
}
func (fake *ChaincodeStub) GetDecorations() map[string][]byte {
fake.getDecorationsMutex.Lock()
ret, specificReturn := fake.getDecorationsReturnsOnCall[len(fake.getDecorationsArgsForCall)]
fake.getDecorationsArgsForCall = append(fake.getDecorationsArgsForCall, struct {
}{})
fake.recordInvocation("GetDecorations", []interface{}{})
fake.getDecorationsMutex.Unlock()
if fake.GetDecorationsStub != nil {
return fake.GetDecorationsStub()
}
if specificReturn {
return ret.result1
}
fakeReturns := fake.getDecorationsReturns
return fakeReturns.result1
}
func (fake *ChaincodeStub) GetDecorationsCallCount() int {
fake.getDecorationsMutex.RLock()
defer fake.getDecorationsMutex.RUnlock()
return len(fake.getDecorationsArgsForCall)
}
func (fake *ChaincodeStub) GetDecorationsCalls(stub func() map[string][]byte) {
fake.getDecorationsMutex.Lock()
defer fake.getDecorationsMutex.Unlock()
fake.GetDecorationsStub = stub
}
func (fake *ChaincodeStub) GetDecorationsReturns(result1 map[string][]byte) {
fake.getDecorationsMutex.Lock()
defer fake.getDecorationsMutex.Unlock()
fake.GetDecorationsStub = nil
fake.getDecorationsReturns = struct {
result1 map[string][]byte
}{result1}
}
func (fake *ChaincodeStub) GetDecorationsReturnsOnCall(i int, result1 map[string][]byte) {
fake.getDecorationsMutex.Lock()
defer fake.getDecorationsMutex.Unlock()
fake.GetDecorationsStub = nil
if fake.getDecorationsReturnsOnCall == nil {
fake.getDecorationsReturnsOnCall = make(map[int]struct {
result1 map[string][]byte