mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 04:22:33 +08:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
@@ -7,6 +7,8 @@ import (
|
||||
api "github.com/acepanel/panel/pkg/api"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/acepanel/panel/pkg/types"
|
||||
)
|
||||
|
||||
// AppRepo is an autogenerated mock type for the AppRepo type
|
||||
@@ -69,6 +71,53 @@ func (_c *AppRepo_All_Call) RunAndReturn(run func() api.Apps) *AppRepo_All_Call
|
||||
return _c
|
||||
}
|
||||
|
||||
// Categories provides a mock function with no fields
|
||||
func (_m *AppRepo) Categories() []types.LV {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for Categories")
|
||||
}
|
||||
|
||||
var r0 []types.LV
|
||||
if rf, ok := ret.Get(0).(func() []types.LV); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]types.LV)
|
||||
}
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// AppRepo_Categories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Categories'
|
||||
type AppRepo_Categories_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// Categories is a helper method to define mock.On call
|
||||
func (_e *AppRepo_Expecter) Categories() *AppRepo_Categories_Call {
|
||||
return &AppRepo_Categories_Call{Call: _e.mock.On("Categories")}
|
||||
}
|
||||
|
||||
func (_c *AppRepo_Categories_Call) Run(run func()) *AppRepo_Categories_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run()
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *AppRepo_Categories_Call) Return(_a0 []types.LV) *AppRepo_Categories_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *AppRepo_Categories_Call) RunAndReturn(run func() []types.LV) *AppRepo_Categories_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// Get provides a mock function with given fields: slug
|
||||
func (_m *AppRepo) Get(slug string) (*api.App, error) {
|
||||
ret := _m.Called(slug)
|
||||
|
||||
@@ -183,6 +183,51 @@ func (_c *CacheRepo_UpdateApps_Call) RunAndReturn(run func() error) *CacheRepo_U
|
||||
return _c
|
||||
}
|
||||
|
||||
// UpdateCategories provides a mock function with no fields
|
||||
func (_m *CacheRepo) UpdateCategories() error {
|
||||
ret := _m.Called()
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for UpdateCategories")
|
||||
}
|
||||
|
||||
var r0 error
|
||||
if rf, ok := ret.Get(0).(func() error); ok {
|
||||
r0 = rf()
|
||||
} else {
|
||||
r0 = ret.Error(0)
|
||||
}
|
||||
|
||||
return r0
|
||||
}
|
||||
|
||||
// CacheRepo_UpdateCategories_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateCategories'
|
||||
type CacheRepo_UpdateCategories_Call struct {
|
||||
*mock.Call
|
||||
}
|
||||
|
||||
// UpdateCategories is a helper method to define mock.On call
|
||||
func (_e *CacheRepo_Expecter) UpdateCategories() *CacheRepo_UpdateCategories_Call {
|
||||
return &CacheRepo_UpdateCategories_Call{Call: _e.mock.On("UpdateCategories")}
|
||||
}
|
||||
|
||||
func (_c *CacheRepo_UpdateCategories_Call) Run(run func()) *CacheRepo_UpdateCategories_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run()
|
||||
})
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *CacheRepo_UpdateCategories_Call) Return(_a0 error) *CacheRepo_UpdateCategories_Call {
|
||||
_c.Call.Return(_a0)
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *CacheRepo_UpdateCategories_Call) RunAndReturn(run func() error) *CacheRepo_UpdateCategories_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
// UpdateRewrites provides a mock function with no fields
|
||||
func (_m *CacheRepo) UpdateRewrites() error {
|
||||
ret := _m.Called()
|
||||
|
||||
Reference in New Issue
Block a user