github.com/Hnampk/fabric@v2.1.1+incompatible/gossip/privdata/mocks/collection_access_factory.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import mock "github.com/stretchr/testify/mock"
     6  import peer "github.com/hyperledger/fabric-protos-go/peer"
     7  import privdata "github.com/hyperledger/fabric/core/common/privdata"
     8  
     9  // CollectionAccessFactory is an autogenerated mock type for the CollectionAccessFactory type
    10  type CollectionAccessFactory struct {
    11  	mock.Mock
    12  }
    13  
    14  // AccessPolicy provides a mock function with given fields: config, chainID
    15  func (_m *CollectionAccessFactory) AccessPolicy(config *peer.CollectionConfig, chainID string) (privdata.CollectionAccessPolicy, error) {
    16  	ret := _m.Called(config, chainID)
    17  
    18  	var r0 privdata.CollectionAccessPolicy
    19  	if rf, ok := ret.Get(0).(func(*peer.CollectionConfig, string) privdata.CollectionAccessPolicy); ok {
    20  		r0 = rf(config, chainID)
    21  	} else {
    22  		if ret.Get(0) != nil {
    23  			r0 = ret.Get(0).(privdata.CollectionAccessPolicy)
    24  		}
    25  	}
    26  
    27  	var r1 error
    28  	if rf, ok := ret.Get(1).(func(*peer.CollectionConfig, string) error); ok {
    29  		r1 = rf(config, chainID)
    30  	} else {
    31  		r1 = ret.Error(1)
    32  	}
    33  
    34  	return r0, r1
    35  }