2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-04 04:22:33 +08:00

chore: update mocks

This commit is contained in:
devhaozi
2026-01-08 15:05:18 +00:00
committed by github-actions[bot]
parent 017604ec11
commit f0e9543bf1

425
mocks/biz/WebHookRepo.go Normal file
View File

@@ -0,0 +1,425 @@
// Code generated by mockery. DO NOT EDIT.
package biz
import (
biz "github.com/acepanel/panel/internal/biz"
mock "github.com/stretchr/testify/mock"
request "github.com/acepanel/panel/internal/http/request"
)
// WebHookRepo is an autogenerated mock type for the WebHookRepo type
type WebHookRepo struct {
mock.Mock
}
type WebHookRepo_Expecter struct {
mock *mock.Mock
}
func (_m *WebHookRepo) EXPECT() *WebHookRepo_Expecter {
return &WebHookRepo_Expecter{mock: &_m.Mock}
}
// Call provides a mock function with given fields: key
func (_m *WebHookRepo) Call(key string) (string, error) {
ret := _m.Called(key)
if len(ret) == 0 {
panic("no return value specified for Call")
}
var r0 string
var r1 error
if rf, ok := ret.Get(0).(func(string) (string, error)); ok {
return rf(key)
}
if rf, ok := ret.Get(0).(func(string) string); ok {
r0 = rf(key)
} else {
r0 = ret.Get(0).(string)
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(key)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// WebHookRepo_Call_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Call'
type WebHookRepo_Call_Call struct {
*mock.Call
}
// Call is a helper method to define mock.On call
// - key string
func (_e *WebHookRepo_Expecter) Call(key interface{}) *WebHookRepo_Call_Call {
return &WebHookRepo_Call_Call{Call: _e.mock.On("Call", key)}
}
func (_c *WebHookRepo_Call_Call) Run(run func(key string)) *WebHookRepo_Call_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *WebHookRepo_Call_Call) Return(_a0 string, _a1 error) *WebHookRepo_Call_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *WebHookRepo_Call_Call) RunAndReturn(run func(string) (string, error)) *WebHookRepo_Call_Call {
_c.Call.Return(run)
return _c
}
// Create provides a mock function with given fields: req
func (_m *WebHookRepo) Create(req *request.WebHookCreate) (*biz.WebHook, error) {
ret := _m.Called(req)
if len(ret) == 0 {
panic("no return value specified for Create")
}
var r0 *biz.WebHook
var r1 error
if rf, ok := ret.Get(0).(func(*request.WebHookCreate) (*biz.WebHook, error)); ok {
return rf(req)
}
if rf, ok := ret.Get(0).(func(*request.WebHookCreate) *biz.WebHook); ok {
r0 = rf(req)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*biz.WebHook)
}
}
if rf, ok := ret.Get(1).(func(*request.WebHookCreate) error); ok {
r1 = rf(req)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// WebHookRepo_Create_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Create'
type WebHookRepo_Create_Call struct {
*mock.Call
}
// Create is a helper method to define mock.On call
// - req *request.WebHookCreate
func (_e *WebHookRepo_Expecter) Create(req interface{}) *WebHookRepo_Create_Call {
return &WebHookRepo_Create_Call{Call: _e.mock.On("Create", req)}
}
func (_c *WebHookRepo_Create_Call) Run(run func(req *request.WebHookCreate)) *WebHookRepo_Create_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*request.WebHookCreate))
})
return _c
}
func (_c *WebHookRepo_Create_Call) Return(_a0 *biz.WebHook, _a1 error) *WebHookRepo_Create_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *WebHookRepo_Create_Call) RunAndReturn(run func(*request.WebHookCreate) (*biz.WebHook, error)) *WebHookRepo_Create_Call {
_c.Call.Return(run)
return _c
}
// Delete provides a mock function with given fields: id
func (_m *WebHookRepo) Delete(id uint) error {
ret := _m.Called(id)
if len(ret) == 0 {
panic("no return value specified for Delete")
}
var r0 error
if rf, ok := ret.Get(0).(func(uint) error); ok {
r0 = rf(id)
} else {
r0 = ret.Error(0)
}
return r0
}
// WebHookRepo_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
type WebHookRepo_Delete_Call struct {
*mock.Call
}
// Delete is a helper method to define mock.On call
// - id uint
func (_e *WebHookRepo_Expecter) Delete(id interface{}) *WebHookRepo_Delete_Call {
return &WebHookRepo_Delete_Call{Call: _e.mock.On("Delete", id)}
}
func (_c *WebHookRepo_Delete_Call) Run(run func(id uint)) *WebHookRepo_Delete_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(uint))
})
return _c
}
func (_c *WebHookRepo_Delete_Call) Return(_a0 error) *WebHookRepo_Delete_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *WebHookRepo_Delete_Call) RunAndReturn(run func(uint) error) *WebHookRepo_Delete_Call {
_c.Call.Return(run)
return _c
}
// Get provides a mock function with given fields: id
func (_m *WebHookRepo) Get(id uint) (*biz.WebHook, error) {
ret := _m.Called(id)
if len(ret) == 0 {
panic("no return value specified for Get")
}
var r0 *biz.WebHook
var r1 error
if rf, ok := ret.Get(0).(func(uint) (*biz.WebHook, error)); ok {
return rf(id)
}
if rf, ok := ret.Get(0).(func(uint) *biz.WebHook); ok {
r0 = rf(id)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*biz.WebHook)
}
}
if rf, ok := ret.Get(1).(func(uint) error); ok {
r1 = rf(id)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// WebHookRepo_Get_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Get'
type WebHookRepo_Get_Call struct {
*mock.Call
}
// Get is a helper method to define mock.On call
// - id uint
func (_e *WebHookRepo_Expecter) Get(id interface{}) *WebHookRepo_Get_Call {
return &WebHookRepo_Get_Call{Call: _e.mock.On("Get", id)}
}
func (_c *WebHookRepo_Get_Call) Run(run func(id uint)) *WebHookRepo_Get_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(uint))
})
return _c
}
func (_c *WebHookRepo_Get_Call) Return(_a0 *biz.WebHook, _a1 error) *WebHookRepo_Get_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *WebHookRepo_Get_Call) RunAndReturn(run func(uint) (*biz.WebHook, error)) *WebHookRepo_Get_Call {
_c.Call.Return(run)
return _c
}
// GetByKey provides a mock function with given fields: key
func (_m *WebHookRepo) GetByKey(key string) (*biz.WebHook, error) {
ret := _m.Called(key)
if len(ret) == 0 {
panic("no return value specified for GetByKey")
}
var r0 *biz.WebHook
var r1 error
if rf, ok := ret.Get(0).(func(string) (*biz.WebHook, error)); ok {
return rf(key)
}
if rf, ok := ret.Get(0).(func(string) *biz.WebHook); ok {
r0 = rf(key)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*biz.WebHook)
}
}
if rf, ok := ret.Get(1).(func(string) error); ok {
r1 = rf(key)
} else {
r1 = ret.Error(1)
}
return r0, r1
}
// WebHookRepo_GetByKey_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetByKey'
type WebHookRepo_GetByKey_Call struct {
*mock.Call
}
// GetByKey is a helper method to define mock.On call
// - key string
func (_e *WebHookRepo_Expecter) GetByKey(key interface{}) *WebHookRepo_GetByKey_Call {
return &WebHookRepo_GetByKey_Call{Call: _e.mock.On("GetByKey", key)}
}
func (_c *WebHookRepo_GetByKey_Call) Run(run func(key string)) *WebHookRepo_GetByKey_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(string))
})
return _c
}
func (_c *WebHookRepo_GetByKey_Call) Return(_a0 *biz.WebHook, _a1 error) *WebHookRepo_GetByKey_Call {
_c.Call.Return(_a0, _a1)
return _c
}
func (_c *WebHookRepo_GetByKey_Call) RunAndReturn(run func(string) (*biz.WebHook, error)) *WebHookRepo_GetByKey_Call {
_c.Call.Return(run)
return _c
}
// List provides a mock function with given fields: page, limit
func (_m *WebHookRepo) List(page uint, limit uint) ([]*biz.WebHook, int64, error) {
ret := _m.Called(page, limit)
if len(ret) == 0 {
panic("no return value specified for List")
}
var r0 []*biz.WebHook
var r1 int64
var r2 error
if rf, ok := ret.Get(0).(func(uint, uint) ([]*biz.WebHook, int64, error)); ok {
return rf(page, limit)
}
if rf, ok := ret.Get(0).(func(uint, uint) []*biz.WebHook); ok {
r0 = rf(page, limit)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]*biz.WebHook)
}
}
if rf, ok := ret.Get(1).(func(uint, uint) int64); ok {
r1 = rf(page, limit)
} else {
r1 = ret.Get(1).(int64)
}
if rf, ok := ret.Get(2).(func(uint, uint) error); ok {
r2 = rf(page, limit)
} else {
r2 = ret.Error(2)
}
return r0, r1, r2
}
// WebHookRepo_List_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'List'
type WebHookRepo_List_Call struct {
*mock.Call
}
// List is a helper method to define mock.On call
// - page uint
// - limit uint
func (_e *WebHookRepo_Expecter) List(page interface{}, limit interface{}) *WebHookRepo_List_Call {
return &WebHookRepo_List_Call{Call: _e.mock.On("List", page, limit)}
}
func (_c *WebHookRepo_List_Call) Run(run func(page uint, limit uint)) *WebHookRepo_List_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(uint), args[1].(uint))
})
return _c
}
func (_c *WebHookRepo_List_Call) Return(_a0 []*biz.WebHook, _a1 int64, _a2 error) *WebHookRepo_List_Call {
_c.Call.Return(_a0, _a1, _a2)
return _c
}
func (_c *WebHookRepo_List_Call) RunAndReturn(run func(uint, uint) ([]*biz.WebHook, int64, error)) *WebHookRepo_List_Call {
_c.Call.Return(run)
return _c
}
// Update provides a mock function with given fields: req
func (_m *WebHookRepo) Update(req *request.WebHookUpdate) error {
ret := _m.Called(req)
if len(ret) == 0 {
panic("no return value specified for Update")
}
var r0 error
if rf, ok := ret.Get(0).(func(*request.WebHookUpdate) error); ok {
r0 = rf(req)
} else {
r0 = ret.Error(0)
}
return r0
}
// WebHookRepo_Update_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Update'
type WebHookRepo_Update_Call struct {
*mock.Call
}
// Update is a helper method to define mock.On call
// - req *request.WebHookUpdate
func (_e *WebHookRepo_Expecter) Update(req interface{}) *WebHookRepo_Update_Call {
return &WebHookRepo_Update_Call{Call: _e.mock.On("Update", req)}
}
func (_c *WebHookRepo_Update_Call) Run(run func(req *request.WebHookUpdate)) *WebHookRepo_Update_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(*request.WebHookUpdate))
})
return _c
}
func (_c *WebHookRepo_Update_Call) Return(_a0 error) *WebHookRepo_Update_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *WebHookRepo_Update_Call) RunAndReturn(run func(*request.WebHookUpdate) error) *WebHookRepo_Update_Call {
_c.Call.Return(run)
return _c
}
// NewWebHookRepo creates a new instance of WebHookRepo. 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 NewWebHookRepo(t interface {
mock.TestingT
Cleanup(func())
}) *WebHookRepo {
mock := &WebHookRepo{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}