github.com/cs3org/reva/v2@v2.27.7/pkg/storage/utils/decomposedfs/node/mocks/Tree.go (about)

     1  // Copyright 2018-2022 CERN
     2  //
     3  // Licensed under the Apache License, Version 2.0 (the "License");
     4  // you may not use this file except in compliance with the License.
     5  // You may obtain a copy of the License at
     6  //
     7  //     http://www.apache.org/licenses/LICENSE-2.0
     8  //
     9  // Unless required by applicable law or agreed to in writing, software
    10  // distributed under the License is distributed on an "AS IS" BASIS,
    11  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    12  // See the License for the specific language governing permissions and
    13  // limitations under the License.
    14  //
    15  // In applying this license, CERN does not waive the privileges and immunities
    16  // granted to it by virtue of its status as an Intergovernmental Organization
    17  // or submit itself to any jurisdiction.
    18  
    19  // Code generated by mockery v2.40.2. DO NOT EDIT.
    20  
    21  package mocks
    22  
    23  import (
    24  	context "context"
    25  	fs "io/fs"
    26  
    27  	io "io"
    28  
    29  	metadata "github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/metadata"
    30  	mock "github.com/stretchr/testify/mock"
    31  
    32  	node "github.com/cs3org/reva/v2/pkg/storage/utils/decomposedfs/node"
    33  )
    34  
    35  // Tree is an autogenerated mock type for the Tree type
    36  type Tree struct {
    37  	mock.Mock
    38  }
    39  
    40  type Tree_Expecter struct {
    41  	mock *mock.Mock
    42  }
    43  
    44  func (_m *Tree) EXPECT() *Tree_Expecter {
    45  	return &Tree_Expecter{mock: &_m.Mock}
    46  }
    47  
    48  // BuildSpaceIDIndexEntry provides a mock function with given fields: spaceID, nodeID
    49  func (_m *Tree) BuildSpaceIDIndexEntry(spaceID string, nodeID string) string {
    50  	ret := _m.Called(spaceID, nodeID)
    51  
    52  	if len(ret) == 0 {
    53  		panic("no return value specified for BuildSpaceIDIndexEntry")
    54  	}
    55  
    56  	var r0 string
    57  	if rf, ok := ret.Get(0).(func(string, string) string); ok {
    58  		r0 = rf(spaceID, nodeID)
    59  	} else {
    60  		r0 = ret.Get(0).(string)
    61  	}
    62  
    63  	return r0
    64  }
    65  
    66  // Tree_BuildSpaceIDIndexEntry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BuildSpaceIDIndexEntry'
    67  type Tree_BuildSpaceIDIndexEntry_Call struct {
    68  	*mock.Call
    69  }
    70  
    71  // BuildSpaceIDIndexEntry is a helper method to define mock.On call
    72  //   - spaceID string
    73  //   - nodeID string
    74  func (_e *Tree_Expecter) BuildSpaceIDIndexEntry(spaceID interface{}, nodeID interface{}) *Tree_BuildSpaceIDIndexEntry_Call {
    75  	return &Tree_BuildSpaceIDIndexEntry_Call{Call: _e.mock.On("BuildSpaceIDIndexEntry", spaceID, nodeID)}
    76  }
    77  
    78  func (_c *Tree_BuildSpaceIDIndexEntry_Call) Run(run func(spaceID string, nodeID string)) *Tree_BuildSpaceIDIndexEntry_Call {
    79  	_c.Call.Run(func(args mock.Arguments) {
    80  		run(args[0].(string), args[1].(string))
    81  	})
    82  	return _c
    83  }
    84  
    85  func (_c *Tree_BuildSpaceIDIndexEntry_Call) Return(_a0 string) *Tree_BuildSpaceIDIndexEntry_Call {
    86  	_c.Call.Return(_a0)
    87  	return _c
    88  }
    89  
    90  func (_c *Tree_BuildSpaceIDIndexEntry_Call) RunAndReturn(run func(string, string) string) *Tree_BuildSpaceIDIndexEntry_Call {
    91  	_c.Call.Return(run)
    92  	return _c
    93  }
    94  
    95  // CreateDir provides a mock function with given fields: ctx, _a1
    96  func (_m *Tree) CreateDir(ctx context.Context, _a1 *node.Node) error {
    97  	ret := _m.Called(ctx, _a1)
    98  
    99  	if len(ret) == 0 {
   100  		panic("no return value specified for CreateDir")
   101  	}
   102  
   103  	var r0 error
   104  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node) error); ok {
   105  		r0 = rf(ctx, _a1)
   106  	} else {
   107  		r0 = ret.Error(0)
   108  	}
   109  
   110  	return r0
   111  }
   112  
   113  // Tree_CreateDir_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'CreateDir'
   114  type Tree_CreateDir_Call struct {
   115  	*mock.Call
   116  }
   117  
   118  // CreateDir is a helper method to define mock.On call
   119  //   - ctx context.Context
   120  //   - _a1 *node.Node
   121  func (_e *Tree_Expecter) CreateDir(ctx interface{}, _a1 interface{}) *Tree_CreateDir_Call {
   122  	return &Tree_CreateDir_Call{Call: _e.mock.On("CreateDir", ctx, _a1)}
   123  }
   124  
   125  func (_c *Tree_CreateDir_Call) Run(run func(ctx context.Context, _a1 *node.Node)) *Tree_CreateDir_Call {
   126  	_c.Call.Run(func(args mock.Arguments) {
   127  		run(args[0].(context.Context), args[1].(*node.Node))
   128  	})
   129  	return _c
   130  }
   131  
   132  func (_c *Tree_CreateDir_Call) Return(err error) *Tree_CreateDir_Call {
   133  	_c.Call.Return(err)
   134  	return _c
   135  }
   136  
   137  func (_c *Tree_CreateDir_Call) RunAndReturn(run func(context.Context, *node.Node) error) *Tree_CreateDir_Call {
   138  	_c.Call.Return(run)
   139  	return _c
   140  }
   141  
   142  // Delete provides a mock function with given fields: ctx, _a1
   143  func (_m *Tree) Delete(ctx context.Context, _a1 *node.Node) error {
   144  	ret := _m.Called(ctx, _a1)
   145  
   146  	if len(ret) == 0 {
   147  		panic("no return value specified for Delete")
   148  	}
   149  
   150  	var r0 error
   151  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node) error); ok {
   152  		r0 = rf(ctx, _a1)
   153  	} else {
   154  		r0 = ret.Error(0)
   155  	}
   156  
   157  	return r0
   158  }
   159  
   160  // Tree_Delete_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Delete'
   161  type Tree_Delete_Call struct {
   162  	*mock.Call
   163  }
   164  
   165  // Delete is a helper method to define mock.On call
   166  //   - ctx context.Context
   167  //   - _a1 *node.Node
   168  func (_e *Tree_Expecter) Delete(ctx interface{}, _a1 interface{}) *Tree_Delete_Call {
   169  	return &Tree_Delete_Call{Call: _e.mock.On("Delete", ctx, _a1)}
   170  }
   171  
   172  func (_c *Tree_Delete_Call) Run(run func(ctx context.Context, _a1 *node.Node)) *Tree_Delete_Call {
   173  	_c.Call.Run(func(args mock.Arguments) {
   174  		run(args[0].(context.Context), args[1].(*node.Node))
   175  	})
   176  	return _c
   177  }
   178  
   179  func (_c *Tree_Delete_Call) Return(err error) *Tree_Delete_Call {
   180  	_c.Call.Return(err)
   181  	return _c
   182  }
   183  
   184  func (_c *Tree_Delete_Call) RunAndReturn(run func(context.Context, *node.Node) error) *Tree_Delete_Call {
   185  	_c.Call.Return(run)
   186  	return _c
   187  }
   188  
   189  // DeleteBlob provides a mock function with given fields: _a0
   190  func (_m *Tree) DeleteBlob(_a0 *node.Node) error {
   191  	ret := _m.Called(_a0)
   192  
   193  	if len(ret) == 0 {
   194  		panic("no return value specified for DeleteBlob")
   195  	}
   196  
   197  	var r0 error
   198  	if rf, ok := ret.Get(0).(func(*node.Node) error); ok {
   199  		r0 = rf(_a0)
   200  	} else {
   201  		r0 = ret.Error(0)
   202  	}
   203  
   204  	return r0
   205  }
   206  
   207  // Tree_DeleteBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteBlob'
   208  type Tree_DeleteBlob_Call struct {
   209  	*mock.Call
   210  }
   211  
   212  // DeleteBlob is a helper method to define mock.On call
   213  //   - _a0 *node.Node
   214  func (_e *Tree_Expecter) DeleteBlob(_a0 interface{}) *Tree_DeleteBlob_Call {
   215  	return &Tree_DeleteBlob_Call{Call: _e.mock.On("DeleteBlob", _a0)}
   216  }
   217  
   218  func (_c *Tree_DeleteBlob_Call) Run(run func(_a0 *node.Node)) *Tree_DeleteBlob_Call {
   219  	_c.Call.Run(func(args mock.Arguments) {
   220  		run(args[0].(*node.Node))
   221  	})
   222  	return _c
   223  }
   224  
   225  func (_c *Tree_DeleteBlob_Call) Return(_a0 error) *Tree_DeleteBlob_Call {
   226  	_c.Call.Return(_a0)
   227  	return _c
   228  }
   229  
   230  func (_c *Tree_DeleteBlob_Call) RunAndReturn(run func(*node.Node) error) *Tree_DeleteBlob_Call {
   231  	_c.Call.Return(run)
   232  	return _c
   233  }
   234  
   235  // GetMD provides a mock function with given fields: ctx, _a1
   236  func (_m *Tree) GetMD(ctx context.Context, _a1 *node.Node) (fs.FileInfo, error) {
   237  	ret := _m.Called(ctx, _a1)
   238  
   239  	if len(ret) == 0 {
   240  		panic("no return value specified for GetMD")
   241  	}
   242  
   243  	var r0 fs.FileInfo
   244  	var r1 error
   245  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node) (fs.FileInfo, error)); ok {
   246  		return rf(ctx, _a1)
   247  	}
   248  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node) fs.FileInfo); ok {
   249  		r0 = rf(ctx, _a1)
   250  	} else {
   251  		if ret.Get(0) != nil {
   252  			r0 = ret.Get(0).(fs.FileInfo)
   253  		}
   254  	}
   255  
   256  	if rf, ok := ret.Get(1).(func(context.Context, *node.Node) error); ok {
   257  		r1 = rf(ctx, _a1)
   258  	} else {
   259  		r1 = ret.Error(1)
   260  	}
   261  
   262  	return r0, r1
   263  }
   264  
   265  // Tree_GetMD_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMD'
   266  type Tree_GetMD_Call struct {
   267  	*mock.Call
   268  }
   269  
   270  // GetMD is a helper method to define mock.On call
   271  //   - ctx context.Context
   272  //   - _a1 *node.Node
   273  func (_e *Tree_Expecter) GetMD(ctx interface{}, _a1 interface{}) *Tree_GetMD_Call {
   274  	return &Tree_GetMD_Call{Call: _e.mock.On("GetMD", ctx, _a1)}
   275  }
   276  
   277  func (_c *Tree_GetMD_Call) Run(run func(ctx context.Context, _a1 *node.Node)) *Tree_GetMD_Call {
   278  	_c.Call.Run(func(args mock.Arguments) {
   279  		run(args[0].(context.Context), args[1].(*node.Node))
   280  	})
   281  	return _c
   282  }
   283  
   284  func (_c *Tree_GetMD_Call) Return(_a0 fs.FileInfo, _a1 error) *Tree_GetMD_Call {
   285  	_c.Call.Return(_a0, _a1)
   286  	return _c
   287  }
   288  
   289  func (_c *Tree_GetMD_Call) RunAndReturn(run func(context.Context, *node.Node) (fs.FileInfo, error)) *Tree_GetMD_Call {
   290  	_c.Call.Return(run)
   291  	return _c
   292  }
   293  
   294  // InitNewNode provides a mock function with given fields: ctx, n, fsize
   295  func (_m *Tree) InitNewNode(ctx context.Context, n *node.Node, fsize uint64) (metadata.UnlockFunc, error) {
   296  	ret := _m.Called(ctx, n, fsize)
   297  
   298  	if len(ret) == 0 {
   299  		panic("no return value specified for InitNewNode")
   300  	}
   301  
   302  	var r0 metadata.UnlockFunc
   303  	var r1 error
   304  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node, uint64) (metadata.UnlockFunc, error)); ok {
   305  		return rf(ctx, n, fsize)
   306  	}
   307  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node, uint64) metadata.UnlockFunc); ok {
   308  		r0 = rf(ctx, n, fsize)
   309  	} else {
   310  		if ret.Get(0) != nil {
   311  			r0 = ret.Get(0).(metadata.UnlockFunc)
   312  		}
   313  	}
   314  
   315  	if rf, ok := ret.Get(1).(func(context.Context, *node.Node, uint64) error); ok {
   316  		r1 = rf(ctx, n, fsize)
   317  	} else {
   318  		r1 = ret.Error(1)
   319  	}
   320  
   321  	return r0, r1
   322  }
   323  
   324  // Tree_InitNewNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'InitNewNode'
   325  type Tree_InitNewNode_Call struct {
   326  	*mock.Call
   327  }
   328  
   329  // InitNewNode is a helper method to define mock.On call
   330  //   - ctx context.Context
   331  //   - n *node.Node
   332  //   - fsize uint64
   333  func (_e *Tree_Expecter) InitNewNode(ctx interface{}, n interface{}, fsize interface{}) *Tree_InitNewNode_Call {
   334  	return &Tree_InitNewNode_Call{Call: _e.mock.On("InitNewNode", ctx, n, fsize)}
   335  }
   336  
   337  func (_c *Tree_InitNewNode_Call) Run(run func(ctx context.Context, n *node.Node, fsize uint64)) *Tree_InitNewNode_Call {
   338  	_c.Call.Run(func(args mock.Arguments) {
   339  		run(args[0].(context.Context), args[1].(*node.Node), args[2].(uint64))
   340  	})
   341  	return _c
   342  }
   343  
   344  func (_c *Tree_InitNewNode_Call) Return(_a0 metadata.UnlockFunc, _a1 error) *Tree_InitNewNode_Call {
   345  	_c.Call.Return(_a0, _a1)
   346  	return _c
   347  }
   348  
   349  func (_c *Tree_InitNewNode_Call) RunAndReturn(run func(context.Context, *node.Node, uint64) (metadata.UnlockFunc, error)) *Tree_InitNewNode_Call {
   350  	_c.Call.Return(run)
   351  	return _c
   352  }
   353  
   354  // ListFolder provides a mock function with given fields: ctx, _a1
   355  func (_m *Tree) ListFolder(ctx context.Context, _a1 *node.Node) ([]*node.Node, error) {
   356  	ret := _m.Called(ctx, _a1)
   357  
   358  	if len(ret) == 0 {
   359  		panic("no return value specified for ListFolder")
   360  	}
   361  
   362  	var r0 []*node.Node
   363  	var r1 error
   364  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node) ([]*node.Node, error)); ok {
   365  		return rf(ctx, _a1)
   366  	}
   367  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node) []*node.Node); ok {
   368  		r0 = rf(ctx, _a1)
   369  	} else {
   370  		if ret.Get(0) != nil {
   371  			r0 = ret.Get(0).([]*node.Node)
   372  		}
   373  	}
   374  
   375  	if rf, ok := ret.Get(1).(func(context.Context, *node.Node) error); ok {
   376  		r1 = rf(ctx, _a1)
   377  	} else {
   378  		r1 = ret.Error(1)
   379  	}
   380  
   381  	return r0, r1
   382  }
   383  
   384  // Tree_ListFolder_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ListFolder'
   385  type Tree_ListFolder_Call struct {
   386  	*mock.Call
   387  }
   388  
   389  // ListFolder is a helper method to define mock.On call
   390  //   - ctx context.Context
   391  //   - _a1 *node.Node
   392  func (_e *Tree_Expecter) ListFolder(ctx interface{}, _a1 interface{}) *Tree_ListFolder_Call {
   393  	return &Tree_ListFolder_Call{Call: _e.mock.On("ListFolder", ctx, _a1)}
   394  }
   395  
   396  func (_c *Tree_ListFolder_Call) Run(run func(ctx context.Context, _a1 *node.Node)) *Tree_ListFolder_Call {
   397  	_c.Call.Run(func(args mock.Arguments) {
   398  		run(args[0].(context.Context), args[1].(*node.Node))
   399  	})
   400  	return _c
   401  }
   402  
   403  func (_c *Tree_ListFolder_Call) Return(_a0 []*node.Node, _a1 error) *Tree_ListFolder_Call {
   404  	_c.Call.Return(_a0, _a1)
   405  	return _c
   406  }
   407  
   408  func (_c *Tree_ListFolder_Call) RunAndReturn(run func(context.Context, *node.Node) ([]*node.Node, error)) *Tree_ListFolder_Call {
   409  	_c.Call.Return(run)
   410  	return _c
   411  }
   412  
   413  // Move provides a mock function with given fields: ctx, oldNode, newNode
   414  func (_m *Tree) Move(ctx context.Context, oldNode *node.Node, newNode *node.Node) error {
   415  	ret := _m.Called(ctx, oldNode, newNode)
   416  
   417  	if len(ret) == 0 {
   418  		panic("no return value specified for Move")
   419  	}
   420  
   421  	var r0 error
   422  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node, *node.Node) error); ok {
   423  		r0 = rf(ctx, oldNode, newNode)
   424  	} else {
   425  		r0 = ret.Error(0)
   426  	}
   427  
   428  	return r0
   429  }
   430  
   431  // Tree_Move_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Move'
   432  type Tree_Move_Call struct {
   433  	*mock.Call
   434  }
   435  
   436  // Move is a helper method to define mock.On call
   437  //   - ctx context.Context
   438  //   - oldNode *node.Node
   439  //   - newNode *node.Node
   440  func (_e *Tree_Expecter) Move(ctx interface{}, oldNode interface{}, newNode interface{}) *Tree_Move_Call {
   441  	return &Tree_Move_Call{Call: _e.mock.On("Move", ctx, oldNode, newNode)}
   442  }
   443  
   444  func (_c *Tree_Move_Call) Run(run func(ctx context.Context, oldNode *node.Node, newNode *node.Node)) *Tree_Move_Call {
   445  	_c.Call.Run(func(args mock.Arguments) {
   446  		run(args[0].(context.Context), args[1].(*node.Node), args[2].(*node.Node))
   447  	})
   448  	return _c
   449  }
   450  
   451  func (_c *Tree_Move_Call) Return(err error) *Tree_Move_Call {
   452  	_c.Call.Return(err)
   453  	return _c
   454  }
   455  
   456  func (_c *Tree_Move_Call) RunAndReturn(run func(context.Context, *node.Node, *node.Node) error) *Tree_Move_Call {
   457  	_c.Call.Return(run)
   458  	return _c
   459  }
   460  
   461  // Propagate provides a mock function with given fields: ctx, _a1, sizeDiff
   462  func (_m *Tree) Propagate(ctx context.Context, _a1 *node.Node, sizeDiff int64) error {
   463  	ret := _m.Called(ctx, _a1, sizeDiff)
   464  
   465  	if len(ret) == 0 {
   466  		panic("no return value specified for Propagate")
   467  	}
   468  
   469  	var r0 error
   470  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node, int64) error); ok {
   471  		r0 = rf(ctx, _a1, sizeDiff)
   472  	} else {
   473  		r0 = ret.Error(0)
   474  	}
   475  
   476  	return r0
   477  }
   478  
   479  // Tree_Propagate_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Propagate'
   480  type Tree_Propagate_Call struct {
   481  	*mock.Call
   482  }
   483  
   484  // Propagate is a helper method to define mock.On call
   485  //   - ctx context.Context
   486  //   - _a1 *node.Node
   487  //   - sizeDiff int64
   488  func (_e *Tree_Expecter) Propagate(ctx interface{}, _a1 interface{}, sizeDiff interface{}) *Tree_Propagate_Call {
   489  	return &Tree_Propagate_Call{Call: _e.mock.On("Propagate", ctx, _a1, sizeDiff)}
   490  }
   491  
   492  func (_c *Tree_Propagate_Call) Run(run func(ctx context.Context, _a1 *node.Node, sizeDiff int64)) *Tree_Propagate_Call {
   493  	_c.Call.Run(func(args mock.Arguments) {
   494  		run(args[0].(context.Context), args[1].(*node.Node), args[2].(int64))
   495  	})
   496  	return _c
   497  }
   498  
   499  func (_c *Tree_Propagate_Call) Return(err error) *Tree_Propagate_Call {
   500  	_c.Call.Return(err)
   501  	return _c
   502  }
   503  
   504  func (_c *Tree_Propagate_Call) RunAndReturn(run func(context.Context, *node.Node, int64) error) *Tree_Propagate_Call {
   505  	_c.Call.Return(run)
   506  	return _c
   507  }
   508  
   509  // PurgeRecycleItemFunc provides a mock function with given fields: ctx, spaceid, key, purgePath
   510  func (_m *Tree) PurgeRecycleItemFunc(ctx context.Context, spaceid string, key string, purgePath string) (*node.Node, func() error, error) {
   511  	ret := _m.Called(ctx, spaceid, key, purgePath)
   512  
   513  	if len(ret) == 0 {
   514  		panic("no return value specified for PurgeRecycleItemFunc")
   515  	}
   516  
   517  	var r0 *node.Node
   518  	var r1 func() error
   519  	var r2 error
   520  	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) (*node.Node, func() error, error)); ok {
   521  		return rf(ctx, spaceid, key, purgePath)
   522  	}
   523  	if rf, ok := ret.Get(0).(func(context.Context, string, string, string) *node.Node); ok {
   524  		r0 = rf(ctx, spaceid, key, purgePath)
   525  	} else {
   526  		if ret.Get(0) != nil {
   527  			r0 = ret.Get(0).(*node.Node)
   528  		}
   529  	}
   530  
   531  	if rf, ok := ret.Get(1).(func(context.Context, string, string, string) func() error); ok {
   532  		r1 = rf(ctx, spaceid, key, purgePath)
   533  	} else {
   534  		if ret.Get(1) != nil {
   535  			r1 = ret.Get(1).(func() error)
   536  		}
   537  	}
   538  
   539  	if rf, ok := ret.Get(2).(func(context.Context, string, string, string) error); ok {
   540  		r2 = rf(ctx, spaceid, key, purgePath)
   541  	} else {
   542  		r2 = ret.Error(2)
   543  	}
   544  
   545  	return r0, r1, r2
   546  }
   547  
   548  // Tree_PurgeRecycleItemFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'PurgeRecycleItemFunc'
   549  type Tree_PurgeRecycleItemFunc_Call struct {
   550  	*mock.Call
   551  }
   552  
   553  // PurgeRecycleItemFunc is a helper method to define mock.On call
   554  //   - ctx context.Context
   555  //   - spaceid string
   556  //   - key string
   557  //   - purgePath string
   558  func (_e *Tree_Expecter) PurgeRecycleItemFunc(ctx interface{}, spaceid interface{}, key interface{}, purgePath interface{}) *Tree_PurgeRecycleItemFunc_Call {
   559  	return &Tree_PurgeRecycleItemFunc_Call{Call: _e.mock.On("PurgeRecycleItemFunc", ctx, spaceid, key, purgePath)}
   560  }
   561  
   562  func (_c *Tree_PurgeRecycleItemFunc_Call) Run(run func(ctx context.Context, spaceid string, key string, purgePath string)) *Tree_PurgeRecycleItemFunc_Call {
   563  	_c.Call.Run(func(args mock.Arguments) {
   564  		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string))
   565  	})
   566  	return _c
   567  }
   568  
   569  func (_c *Tree_PurgeRecycleItemFunc_Call) Return(_a0 *node.Node, _a1 func() error, _a2 error) *Tree_PurgeRecycleItemFunc_Call {
   570  	_c.Call.Return(_a0, _a1, _a2)
   571  	return _c
   572  }
   573  
   574  func (_c *Tree_PurgeRecycleItemFunc_Call) RunAndReturn(run func(context.Context, string, string, string) (*node.Node, func() error, error)) *Tree_PurgeRecycleItemFunc_Call {
   575  	_c.Call.Return(run)
   576  	return _c
   577  }
   578  
   579  // ReadBlob provides a mock function with given fields: _a0
   580  func (_m *Tree) ReadBlob(_a0 *node.Node) (io.ReadCloser, error) {
   581  	ret := _m.Called(_a0)
   582  
   583  	if len(ret) == 0 {
   584  		panic("no return value specified for ReadBlob")
   585  	}
   586  
   587  	var r0 io.ReadCloser
   588  	var r1 error
   589  	if rf, ok := ret.Get(0).(func(*node.Node) (io.ReadCloser, error)); ok {
   590  		return rf(_a0)
   591  	}
   592  	if rf, ok := ret.Get(0).(func(*node.Node) io.ReadCloser); ok {
   593  		r0 = rf(_a0)
   594  	} else {
   595  		if ret.Get(0) != nil {
   596  			r0 = ret.Get(0).(io.ReadCloser)
   597  		}
   598  	}
   599  
   600  	if rf, ok := ret.Get(1).(func(*node.Node) error); ok {
   601  		r1 = rf(_a0)
   602  	} else {
   603  		r1 = ret.Error(1)
   604  	}
   605  
   606  	return r0, r1
   607  }
   608  
   609  // Tree_ReadBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ReadBlob'
   610  type Tree_ReadBlob_Call struct {
   611  	*mock.Call
   612  }
   613  
   614  // ReadBlob is a helper method to define mock.On call
   615  //   - _a0 *node.Node
   616  func (_e *Tree_Expecter) ReadBlob(_a0 interface{}) *Tree_ReadBlob_Call {
   617  	return &Tree_ReadBlob_Call{Call: _e.mock.On("ReadBlob", _a0)}
   618  }
   619  
   620  func (_c *Tree_ReadBlob_Call) Run(run func(_a0 *node.Node)) *Tree_ReadBlob_Call {
   621  	_c.Call.Run(func(args mock.Arguments) {
   622  		run(args[0].(*node.Node))
   623  	})
   624  	return _c
   625  }
   626  
   627  func (_c *Tree_ReadBlob_Call) Return(_a0 io.ReadCloser, _a1 error) *Tree_ReadBlob_Call {
   628  	_c.Call.Return(_a0, _a1)
   629  	return _c
   630  }
   631  
   632  func (_c *Tree_ReadBlob_Call) RunAndReturn(run func(*node.Node) (io.ReadCloser, error)) *Tree_ReadBlob_Call {
   633  	_c.Call.Return(run)
   634  	return _c
   635  }
   636  
   637  // ResolveSpaceIDIndexEntry provides a mock function with given fields: spaceID, entry
   638  func (_m *Tree) ResolveSpaceIDIndexEntry(spaceID string, entry string) (string, string, error) {
   639  	ret := _m.Called(spaceID, entry)
   640  
   641  	if len(ret) == 0 {
   642  		panic("no return value specified for ResolveSpaceIDIndexEntry")
   643  	}
   644  
   645  	var r0 string
   646  	var r1 string
   647  	var r2 error
   648  	if rf, ok := ret.Get(0).(func(string, string) (string, string, error)); ok {
   649  		return rf(spaceID, entry)
   650  	}
   651  	if rf, ok := ret.Get(0).(func(string, string) string); ok {
   652  		r0 = rf(spaceID, entry)
   653  	} else {
   654  		r0 = ret.Get(0).(string)
   655  	}
   656  
   657  	if rf, ok := ret.Get(1).(func(string, string) string); ok {
   658  		r1 = rf(spaceID, entry)
   659  	} else {
   660  		r1 = ret.Get(1).(string)
   661  	}
   662  
   663  	if rf, ok := ret.Get(2).(func(string, string) error); ok {
   664  		r2 = rf(spaceID, entry)
   665  	} else {
   666  		r2 = ret.Error(2)
   667  	}
   668  
   669  	return r0, r1, r2
   670  }
   671  
   672  // Tree_ResolveSpaceIDIndexEntry_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'ResolveSpaceIDIndexEntry'
   673  type Tree_ResolveSpaceIDIndexEntry_Call struct {
   674  	*mock.Call
   675  }
   676  
   677  // ResolveSpaceIDIndexEntry is a helper method to define mock.On call
   678  //   - spaceID string
   679  //   - entry string
   680  func (_e *Tree_Expecter) ResolveSpaceIDIndexEntry(spaceID interface{}, entry interface{}) *Tree_ResolveSpaceIDIndexEntry_Call {
   681  	return &Tree_ResolveSpaceIDIndexEntry_Call{Call: _e.mock.On("ResolveSpaceIDIndexEntry", spaceID, entry)}
   682  }
   683  
   684  func (_c *Tree_ResolveSpaceIDIndexEntry_Call) Run(run func(spaceID string, entry string)) *Tree_ResolveSpaceIDIndexEntry_Call {
   685  	_c.Call.Run(func(args mock.Arguments) {
   686  		run(args[0].(string), args[1].(string))
   687  	})
   688  	return _c
   689  }
   690  
   691  func (_c *Tree_ResolveSpaceIDIndexEntry_Call) Return(_a0 string, _a1 string, _a2 error) *Tree_ResolveSpaceIDIndexEntry_Call {
   692  	_c.Call.Return(_a0, _a1, _a2)
   693  	return _c
   694  }
   695  
   696  func (_c *Tree_ResolveSpaceIDIndexEntry_Call) RunAndReturn(run func(string, string) (string, string, error)) *Tree_ResolveSpaceIDIndexEntry_Call {
   697  	_c.Call.Return(run)
   698  	return _c
   699  }
   700  
   701  // RestoreRecycleItemFunc provides a mock function with given fields: ctx, spaceid, key, trashPath, target
   702  func (_m *Tree) RestoreRecycleItemFunc(ctx context.Context, spaceid string, key string, trashPath string, target *node.Node) (*node.Node, *node.Node, func() error, error) {
   703  	ret := _m.Called(ctx, spaceid, key, trashPath, target)
   704  
   705  	if len(ret) == 0 {
   706  		panic("no return value specified for RestoreRecycleItemFunc")
   707  	}
   708  
   709  	var r0 *node.Node
   710  	var r1 *node.Node
   711  	var r2 func() error
   712  	var r3 error
   713  	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *node.Node) (*node.Node, *node.Node, func() error, error)); ok {
   714  		return rf(ctx, spaceid, key, trashPath, target)
   715  	}
   716  	if rf, ok := ret.Get(0).(func(context.Context, string, string, string, *node.Node) *node.Node); ok {
   717  		r0 = rf(ctx, spaceid, key, trashPath, target)
   718  	} else {
   719  		if ret.Get(0) != nil {
   720  			r0 = ret.Get(0).(*node.Node)
   721  		}
   722  	}
   723  
   724  	if rf, ok := ret.Get(1).(func(context.Context, string, string, string, *node.Node) *node.Node); ok {
   725  		r1 = rf(ctx, spaceid, key, trashPath, target)
   726  	} else {
   727  		if ret.Get(1) != nil {
   728  			r1 = ret.Get(1).(*node.Node)
   729  		}
   730  	}
   731  
   732  	if rf, ok := ret.Get(2).(func(context.Context, string, string, string, *node.Node) func() error); ok {
   733  		r2 = rf(ctx, spaceid, key, trashPath, target)
   734  	} else {
   735  		if ret.Get(2) != nil {
   736  			r2 = ret.Get(2).(func() error)
   737  		}
   738  	}
   739  
   740  	if rf, ok := ret.Get(3).(func(context.Context, string, string, string, *node.Node) error); ok {
   741  		r3 = rf(ctx, spaceid, key, trashPath, target)
   742  	} else {
   743  		r3 = ret.Error(3)
   744  	}
   745  
   746  	return r0, r1, r2, r3
   747  }
   748  
   749  // Tree_RestoreRecycleItemFunc_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RestoreRecycleItemFunc'
   750  type Tree_RestoreRecycleItemFunc_Call struct {
   751  	*mock.Call
   752  }
   753  
   754  // RestoreRecycleItemFunc is a helper method to define mock.On call
   755  //   - ctx context.Context
   756  //   - spaceid string
   757  //   - key string
   758  //   - trashPath string
   759  //   - target *node.Node
   760  func (_e *Tree_Expecter) RestoreRecycleItemFunc(ctx interface{}, spaceid interface{}, key interface{}, trashPath interface{}, target interface{}) *Tree_RestoreRecycleItemFunc_Call {
   761  	return &Tree_RestoreRecycleItemFunc_Call{Call: _e.mock.On("RestoreRecycleItemFunc", ctx, spaceid, key, trashPath, target)}
   762  }
   763  
   764  func (_c *Tree_RestoreRecycleItemFunc_Call) Run(run func(ctx context.Context, spaceid string, key string, trashPath string, target *node.Node)) *Tree_RestoreRecycleItemFunc_Call {
   765  	_c.Call.Run(func(args mock.Arguments) {
   766  		run(args[0].(context.Context), args[1].(string), args[2].(string), args[3].(string), args[4].(*node.Node))
   767  	})
   768  	return _c
   769  }
   770  
   771  func (_c *Tree_RestoreRecycleItemFunc_Call) Return(_a0 *node.Node, _a1 *node.Node, _a2 func() error, _a3 error) *Tree_RestoreRecycleItemFunc_Call {
   772  	_c.Call.Return(_a0, _a1, _a2, _a3)
   773  	return _c
   774  }
   775  
   776  func (_c *Tree_RestoreRecycleItemFunc_Call) RunAndReturn(run func(context.Context, string, string, string, *node.Node) (*node.Node, *node.Node, func() error, error)) *Tree_RestoreRecycleItemFunc_Call {
   777  	_c.Call.Return(run)
   778  	return _c
   779  }
   780  
   781  // Setup provides a mock function with given fields:
   782  func (_m *Tree) Setup() error {
   783  	ret := _m.Called()
   784  
   785  	if len(ret) == 0 {
   786  		panic("no return value specified for Setup")
   787  	}
   788  
   789  	var r0 error
   790  	if rf, ok := ret.Get(0).(func() error); ok {
   791  		r0 = rf()
   792  	} else {
   793  		r0 = ret.Error(0)
   794  	}
   795  
   796  	return r0
   797  }
   798  
   799  // Tree_Setup_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Setup'
   800  type Tree_Setup_Call struct {
   801  	*mock.Call
   802  }
   803  
   804  // Setup is a helper method to define mock.On call
   805  func (_e *Tree_Expecter) Setup() *Tree_Setup_Call {
   806  	return &Tree_Setup_Call{Call: _e.mock.On("Setup")}
   807  }
   808  
   809  func (_c *Tree_Setup_Call) Run(run func()) *Tree_Setup_Call {
   810  	_c.Call.Run(func(args mock.Arguments) {
   811  		run()
   812  	})
   813  	return _c
   814  }
   815  
   816  func (_c *Tree_Setup_Call) Return(_a0 error) *Tree_Setup_Call {
   817  	_c.Call.Return(_a0)
   818  	return _c
   819  }
   820  
   821  func (_c *Tree_Setup_Call) RunAndReturn(run func() error) *Tree_Setup_Call {
   822  	_c.Call.Return(run)
   823  	return _c
   824  }
   825  
   826  // TouchFile provides a mock function with given fields: ctx, _a1, markprocessing, mtime
   827  func (_m *Tree) TouchFile(ctx context.Context, _a1 *node.Node, markprocessing bool, mtime string) error {
   828  	ret := _m.Called(ctx, _a1, markprocessing, mtime)
   829  
   830  	if len(ret) == 0 {
   831  		panic("no return value specified for TouchFile")
   832  	}
   833  
   834  	var r0 error
   835  	if rf, ok := ret.Get(0).(func(context.Context, *node.Node, bool, string) error); ok {
   836  		r0 = rf(ctx, _a1, markprocessing, mtime)
   837  	} else {
   838  		r0 = ret.Error(0)
   839  	}
   840  
   841  	return r0
   842  }
   843  
   844  // Tree_TouchFile_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TouchFile'
   845  type Tree_TouchFile_Call struct {
   846  	*mock.Call
   847  }
   848  
   849  // TouchFile is a helper method to define mock.On call
   850  //   - ctx context.Context
   851  //   - _a1 *node.Node
   852  //   - markprocessing bool
   853  //   - mtime string
   854  func (_e *Tree_Expecter) TouchFile(ctx interface{}, _a1 interface{}, markprocessing interface{}, mtime interface{}) *Tree_TouchFile_Call {
   855  	return &Tree_TouchFile_Call{Call: _e.mock.On("TouchFile", ctx, _a1, markprocessing, mtime)}
   856  }
   857  
   858  func (_c *Tree_TouchFile_Call) Run(run func(ctx context.Context, _a1 *node.Node, markprocessing bool, mtime string)) *Tree_TouchFile_Call {
   859  	_c.Call.Run(func(args mock.Arguments) {
   860  		run(args[0].(context.Context), args[1].(*node.Node), args[2].(bool), args[3].(string))
   861  	})
   862  	return _c
   863  }
   864  
   865  func (_c *Tree_TouchFile_Call) Return(_a0 error) *Tree_TouchFile_Call {
   866  	_c.Call.Return(_a0)
   867  	return _c
   868  }
   869  
   870  func (_c *Tree_TouchFile_Call) RunAndReturn(run func(context.Context, *node.Node, bool, string) error) *Tree_TouchFile_Call {
   871  	_c.Call.Return(run)
   872  	return _c
   873  }
   874  
   875  // WriteBlob provides a mock function with given fields: _a0, source
   876  func (_m *Tree) WriteBlob(_a0 *node.Node, source string) error {
   877  	ret := _m.Called(_a0, source)
   878  
   879  	if len(ret) == 0 {
   880  		panic("no return value specified for WriteBlob")
   881  	}
   882  
   883  	var r0 error
   884  	if rf, ok := ret.Get(0).(func(*node.Node, string) error); ok {
   885  		r0 = rf(_a0, source)
   886  	} else {
   887  		r0 = ret.Error(0)
   888  	}
   889  
   890  	return r0
   891  }
   892  
   893  // Tree_WriteBlob_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WriteBlob'
   894  type Tree_WriteBlob_Call struct {
   895  	*mock.Call
   896  }
   897  
   898  // WriteBlob is a helper method to define mock.On call
   899  //   - _a0 *node.Node
   900  //   - source string
   901  func (_e *Tree_Expecter) WriteBlob(_a0 interface{}, source interface{}) *Tree_WriteBlob_Call {
   902  	return &Tree_WriteBlob_Call{Call: _e.mock.On("WriteBlob", _a0, source)}
   903  }
   904  
   905  func (_c *Tree_WriteBlob_Call) Run(run func(_a0 *node.Node, source string)) *Tree_WriteBlob_Call {
   906  	_c.Call.Run(func(args mock.Arguments) {
   907  		run(args[0].(*node.Node), args[1].(string))
   908  	})
   909  	return _c
   910  }
   911  
   912  func (_c *Tree_WriteBlob_Call) Return(_a0 error) *Tree_WriteBlob_Call {
   913  	_c.Call.Return(_a0)
   914  	return _c
   915  }
   916  
   917  func (_c *Tree_WriteBlob_Call) RunAndReturn(run func(*node.Node, string) error) *Tree_WriteBlob_Call {
   918  	_c.Call.Return(run)
   919  	return _c
   920  }
   921  
   922  // NewTree creates a new instance of Tree. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
   923  // The first argument is typically a *testing.T value.
   924  func NewTree(t interface {
   925  	mock.TestingT
   926  	Cleanup(func())
   927  }) *Tree {
   928  	mock := &Tree{}
   929  	mock.Mock.Test(t)
   930  
   931  	t.Cleanup(func() { mock.AssertExpectations(t) })
   932  
   933  	return mock
   934  }