Merge remote-tracking branch 'origin/main'

This commit is contained in:
耗子
2026-03-08 00:42:14 +08:00
2 changed files with 22 additions and 20 deletions
+11 -10
View File
@@ -136,17 +136,17 @@ func (_c *CertRepo_Delete_Call) RunAndReturn(run func(context.Context, uint) err
return _c
}
// Deploy provides a mock function with given fields: ID, WebsiteID
func (_m *CertRepo) Deploy(ID uint, WebsiteID uint) error {
ret := _m.Called(ID, WebsiteID)
// Deploy provides a mock function with given fields: ID, WebsiteID, enableHTTPS
func (_m *CertRepo) Deploy(ID uint, WebsiteID uint, enableHTTPS bool) error {
ret := _m.Called(ID, WebsiteID, enableHTTPS)
if len(ret) == 0 {
panic("no return value specified for Deploy")
}
var r0 error
if rf, ok := ret.Get(0).(func(uint, uint) error); ok {
r0 = rf(ID, WebsiteID)
if rf, ok := ret.Get(0).(func(uint, uint, bool) error); ok {
r0 = rf(ID, WebsiteID, enableHTTPS)
} else {
r0 = ret.Error(0)
}
@@ -162,13 +162,14 @@ type CertRepo_Deploy_Call struct {
// Deploy is a helper method to define mock.On call
// - ID uint
// - WebsiteID uint
func (_e *CertRepo_Expecter) Deploy(ID interface{}, WebsiteID interface{}) *CertRepo_Deploy_Call {
return &CertRepo_Deploy_Call{Call: _e.mock.On("Deploy", ID, WebsiteID)}
// - enableHTTPS bool
func (_e *CertRepo_Expecter) Deploy(ID interface{}, WebsiteID interface{}, enableHTTPS interface{}) *CertRepo_Deploy_Call {
return &CertRepo_Deploy_Call{Call: _e.mock.On("Deploy", ID, WebsiteID, enableHTTPS)}
}
func (_c *CertRepo_Deploy_Call) Run(run func(ID uint, WebsiteID uint)) *CertRepo_Deploy_Call {
func (_c *CertRepo_Deploy_Call) Run(run func(ID uint, WebsiteID uint, enableHTTPS bool)) *CertRepo_Deploy_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(uint), args[1].(uint))
run(args[0].(uint), args[1].(uint), args[2].(bool))
})
return _c
}
@@ -178,7 +179,7 @@ func (_c *CertRepo_Deploy_Call) Return(_a0 error) *CertRepo_Deploy_Call {
return _c
}
func (_c *CertRepo_Deploy_Call) RunAndReturn(run func(uint, uint) error) *CertRepo_Deploy_Call {
func (_c *CertRepo_Deploy_Call) RunAndReturn(run func(uint, uint, bool) error) *CertRepo_Deploy_Call {
_c.Call.Return(run)
return _c
}
+11 -10
View File
@@ -474,17 +474,17 @@ func (_c *WebsiteRepo_List_Call) RunAndReturn(run func(string, uint, uint) ([]*b
return _c
}
// ObtainCert provides a mock function with given fields: ctx, id
func (_m *WebsiteRepo) ObtainCert(ctx context.Context, id uint) error {
ret := _m.Called(ctx, id)
// ObtainCert provides a mock function with given fields: ctx, id, dnsID
func (_m *WebsiteRepo) ObtainCert(ctx context.Context, id uint, dnsID uint) error {
ret := _m.Called(ctx, id, dnsID)
if len(ret) == 0 {
panic("no return value specified for ObtainCert")
}
var r0 error
if rf, ok := ret.Get(0).(func(context.Context, uint) error); ok {
r0 = rf(ctx, id)
if rf, ok := ret.Get(0).(func(context.Context, uint, uint) error); ok {
r0 = rf(ctx, id, dnsID)
} else {
r0 = ret.Error(0)
}
@@ -500,13 +500,14 @@ type WebsiteRepo_ObtainCert_Call struct {
// ObtainCert is a helper method to define mock.On call
// - ctx context.Context
// - id uint
func (_e *WebsiteRepo_Expecter) ObtainCert(ctx interface{}, id interface{}) *WebsiteRepo_ObtainCert_Call {
return &WebsiteRepo_ObtainCert_Call{Call: _e.mock.On("ObtainCert", ctx, id)}
// - dnsID uint
func (_e *WebsiteRepo_Expecter) ObtainCert(ctx interface{}, id interface{}, dnsID interface{}) *WebsiteRepo_ObtainCert_Call {
return &WebsiteRepo_ObtainCert_Call{Call: _e.mock.On("ObtainCert", ctx, id, dnsID)}
}
func (_c *WebsiteRepo_ObtainCert_Call) Run(run func(ctx context.Context, id uint)) *WebsiteRepo_ObtainCert_Call {
func (_c *WebsiteRepo_ObtainCert_Call) Run(run func(ctx context.Context, id uint, dnsID uint)) *WebsiteRepo_ObtainCert_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(context.Context), args[1].(uint))
run(args[0].(context.Context), args[1].(uint), args[2].(uint))
})
return _c
}
@@ -516,7 +517,7 @@ func (_c *WebsiteRepo_ObtainCert_Call) Return(_a0 error) *WebsiteRepo_ObtainCert
return _c
}
func (_c *WebsiteRepo_ObtainCert_Call) RunAndReturn(run func(context.Context, uint) error) *WebsiteRepo_ObtainCert_Call {
func (_c *WebsiteRepo_ObtainCert_Call) RunAndReturn(run func(context.Context, uint, uint) error) *WebsiteRepo_ObtainCert_Call {
_c.Call.Return(run)
return _c
}