github.com/lino-network/lino@v0.6.11/x/bandwidth/mocks/BandwidthKeeper.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 package mocks 4 5 import ( 6 authtypes "github.com/cosmos/cosmos-sdk/x/auth/types" 7 8 linotypes "github.com/lino-network/lino/types" 9 10 mock "github.com/stretchr/testify/mock" 11 12 model "github.com/lino-network/lino/x/bandwidth/model" 13 14 types "github.com/cosmos/cosmos-sdk/types" 15 ) 16 17 // BandwidthKeeper is an autogenerated mock type for the BandwidthKeeper type 18 type BandwidthKeeper struct { 19 mock.Mock 20 } 21 22 // BeginBlocker provides a mock function with given fields: ctx 23 func (_m *BandwidthKeeper) BeginBlocker(ctx types.Context) types.Error { 24 ret := _m.Called(ctx) 25 26 var r0 types.Error 27 if rf, ok := ret.Get(0).(func(types.Context) types.Error); ok { 28 r0 = rf(ctx) 29 } else { 30 if ret.Get(0) != nil { 31 r0 = ret.Get(0).(types.Error) 32 } 33 } 34 35 return r0 36 } 37 38 // CheckBandwidth provides a mock function with given fields: ctx, addr, fee 39 func (_m *BandwidthKeeper) CheckBandwidth(ctx types.Context, addr types.AccAddress, fee authtypes.StdFee) types.Error { 40 ret := _m.Called(ctx, addr, fee) 41 42 var r0 types.Error 43 if rf, ok := ret.Get(0).(func(types.Context, types.AccAddress, authtypes.StdFee) types.Error); ok { 44 r0 = rf(ctx, addr, fee) 45 } else { 46 if ret.Get(0) != nil { 47 r0 = ret.Get(0).(types.Error) 48 } 49 } 50 51 return r0 52 } 53 54 // DecayMaxMPS provides a mock function with given fields: ctx 55 func (_m *BandwidthKeeper) DecayMaxMPS(ctx types.Context) types.Error { 56 ret := _m.Called(ctx) 57 58 var r0 types.Error 59 if rf, ok := ret.Get(0).(func(types.Context) types.Error); ok { 60 r0 = rf(ctx) 61 } else { 62 if ret.Get(0) != nil { 63 r0 = ret.Get(0).(types.Error) 64 } 65 } 66 67 return r0 68 } 69 70 // EndBlocker provides a mock function with given fields: ctx 71 func (_m *BandwidthKeeper) EndBlocker(ctx types.Context) types.Error { 72 ret := _m.Called(ctx) 73 74 var r0 types.Error 75 if rf, ok := ret.Get(0).(func(types.Context) types.Error); ok { 76 r0 = rf(ctx) 77 } else { 78 if ret.Get(0) != nil { 79 r0 = ret.Get(0).(types.Error) 80 } 81 } 82 83 return r0 84 } 85 86 // GetAppBandwidthInfo provides a mock function with given fields: ctx, accKey 87 func (_m *BandwidthKeeper) GetAppBandwidthInfo(ctx types.Context, accKey linotypes.AccountKey) (*model.AppBandwidthInfo, types.Error) { 88 ret := _m.Called(ctx, accKey) 89 90 var r0 *model.AppBandwidthInfo 91 if rf, ok := ret.Get(0).(func(types.Context, linotypes.AccountKey) *model.AppBandwidthInfo); ok { 92 r0 = rf(ctx, accKey) 93 } else { 94 if ret.Get(0) != nil { 95 r0 = ret.Get(0).(*model.AppBandwidthInfo) 96 } 97 } 98 99 var r1 types.Error 100 if rf, ok := ret.Get(1).(func(types.Context, linotypes.AccountKey) types.Error); ok { 101 r1 = rf(ctx, accKey) 102 } else { 103 if ret.Get(1) != nil { 104 r1 = ret.Get(1).(types.Error) 105 } 106 } 107 108 return r0, r1 109 } 110 111 // GetBandwidthInfo provides a mock function with given fields: ctx 112 func (_m *BandwidthKeeper) GetBandwidthInfo(ctx types.Context) (*model.BandwidthInfo, types.Error) { 113 ret := _m.Called(ctx) 114 115 var r0 *model.BandwidthInfo 116 if rf, ok := ret.Get(0).(func(types.Context) *model.BandwidthInfo); ok { 117 r0 = rf(ctx) 118 } else { 119 if ret.Get(0) != nil { 120 r0 = ret.Get(0).(*model.BandwidthInfo) 121 } 122 } 123 124 var r1 types.Error 125 if rf, ok := ret.Get(1).(func(types.Context) types.Error); ok { 126 r1 = rf(ctx) 127 } else { 128 if ret.Get(1) != nil { 129 r1 = ret.Get(1).(types.Error) 130 } 131 } 132 133 return r0, r1 134 } 135 136 // GetBlockInfo provides a mock function with given fields: ctx 137 func (_m *BandwidthKeeper) GetBlockInfo(ctx types.Context) (*model.BlockInfo, types.Error) { 138 ret := _m.Called(ctx) 139 140 var r0 *model.BlockInfo 141 if rf, ok := ret.Get(0).(func(types.Context) *model.BlockInfo); ok { 142 r0 = rf(ctx) 143 } else { 144 if ret.Get(0) != nil { 145 r0 = ret.Get(0).(*model.BlockInfo) 146 } 147 } 148 149 var r1 types.Error 150 if rf, ok := ret.Get(1).(func(types.Context) types.Error); ok { 151 r1 = rf(ctx) 152 } else { 153 if ret.Get(1) != nil { 154 r1 = ret.Get(1).(types.Error) 155 } 156 } 157 158 return r0, r1 159 } 160 161 // InitGenesis provides a mock function with given fields: ctx 162 func (_m *BandwidthKeeper) InitGenesis(ctx types.Context) error { 163 ret := _m.Called(ctx) 164 165 var r0 error 166 if rf, ok := ret.Get(0).(func(types.Context) error); ok { 167 r0 = rf(ctx) 168 } else { 169 r0 = ret.Error(0) 170 } 171 172 return r0 173 } 174 175 // ReCalculateAppBandwidthInfo provides a mock function with given fields: ctx 176 func (_m *BandwidthKeeper) ReCalculateAppBandwidthInfo(ctx types.Context) types.Error { 177 ret := _m.Called(ctx) 178 179 var r0 types.Error 180 if rf, ok := ret.Get(0).(func(types.Context) types.Error); ok { 181 r0 = rf(ctx) 182 } else { 183 if ret.Get(0) != nil { 184 r0 = ret.Get(0).(types.Error) 185 } 186 } 187 188 return r0 189 }