mirror of
https://github.com/tnb-labs/panel.git
synced 2026-09-21 13:20:10 +08:00
630 lines
18 KiB
Go
630 lines
18 KiB
Go
// Code generated by mockery. DO NOT EDIT.
|
|
|
|
package biz
|
|
|
|
import (
|
|
biz "github.com/acepanel/panel/v3/internal/biz"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// ScanEventRepo is an autogenerated mock type for the ScanEventRepo type
|
|
type ScanEventRepo struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type ScanEventRepo_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *ScanEventRepo) EXPECT() *ScanEventRepo_Expecter {
|
|
return &ScanEventRepo_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Clear provides a mock function with no fields
|
|
func (_m *ScanEventRepo) Clear() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Clear")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// ScanEventRepo_Clear_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Clear'
|
|
type ScanEventRepo_Clear_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Clear is a helper method to define mock.On call
|
|
func (_e *ScanEventRepo_Expecter) Clear() *ScanEventRepo_Clear_Call {
|
|
return &ScanEventRepo_Clear_Call{Call: _e.mock.On("Clear")}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Clear_Call) Run(run func()) *ScanEventRepo_Clear_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Clear_Call) Return(_a0 error) *ScanEventRepo_Clear_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Clear_Call) RunAndReturn(run func() error) *ScanEventRepo_Clear_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ClearBefore provides a mock function with given fields: date
|
|
func (_m *ScanEventRepo) ClearBefore(date string) error {
|
|
ret := _m.Called(date)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ClearBefore")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(date)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// ScanEventRepo_ClearBefore_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ClearBefore'
|
|
type ScanEventRepo_ClearBefore_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ClearBefore is a helper method to define mock.On call
|
|
// - date string
|
|
func (_e *ScanEventRepo_Expecter) ClearBefore(date interface{}) *ScanEventRepo_ClearBefore_Call {
|
|
return &ScanEventRepo_ClearBefore_Call{Call: _e.mock.On("ClearBefore", date)}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_ClearBefore_Call) Run(run func(date string)) *ScanEventRepo_ClearBefore_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_ClearBefore_Call) Return(_a0 error) *ScanEventRepo_ClearBefore_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_ClearBefore_Call) RunAndReturn(run func(string) error) *ScanEventRepo_ClearBefore_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// GetSetting provides a mock function with no fields
|
|
func (_m *ScanEventRepo) GetSetting() (*biz.ScanSetting, error) {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GetSetting")
|
|
}
|
|
|
|
var r0 *biz.ScanSetting
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func() (*biz.ScanSetting, error)); ok {
|
|
return rf()
|
|
}
|
|
if rf, ok := ret.Get(0).(func() *biz.ScanSetting); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*biz.ScanSetting)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ScanEventRepo_GetSetting_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSetting'
|
|
type ScanEventRepo_GetSetting_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// GetSetting is a helper method to define mock.On call
|
|
func (_e *ScanEventRepo_Expecter) GetSetting() *ScanEventRepo_GetSetting_Call {
|
|
return &ScanEventRepo_GetSetting_Call{Call: _e.mock.On("GetSetting")}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_GetSetting_Call) Run(run func()) *ScanEventRepo_GetSetting_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_GetSetting_Call) Return(_a0 *biz.ScanSetting, _a1 error) *ScanEventRepo_GetSetting_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_GetSetting_Call) RunAndReturn(run func() (*biz.ScanSetting, error)) *ScanEventRepo_GetSetting_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// List provides a mock function with given fields: start, end, sourceIP, port, location, page, limit
|
|
func (_m *ScanEventRepo) List(start string, end string, sourceIP string, port uint, location string, page uint, limit uint) ([]*biz.ScanEvent, uint, error) {
|
|
ret := _m.Called(start, end, sourceIP, port, location, page, limit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for List")
|
|
}
|
|
|
|
var r0 []*biz.ScanEvent
|
|
var r1 uint
|
|
var r2 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, uint, string, uint, uint) ([]*biz.ScanEvent, uint, error)); ok {
|
|
return rf(start, end, sourceIP, port, location, page, limit)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string, string, uint, string, uint, uint) []*biz.ScanEvent); ok {
|
|
r0 = rf(start, end, sourceIP, port, location, page, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*biz.ScanEvent)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string, string, uint, string, uint, uint) uint); ok {
|
|
r1 = rf(start, end, sourceIP, port, location, page, limit)
|
|
} else {
|
|
r1 = ret.Get(1).(uint)
|
|
}
|
|
|
|
if rf, ok := ret.Get(2).(func(string, string, string, uint, string, uint, uint) error); ok {
|
|
r2 = rf(start, end, sourceIP, port, location, page, limit)
|
|
} else {
|
|
r2 = ret.Error(2)
|
|
}
|
|
|
|
return r0, r1, r2
|
|
}
|
|
|
|
// ScanEventRepo_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
|
|
type ScanEventRepo_List_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// List is a helper method to define mock.On call
|
|
// - start string
|
|
// - end string
|
|
// - sourceIP string
|
|
// - port uint
|
|
// - location string
|
|
// - page uint
|
|
// - limit uint
|
|
func (_e *ScanEventRepo_Expecter) List(start interface{}, end interface{}, sourceIP interface{}, port interface{}, location interface{}, page interface{}, limit interface{}) *ScanEventRepo_List_Call {
|
|
return &ScanEventRepo_List_Call{Call: _e.mock.On("List", start, end, sourceIP, port, location, page, limit)}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_List_Call) Run(run func(start string, end string, sourceIP string, port uint, location string, page uint, limit uint)) *ScanEventRepo_List_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string), args[2].(string), args[3].(uint), args[4].(string), args[5].(uint), args[6].(uint))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_List_Call) Return(_a0 []*biz.ScanEvent, _a1 uint, _a2 error) *ScanEventRepo_List_Call {
|
|
_c.Call.Return(_a0, _a1, _a2)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_List_Call) RunAndReturn(run func(string, string, string, uint, string, uint, uint) ([]*biz.ScanEvent, uint, error)) *ScanEventRepo_List_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Summary provides a mock function with given fields: start, end
|
|
func (_m *ScanEventRepo) Summary(start string, end string) (*biz.ScanSummary, error) {
|
|
ret := _m.Called(start, end)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Summary")
|
|
}
|
|
|
|
var r0 *biz.ScanSummary
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string) (*biz.ScanSummary, error)); ok {
|
|
return rf(start, end)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string) *biz.ScanSummary); ok {
|
|
r0 = rf(start, end)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*biz.ScanSummary)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
|
r1 = rf(start, end)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ScanEventRepo_Summary_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Summary'
|
|
type ScanEventRepo_Summary_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Summary is a helper method to define mock.On call
|
|
// - start string
|
|
// - end string
|
|
func (_e *ScanEventRepo_Expecter) Summary(start interface{}, end interface{}) *ScanEventRepo_Summary_Call {
|
|
return &ScanEventRepo_Summary_Call{Call: _e.mock.On("Summary", start, end)}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Summary_Call) Run(run func(start string, end string)) *ScanEventRepo_Summary_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Summary_Call) Return(_a0 *biz.ScanSummary, _a1 error) *ScanEventRepo_Summary_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Summary_Call) RunAndReturn(run func(string, string) (*biz.ScanSummary, error)) *ScanEventRepo_Summary_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TopPorts provides a mock function with given fields: start, end, limit
|
|
func (_m *ScanEventRepo) TopPorts(start string, end string, limit uint) ([]*biz.ScanPortRank, error) {
|
|
ret := _m.Called(start, end, limit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TopPorts")
|
|
}
|
|
|
|
var r0 []*biz.ScanPortRank
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string, uint) ([]*biz.ScanPortRank, error)); ok {
|
|
return rf(start, end, limit)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string, uint) []*biz.ScanPortRank); ok {
|
|
r0 = rf(start, end, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*biz.ScanPortRank)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string, uint) error); ok {
|
|
r1 = rf(start, end, limit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ScanEventRepo_TopPorts_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TopPorts'
|
|
type ScanEventRepo_TopPorts_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TopPorts is a helper method to define mock.On call
|
|
// - start string
|
|
// - end string
|
|
// - limit uint
|
|
func (_e *ScanEventRepo_Expecter) TopPorts(start interface{}, end interface{}, limit interface{}) *ScanEventRepo_TopPorts_Call {
|
|
return &ScanEventRepo_TopPorts_Call{Call: _e.mock.On("TopPorts", start, end, limit)}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_TopPorts_Call) Run(run func(start string, end string, limit uint)) *ScanEventRepo_TopPorts_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string), args[2].(uint))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_TopPorts_Call) Return(_a0 []*biz.ScanPortRank, _a1 error) *ScanEventRepo_TopPorts_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_TopPorts_Call) RunAndReturn(run func(string, string, uint) ([]*biz.ScanPortRank, error)) *ScanEventRepo_TopPorts_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// TopSourceIPs provides a mock function with given fields: start, end, limit
|
|
func (_m *ScanEventRepo) TopSourceIPs(start string, end string, limit uint) ([]*biz.ScanSourceRank, error) {
|
|
ret := _m.Called(start, end, limit)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for TopSourceIPs")
|
|
}
|
|
|
|
var r0 []*biz.ScanSourceRank
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string, uint) ([]*biz.ScanSourceRank, error)); ok {
|
|
return rf(start, end, limit)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string, uint) []*biz.ScanSourceRank); ok {
|
|
r0 = rf(start, end, limit)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*biz.ScanSourceRank)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string, uint) error); ok {
|
|
r1 = rf(start, end, limit)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ScanEventRepo_TopSourceIPs_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TopSourceIPs'
|
|
type ScanEventRepo_TopSourceIPs_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// TopSourceIPs is a helper method to define mock.On call
|
|
// - start string
|
|
// - end string
|
|
// - limit uint
|
|
func (_e *ScanEventRepo_Expecter) TopSourceIPs(start interface{}, end interface{}, limit interface{}) *ScanEventRepo_TopSourceIPs_Call {
|
|
return &ScanEventRepo_TopSourceIPs_Call{Call: _e.mock.On("TopSourceIPs", start, end, limit)}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_TopSourceIPs_Call) Run(run func(start string, end string, limit uint)) *ScanEventRepo_TopSourceIPs_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string), args[2].(uint))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_TopSourceIPs_Call) Return(_a0 []*biz.ScanSourceRank, _a1 error) *ScanEventRepo_TopSourceIPs_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_TopSourceIPs_Call) RunAndReturn(run func(string, string, uint) ([]*biz.ScanSourceRank, error)) *ScanEventRepo_TopSourceIPs_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Trend provides a mock function with given fields: start, end
|
|
func (_m *ScanEventRepo) Trend(start string, end string) ([]*biz.ScanDayTrend, error) {
|
|
ret := _m.Called(start, end)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Trend")
|
|
}
|
|
|
|
var r0 []*biz.ScanDayTrend
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, string) ([]*biz.ScanDayTrend, error)); ok {
|
|
return rf(start, end)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, string) []*biz.ScanDayTrend); ok {
|
|
r0 = rf(start, end)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*biz.ScanDayTrend)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, string) error); ok {
|
|
r1 = rf(start, end)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ScanEventRepo_Trend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Trend'
|
|
type ScanEventRepo_Trend_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Trend is a helper method to define mock.On call
|
|
// - start string
|
|
// - end string
|
|
func (_e *ScanEventRepo_Expecter) Trend(start interface{}, end interface{}) *ScanEventRepo_Trend_Call {
|
|
return &ScanEventRepo_Trend_Call{Call: _e.mock.On("Trend", start, end)}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Trend_Call) Run(run func(start string, end string)) *ScanEventRepo_Trend_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Trend_Call) Return(_a0 []*biz.ScanDayTrend, _a1 error) *ScanEventRepo_Trend_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Trend_Call) RunAndReturn(run func(string, string) ([]*biz.ScanDayTrend, error)) *ScanEventRepo_Trend_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// UpdateSetting provides a mock function with given fields: setting
|
|
func (_m *ScanEventRepo) UpdateSetting(setting *biz.ScanSetting) error {
|
|
ret := _m.Called(setting)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for UpdateSetting")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*biz.ScanSetting) error); ok {
|
|
r0 = rf(setting)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// ScanEventRepo_UpdateSetting_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateSetting'
|
|
type ScanEventRepo_UpdateSetting_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// UpdateSetting is a helper method to define mock.On call
|
|
// - setting *biz.ScanSetting
|
|
func (_e *ScanEventRepo_Expecter) UpdateSetting(setting interface{}) *ScanEventRepo_UpdateSetting_Call {
|
|
return &ScanEventRepo_UpdateSetting_Call{Call: _e.mock.On("UpdateSetting", setting)}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_UpdateSetting_Call) Run(run func(setting *biz.ScanSetting)) *ScanEventRepo_UpdateSetting_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(*biz.ScanSetting))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_UpdateSetting_Call) Return(_a0 error) *ScanEventRepo_UpdateSetting_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_UpdateSetting_Call) RunAndReturn(run func(*biz.ScanSetting) error) *ScanEventRepo_UpdateSetting_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Upsert provides a mock function with given fields: events
|
|
func (_m *ScanEventRepo) Upsert(events []*biz.ScanEvent) error {
|
|
ret := _m.Called(events)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for Upsert")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func([]*biz.ScanEvent) error); ok {
|
|
r0 = rf(events)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// ScanEventRepo_Upsert_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Upsert'
|
|
type ScanEventRepo_Upsert_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Upsert is a helper method to define mock.On call
|
|
// - events []*biz.ScanEvent
|
|
func (_e *ScanEventRepo_Expecter) Upsert(events interface{}) *ScanEventRepo_Upsert_Call {
|
|
return &ScanEventRepo_Upsert_Call{Call: _e.mock.On("Upsert", events)}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Upsert_Call) Run(run func(events []*biz.ScanEvent)) *ScanEventRepo_Upsert_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].([]*biz.ScanEvent))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Upsert_Call) Return(_a0 error) *ScanEventRepo_Upsert_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_Upsert_Call) RunAndReturn(run func([]*biz.ScanEvent) error) *ScanEventRepo_Upsert_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// VacuumDB provides a mock function with no fields
|
|
func (_m *ScanEventRepo) VacuumDB() error {
|
|
ret := _m.Called()
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for VacuumDB")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func() error); ok {
|
|
r0 = rf()
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// ScanEventRepo_VacuumDB_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'VacuumDB'
|
|
type ScanEventRepo_VacuumDB_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// VacuumDB is a helper method to define mock.On call
|
|
func (_e *ScanEventRepo_Expecter) VacuumDB() *ScanEventRepo_VacuumDB_Call {
|
|
return &ScanEventRepo_VacuumDB_Call{Call: _e.mock.On("VacuumDB")}
|
|
}
|
|
|
|
func (_c *ScanEventRepo_VacuumDB_Call) Run(run func()) *ScanEventRepo_VacuumDB_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_VacuumDB_Call) Return(_a0 error) *ScanEventRepo_VacuumDB_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *ScanEventRepo_VacuumDB_Call) RunAndReturn(run func() error) *ScanEventRepo_VacuumDB_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewScanEventRepo creates a new instance of ScanEventRepo. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
|
|
// The first argument is typically a *testing.T value.
|
|
func NewScanEventRepo(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *ScanEventRepo {
|
|
mock := &ScanEventRepo{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|