mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-12-05 08:06:30 +00:00
399 lines
9 KiB
Go
399 lines
9 KiB
Go
// Code generated by mockery. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
mock "github.com/stretchr/testify/mock"
|
|
model "go.woodpecker-ci.org/woodpecker/v2/server/model"
|
|
)
|
|
|
|
// Service is an autogenerated mock type for the Service type
|
|
type Service struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// GlobalSecretCreate provides a mock function with given fields: _a0
|
|
func (_m *Service) GlobalSecretCreate(_a0 *model.Secret) error {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GlobalSecretCreate")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*model.Secret) error); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GlobalSecretDelete provides a mock function with given fields: _a0
|
|
func (_m *Service) GlobalSecretDelete(_a0 string) error {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GlobalSecretDelete")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GlobalSecretFind provides a mock function with given fields: _a0
|
|
func (_m *Service) GlobalSecretFind(_a0 string) (*model.Secret, error) {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GlobalSecretFind")
|
|
}
|
|
|
|
var r0 *model.Secret
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(string) (*model.Secret, error)); ok {
|
|
return rf(_a0)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(string) *model.Secret); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Secret)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(_a0)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GlobalSecretList provides a mock function with given fields: _a0
|
|
func (_m *Service) GlobalSecretList(_a0 *model.ListOptions) ([]*model.Secret, error) {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GlobalSecretList")
|
|
}
|
|
|
|
var r0 []*model.Secret
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.ListOptions) ([]*model.Secret, error)); ok {
|
|
return rf(_a0)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.ListOptions) []*model.Secret); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.Secret)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.ListOptions) error); ok {
|
|
r1 = rf(_a0)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GlobalSecretUpdate provides a mock function with given fields: _a0
|
|
func (_m *Service) GlobalSecretUpdate(_a0 *model.Secret) error {
|
|
ret := _m.Called(_a0)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for GlobalSecretUpdate")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*model.Secret) error); ok {
|
|
r0 = rf(_a0)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// OrgSecretCreate provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) OrgSecretCreate(_a0 int64, _a1 *model.Secret) error {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OrgSecretCreate")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(int64, *model.Secret) error); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// OrgSecretDelete provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) OrgSecretDelete(_a0 int64, _a1 string) error {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OrgSecretDelete")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(int64, string) error); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// OrgSecretFind provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) OrgSecretFind(_a0 int64, _a1 string) (*model.Secret, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OrgSecretFind")
|
|
}
|
|
|
|
var r0 *model.Secret
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(int64, string) (*model.Secret, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(int64, string) *model.Secret); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Secret)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(int64, string) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// OrgSecretList provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) OrgSecretList(_a0 int64, _a1 *model.ListOptions) ([]*model.Secret, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OrgSecretList")
|
|
}
|
|
|
|
var r0 []*model.Secret
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(int64, *model.ListOptions) ([]*model.Secret, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(int64, *model.ListOptions) []*model.Secret); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.Secret)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(int64, *model.ListOptions) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// OrgSecretUpdate provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) OrgSecretUpdate(_a0 int64, _a1 *model.Secret) error {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for OrgSecretUpdate")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(int64, *model.Secret) error); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SecretCreate provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) SecretCreate(_a0 *model.Repo, _a1 *model.Secret) error {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SecretCreate")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*model.Repo, *model.Secret) error); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SecretDelete provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) SecretDelete(_a0 *model.Repo, _a1 string) error {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SecretDelete")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*model.Repo, string) error); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// SecretFind provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) SecretFind(_a0 *model.Repo, _a1 string) (*model.Secret, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SecretFind")
|
|
}
|
|
|
|
var r0 *model.Secret
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.Repo, string) (*model.Secret, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.Repo, string) *model.Secret); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*model.Secret)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.Repo, string) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SecretList provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) SecretList(_a0 *model.Repo, _a1 *model.ListOptions) ([]*model.Secret, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SecretList")
|
|
}
|
|
|
|
var r0 []*model.Secret
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions) ([]*model.Secret, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.Repo, *model.ListOptions) []*model.Secret); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.Secret)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.Repo, *model.ListOptions) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SecretListPipeline provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) SecretListPipeline(_a0 *model.Repo, _a1 *model.Pipeline) ([]*model.Secret, error) {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SecretListPipeline")
|
|
}
|
|
|
|
var r0 []*model.Secret
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(*model.Repo, *model.Pipeline) ([]*model.Secret, error)); ok {
|
|
return rf(_a0, _a1)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(*model.Repo, *model.Pipeline) []*model.Secret); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]*model.Secret)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(*model.Repo, *model.Pipeline) error); ok {
|
|
r1 = rf(_a0, _a1)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SecretUpdate provides a mock function with given fields: _a0, _a1
|
|
func (_m *Service) SecretUpdate(_a0 *model.Repo, _a1 *model.Secret) error {
|
|
ret := _m.Called(_a0, _a1)
|
|
|
|
if len(ret) == 0 {
|
|
panic("no return value specified for SecretUpdate")
|
|
}
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*model.Repo, *model.Secret) error); ok {
|
|
r0 = rf(_a0, _a1)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// NewService creates a new instance of Service. 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 NewService(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *Service {
|
|
mock := &Service{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|