github.com/0chain/gosdk@v1.17.11/zcnbridge/mocks/KeyStore.go (about) 1 // Code generated by mockery v2.28.1. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 accounts "github.com/ethereum/go-ethereum/accounts" 7 keystore "github.com/ethereum/go-ethereum/accounts/keystore" 8 9 mock "github.com/stretchr/testify/mock" 10 11 time "time" 12 ) 13 14 // KeyStore is an autogenerated mock type for the KeyStore type 15 type KeyStore struct { 16 mock.Mock 17 } 18 19 // Find provides a mock function with given fields: _a0 20 func (_m *KeyStore) Find(_a0 accounts.Account) (accounts.Account, error) { 21 ret := _m.Called(_a0) 22 23 var r0 accounts.Account 24 var r1 error 25 if rf, ok := ret.Get(0).(func(accounts.Account) (accounts.Account, error)); ok { 26 return rf(_a0) 27 } 28 if rf, ok := ret.Get(0).(func(accounts.Account) accounts.Account); ok { 29 r0 = rf(_a0) 30 } else { 31 r0 = ret.Get(0).(accounts.Account) 32 } 33 34 if rf, ok := ret.Get(1).(func(accounts.Account) error); ok { 35 r1 = rf(_a0) 36 } else { 37 r1 = ret.Error(1) 38 } 39 40 return r0, r1 41 } 42 43 // GetEthereumKeyStore provides a mock function with given fields: 44 func (_m *KeyStore) GetEthereumKeyStore() *keystore.KeyStore { 45 ret := _m.Called() 46 47 var r0 *keystore.KeyStore 48 if rf, ok := ret.Get(0).(func() *keystore.KeyStore); ok { 49 r0 = rf() 50 } else { 51 if ret.Get(0) != nil { 52 r0 = ret.Get(0).(*keystore.KeyStore) 53 } 54 } 55 56 return r0 57 } 58 59 // SignHash provides a mock function with given fields: account, hash 60 func (_m *KeyStore) SignHash(account accounts.Account, hash []byte) ([]byte, error) { 61 ret := _m.Called(account, hash) 62 63 var r0 []byte 64 var r1 error 65 if rf, ok := ret.Get(0).(func(accounts.Account, []byte) ([]byte, error)); ok { 66 return rf(account, hash) 67 } 68 if rf, ok := ret.Get(0).(func(accounts.Account, []byte) []byte); ok { 69 r0 = rf(account, hash) 70 } else { 71 if ret.Get(0) != nil { 72 r0 = ret.Get(0).([]byte) 73 } 74 } 75 76 if rf, ok := ret.Get(1).(func(accounts.Account, []byte) error); ok { 77 r1 = rf(account, hash) 78 } else { 79 r1 = ret.Error(1) 80 } 81 82 return r0, r1 83 } 84 85 // TimedUnlock provides a mock function with given fields: _a0, _a1, _a2 86 func (_m *KeyStore) TimedUnlock(_a0 accounts.Account, _a1 string, _a2 time.Duration) error { 87 ret := _m.Called(_a0, _a1, _a2) 88 89 var r0 error 90 if rf, ok := ret.Get(0).(func(accounts.Account, string, time.Duration) error); ok { 91 r0 = rf(_a0, _a1, _a2) 92 } else { 93 r0 = ret.Error(0) 94 } 95 96 return r0 97 } 98 99 type mockConstructorTestingTNewKeyStore interface { 100 mock.TestingT 101 Cleanup(func()) 102 } 103 104 // NewKeyStore creates a new instance of KeyStore. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 105 func NewKeyStore(t mockConstructorTestingTNewKeyStore) *KeyStore { 106 mock := &KeyStore{} 107 mock.Mock.Test(t) 108 109 t.Cleanup(func() { mock.AssertExpectations(t) }) 110 111 return mock 112 }