github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/CommandWebhookStore.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 // CommandWebhookStore is an autogenerated mock type for the CommandWebhookStore type 13 type CommandWebhookStore struct { 14 mock.Mock 15 } 16 17 // Cleanup provides a mock function with given fields: 18 func (_m *CommandWebhookStore) Cleanup() { 19 _m.Called() 20 } 21 22 // Get provides a mock function with given fields: id 23 func (_m *CommandWebhookStore) Get(id string) (*model.CommandWebhook, error) { 24 ret := _m.Called(id) 25 26 var r0 *model.CommandWebhook 27 if rf, ok := ret.Get(0).(func(string) *model.CommandWebhook); ok { 28 r0 = rf(id) 29 } else { 30 if ret.Get(0) != nil { 31 r0 = ret.Get(0).(*model.CommandWebhook) 32 } 33 } 34 35 var r1 error 36 if rf, ok := ret.Get(1).(func(string) error); ok { 37 r1 = rf(id) 38 } else { 39 r1 = ret.Error(1) 40 } 41 42 return r0, r1 43 } 44 45 // Save provides a mock function with given fields: webhook 46 func (_m *CommandWebhookStore) Save(webhook *model.CommandWebhook) (*model.CommandWebhook, error) { 47 ret := _m.Called(webhook) 48 49 var r0 *model.CommandWebhook 50 if rf, ok := ret.Get(0).(func(*model.CommandWebhook) *model.CommandWebhook); ok { 51 r0 = rf(webhook) 52 } else { 53 if ret.Get(0) != nil { 54 r0 = ret.Get(0).(*model.CommandWebhook) 55 } 56 } 57 58 var r1 error 59 if rf, ok := ret.Get(1).(func(*model.CommandWebhook) error); ok { 60 r1 = rf(webhook) 61 } else { 62 r1 = ret.Error(1) 63 } 64 65 return r0, r1 66 } 67 68 // TryUse provides a mock function with given fields: id, limit 69 func (_m *CommandWebhookStore) TryUse(id string, limit int) error { 70 ret := _m.Called(id, limit) 71 72 var r0 error 73 if rf, ok := ret.Get(0).(func(string, int) error); ok { 74 r0 = rf(id, limit) 75 } else { 76 r0 = ret.Error(0) 77 } 78 79 return r0 80 }