mirror of
				https://gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud
				synced 2025-11-04 04:01:46 +00:00 
			
		
		
		
	code restructuration: private implementation
This commit is contained in:
		
							
								
								
									
										132
									
								
								mocks/Apps.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										132
									
								
								mocks/Apps.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,132 @@
 | 
			
		||||
// 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"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Apps is an autogenerated mock type for the Apps type
 | 
			
		||||
type Apps struct {
 | 
			
		||||
	mock.Mock
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Disable provides a mock function with given fields: name
 | 
			
		||||
func (_m *Apps) 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 *Apps) 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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Infos provides a mock function with given fields: name
 | 
			
		||||
func (_m *Apps) Infos(name string) (gonextcloud.App, error) {
 | 
			
		||||
	ret := _m.Called(name)
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.App
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string) gonextcloud.App); ok {
 | 
			
		||||
		r0 = rf(name)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Get(0).(gonextcloud.App)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	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 *Apps) 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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ListDisabled provides a mock function with given fields:
 | 
			
		||||
func (_m *Apps) ListDisabled() ([]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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// ListEnabled provides a mock function with given fields:
 | 
			
		||||
func (_m *Apps) ListEnabled() ([]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
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										151
									
								
								mocks/AppsConfig.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										151
									
								
								mocks/AppsConfig.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,151 @@
 | 
			
		||||
// Code generated by mockery v1.0.0. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
package mocks
 | 
			
		||||
 | 
			
		||||
import mock "github.com/stretchr/testify/mock"
 | 
			
		||||
 | 
			
		||||
// AppsConfig is an autogenerated mock type for the AppsConfig type
 | 
			
		||||
type AppsConfig struct {
 | 
			
		||||
	mock.Mock
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DeleteValue provides a mock function with given fields: id, key, value
 | 
			
		||||
func (_m *AppsConfig) DeleteValue(id string, key string, value string) error {
 | 
			
		||||
	ret := _m.Called(id, key, value)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
 | 
			
		||||
		r0 = rf(id, key, value)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Details provides a mock function with given fields: appID
 | 
			
		||||
func (_m *AppsConfig) Details(appID string) (map[string]string, error) {
 | 
			
		||||
	ret := _m.Called(appID)
 | 
			
		||||
 | 
			
		||||
	var r0 map[string]string
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string) map[string]string); ok {
 | 
			
		||||
		r0 = rf(appID)
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(map[string]string)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func(string) error); ok {
 | 
			
		||||
		r1 = rf(appID)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Get provides a mock function with given fields:
 | 
			
		||||
func (_m *AppsConfig) Get() (map[string]map[string]string, error) {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 map[string]map[string]string
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() map[string]map[string]string); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(map[string]map[string]string)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func() error); ok {
 | 
			
		||||
		r1 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Keys provides a mock function with given fields: id
 | 
			
		||||
func (_m *AppsConfig) Keys(id string) ([]string, error) {
 | 
			
		||||
	ret := _m.Called(id)
 | 
			
		||||
 | 
			
		||||
	var r0 []string
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string) []string); ok {
 | 
			
		||||
		r0 = rf(id)
 | 
			
		||||
	} 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(id)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List provides a mock function with given fields:
 | 
			
		||||
func (_m *AppsConfig) 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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SetValue provides a mock function with given fields: id, key, value
 | 
			
		||||
func (_m *AppsConfig) SetValue(id string, key string, value string) error {
 | 
			
		||||
	ret := _m.Called(id, key, value)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
 | 
			
		||||
		r0 = rf(id, key, value)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Value provides a mock function with given fields: id, key
 | 
			
		||||
func (_m *AppsConfig) Value(id string, key string) (string, error) {
 | 
			
		||||
	ret := _m.Called(id, key)
 | 
			
		||||
 | 
			
		||||
	var r0 string
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string, string) string); ok {
 | 
			
		||||
		r0 = rf(id, key)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Get(0).(string)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func(string, string) error); ok {
 | 
			
		||||
		r1 = rf(id, key)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										38
									
								
								mocks/Auth.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								mocks/Auth.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,38 @@
 | 
			
		||||
// Code generated by mockery v1.0.0. DO NOT EDIT.
 | 
			
		||||
 | 
			
		||||
package mocks
 | 
			
		||||
 | 
			
		||||
import mock "github.com/stretchr/testify/mock"
 | 
			
		||||
 | 
			
		||||
// Auth is an autogenerated mock type for the Auth type
 | 
			
		||||
type Auth struct {
 | 
			
		||||
	mock.Mock
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Login provides a mock function with given fields: username, password
 | 
			
		||||
func (_m *Auth) Login(username string, password string) error {
 | 
			
		||||
	ret := _m.Called(username, password)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string, string) error); ok {
 | 
			
		||||
		r0 = rf(username, password)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Logout provides a mock function with given fields:
 | 
			
		||||
func (_m *Auth) Logout() error {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() error); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										154
									
								
								mocks/Client.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										154
									
								
								mocks/Client.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,154 @@
 | 
			
		||||
// 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"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Client is an autogenerated mock type for the Client type
 | 
			
		||||
type Client struct {
 | 
			
		||||
	mock.Mock
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Apps provides a mock function with given fields:
 | 
			
		||||
func (_m *Client) Apps() gonextcloud.Apps {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.Apps
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() gonextcloud.Apps); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(gonextcloud.Apps)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AppsConfig provides a mock function with given fields:
 | 
			
		||||
func (_m *Client) AppsConfig() gonextcloud.AppsConfig {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.AppsConfig
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() gonextcloud.AppsConfig); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(gonextcloud.AppsConfig)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GroupFolders provides a mock function with given fields:
 | 
			
		||||
func (_m *Client) GroupFolders() gonextcloud.GroupFolders {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.GroupFolders
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() gonextcloud.GroupFolders); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(gonextcloud.GroupFolders)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Groups provides a mock function with given fields:
 | 
			
		||||
func (_m *Client) Groups() gonextcloud.Groups {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.Groups
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() gonextcloud.Groups); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(gonextcloud.Groups)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Login provides a mock function with given fields: username, password
 | 
			
		||||
func (_m *Client) Login(username string, password string) error {
 | 
			
		||||
	ret := _m.Called(username, password)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string, string) error); ok {
 | 
			
		||||
		r0 = rf(username, password)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Logout provides a mock function with given fields:
 | 
			
		||||
func (_m *Client) Logout() error {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() error); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Notifications provides a mock function with given fields:
 | 
			
		||||
func (_m *Client) Notifications() gonextcloud.Notifications {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.Notifications
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() gonextcloud.Notifications); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(gonextcloud.Notifications)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Shares provides a mock function with given fields:
 | 
			
		||||
func (_m *Client) Shares() gonextcloud.Shares {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.Shares
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() gonextcloud.Shares); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(gonextcloud.Shares)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Users provides a mock function with given fields:
 | 
			
		||||
func (_m *Client) Users() gonextcloud.Users {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.Users
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() gonextcloud.Users); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(gonextcloud.Users)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										149
									
								
								mocks/GroupFolders.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										149
									
								
								mocks/GroupFolders.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,149 @@
 | 
			
		||||
// 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"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// GroupFolders is an autogenerated mock type for the GroupFolders type
 | 
			
		||||
type GroupFolders struct {
 | 
			
		||||
	mock.Mock
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AddGroup provides a mock function with given fields: folderID, groupName
 | 
			
		||||
func (_m *GroupFolders) AddGroup(folderID int, groupName string) error {
 | 
			
		||||
	ret := _m.Called(folderID, groupName)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int, string) error); ok {
 | 
			
		||||
		r0 = rf(folderID, groupName)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Create provides a mock function with given fields: name
 | 
			
		||||
func (_m *GroupFolders) Create(name string) (int, error) {
 | 
			
		||||
	ret := _m.Called(name)
 | 
			
		||||
 | 
			
		||||
	var r0 int
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string) int); ok {
 | 
			
		||||
		r0 = rf(name)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Get(0).(int)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func(string) error); ok {
 | 
			
		||||
		r1 = rf(name)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Get provides a mock function with given fields: id
 | 
			
		||||
func (_m *GroupFolders) Get(id int) (gonextcloud.GroupFolder, error) {
 | 
			
		||||
	ret := _m.Called(id)
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.GroupFolder
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int) gonextcloud.GroupFolder); ok {
 | 
			
		||||
		r0 = rf(id)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Get(0).(gonextcloud.GroupFolder)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func(int) error); ok {
 | 
			
		||||
		r1 = rf(id)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List provides a mock function with given fields:
 | 
			
		||||
func (_m *GroupFolders) List() (map[int]gonextcloud.GroupFolder, error) {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 map[int]gonextcloud.GroupFolder
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() map[int]gonextcloud.GroupFolder); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).(map[int]gonextcloud.GroupFolder)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func() error); ok {
 | 
			
		||||
		r1 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// RemoveGroup provides a mock function with given fields: folderID, groupName
 | 
			
		||||
func (_m *GroupFolders) RemoveGroup(folderID int, groupName string) error {
 | 
			
		||||
	ret := _m.Called(folderID, groupName)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int, string) error); ok {
 | 
			
		||||
		r0 = rf(folderID, groupName)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Rename provides a mock function with given fields: groupID, name
 | 
			
		||||
func (_m *GroupFolders) Rename(groupID int, name string) error {
 | 
			
		||||
	ret := _m.Called(groupID, name)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int, string) error); ok {
 | 
			
		||||
		r0 = rf(groupID, name)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SetGroupPermissions provides a mock function with given fields: folderID, groupName, permission
 | 
			
		||||
func (_m *GroupFolders) SetGroupPermissions(folderID int, groupName string, permission gonextcloud.SharePermission) error {
 | 
			
		||||
	ret := _m.Called(folderID, groupName, permission)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int, string, gonextcloud.SharePermission) error); ok {
 | 
			
		||||
		r0 = rf(folderID, groupName, permission)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SetQuota provides a mock function with given fields: folderID, quota
 | 
			
		||||
func (_m *GroupFolders) SetQuota(folderID int, quota int) error {
 | 
			
		||||
	ret := _m.Called(folderID, quota)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int, int) error); ok {
 | 
			
		||||
		r0 = rf(folderID, quota)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										157
									
								
								mocks/Groups.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										157
									
								
								mocks/Groups.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,157 @@
 | 
			
		||||
// 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"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Groups is an autogenerated mock type for the Groups type
 | 
			
		||||
type Groups struct {
 | 
			
		||||
	mock.Mock
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Create provides a mock function with given fields: name
 | 
			
		||||
func (_m *Groups) Create(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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Delete provides a mock function with given fields: name
 | 
			
		||||
func (_m *Groups) 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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List provides a mock function with given fields:
 | 
			
		||||
func (_m *Groups) 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: search
 | 
			
		||||
func (_m *Groups) ListDetails(search string) ([]gonextcloud.Group, error) {
 | 
			
		||||
	ret := _m.Called(search)
 | 
			
		||||
 | 
			
		||||
	var r0 []gonextcloud.Group
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string) []gonextcloud.Group); ok {
 | 
			
		||||
		r0 = rf(search)
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).([]gonextcloud.Group)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func(string) error); ok {
 | 
			
		||||
		r1 = rf(search)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Search provides a mock function with given fields: search
 | 
			
		||||
func (_m *Groups) 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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// SubAdminList provides a mock function with given fields: name
 | 
			
		||||
func (_m *Groups) SubAdminList(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
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Users provides a mock function with given fields: name
 | 
			
		||||
func (_m *Groups) Users(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
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										128
									
								
								mocks/Notifications.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										128
									
								
								mocks/Notifications.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,128 @@
 | 
			
		||||
// 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"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Notifications is an autogenerated mock type for the Notifications type
 | 
			
		||||
type Notifications struct {
 | 
			
		||||
	mock.Mock
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// AdminAvailable provides a mock function with given fields:
 | 
			
		||||
func (_m *Notifications) AdminAvailable() error {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() error); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Available provides a mock function with given fields:
 | 
			
		||||
func (_m *Notifications) Available() error {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() error); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Create provides a mock function with given fields: userID, title, message
 | 
			
		||||
func (_m *Notifications) Create(userID string, title string, message string) error {
 | 
			
		||||
	ret := _m.Called(userID, title, message)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string, string, string) error); ok {
 | 
			
		||||
		r0 = rf(userID, title, message)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Delete provides a mock function with given fields: id
 | 
			
		||||
func (_m *Notifications) Delete(id int) error {
 | 
			
		||||
	ret := _m.Called(id)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int) error); ok {
 | 
			
		||||
		r0 = rf(id)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// DeleteAll provides a mock function with given fields:
 | 
			
		||||
func (_m *Notifications) DeleteAll() error {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() error); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Get provides a mock function with given fields: id
 | 
			
		||||
func (_m *Notifications) Get(id int) (gonextcloud.Notification, error) {
 | 
			
		||||
	ret := _m.Called(id)
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.Notification
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int) gonextcloud.Notification); ok {
 | 
			
		||||
		r0 = rf(id)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Get(0).(gonextcloud.Notification)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func(int) error); ok {
 | 
			
		||||
		r1 = rf(id)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List provides a mock function with given fields:
 | 
			
		||||
func (_m *Notifications) List() ([]gonextcloud.Notification, error) {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 []gonextcloud.Notification
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() []gonextcloud.Notification); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).([]gonextcloud.Notification)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func() error); ok {
 | 
			
		||||
		r1 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										186
									
								
								mocks/Shares.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										186
									
								
								mocks/Shares.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,186 @@
 | 
			
		||||
// 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"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Shares is an autogenerated mock type for the Shares type
 | 
			
		||||
type Shares struct {
 | 
			
		||||
	mock.Mock
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Create provides a mock function with given fields: path, shareType, permission, shareWith, publicUpload, password
 | 
			
		||||
func (_m *Shares) Create(path string, shareType gonextcloud.ShareType, permission gonextcloud.SharePermission, shareWith string, publicUpload bool, password string) (gonextcloud.Share, error) {
 | 
			
		||||
	ret := _m.Called(path, shareType, permission, shareWith, publicUpload, password)
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.Share
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string, gonextcloud.ShareType, gonextcloud.SharePermission, string, bool, string) gonextcloud.Share); ok {
 | 
			
		||||
		r0 = rf(path, shareType, permission, shareWith, publicUpload, password)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Get(0).(gonextcloud.Share)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func(string, gonextcloud.ShareType, gonextcloud.SharePermission, string, bool, string) error); ok {
 | 
			
		||||
		r1 = rf(path, shareType, permission, shareWith, publicUpload, password)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Delete provides a mock function with given fields: shareID
 | 
			
		||||
func (_m *Shares) Delete(shareID int) error {
 | 
			
		||||
	ret := _m.Called(shareID)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int) error); ok {
 | 
			
		||||
		r0 = rf(shareID)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Get provides a mock function with given fields: shareID
 | 
			
		||||
func (_m *Shares) Get(shareID string) (gonextcloud.Share, error) {
 | 
			
		||||
	ret := _m.Called(shareID)
 | 
			
		||||
 | 
			
		||||
	var r0 gonextcloud.Share
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string) gonextcloud.Share); ok {
 | 
			
		||||
		r0 = rf(shareID)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Get(0).(gonextcloud.Share)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func(string) error); ok {
 | 
			
		||||
		r1 = rf(shareID)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// GetFromPath provides a mock function with given fields: path, reshares, subfiles
 | 
			
		||||
func (_m *Shares) GetFromPath(path string, reshares bool, subfiles bool) ([]gonextcloud.Share, error) {
 | 
			
		||||
	ret := _m.Called(path, reshares, subfiles)
 | 
			
		||||
 | 
			
		||||
	var r0 []gonextcloud.Share
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(string, bool, bool) []gonextcloud.Share); ok {
 | 
			
		||||
		r0 = rf(path, reshares, subfiles)
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).([]gonextcloud.Share)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func(string, bool, bool) error); ok {
 | 
			
		||||
		r1 = rf(path, reshares, subfiles)
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// List provides a mock function with given fields:
 | 
			
		||||
func (_m *Shares) List() ([]gonextcloud.Share, error) {
 | 
			
		||||
	ret := _m.Called()
 | 
			
		||||
 | 
			
		||||
	var r0 []gonextcloud.Share
 | 
			
		||||
	if rf, ok := ret.Get(0).(func() []gonextcloud.Share); ok {
 | 
			
		||||
		r0 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		if ret.Get(0) != nil {
 | 
			
		||||
			r0 = ret.Get(0).([]gonextcloud.Share)
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	var r1 error
 | 
			
		||||
	if rf, ok := ret.Get(1).(func() error); ok {
 | 
			
		||||
		r1 = rf()
 | 
			
		||||
	} else {
 | 
			
		||||
		r1 = ret.Error(1)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0, r1
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// Update provides a mock function with given fields: shareUpdate
 | 
			
		||||
func (_m *Shares) Update(shareUpdate gonextcloud.ShareUpdate) error {
 | 
			
		||||
	ret := _m.Called(shareUpdate)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(gonextcloud.ShareUpdate) error); ok {
 | 
			
		||||
		r0 = rf(shareUpdate)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdateExpireDate provides a mock function with given fields: shareID, expireDate
 | 
			
		||||
func (_m *Shares) UpdateExpireDate(shareID int, expireDate string) error {
 | 
			
		||||
	ret := _m.Called(shareID, expireDate)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int, string) error); ok {
 | 
			
		||||
		r0 = rf(shareID, expireDate)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdatePassword provides a mock function with given fields: shareID, password
 | 
			
		||||
func (_m *Shares) UpdatePassword(shareID int, password string) error {
 | 
			
		||||
	ret := _m.Called(shareID, password)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int, string) error); ok {
 | 
			
		||||
		r0 = rf(shareID, password)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdatePermissions provides a mock function with given fields: shareID, permissions
 | 
			
		||||
func (_m *Shares) UpdatePermissions(shareID int, permissions gonextcloud.SharePermission) error {
 | 
			
		||||
	ret := _m.Called(shareID, permissions)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int, gonextcloud.SharePermission) error); ok {
 | 
			
		||||
		r0 = rf(shareID, permissions)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
// UpdatePublicUpload provides a mock function with given fields: shareID, public
 | 
			
		||||
func (_m *Shares) UpdatePublicUpload(shareID int, public bool) error {
 | 
			
		||||
	ret := _m.Called(shareID, public)
 | 
			
		||||
 | 
			
		||||
	var r0 error
 | 
			
		||||
	if rf, ok := ret.Get(0).(func(int, bool) error); ok {
 | 
			
		||||
		r0 = rf(shareID, public)
 | 
			
		||||
	} else {
 | 
			
		||||
		r0 = ret.Error(0)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return r0
 | 
			
		||||
}
 | 
			
		||||
							
								
								
									
										439
									
								
								mocks/Users.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										439
									
								
								mocks/Users.go
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,439 @@
 | 
			
		||||
// 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
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user