github.com/Hnampk/fabric@v2.1.1+incompatible/gossip/privdata/mocks/collection_store.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package mocks 4 5 import ledger "github.com/hyperledger/fabric/core/ledger" 6 import mock "github.com/stretchr/testify/mock" 7 import peer "github.com/hyperledger/fabric-protos-go/peer" 8 import privdata "github.com/hyperledger/fabric/core/common/privdata" 9 10 // CollectionStore is an autogenerated mock type for the CollectionStore type 11 type CollectionStore struct { 12 mock.Mock 13 } 14 15 // AccessFilter provides a mock function with given fields: channelName, collectionPolicyConfig 16 func (_m *CollectionStore) AccessFilter(channelName string, collectionPolicyConfig *peer.CollectionPolicyConfig) (privdata.Filter, error) { 17 ret := _m.Called(channelName, collectionPolicyConfig) 18 19 var r0 privdata.Filter 20 if rf, ok := ret.Get(0).(func(string, *peer.CollectionPolicyConfig) privdata.Filter); ok { 21 r0 = rf(channelName, collectionPolicyConfig) 22 } else { 23 if ret.Get(0) != nil { 24 r0 = ret.Get(0).(privdata.Filter) 25 } 26 } 27 28 var r1 error 29 if rf, ok := ret.Get(1).(func(string, *peer.CollectionPolicyConfig) error); ok { 30 r1 = rf(channelName, collectionPolicyConfig) 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 // RetrieveCollection provides a mock function with given fields: _a0 39 func (_m *CollectionStore) RetrieveCollection(_a0 privdata.CollectionCriteria) (privdata.Collection, error) { 40 ret := _m.Called(_a0) 41 42 var r0 privdata.Collection 43 if rf, ok := ret.Get(0).(func(privdata.CollectionCriteria) privdata.Collection); ok { 44 r0 = rf(_a0) 45 } else { 46 if ret.Get(0) != nil { 47 r0 = ret.Get(0).(privdata.Collection) 48 } 49 } 50 51 var r1 error 52 if rf, ok := ret.Get(1).(func(privdata.CollectionCriteria) error); ok { 53 r1 = rf(_a0) 54 } else { 55 r1 = ret.Error(1) 56 } 57 58 return r0, r1 59 } 60 61 // RetrieveCollectionAccessPolicy provides a mock function with given fields: _a0 62 func (_m *CollectionStore) RetrieveCollectionAccessPolicy(_a0 privdata.CollectionCriteria) (privdata.CollectionAccessPolicy, error) { 63 ret := _m.Called(_a0) 64 65 var r0 privdata.CollectionAccessPolicy 66 if rf, ok := ret.Get(0).(func(privdata.CollectionCriteria) privdata.CollectionAccessPolicy); ok { 67 r0 = rf(_a0) 68 } else { 69 if ret.Get(0) != nil { 70 r0 = ret.Get(0).(privdata.CollectionAccessPolicy) 71 } 72 } 73 74 var r1 error 75 if rf, ok := ret.Get(1).(func(privdata.CollectionCriteria) error); ok { 76 r1 = rf(_a0) 77 } else { 78 r1 = ret.Error(1) 79 } 80 81 return r0, r1 82 } 83 84 // RetrieveCollectionConfig provides a mock function with given fields: _a0 85 func (_m *CollectionStore) RetrieveCollectionConfig(_a0 privdata.CollectionCriteria) (*peer.StaticCollectionConfig, error) { 86 ret := _m.Called(_a0) 87 88 var r0 *peer.StaticCollectionConfig 89 if rf, ok := ret.Get(0).(func(privdata.CollectionCriteria) *peer.StaticCollectionConfig); ok { 90 r0 = rf(_a0) 91 } else { 92 if ret.Get(0) != nil { 93 r0 = ret.Get(0).(*peer.StaticCollectionConfig) 94 } 95 } 96 97 var r1 error 98 if rf, ok := ret.Get(1).(func(privdata.CollectionCriteria) error); ok { 99 r1 = rf(_a0) 100 } else { 101 r1 = ret.Error(1) 102 } 103 104 return r0, r1 105 } 106 107 // RetrieveCollectionConfigPackage provides a mock function with given fields: _a0 108 func (_m *CollectionStore) RetrieveCollectionConfigPackage(_a0 privdata.CollectionCriteria) (*peer.CollectionConfigPackage, error) { 109 ret := _m.Called(_a0) 110 111 var r0 *peer.CollectionConfigPackage 112 if rf, ok := ret.Get(0).(func(privdata.CollectionCriteria) *peer.CollectionConfigPackage); ok { 113 r0 = rf(_a0) 114 } else { 115 if ret.Get(0) != nil { 116 r0 = ret.Get(0).(*peer.CollectionConfigPackage) 117 } 118 } 119 120 var r1 error 121 if rf, ok := ret.Get(1).(func(privdata.CollectionCriteria) error); ok { 122 r1 = rf(_a0) 123 } else { 124 r1 = ret.Error(1) 125 } 126 127 return r0, r1 128 } 129 130 // RetrieveCollectionPersistenceConfigs provides a mock function with given fields: _a0 131 func (_m *CollectionStore) RetrieveCollectionPersistenceConfigs(_a0 privdata.CollectionCriteria) (privdata.CollectionPersistenceConfigs, error) { 132 ret := _m.Called(_a0) 133 134 var r0 privdata.CollectionPersistenceConfigs 135 if rf, ok := ret.Get(0).(func(privdata.CollectionCriteria) privdata.CollectionPersistenceConfigs); ok { 136 r0 = rf(_a0) 137 } else { 138 if ret.Get(0) != nil { 139 r0 = ret.Get(0).(privdata.CollectionPersistenceConfigs) 140 } 141 } 142 143 var r1 error 144 if rf, ok := ret.Get(1).(func(privdata.CollectionCriteria) error); ok { 145 r1 = rf(_a0) 146 } else { 147 r1 = ret.Error(1) 148 } 149 150 return r0, r1 151 } 152 153 // RetrieveReadWritePermission provides a mock function with given fields: _a0, _a1, _a2 154 func (_m *CollectionStore) RetrieveReadWritePermission(_a0 privdata.CollectionCriteria, _a1 *peer.SignedProposal, _a2 ledger.QueryExecutor) (bool, bool, error) { 155 ret := _m.Called(_a0, _a1, _a2) 156 157 var r0 bool 158 if rf, ok := ret.Get(0).(func(privdata.CollectionCriteria, *peer.SignedProposal, ledger.QueryExecutor) bool); ok { 159 r0 = rf(_a0, _a1, _a2) 160 } else { 161 r0 = ret.Get(0).(bool) 162 } 163 164 var r1 bool 165 if rf, ok := ret.Get(1).(func(privdata.CollectionCriteria, *peer.SignedProposal, ledger.QueryExecutor) bool); ok { 166 r1 = rf(_a0, _a1, _a2) 167 } else { 168 r1 = ret.Get(1).(bool) 169 } 170 171 var r2 error 172 if rf, ok := ret.Get(2).(func(privdata.CollectionCriteria, *peer.SignedProposal, ledger.QueryExecutor) error); ok { 173 r2 = rf(_a0, _a1, _a2) 174 } else { 175 r2 = ret.Error(2) 176 } 177 178 return r0, r1, r2 179 }