github.com/xzl8028/xenia-server@v0.0.0-20190809101854-18450a97da63/store/storetest/mocks/CommandStore.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/xzl8028/xenia-server/model" 9 10 // CommandStore is an autogenerated mock type for the CommandStore type 11 type CommandStore struct { 12 mock.Mock 13 } 14 15 // AnalyticsCommandCount provides a mock function with given fields: teamId 16 func (_m *CommandStore) AnalyticsCommandCount(teamId string) (int64, *model.AppError) { 17 ret := _m.Called(teamId) 18 19 var r0 int64 20 if rf, ok := ret.Get(0).(func(string) int64); ok { 21 r0 = rf(teamId) 22 } else { 23 r0 = ret.Get(0).(int64) 24 } 25 26 var r1 *model.AppError 27 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 28 r1 = rf(teamId) 29 } else { 30 if ret.Get(1) != nil { 31 r1 = ret.Get(1).(*model.AppError) 32 } 33 } 34 35 return r0, r1 36 } 37 38 // Delete provides a mock function with given fields: commandId, time 39 func (_m *CommandStore) Delete(commandId string, time int64) *model.AppError { 40 ret := _m.Called(commandId, time) 41 42 var r0 *model.AppError 43 if rf, ok := ret.Get(0).(func(string, int64) *model.AppError); ok { 44 r0 = rf(commandId, time) 45 } else { 46 if ret.Get(0) != nil { 47 r0 = ret.Get(0).(*model.AppError) 48 } 49 } 50 51 return r0 52 } 53 54 // Get provides a mock function with given fields: id 55 func (_m *CommandStore) Get(id string) (*model.Command, *model.AppError) { 56 ret := _m.Called(id) 57 58 var r0 *model.Command 59 if rf, ok := ret.Get(0).(func(string) *model.Command); ok { 60 r0 = rf(id) 61 } else { 62 if ret.Get(0) != nil { 63 r0 = ret.Get(0).(*model.Command) 64 } 65 } 66 67 var r1 *model.AppError 68 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 69 r1 = rf(id) 70 } else { 71 if ret.Get(1) != nil { 72 r1 = ret.Get(1).(*model.AppError) 73 } 74 } 75 76 return r0, r1 77 } 78 79 // GetByTeam provides a mock function with given fields: teamId 80 func (_m *CommandStore) GetByTeam(teamId string) ([]*model.Command, *model.AppError) { 81 ret := _m.Called(teamId) 82 83 var r0 []*model.Command 84 if rf, ok := ret.Get(0).(func(string) []*model.Command); ok { 85 r0 = rf(teamId) 86 } else { 87 if ret.Get(0) != nil { 88 r0 = ret.Get(0).([]*model.Command) 89 } 90 } 91 92 var r1 *model.AppError 93 if rf, ok := ret.Get(1).(func(string) *model.AppError); ok { 94 r1 = rf(teamId) 95 } else { 96 if ret.Get(1) != nil { 97 r1 = ret.Get(1).(*model.AppError) 98 } 99 } 100 101 return r0, r1 102 } 103 104 // GetByTrigger provides a mock function with given fields: teamId, trigger 105 func (_m *CommandStore) GetByTrigger(teamId string, trigger string) (*model.Command, *model.AppError) { 106 ret := _m.Called(teamId, trigger) 107 108 var r0 *model.Command 109 if rf, ok := ret.Get(0).(func(string, string) *model.Command); ok { 110 r0 = rf(teamId, trigger) 111 } else { 112 if ret.Get(0) != nil { 113 r0 = ret.Get(0).(*model.Command) 114 } 115 } 116 117 var r1 *model.AppError 118 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 119 r1 = rf(teamId, trigger) 120 } else { 121 if ret.Get(1) != nil { 122 r1 = ret.Get(1).(*model.AppError) 123 } 124 } 125 126 return r0, r1 127 } 128 129 // PermanentDeleteByTeam provides a mock function with given fields: teamId 130 func (_m *CommandStore) PermanentDeleteByTeam(teamId string) *model.AppError { 131 ret := _m.Called(teamId) 132 133 var r0 *model.AppError 134 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 135 r0 = rf(teamId) 136 } else { 137 if ret.Get(0) != nil { 138 r0 = ret.Get(0).(*model.AppError) 139 } 140 } 141 142 return r0 143 } 144 145 // PermanentDeleteByUser provides a mock function with given fields: userId 146 func (_m *CommandStore) PermanentDeleteByUser(userId string) *model.AppError { 147 ret := _m.Called(userId) 148 149 var r0 *model.AppError 150 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 151 r0 = rf(userId) 152 } else { 153 if ret.Get(0) != nil { 154 r0 = ret.Get(0).(*model.AppError) 155 } 156 } 157 158 return r0 159 } 160 161 // Save provides a mock function with given fields: webhook 162 func (_m *CommandStore) Save(webhook *model.Command) (*model.Command, *model.AppError) { 163 ret := _m.Called(webhook) 164 165 var r0 *model.Command 166 if rf, ok := ret.Get(0).(func(*model.Command) *model.Command); ok { 167 r0 = rf(webhook) 168 } else { 169 if ret.Get(0) != nil { 170 r0 = ret.Get(0).(*model.Command) 171 } 172 } 173 174 var r1 *model.AppError 175 if rf, ok := ret.Get(1).(func(*model.Command) *model.AppError); ok { 176 r1 = rf(webhook) 177 } else { 178 if ret.Get(1) != nil { 179 r1 = ret.Get(1).(*model.AppError) 180 } 181 } 182 183 return r0, r1 184 } 185 186 // Update provides a mock function with given fields: hook 187 func (_m *CommandStore) Update(hook *model.Command) (*model.Command, *model.AppError) { 188 ret := _m.Called(hook) 189 190 var r0 *model.Command 191 if rf, ok := ret.Get(0).(func(*model.Command) *model.Command); ok { 192 r0 = rf(hook) 193 } else { 194 if ret.Get(0) != nil { 195 r0 = ret.Get(0).(*model.Command) 196 } 197 } 198 199 var r1 *model.AppError 200 if rf, ok := ret.Get(1).(func(*model.Command) *model.AppError); ok { 201 r1 = rf(hook) 202 } else { 203 if ret.Get(1) != nil { 204 r1 = ret.Get(1).(*model.AppError) 205 } 206 } 207 208 return r0, r1 209 }