mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 06:40:59 +08:00
154 lines
3.9 KiB
Go
154 lines
3.9 KiB
Go
// Code generated by mockery. DO NOT EDIT.
|
|
|
|
package biz
|
|
|
|
import (
|
|
biz "github.com/acepanel/panel/internal/biz"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// LogRepo is an autogenerated mock type for the LogRepo type
|
|
type LogRepo struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type LogRepo_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *LogRepo) EXPECT() *LogRepo_Expecter {
|
|
return &LogRepo_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// List provides a mock function with given fields: logType, limit, date
|
|
func (_m *LogRepo) List(logType string, limit int, date string) ([]biz.LogEntry, error) {
|
|
ret := _m.Called(logType, limit, date)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for List")
|
|
}
|
|
|
|
var r0 []biz.LogEntry
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string, int, string) ([]biz.LogEntry, error)); ok {
|
|
return rf(logType, limit, date)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string, int, string) []biz.LogEntry); ok {
|
|
r0 = rf(logType, limit, date)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]biz.LogEntry)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string, int, string) error); ok {
|
|
r1 = rf(logType, limit, date)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// LogRepo_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
|
|
type LogRepo_List_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// List is a helper method to define mock.On call
|
|
// - logType string
|
|
// - limit int
|
|
// - date string
|
|
func (_e *LogRepo_Expecter) List(logType interface{}, limit interface{}, date interface{}) *LogRepo_List_Call {
|
|
return &LogRepo_List_Call{Call: _e.mock.On("List", logType, limit, date)}
|
|
}
|
|
|
|
func (_c *LogRepo_List_Call) Run(run func(logType string, limit int, date string)) *LogRepo_List_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string), args[1].(int), args[2].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *LogRepo_List_Call) Return(_a0 []biz.LogEntry, _a1 error) *LogRepo_List_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *LogRepo_List_Call) RunAndReturn(run func(string, int, string) ([]biz.LogEntry, error)) *LogRepo_List_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// ListDates provides a mock function with given fields: logType
|
|
func (_m *LogRepo) ListDates(logType string) ([]string, error) {
|
|
ret := _m.Called(logType)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for ListDates")
|
|
}
|
|
|
|
var r0 []string
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) ([]string, error)); ok {
|
|
return rf(logType)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) []string); ok {
|
|
r0 = rf(logType)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(logType)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// LogRepo_ListDates_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListDates'
|
|
type LogRepo_ListDates_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// ListDates is a helper method to define mock.On call
|
|
// - logType string
|
|
func (_e *LogRepo_Expecter) ListDates(logType interface{}) *LogRepo_ListDates_Call {
|
|
return &LogRepo_ListDates_Call{Call: _e.mock.On("ListDates", logType)}
|
|
}
|
|
|
|
func (_c *LogRepo_ListDates_Call) Run(run func(logType string)) *LogRepo_ListDates_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(string))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *LogRepo_ListDates_Call) Return(_a0 []string, _a1 error) *LogRepo_ListDates_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *LogRepo_ListDates_Call) RunAndReturn(run func(string) ([]string, error)) *LogRepo_ListDates_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewLogRepo creates a new instance of LogRepo. 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 NewLogRepo(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *LogRepo {
|
|
mock := &LogRepo{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|