github.com/vipernet-xyz/tm@v0.34.24/proxy/mocks/app_conn_snapshot.go (about) 1 // Code generated by mockery. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 mock "github.com/stretchr/testify/mock" 7 8 types "github.com/vipernet-xyz/tm/abci/types" 9 ) 10 11 // AppConnSnapshot is an autogenerated mock type for the AppConnSnapshot type 12 type AppConnSnapshot struct { 13 mock.Mock 14 } 15 16 // ApplySnapshotChunkSync provides a mock function with given fields: _a0 17 func (_m *AppConnSnapshot) ApplySnapshotChunkSync(_a0 types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) { 18 ret := _m.Called(_a0) 19 20 var r0 *types.ResponseApplySnapshotChunk 21 if rf, ok := ret.Get(0).(func(types.RequestApplySnapshotChunk) *types.ResponseApplySnapshotChunk); ok { 22 r0 = rf(_a0) 23 } else { 24 if ret.Get(0) != nil { 25 r0 = ret.Get(0).(*types.ResponseApplySnapshotChunk) 26 } 27 } 28 29 var r1 error 30 if rf, ok := ret.Get(1).(func(types.RequestApplySnapshotChunk) error); ok { 31 r1 = rf(_a0) 32 } else { 33 r1 = ret.Error(1) 34 } 35 36 return r0, r1 37 } 38 39 // Error provides a mock function with given fields: 40 func (_m *AppConnSnapshot) Error() error { 41 ret := _m.Called() 42 43 var r0 error 44 if rf, ok := ret.Get(0).(func() error); ok { 45 r0 = rf() 46 } else { 47 r0 = ret.Error(0) 48 } 49 50 return r0 51 } 52 53 // ListSnapshotsSync provides a mock function with given fields: _a0 54 func (_m *AppConnSnapshot) ListSnapshotsSync(_a0 types.RequestListSnapshots) (*types.ResponseListSnapshots, error) { 55 ret := _m.Called(_a0) 56 57 var r0 *types.ResponseListSnapshots 58 if rf, ok := ret.Get(0).(func(types.RequestListSnapshots) *types.ResponseListSnapshots); ok { 59 r0 = rf(_a0) 60 } else { 61 if ret.Get(0) != nil { 62 r0 = ret.Get(0).(*types.ResponseListSnapshots) 63 } 64 } 65 66 var r1 error 67 if rf, ok := ret.Get(1).(func(types.RequestListSnapshots) error); ok { 68 r1 = rf(_a0) 69 } else { 70 r1 = ret.Error(1) 71 } 72 73 return r0, r1 74 } 75 76 // LoadSnapshotChunkSync provides a mock function with given fields: _a0 77 func (_m *AppConnSnapshot) LoadSnapshotChunkSync(_a0 types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) { 78 ret := _m.Called(_a0) 79 80 var r0 *types.ResponseLoadSnapshotChunk 81 if rf, ok := ret.Get(0).(func(types.RequestLoadSnapshotChunk) *types.ResponseLoadSnapshotChunk); ok { 82 r0 = rf(_a0) 83 } else { 84 if ret.Get(0) != nil { 85 r0 = ret.Get(0).(*types.ResponseLoadSnapshotChunk) 86 } 87 } 88 89 var r1 error 90 if rf, ok := ret.Get(1).(func(types.RequestLoadSnapshotChunk) error); ok { 91 r1 = rf(_a0) 92 } else { 93 r1 = ret.Error(1) 94 } 95 96 return r0, r1 97 } 98 99 // OfferSnapshotSync provides a mock function with given fields: _a0 100 func (_m *AppConnSnapshot) OfferSnapshotSync(_a0 types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) { 101 ret := _m.Called(_a0) 102 103 var r0 *types.ResponseOfferSnapshot 104 if rf, ok := ret.Get(0).(func(types.RequestOfferSnapshot) *types.ResponseOfferSnapshot); ok { 105 r0 = rf(_a0) 106 } else { 107 if ret.Get(0) != nil { 108 r0 = ret.Get(0).(*types.ResponseOfferSnapshot) 109 } 110 } 111 112 var r1 error 113 if rf, ok := ret.Get(1).(func(types.RequestOfferSnapshot) error); ok { 114 r1 = rf(_a0) 115 } else { 116 r1 = ret.Error(1) 117 } 118 119 return r0, r1 120 } 121 122 type NewAppConnSnapshotT interface { 123 mock.TestingT 124 Cleanup(func()) 125 } 126 127 // NewAppConnSnapshot creates a new instance of AppConnSnapshot. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. 128 func NewAppConnSnapshot(t NewAppConnSnapshotT) *AppConnSnapshot { 129 mock := &AppConnSnapshot{} 130 mock.Mock.Test(t) 131 132 t.Cleanup(func() { mock.AssertExpectations(t) }) 133 134 return mock 135 }