github.com/aakash4dev/cometbft@v0.38.2/proxy/mocks/app_conn_snapshot.go (about)

     1  // Code generated by mockery. DO NOT EDIT.
     2  
     3  package mocks
     4  
     5  import (
     6  	context "context"
     7  
     8  	mock "github.com/stretchr/testify/mock"
     9  
    10  	types "github.com/aakash4dev/cometbft/abci/types"
    11  )
    12  
    13  // AppConnSnapshot is an autogenerated mock type for the AppConnSnapshot type
    14  type AppConnSnapshot struct {
    15  	mock.Mock
    16  }
    17  
    18  // ApplySnapshotChunk provides a mock function with given fields: _a0, _a1
    19  func (_m *AppConnSnapshot) ApplySnapshotChunk(_a0 context.Context, _a1 *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error) {
    20  	ret := _m.Called(_a0, _a1)
    21  
    22  	var r0 *types.ResponseApplySnapshotChunk
    23  	var r1 error
    24  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) (*types.ResponseApplySnapshotChunk, error)); ok {
    25  		return rf(_a0, _a1)
    26  	}
    27  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestApplySnapshotChunk) *types.ResponseApplySnapshotChunk); ok {
    28  		r0 = rf(_a0, _a1)
    29  	} else {
    30  		if ret.Get(0) != nil {
    31  			r0 = ret.Get(0).(*types.ResponseApplySnapshotChunk)
    32  		}
    33  	}
    34  
    35  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestApplySnapshotChunk) error); ok {
    36  		r1 = rf(_a0, _a1)
    37  	} else {
    38  		r1 = ret.Error(1)
    39  	}
    40  
    41  	return r0, r1
    42  }
    43  
    44  // Error provides a mock function with given fields:
    45  func (_m *AppConnSnapshot) Error() error {
    46  	ret := _m.Called()
    47  
    48  	var r0 error
    49  	if rf, ok := ret.Get(0).(func() error); ok {
    50  		r0 = rf()
    51  	} else {
    52  		r0 = ret.Error(0)
    53  	}
    54  
    55  	return r0
    56  }
    57  
    58  // ListSnapshots provides a mock function with given fields: _a0, _a1
    59  func (_m *AppConnSnapshot) ListSnapshots(_a0 context.Context, _a1 *types.RequestListSnapshots) (*types.ResponseListSnapshots, error) {
    60  	ret := _m.Called(_a0, _a1)
    61  
    62  	var r0 *types.ResponseListSnapshots
    63  	var r1 error
    64  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) (*types.ResponseListSnapshots, error)); ok {
    65  		return rf(_a0, _a1)
    66  	}
    67  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestListSnapshots) *types.ResponseListSnapshots); ok {
    68  		r0 = rf(_a0, _a1)
    69  	} else {
    70  		if ret.Get(0) != nil {
    71  			r0 = ret.Get(0).(*types.ResponseListSnapshots)
    72  		}
    73  	}
    74  
    75  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestListSnapshots) error); ok {
    76  		r1 = rf(_a0, _a1)
    77  	} else {
    78  		r1 = ret.Error(1)
    79  	}
    80  
    81  	return r0, r1
    82  }
    83  
    84  // LoadSnapshotChunk provides a mock function with given fields: _a0, _a1
    85  func (_m *AppConnSnapshot) LoadSnapshotChunk(_a0 context.Context, _a1 *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error) {
    86  	ret := _m.Called(_a0, _a1)
    87  
    88  	var r0 *types.ResponseLoadSnapshotChunk
    89  	var r1 error
    90  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) (*types.ResponseLoadSnapshotChunk, error)); ok {
    91  		return rf(_a0, _a1)
    92  	}
    93  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestLoadSnapshotChunk) *types.ResponseLoadSnapshotChunk); ok {
    94  		r0 = rf(_a0, _a1)
    95  	} else {
    96  		if ret.Get(0) != nil {
    97  			r0 = ret.Get(0).(*types.ResponseLoadSnapshotChunk)
    98  		}
    99  	}
   100  
   101  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestLoadSnapshotChunk) error); ok {
   102  		r1 = rf(_a0, _a1)
   103  	} else {
   104  		r1 = ret.Error(1)
   105  	}
   106  
   107  	return r0, r1
   108  }
   109  
   110  // OfferSnapshot provides a mock function with given fields: _a0, _a1
   111  func (_m *AppConnSnapshot) OfferSnapshot(_a0 context.Context, _a1 *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error) {
   112  	ret := _m.Called(_a0, _a1)
   113  
   114  	var r0 *types.ResponseOfferSnapshot
   115  	var r1 error
   116  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) (*types.ResponseOfferSnapshot, error)); ok {
   117  		return rf(_a0, _a1)
   118  	}
   119  	if rf, ok := ret.Get(0).(func(context.Context, *types.RequestOfferSnapshot) *types.ResponseOfferSnapshot); ok {
   120  		r0 = rf(_a0, _a1)
   121  	} else {
   122  		if ret.Get(0) != nil {
   123  			r0 = ret.Get(0).(*types.ResponseOfferSnapshot)
   124  		}
   125  	}
   126  
   127  	if rf, ok := ret.Get(1).(func(context.Context, *types.RequestOfferSnapshot) error); ok {
   128  		r1 = rf(_a0, _a1)
   129  	} else {
   130  		r1 = ret.Error(1)
   131  	}
   132  
   133  	return r0, r1
   134  }
   135  
   136  // 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.
   137  // The first argument is typically a *testing.T value.
   138  func NewAppConnSnapshot(t interface {
   139  	mock.TestingT
   140  	Cleanup(func())
   141  }) *AppConnSnapshot {
   142  	mock := &AppConnSnapshot{}
   143  	mock.Mock.Test(t)
   144  
   145  	t.Cleanup(func() { mock.AssertExpectations(t) })
   146  
   147  	return mock
   148  }