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