github.com/mad-app/mattermost-server@v5.11.1+incompatible/store/storetest/mocks/FileInfoStore.go (about)

     1  // Code generated by mockery v1.0.0. DO NOT EDIT.
     2  
     3  // Regenerate this file using `make store-mocks`.
     4  
     5  package mocks
     6  
     7  import mock "github.com/stretchr/testify/mock"
     8  import model "github.com/mattermost/mattermost-server/model"
     9  import store "github.com/mattermost/mattermost-server/store"
    10  
    11  // FileInfoStore is an autogenerated mock type for the FileInfoStore type
    12  type FileInfoStore struct {
    13  	mock.Mock
    14  }
    15  
    16  // AttachToPost provides a mock function with given fields: fileId, postId, creatorId
    17  func (_m *FileInfoStore) AttachToPost(fileId string, postId string, creatorId string) store.StoreChannel {
    18  	ret := _m.Called(fileId, postId, creatorId)
    19  
    20  	var r0 store.StoreChannel
    21  	if rf, ok := ret.Get(0).(func(string, string, string) store.StoreChannel); ok {
    22  		r0 = rf(fileId, postId, creatorId)
    23  	} else {
    24  		if ret.Get(0) != nil {
    25  			r0 = ret.Get(0).(store.StoreChannel)
    26  		}
    27  	}
    28  
    29  	return r0
    30  }
    31  
    32  // ClearCaches provides a mock function with given fields:
    33  func (_m *FileInfoStore) ClearCaches() {
    34  	_m.Called()
    35  }
    36  
    37  // DeleteForPost provides a mock function with given fields: postId
    38  func (_m *FileInfoStore) DeleteForPost(postId string) store.StoreChannel {
    39  	ret := _m.Called(postId)
    40  
    41  	var r0 store.StoreChannel
    42  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    43  		r0 = rf(postId)
    44  	} else {
    45  		if ret.Get(0) != nil {
    46  			r0 = ret.Get(0).(store.StoreChannel)
    47  		}
    48  	}
    49  
    50  	return r0
    51  }
    52  
    53  // Get provides a mock function with given fields: id
    54  func (_m *FileInfoStore) Get(id string) store.StoreChannel {
    55  	ret := _m.Called(id)
    56  
    57  	var r0 store.StoreChannel
    58  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    59  		r0 = rf(id)
    60  	} else {
    61  		if ret.Get(0) != nil {
    62  			r0 = ret.Get(0).(store.StoreChannel)
    63  		}
    64  	}
    65  
    66  	return r0
    67  }
    68  
    69  // GetByPath provides a mock function with given fields: path
    70  func (_m *FileInfoStore) GetByPath(path string) store.StoreChannel {
    71  	ret := _m.Called(path)
    72  
    73  	var r0 store.StoreChannel
    74  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
    75  		r0 = rf(path)
    76  	} else {
    77  		if ret.Get(0) != nil {
    78  			r0 = ret.Get(0).(store.StoreChannel)
    79  		}
    80  	}
    81  
    82  	return r0
    83  }
    84  
    85  // GetForPost provides a mock function with given fields: postId, readFromMaster, allowFromCache
    86  func (_m *FileInfoStore) GetForPost(postId string, readFromMaster bool, allowFromCache bool) store.StoreChannel {
    87  	ret := _m.Called(postId, readFromMaster, allowFromCache)
    88  
    89  	var r0 store.StoreChannel
    90  	if rf, ok := ret.Get(0).(func(string, bool, bool) store.StoreChannel); ok {
    91  		r0 = rf(postId, readFromMaster, allowFromCache)
    92  	} else {
    93  		if ret.Get(0) != nil {
    94  			r0 = ret.Get(0).(store.StoreChannel)
    95  		}
    96  	}
    97  
    98  	return r0
    99  }
   100  
   101  // GetForUser provides a mock function with given fields: userId
   102  func (_m *FileInfoStore) GetForUser(userId string) store.StoreChannel {
   103  	ret := _m.Called(userId)
   104  
   105  	var r0 store.StoreChannel
   106  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   107  		r0 = rf(userId)
   108  	} else {
   109  		if ret.Get(0) != nil {
   110  			r0 = ret.Get(0).(store.StoreChannel)
   111  		}
   112  	}
   113  
   114  	return r0
   115  }
   116  
   117  // InvalidateFileInfosForPostCache provides a mock function with given fields: postId
   118  func (_m *FileInfoStore) InvalidateFileInfosForPostCache(postId string) {
   119  	_m.Called(postId)
   120  }
   121  
   122  // PermanentDelete provides a mock function with given fields: fileId
   123  func (_m *FileInfoStore) PermanentDelete(fileId string) store.StoreChannel {
   124  	ret := _m.Called(fileId)
   125  
   126  	var r0 store.StoreChannel
   127  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   128  		r0 = rf(fileId)
   129  	} else {
   130  		if ret.Get(0) != nil {
   131  			r0 = ret.Get(0).(store.StoreChannel)
   132  		}
   133  	}
   134  
   135  	return r0
   136  }
   137  
   138  // PermanentDeleteBatch provides a mock function with given fields: endTime, limit
   139  func (_m *FileInfoStore) PermanentDeleteBatch(endTime int64, limit int64) store.StoreChannel {
   140  	ret := _m.Called(endTime, limit)
   141  
   142  	var r0 store.StoreChannel
   143  	if rf, ok := ret.Get(0).(func(int64, int64) store.StoreChannel); ok {
   144  		r0 = rf(endTime, limit)
   145  	} else {
   146  		if ret.Get(0) != nil {
   147  			r0 = ret.Get(0).(store.StoreChannel)
   148  		}
   149  	}
   150  
   151  	return r0
   152  }
   153  
   154  // PermanentDeleteByUser provides a mock function with given fields: userId
   155  func (_m *FileInfoStore) PermanentDeleteByUser(userId string) store.StoreChannel {
   156  	ret := _m.Called(userId)
   157  
   158  	var r0 store.StoreChannel
   159  	if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok {
   160  		r0 = rf(userId)
   161  	} else {
   162  		if ret.Get(0) != nil {
   163  			r0 = ret.Get(0).(store.StoreChannel)
   164  		}
   165  	}
   166  
   167  	return r0
   168  }
   169  
   170  // Save provides a mock function with given fields: info
   171  func (_m *FileInfoStore) Save(info *model.FileInfo) store.StoreChannel {
   172  	ret := _m.Called(info)
   173  
   174  	var r0 store.StoreChannel
   175  	if rf, ok := ret.Get(0).(func(*model.FileInfo) store.StoreChannel); ok {
   176  		r0 = rf(info)
   177  	} else {
   178  		if ret.Get(0) != nil {
   179  			r0 = ret.Get(0).(store.StoreChannel)
   180  		}
   181  	}
   182  
   183  	return r0
   184  }