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