github.com/turingchain2020/turingchain@v1.1.21/blockchain/mocks/commonstore.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  
     7  // CommonStore is an autogenerated mock type for the CommonStore type
     8  type CommonStore struct {
     9  	mock.Mock
    10  }
    11  
    12  // GetKey provides a mock function with given fields: key
    13  func (_m *CommonStore) GetKey(key []byte) ([]byte, error) {
    14  	ret := _m.Called(key)
    15  
    16  	var r0 []byte
    17  	if rf, ok := ret.Get(0).(func([]byte) []byte); ok {
    18  		r0 = rf(key)
    19  	} else {
    20  		if ret.Get(0) != nil {
    21  			r0 = ret.Get(0).([]byte)
    22  		}
    23  	}
    24  
    25  	var r1 error
    26  	if rf, ok := ret.Get(1).(func([]byte) error); ok {
    27  		r1 = rf(key)
    28  	} else {
    29  		r1 = ret.Error(1)
    30  	}
    31  
    32  	return r0, r1
    33  }
    34  
    35  // List provides a mock function with given fields: prefix
    36  func (_m *CommonStore) List(prefix []byte) ([][]byte, error) {
    37  	ret := _m.Called(prefix)
    38  
    39  	var r0 [][]byte
    40  	if rf, ok := ret.Get(0).(func([]byte) [][]byte); ok {
    41  		r0 = rf(prefix)
    42  	} else {
    43  		if ret.Get(0) != nil {
    44  			r0 = ret.Get(0).([][]byte)
    45  		}
    46  	}
    47  
    48  	var r1 error
    49  	if rf, ok := ret.Get(1).(func([]byte) error); ok {
    50  		r1 = rf(prefix)
    51  	} else {
    52  		r1 = ret.Error(1)
    53  	}
    54  
    55  	return r0, r1
    56  }
    57  
    58  // PrefixCount provides a mock function with given fields: prefix
    59  func (_m *CommonStore) PrefixCount(prefix []byte) int64 {
    60  	ret := _m.Called(prefix)
    61  
    62  	var r0 int64
    63  	if rf, ok := ret.Get(0).(func([]byte) int64); ok {
    64  		r0 = rf(prefix)
    65  	} else {
    66  		r0 = ret.Get(0).(int64)
    67  	}
    68  
    69  	return r0
    70  }
    71  
    72  // Set provides a mock function with given fields: key, value
    73  func (_m *CommonStore) Set(key []byte, value []byte) error {
    74  	ret := _m.Called(key, value)
    75  
    76  	var r0 error
    77  	if rf, ok := ret.Get(0).(func([]byte, []byte) error); ok {
    78  		r0 = rf(key, value)
    79  	} else {
    80  		r0 = ret.Error(0)
    81  	}
    82  
    83  	return r0
    84  }
    85  
    86  // SetSync provides a mock function with given fields: key, value
    87  func (_m *CommonStore) SetSync(key []byte, value []byte) error {
    88  	ret := _m.Called(key, value)
    89  
    90  	var r0 error
    91  	if rf, ok := ret.Get(0).(func([]byte, []byte) error); ok {
    92  		r0 = rf(key, value)
    93  	} else {
    94  		r0 = ret.Error(0)
    95  	}
    96  
    97  	return r0
    98  }