mirror of
https://gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud
synced 2024-11-25 21:16:25 +00:00
440 lines
9.4 KiB
Go
440 lines
9.4 KiB
Go
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
|
|
|
package mocks
|
|
|
|
import (
|
|
"github.com/stretchr/testify/mock"
|
|
|
|
"gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud"
|
|
)
|
|
|
|
// Users is an autogenerated mock type for the Users type
|
|
type Users struct {
|
|
mock.Mock
|
|
}
|
|
|
|
// Create provides a mock function with given fields: username, password, user
|
|
func (_m *Users) Create(username string, password string, user *gonextcloud.UserDetails) error {
|
|
ret := _m.Called(username, password, user)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, *gonextcloud.UserDetails) error); ok {
|
|
r0 = rf(username, password, user)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// CreateBatchWithoutPassword provides a mock function with given fields: users
|
|
func (_m *Users) CreateBatchWithoutPassword(users []gonextcloud.User) error {
|
|
ret := _m.Called(users)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func([]gonextcloud.User) error); ok {
|
|
r0 = rf(users)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// CreateWithoutPassword provides a mock function with given fields: username, email, displayName, quota, language, groups
|
|
func (_m *Users) CreateWithoutPassword(username string, email string, displayName string, quota string, language string, groups ...string) error {
|
|
_va := make([]interface{}, len(groups))
|
|
for _i := range groups {
|
|
_va[_i] = groups[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, username, email, displayName, quota, language)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string, string, string, string, ...string) error); ok {
|
|
r0 = rf(username, email, displayName, quota, language, groups...)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Delete provides a mock function with given fields: name
|
|
func (_m *Users) Delete(name string) error {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Disable provides a mock function with given fields: name
|
|
func (_m *Users) Disable(name string) error {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Enable provides a mock function with given fields: name
|
|
func (_m *Users) Enable(name string) error {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Get provides a mock function with given fields: name
|
|
func (_m *Users) Get(name string) (*gonextcloud.UserDetails, error) {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 *gonextcloud.UserDetails
|
|
if rf, ok := ret.Get(0).(func(string) *gonextcloud.UserDetails); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*gonextcloud.UserDetails)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GroupAdd provides a mock function with given fields: name, group
|
|
func (_m *Users) GroupAdd(name string, group string) error {
|
|
ret := _m.Called(name, group)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, group)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GroupDemote provides a mock function with given fields: name, group
|
|
func (_m *Users) GroupDemote(name string, group string) error {
|
|
ret := _m.Called(name, group)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, group)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GroupList provides a mock function with given fields: name
|
|
func (_m *Users) GroupList(name string) ([]string, error) {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func(string) []string); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// GroupPromote provides a mock function with given fields: name, group
|
|
func (_m *Users) GroupPromote(name string, group string) error {
|
|
ret := _m.Called(name, group)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, group)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GroupRemove provides a mock function with given fields: name, group
|
|
func (_m *Users) GroupRemove(name string, group string) error {
|
|
ret := _m.Called(name, group)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, group)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// GroupSubAdminList provides a mock function with given fields: name
|
|
func (_m *Users) GroupSubAdminList(name string) ([]string, error) {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func(string) []string); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(name)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// List provides a mock function with given fields:
|
|
func (_m *Users) List() ([]string, error) {
|
|
ret := _m.Called()
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func() []string); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// ListDetails provides a mock function with given fields:
|
|
func (_m *Users) ListDetails() (map[string]gonextcloud.UserDetails, error) {
|
|
ret := _m.Called()
|
|
|
|
var r0 map[string]gonextcloud.UserDetails
|
|
if rf, ok := ret.Get(0).(func() map[string]gonextcloud.UserDetails); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(map[string]gonextcloud.UserDetails)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func() error); ok {
|
|
r1 = rf()
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// Search provides a mock function with given fields: search
|
|
func (_m *Users) Search(search string) ([]string, error) {
|
|
ret := _m.Called(search)
|
|
|
|
var r0 []string
|
|
if rf, ok := ret.Get(0).(func(string) []string); ok {
|
|
r0 = rf(search)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).([]string)
|
|
}
|
|
}
|
|
|
|
var r1 error
|
|
if rf, ok := ret.Get(1).(func(string) error); ok {
|
|
r1 = rf(search)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// SendWelcomeEmail provides a mock function with given fields: name
|
|
func (_m *Users) SendWelcomeEmail(name string) error {
|
|
ret := _m.Called(name)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string) error); ok {
|
|
r0 = rf(name)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// Update provides a mock function with given fields: user
|
|
func (_m *Users) Update(user *gonextcloud.UserDetails) error {
|
|
ret := _m.Called(user)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(*gonextcloud.UserDetails) error); ok {
|
|
r0 = rf(user)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateAddress provides a mock function with given fields: name, address
|
|
func (_m *Users) UpdateAddress(name string, address string) error {
|
|
ret := _m.Called(name, address)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, address)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateDisplayName provides a mock function with given fields: name, displayName
|
|
func (_m *Users) UpdateDisplayName(name string, displayName string) error {
|
|
ret := _m.Called(name, displayName)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, displayName)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateEmail provides a mock function with given fields: name, email
|
|
func (_m *Users) UpdateEmail(name string, email string) error {
|
|
ret := _m.Called(name, email)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, email)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdatePassword provides a mock function with given fields: name, password
|
|
func (_m *Users) UpdatePassword(name string, password string) error {
|
|
ret := _m.Called(name, password)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, password)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdatePhone provides a mock function with given fields: name, phone
|
|
func (_m *Users) UpdatePhone(name string, phone string) error {
|
|
ret := _m.Called(name, phone)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, phone)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateQuota provides a mock function with given fields: name, quota
|
|
func (_m *Users) UpdateQuota(name string, quota int64) error {
|
|
ret := _m.Called(name, quota)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, int64) error); ok {
|
|
r0 = rf(name, quota)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateTwitter provides a mock function with given fields: name, twitter
|
|
func (_m *Users) UpdateTwitter(name string, twitter string) error {
|
|
ret := _m.Called(name, twitter)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, twitter)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// UpdateWebSite provides a mock function with given fields: name, website
|
|
func (_m *Users) UpdateWebSite(name string, website string) error {
|
|
ret := _m.Called(name, website)
|
|
|
|
var r0 error
|
|
if rf, ok := ret.Get(0).(func(string, string) error); ok {
|
|
r0 = rf(name, website)
|
|
} else {
|
|
r0 = ret.Error(0)
|
|
}
|
|
|
|
return r0
|
|
}
|