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