github.com/mattermosttest/mattermost-server/v5@v5.0.0-20200917143240-9dfa12e121f9/services/filesstore/mocks/FileBackend.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make filesstore-mocks`.
     4  
     5  package mocks
     6  
     7  import (
     8  	io "io"
     9  
    10  	filesstore "github.com/mattermost/mattermost-server/v5/services/filesstore"
    11  
    12  	mock "github.com/stretchr/testify/mock"
    13  
    14  	model "github.com/mattermost/mattermost-server/v5/model"
    15  )
    16  
    17  // FileBackend is an autogenerated mock type for the FileBackend type
    18  type FileBackend struct {
    19  	mock.Mock
    20  }
    21  
    22  // CopyFile provides a mock function with given fields: oldPath, newPath
    23  func (_m *FileBackend) CopyFile(oldPath string, newPath string) *model.AppError {
    24  	ret := _m.Called(oldPath, newPath)
    25  
    26  	var r0 *model.AppError
    27  	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
    28  		r0 = rf(oldPath, newPath)
    29  	} else {
    30  		if ret.Get(0) != nil {
    31  			r0 = ret.Get(0).(*model.AppError)
    32  		}
    33  	}
    34  
    35  	return r0
    36  }
    37  
    38  // FileExists provides a mock function with given fields: path
    39  func (_m *FileBackend) FileExists(path string) (bool, *model.AppError) {
    40  	ret := _m.Called(path)
    41  
    42  	var r0 bool
    43  	if rf, ok := ret.Get(0).(func(string) bool); ok {
    44  		r0 = rf(path)
    45  	} else {
    46  		r0 = ret.Get(0).(bool)
    47  	}
    48  
    49  	var r1 *model.AppError
    50  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
    51  		r1 = rf(path)
    52  	} else {
    53  		if ret.Get(1) != nil {
    54  			r1 = ret.Get(1).(*model.AppError)
    55  		}
    56  	}
    57  
    58  	return r0, r1
    59  }
    60  
    61  // ListDirectory provides a mock function with given fields: path
    62  func (_m *FileBackend) ListDirectory(path string) (*[]string, *model.AppError) {
    63  	ret := _m.Called(path)
    64  
    65  	var r0 *[]string
    66  	if rf, ok := ret.Get(0).(func(string) *[]string); ok {
    67  		r0 = rf(path)
    68  	} else {
    69  		if ret.Get(0) != nil {
    70  			r0 = ret.Get(0).(*[]string)
    71  		}
    72  	}
    73  
    74  	var r1 *model.AppError
    75  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
    76  		r1 = rf(path)
    77  	} else {
    78  		if ret.Get(1) != nil {
    79  			r1 = ret.Get(1).(*model.AppError)
    80  		}
    81  	}
    82  
    83  	return r0, r1
    84  }
    85  
    86  // MoveFile provides a mock function with given fields: oldPath, newPath
    87  func (_m *FileBackend) MoveFile(oldPath string, newPath string) *model.AppError {
    88  	ret := _m.Called(oldPath, newPath)
    89  
    90  	var r0 *model.AppError
    91  	if rf, ok := ret.Get(0).(func(string, string) *model.AppError); ok {
    92  		r0 = rf(oldPath, newPath)
    93  	} else {
    94  		if ret.Get(0) != nil {
    95  			r0 = ret.Get(0).(*model.AppError)
    96  		}
    97  	}
    98  
    99  	return r0
   100  }
   101  
   102  // ReadFile provides a mock function with given fields: path
   103  func (_m *FileBackend) ReadFile(path string) ([]byte, *model.AppError) {
   104  	ret := _m.Called(path)
   105  
   106  	var r0 []byte
   107  	if rf, ok := ret.Get(0).(func(string) []byte); ok {
   108  		r0 = rf(path)
   109  	} else {
   110  		if ret.Get(0) != nil {
   111  			r0 = ret.Get(0).([]byte)
   112  		}
   113  	}
   114  
   115  	var r1 *model.AppError
   116  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   117  		r1 = rf(path)
   118  	} else {
   119  		if ret.Get(1) != nil {
   120  			r1 = ret.Get(1).(*model.AppError)
   121  		}
   122  	}
   123  
   124  	return r0, r1
   125  }
   126  
   127  // Reader provides a mock function with given fields: path
   128  func (_m *FileBackend) Reader(path string) (filesstore.ReadCloseSeeker, *model.AppError) {
   129  	ret := _m.Called(path)
   130  
   131  	var r0 filesstore.ReadCloseSeeker
   132  	if rf, ok := ret.Get(0).(func(string) filesstore.ReadCloseSeeker); ok {
   133  		r0 = rf(path)
   134  	} else {
   135  		if ret.Get(0) != nil {
   136  			r0 = ret.Get(0).(filesstore.ReadCloseSeeker)
   137  		}
   138  	}
   139  
   140  	var r1 *model.AppError
   141  	if rf, ok := ret.Get(1).(func(string) *model.AppError); ok {
   142  		r1 = rf(path)
   143  	} else {
   144  		if ret.Get(1) != nil {
   145  			r1 = ret.Get(1).(*model.AppError)
   146  		}
   147  	}
   148  
   149  	return r0, r1
   150  }
   151  
   152  // RemoveDirectory provides a mock function with given fields: path
   153  func (_m *FileBackend) RemoveDirectory(path string) *model.AppError {
   154  	ret := _m.Called(path)
   155  
   156  	var r0 *model.AppError
   157  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
   158  		r0 = rf(path)
   159  	} else {
   160  		if ret.Get(0) != nil {
   161  			r0 = ret.Get(0).(*model.AppError)
   162  		}
   163  	}
   164  
   165  	return r0
   166  }
   167  
   168  // RemoveFile provides a mock function with given fields: path
   169  func (_m *FileBackend) RemoveFile(path string) *model.AppError {
   170  	ret := _m.Called(path)
   171  
   172  	var r0 *model.AppError
   173  	if rf, ok := ret.Get(0).(func(string) *model.AppError); ok {
   174  		r0 = rf(path)
   175  	} else {
   176  		if ret.Get(0) != nil {
   177  			r0 = ret.Get(0).(*model.AppError)
   178  		}
   179  	}
   180  
   181  	return r0
   182  }
   183  
   184  // TestConnection provides a mock function with given fields:
   185  func (_m *FileBackend) TestConnection() *model.AppError {
   186  	ret := _m.Called()
   187  
   188  	var r0 *model.AppError
   189  	if rf, ok := ret.Get(0).(func() *model.AppError); ok {
   190  		r0 = rf()
   191  	} else {
   192  		if ret.Get(0) != nil {
   193  			r0 = ret.Get(0).(*model.AppError)
   194  		}
   195  	}
   196  
   197  	return r0
   198  }
   199  
   200  // WriteFile provides a mock function with given fields: fr, path
   201  func (_m *FileBackend) WriteFile(fr io.Reader, path string) (int64, *model.AppError) {
   202  	ret := _m.Called(fr, path)
   203  
   204  	var r0 int64
   205  	if rf, ok := ret.Get(0).(func(io.Reader, string) int64); ok {
   206  		r0 = rf(fr, path)
   207  	} else {
   208  		r0 = ret.Get(0).(int64)
   209  	}
   210  
   211  	var r1 *model.AppError
   212  	if rf, ok := ret.Get(1).(func(io.Reader, string) *model.AppError); ok {
   213  		r1 = rf(fr, path)
   214  	} else {
   215  		if ret.Get(1) != nil {
   216  			r1 = ret.Get(1).(*model.AppError)
   217  		}
   218  	}
   219  
   220  	return r0, r1
   221  }