github.com/ashishbhate/mattermost-server@v5.11.1+incompatible/services/filesstore/mocks/FileBackend.go (about)

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