github.com/qichengzx/mattermost-server@v4.5.1-0.20180604164826-2c75247c97d0+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 17 func (_m *FileInfoStore) AttachToPost(fileId string, postId string) store.StoreChannel { 18 ret := _m.Called(fileId, postId) 19 20 var r0 store.StoreChannel 21 if rf, ok := ret.Get(0).(func(string, string) store.StoreChannel); ok { 22 r0 = rf(fileId, postId) 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 // InvalidateFileInfosForPostCache provides a mock function with given fields: postId 102 func (_m *FileInfoStore) InvalidateFileInfosForPostCache(postId string) { 103 _m.Called(postId) 104 } 105 106 // PermanentDelete provides a mock function with given fields: fileId 107 func (_m *FileInfoStore) PermanentDelete(fileId string) store.StoreChannel { 108 ret := _m.Called(fileId) 109 110 var r0 store.StoreChannel 111 if rf, ok := ret.Get(0).(func(string) store.StoreChannel); ok { 112 r0 = rf(fileId) 113 } else { 114 if ret.Get(0) != nil { 115 r0 = ret.Get(0).(store.StoreChannel) 116 } 117 } 118 119 return r0 120 } 121 122 // PermanentDeleteBatch provides a mock function with given fields: endTime, limit 123 func (_m *FileInfoStore) PermanentDeleteBatch(endTime int64, limit int64) store.StoreChannel { 124 ret := _m.Called(endTime, limit) 125 126 var r0 store.StoreChannel 127 if rf, ok := ret.Get(0).(func(int64, int64) store.StoreChannel); ok { 128 r0 = rf(endTime, limit) 129 } else { 130 if ret.Get(0) != nil { 131 r0 = ret.Get(0).(store.StoreChannel) 132 } 133 } 134 135 return r0 136 } 137 138 // Save provides a mock function with given fields: info 139 func (_m *FileInfoStore) Save(info *model.FileInfo) store.StoreChannel { 140 ret := _m.Called(info) 141 142 var r0 store.StoreChannel 143 if rf, ok := ret.Get(0).(func(*model.FileInfo) store.StoreChannel); ok { 144 r0 = rf(info) 145 } else { 146 if ret.Get(0) != nil { 147 r0 = ret.Get(0).(store.StoreChannel) 148 } 149 } 150 151 return r0 152 }