mirror of
https://github.com/tnb-labs/panel.git
synced 2026-08-29 02:10:58 +08:00
chore: update mocks
This commit is contained in:
committed by
github-actions[bot]
parent
4df5038f91
commit
205d95a591
@@ -5,10 +5,8 @@ package biz
|
||||
import (
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
api "github.com/acepanel/panel/pkg/api"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/acepanel/panel/pkg/types"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// AppRepo is an autogenerated mock type for the AppRepo type
|
||||
|
||||
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// BackupAccountRepo is an autogenerated mock type for the BackupAccountRepo type
|
||||
|
||||
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/acepanel/panel/pkg/types"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// BackupRepo is an autogenerated mock type for the BackupRepo type
|
||||
|
||||
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// CertAccountRepo is an autogenerated mock type for the CertAccountRepo type
|
||||
|
||||
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// CertDNSRepo is an autogenerated mock type for the CertDNSRepo type
|
||||
|
||||
@@ -3,18 +3,14 @@
|
||||
package biz
|
||||
|
||||
import (
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
acme "github.com/acepanel/panel/pkg/acme"
|
||||
|
||||
context "context"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
|
||||
acme "github.com/acepanel/panel/pkg/acme"
|
||||
types "github.com/acepanel/panel/pkg/types"
|
||||
|
||||
v3acme "github.com/mholt/acmez/v3/acme"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// CertRepo is an autogenerated mock type for the CertRepo type
|
||||
|
||||
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// CronRepo is an autogenerated mock type for the CronRepo type
|
||||
|
||||
+18
-19
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// DatabaseRepo is an autogenerated mock type for the DatabaseRepo type
|
||||
@@ -166,9 +164,9 @@ func (_c *DatabaseRepo_Delete_Call) RunAndReturn(run func(context.Context, uint,
|
||||
return _c
|
||||
}
|
||||
|
||||
// List provides a mock function with given fields: page, limit
|
||||
func (_m *DatabaseRepo) List(page uint, limit uint) ([]*biz.Database, int64, error) {
|
||||
ret := _m.Called(page, limit)
|
||||
// List provides a mock function with given fields: page, limit, typ
|
||||
func (_m *DatabaseRepo) List(page uint, limit uint, typ string) ([]*biz.Database, int64, error) {
|
||||
ret := _m.Called(page, limit, typ)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
@@ -177,25 +175,25 @@ func (_m *DatabaseRepo) List(page uint, limit uint) ([]*biz.Database, int64, err
|
||||
var r0 []*biz.Database
|
||||
var r1 int64
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(uint, uint) ([]*biz.Database, int64, error)); ok {
|
||||
return rf(page, limit)
|
||||
if rf, ok := ret.Get(0).(func(uint, uint, string) ([]*biz.Database, int64, error)); ok {
|
||||
return rf(page, limit, typ)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(uint, uint) []*biz.Database); ok {
|
||||
r0 = rf(page, limit)
|
||||
if rf, ok := ret.Get(0).(func(uint, uint, string) []*biz.Database); ok {
|
||||
r0 = rf(page, limit, typ)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*biz.Database)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(uint, uint) int64); ok {
|
||||
r1 = rf(page, limit)
|
||||
if rf, ok := ret.Get(1).(func(uint, uint, string) int64); ok {
|
||||
r1 = rf(page, limit, typ)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int64)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(2).(func(uint, uint) error); ok {
|
||||
r2 = rf(page, limit)
|
||||
if rf, ok := ret.Get(2).(func(uint, uint, string) error); ok {
|
||||
r2 = rf(page, limit, typ)
|
||||
} else {
|
||||
r2 = ret.Error(2)
|
||||
}
|
||||
@@ -211,13 +209,14 @@ type DatabaseRepo_List_Call struct {
|
||||
// List is a helper method to define mock.On call
|
||||
// - page uint
|
||||
// - limit uint
|
||||
func (_e *DatabaseRepo_Expecter) List(page interface{}, limit interface{}) *DatabaseRepo_List_Call {
|
||||
return &DatabaseRepo_List_Call{Call: _e.mock.On("List", page, limit)}
|
||||
// - typ string
|
||||
func (_e *DatabaseRepo_Expecter) List(page interface{}, limit interface{}, typ interface{}) *DatabaseRepo_List_Call {
|
||||
return &DatabaseRepo_List_Call{Call: _e.mock.On("List", page, limit, typ)}
|
||||
}
|
||||
|
||||
func (_c *DatabaseRepo_List_Call) Run(run func(page uint, limit uint)) *DatabaseRepo_List_Call {
|
||||
func (_c *DatabaseRepo_List_Call) Run(run func(page uint, limit uint, typ string)) *DatabaseRepo_List_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(uint), args[1].(uint))
|
||||
run(args[0].(uint), args[1].(uint), args[2].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
@@ -227,7 +226,7 @@ func (_c *DatabaseRepo_List_Call) Return(_a0 []*biz.Database, _a1 int64, _a2 err
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DatabaseRepo_List_Call) RunAndReturn(run func(uint, uint) ([]*biz.Database, int64, error)) *DatabaseRepo_List_Call {
|
||||
func (_c *DatabaseRepo_List_Call) RunAndReturn(run func(uint, uint, string) ([]*biz.Database, int64, error)) *DatabaseRepo_List_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
@@ -4,9 +4,8 @@ package biz
|
||||
|
||||
import (
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// DatabaseServerRepo is an autogenerated mock type for the DatabaseServerRepo type
|
||||
@@ -331,9 +330,9 @@ func (_c *DatabaseServerRepo_GetByName_Call) RunAndReturn(run func(string) (*biz
|
||||
return _c
|
||||
}
|
||||
|
||||
// List provides a mock function with given fields: page, limit
|
||||
func (_m *DatabaseServerRepo) List(page uint, limit uint) ([]*biz.DatabaseServer, int64, error) {
|
||||
ret := _m.Called(page, limit)
|
||||
// List provides a mock function with given fields: page, limit, typ
|
||||
func (_m *DatabaseServerRepo) List(page uint, limit uint, typ string) ([]*biz.DatabaseServer, int64, error) {
|
||||
ret := _m.Called(page, limit, typ)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
@@ -342,25 +341,25 @@ func (_m *DatabaseServerRepo) List(page uint, limit uint) ([]*biz.DatabaseServer
|
||||
var r0 []*biz.DatabaseServer
|
||||
var r1 int64
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(uint, uint) ([]*biz.DatabaseServer, int64, error)); ok {
|
||||
return rf(page, limit)
|
||||
if rf, ok := ret.Get(0).(func(uint, uint, string) ([]*biz.DatabaseServer, int64, error)); ok {
|
||||
return rf(page, limit, typ)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(uint, uint) []*biz.DatabaseServer); ok {
|
||||
r0 = rf(page, limit)
|
||||
if rf, ok := ret.Get(0).(func(uint, uint, string) []*biz.DatabaseServer); ok {
|
||||
r0 = rf(page, limit, typ)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*biz.DatabaseServer)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(uint, uint) int64); ok {
|
||||
r1 = rf(page, limit)
|
||||
if rf, ok := ret.Get(1).(func(uint, uint, string) int64); ok {
|
||||
r1 = rf(page, limit, typ)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int64)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(2).(func(uint, uint) error); ok {
|
||||
r2 = rf(page, limit)
|
||||
if rf, ok := ret.Get(2).(func(uint, uint, string) error); ok {
|
||||
r2 = rf(page, limit, typ)
|
||||
} else {
|
||||
r2 = ret.Error(2)
|
||||
}
|
||||
@@ -376,13 +375,14 @@ type DatabaseServerRepo_List_Call struct {
|
||||
// List is a helper method to define mock.On call
|
||||
// - page uint
|
||||
// - limit uint
|
||||
func (_e *DatabaseServerRepo_Expecter) List(page interface{}, limit interface{}) *DatabaseServerRepo_List_Call {
|
||||
return &DatabaseServerRepo_List_Call{Call: _e.mock.On("List", page, limit)}
|
||||
// - typ string
|
||||
func (_e *DatabaseServerRepo_Expecter) List(page interface{}, limit interface{}, typ interface{}) *DatabaseServerRepo_List_Call {
|
||||
return &DatabaseServerRepo_List_Call{Call: _e.mock.On("List", page, limit, typ)}
|
||||
}
|
||||
|
||||
func (_c *DatabaseServerRepo_List_Call) Run(run func(page uint, limit uint)) *DatabaseServerRepo_List_Call {
|
||||
func (_c *DatabaseServerRepo_List_Call) Run(run func(page uint, limit uint, typ string)) *DatabaseServerRepo_List_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(uint), args[1].(uint))
|
||||
run(args[0].(uint), args[1].(uint), args[2].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
@@ -392,7 +392,7 @@ func (_c *DatabaseServerRepo_List_Call) Return(_a0 []*biz.DatabaseServer, _a1 in
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DatabaseServerRepo_List_Call) RunAndReturn(run func(uint, uint) ([]*biz.DatabaseServer, int64, error)) *DatabaseServerRepo_List_Call {
|
||||
func (_c *DatabaseServerRepo_List_Call) RunAndReturn(run func(uint, uint, string) ([]*biz.DatabaseServer, int64, error)) *DatabaseServerRepo_List_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// DatabaseUserRepo is an autogenerated mock type for the DatabaseUserRepo type
|
||||
@@ -279,9 +277,9 @@ func (_c *DatabaseUserRepo_Get_Call) RunAndReturn(run func(uint) (*biz.DatabaseU
|
||||
return _c
|
||||
}
|
||||
|
||||
// List provides a mock function with given fields: page, limit
|
||||
func (_m *DatabaseUserRepo) List(page uint, limit uint) ([]*biz.DatabaseUser, int64, error) {
|
||||
ret := _m.Called(page, limit)
|
||||
// List provides a mock function with given fields: page, limit, typ
|
||||
func (_m *DatabaseUserRepo) List(page uint, limit uint, typ string) ([]*biz.DatabaseUser, int64, error) {
|
||||
ret := _m.Called(page, limit, typ)
|
||||
|
||||
if len(ret) == 0 {
|
||||
panic("no return value specified for List")
|
||||
@@ -290,25 +288,25 @@ func (_m *DatabaseUserRepo) List(page uint, limit uint) ([]*biz.DatabaseUser, in
|
||||
var r0 []*biz.DatabaseUser
|
||||
var r1 int64
|
||||
var r2 error
|
||||
if rf, ok := ret.Get(0).(func(uint, uint) ([]*biz.DatabaseUser, int64, error)); ok {
|
||||
return rf(page, limit)
|
||||
if rf, ok := ret.Get(0).(func(uint, uint, string) ([]*biz.DatabaseUser, int64, error)); ok {
|
||||
return rf(page, limit, typ)
|
||||
}
|
||||
if rf, ok := ret.Get(0).(func(uint, uint) []*biz.DatabaseUser); ok {
|
||||
r0 = rf(page, limit)
|
||||
if rf, ok := ret.Get(0).(func(uint, uint, string) []*biz.DatabaseUser); ok {
|
||||
r0 = rf(page, limit, typ)
|
||||
} else {
|
||||
if ret.Get(0) != nil {
|
||||
r0 = ret.Get(0).([]*biz.DatabaseUser)
|
||||
}
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(1).(func(uint, uint) int64); ok {
|
||||
r1 = rf(page, limit)
|
||||
if rf, ok := ret.Get(1).(func(uint, uint, string) int64); ok {
|
||||
r1 = rf(page, limit, typ)
|
||||
} else {
|
||||
r1 = ret.Get(1).(int64)
|
||||
}
|
||||
|
||||
if rf, ok := ret.Get(2).(func(uint, uint) error); ok {
|
||||
r2 = rf(page, limit)
|
||||
if rf, ok := ret.Get(2).(func(uint, uint, string) error); ok {
|
||||
r2 = rf(page, limit, typ)
|
||||
} else {
|
||||
r2 = ret.Error(2)
|
||||
}
|
||||
@@ -324,13 +322,14 @@ type DatabaseUserRepo_List_Call struct {
|
||||
// List is a helper method to define mock.On call
|
||||
// - page uint
|
||||
// - limit uint
|
||||
func (_e *DatabaseUserRepo_Expecter) List(page interface{}, limit interface{}) *DatabaseUserRepo_List_Call {
|
||||
return &DatabaseUserRepo_List_Call{Call: _e.mock.On("List", page, limit)}
|
||||
// - typ string
|
||||
func (_e *DatabaseUserRepo_Expecter) List(page interface{}, limit interface{}, typ interface{}) *DatabaseUserRepo_List_Call {
|
||||
return &DatabaseUserRepo_List_Call{Call: _e.mock.On("List", page, limit, typ)}
|
||||
}
|
||||
|
||||
func (_c *DatabaseUserRepo_List_Call) Run(run func(page uint, limit uint)) *DatabaseUserRepo_List_Call {
|
||||
func (_c *DatabaseUserRepo_List_Call) Run(run func(page uint, limit uint, typ string)) *DatabaseUserRepo_List_Call {
|
||||
_c.Call.Run(func(args mock.Arguments) {
|
||||
run(args[0].(uint), args[1].(uint))
|
||||
run(args[0].(uint), args[1].(uint), args[2].(string))
|
||||
})
|
||||
return _c
|
||||
}
|
||||
@@ -340,7 +339,7 @@ func (_c *DatabaseUserRepo_List_Call) Return(_a0 []*biz.DatabaseUser, _a1 int64,
|
||||
return _c
|
||||
}
|
||||
|
||||
func (_c *DatabaseUserRepo_List_Call) RunAndReturn(run func(uint, uint) ([]*biz.DatabaseUser, int64, error)) *DatabaseUserRepo_List_Call {
|
||||
func (_c *DatabaseUserRepo_List_Call) RunAndReturn(run func(uint, uint, string) ([]*biz.DatabaseUser, int64, error)) *DatabaseUserRepo_List_Call {
|
||||
_c.Call.Return(run)
|
||||
return _c
|
||||
}
|
||||
|
||||
@@ -5,9 +5,8 @@ package biz
|
||||
import (
|
||||
api "github.com/acepanel/panel/pkg/api"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/acepanel/panel/pkg/types"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// EnvironmentRepo is an autogenerated mock type for the EnvironmentRepo type
|
||||
|
||||
@@ -3,12 +3,11 @@
|
||||
package biz
|
||||
|
||||
import (
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
|
||||
time "time"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// MonitorRepo is an autogenerated mock type for the MonitorRepo type
|
||||
|
||||
@@ -6,9 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/acepanel/panel/pkg/types"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// ProjectRepo is an autogenerated mock type for the ProjectRepo type
|
||||
|
||||
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// SSHRepo is an autogenerated mock type for the SSHRepo type
|
||||
|
||||
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// SettingRepo is an autogenerated mock type for the SettingRepo type
|
||||
|
||||
@@ -5,9 +5,8 @@ package biz
|
||||
import (
|
||||
api "github.com/acepanel/panel/pkg/api"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
types "github.com/acepanel/panel/pkg/types"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// TemplateRepo is an autogenerated mock type for the TemplateRepo type
|
||||
|
||||
@@ -4,11 +4,9 @@ package biz
|
||||
|
||||
import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
image "image"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
|
||||
@@ -4,12 +4,10 @@ package biz
|
||||
|
||||
import (
|
||||
http "net/http"
|
||||
time "time"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
time "time"
|
||||
)
|
||||
|
||||
// UserTokenRepo is an autogenerated mock type for the UserTokenRepo type
|
||||
|
||||
@@ -6,10 +6,8 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// WebHookRepo is an autogenerated mock type for the WebHookRepo type
|
||||
|
||||
@@ -6,12 +6,9 @@ import (
|
||||
context "context"
|
||||
|
||||
biz "github.com/acepanel/panel/internal/biz"
|
||||
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
|
||||
request "github.com/acepanel/panel/internal/http/request"
|
||||
|
||||
types "github.com/acepanel/panel/pkg/types"
|
||||
mock "github.com/stretchr/testify/mock"
|
||||
)
|
||||
|
||||
// WebsiteRepo is an autogenerated mock type for the WebsiteRepo type
|
||||
|
||||
Reference in New Issue
Block a user