mirror of
https://gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud
synced 2024-12-01 23:26:24 +00:00
184 lines
4.5 KiB
Go
184 lines
4.5 KiB
Go
|
// Code generated by mockery v1.0.0. DO NOT EDIT.
|
||
|
|
||
|
package mocks
|
||
|
|
||
|
import mock "github.com/stretchr/testify/mock"
|
||
|
import types "gitlab.bertha.cloud/partitio/Nextcloud-Partitio/gonextcloud/types"
|
||
|
|
||
|
// 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 types.ShareType, permission types.SharePermission, shareWith string, publicUpload bool, password string) (types.Share, error) {
|
||
|
ret := _m.Called(path, shareType, permission, shareWith, publicUpload, password)
|
||
|
|
||
|
var r0 types.Share
|
||
|
if rf, ok := ret.Get(0).(func(string, types.ShareType, types.SharePermission, string, bool, string) types.Share); ok {
|
||
|
r0 = rf(path, shareType, permission, shareWith, publicUpload, password)
|
||
|
} else {
|
||
|
r0 = ret.Get(0).(types.Share)
|
||
|
}
|
||
|
|
||
|
var r1 error
|
||
|
if rf, ok := ret.Get(1).(func(string, types.ShareType, types.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) (types.Share, error) {
|
||
|
ret := _m.Called(shareID)
|
||
|
|
||
|
var r0 types.Share
|
||
|
if rf, ok := ret.Get(0).(func(string) types.Share); ok {
|
||
|
r0 = rf(shareID)
|
||
|
} else {
|
||
|
r0 = ret.Get(0).(types.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) ([]types.Share, error) {
|
||
|
ret := _m.Called(path, reshares, subfiles)
|
||
|
|
||
|
var r0 []types.Share
|
||
|
if rf, ok := ret.Get(0).(func(string, bool, bool) []types.Share); ok {
|
||
|
r0 = rf(path, reshares, subfiles)
|
||
|
} else {
|
||
|
if ret.Get(0) != nil {
|
||
|
r0 = ret.Get(0).([]types.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() ([]types.Share, error) {
|
||
|
ret := _m.Called()
|
||
|
|
||
|
var r0 []types.Share
|
||
|
if rf, ok := ret.Get(0).(func() []types.Share); ok {
|
||
|
r0 = rf()
|
||
|
} else {
|
||
|
if ret.Get(0) != nil {
|
||
|
r0 = ret.Get(0).([]types.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 types.ShareUpdate) error {
|
||
|
ret := _m.Called(shareUpdate)
|
||
|
|
||
|
var r0 error
|
||
|
if rf, ok := ret.Get(0).(func(types.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 types.SharePermission) error {
|
||
|
ret := _m.Called(shareID, permissions)
|
||
|
|
||
|
var r0 error
|
||
|
if rf, ok := ret.Get(0).(func(int, types.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
|
||
|
}
|