github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/PreferenceStore.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 ( 8 model "github.com/mattermost/mattermost-server/v5/model" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // PreferenceStore is an autogenerated mock type for the PreferenceStore type 13 type PreferenceStore struct { 14 mock.Mock 15 } 16 17 // CleanupFlagsBatch provides a mock function with given fields: limit 18 func (_m *PreferenceStore) CleanupFlagsBatch(limit int64) (int64, error) { 19 ret := _m.Called(limit) 20 21 var r0 int64 22 if rf, ok := ret.Get(0).(func(int64) int64); ok { 23 r0 = rf(limit) 24 } else { 25 r0 = ret.Get(0).(int64) 26 } 27 28 var r1 error 29 if rf, ok := ret.Get(1).(func(int64) error); ok { 30 r1 = rf(limit) 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 // Delete provides a mock function with given fields: userId, category, name 39 func (_m *PreferenceStore) Delete(userId string, category string, name string) error { 40 ret := _m.Called(userId, category, name) 41 42 var r0 error 43 if rf, ok := ret.Get(0).(func(string, string, string) error); ok { 44 r0 = rf(userId, category, name) 45 } else { 46 r0 = ret.Error(0) 47 } 48 49 return r0 50 } 51 52 // DeleteCategory provides a mock function with given fields: userId, category 53 func (_m *PreferenceStore) DeleteCategory(userId string, category string) error { 54 ret := _m.Called(userId, category) 55 56 var r0 error 57 if rf, ok := ret.Get(0).(func(string, string) error); ok { 58 r0 = rf(userId, category) 59 } else { 60 r0 = ret.Error(0) 61 } 62 63 return r0 64 } 65 66 // DeleteCategoryAndName provides a mock function with given fields: category, name 67 func (_m *PreferenceStore) DeleteCategoryAndName(category string, name string) error { 68 ret := _m.Called(category, name) 69 70 var r0 error 71 if rf, ok := ret.Get(0).(func(string, string) error); ok { 72 r0 = rf(category, name) 73 } else { 74 r0 = ret.Error(0) 75 } 76 77 return r0 78 } 79 80 // Get provides a mock function with given fields: userId, category, name 81 func (_m *PreferenceStore) Get(userId string, category string, name string) (*model.Preference, error) { 82 ret := _m.Called(userId, category, name) 83 84 var r0 *model.Preference 85 if rf, ok := ret.Get(0).(func(string, string, string) *model.Preference); ok { 86 r0 = rf(userId, category, name) 87 } else { 88 if ret.Get(0) != nil { 89 r0 = ret.Get(0).(*model.Preference) 90 } 91 } 92 93 var r1 error 94 if rf, ok := ret.Get(1).(func(string, string, string) error); ok { 95 r1 = rf(userId, category, name) 96 } else { 97 r1 = ret.Error(1) 98 } 99 100 return r0, r1 101 } 102 103 // GetAll provides a mock function with given fields: userId 104 func (_m *PreferenceStore) GetAll(userId string) (model.Preferences, error) { 105 ret := _m.Called(userId) 106 107 var r0 model.Preferences 108 if rf, ok := ret.Get(0).(func(string) model.Preferences); ok { 109 r0 = rf(userId) 110 } else { 111 if ret.Get(0) != nil { 112 r0 = ret.Get(0).(model.Preferences) 113 } 114 } 115 116 var r1 error 117 if rf, ok := ret.Get(1).(func(string) error); ok { 118 r1 = rf(userId) 119 } else { 120 r1 = ret.Error(1) 121 } 122 123 return r0, r1 124 } 125 126 // GetCategory provides a mock function with given fields: userId, category 127 func (_m *PreferenceStore) GetCategory(userId string, category string) (model.Preferences, error) { 128 ret := _m.Called(userId, category) 129 130 var r0 model.Preferences 131 if rf, ok := ret.Get(0).(func(string, string) model.Preferences); ok { 132 r0 = rf(userId, category) 133 } else { 134 if ret.Get(0) != nil { 135 r0 = ret.Get(0).(model.Preferences) 136 } 137 } 138 139 var r1 error 140 if rf, ok := ret.Get(1).(func(string, string) error); ok { 141 r1 = rf(userId, category) 142 } else { 143 r1 = ret.Error(1) 144 } 145 146 return r0, r1 147 } 148 149 // PermanentDeleteByUser provides a mock function with given fields: userId 150 func (_m *PreferenceStore) PermanentDeleteByUser(userId string) error { 151 ret := _m.Called(userId) 152 153 var r0 error 154 if rf, ok := ret.Get(0).(func(string) error); ok { 155 r0 = rf(userId) 156 } else { 157 r0 = ret.Error(0) 158 } 159 160 return r0 161 } 162 163 // Save provides a mock function with given fields: preferences 164 func (_m *PreferenceStore) Save(preferences *model.Preferences) error { 165 ret := _m.Called(preferences) 166 167 var r0 error 168 if rf, ok := ret.Get(0).(func(*model.Preferences) error); ok { 169 r0 = rf(preferences) 170 } else { 171 r0 = ret.Error(0) 172 } 173 174 return r0 175 }