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