github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/UploadSessionStore.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 // UploadSessionStore is an autogenerated mock type for the UploadSessionStore type 13 type UploadSessionStore struct { 14 mock.Mock 15 } 16 17 // Delete provides a mock function with given fields: id 18 func (_m *UploadSessionStore) Delete(id string) error { 19 ret := _m.Called(id) 20 21 var r0 error 22 if rf, ok := ret.Get(0).(func(string) error); ok { 23 r0 = rf(id) 24 } else { 25 r0 = ret.Error(0) 26 } 27 28 return r0 29 } 30 31 // Get provides a mock function with given fields: id 32 func (_m *UploadSessionStore) Get(id string) (*model.UploadSession, error) { 33 ret := _m.Called(id) 34 35 var r0 *model.UploadSession 36 if rf, ok := ret.Get(0).(func(string) *model.UploadSession); ok { 37 r0 = rf(id) 38 } else { 39 if ret.Get(0) != nil { 40 r0 = ret.Get(0).(*model.UploadSession) 41 } 42 } 43 44 var r1 error 45 if rf, ok := ret.Get(1).(func(string) error); ok { 46 r1 = rf(id) 47 } else { 48 r1 = ret.Error(1) 49 } 50 51 return r0, r1 52 } 53 54 // GetForUser provides a mock function with given fields: userId 55 func (_m *UploadSessionStore) GetForUser(userId string) ([]*model.UploadSession, error) { 56 ret := _m.Called(userId) 57 58 var r0 []*model.UploadSession 59 if rf, ok := ret.Get(0).(func(string) []*model.UploadSession); ok { 60 r0 = rf(userId) 61 } else { 62 if ret.Get(0) != nil { 63 r0 = ret.Get(0).([]*model.UploadSession) 64 } 65 } 66 67 var r1 error 68 if rf, ok := ret.Get(1).(func(string) error); ok { 69 r1 = rf(userId) 70 } else { 71 r1 = ret.Error(1) 72 } 73 74 return r0, r1 75 } 76 77 // Save provides a mock function with given fields: session 78 func (_m *UploadSessionStore) Save(session *model.UploadSession) (*model.UploadSession, error) { 79 ret := _m.Called(session) 80 81 var r0 *model.UploadSession 82 if rf, ok := ret.Get(0).(func(*model.UploadSession) *model.UploadSession); ok { 83 r0 = rf(session) 84 } else { 85 if ret.Get(0) != nil { 86 r0 = ret.Get(0).(*model.UploadSession) 87 } 88 } 89 90 var r1 error 91 if rf, ok := ret.Get(1).(func(*model.UploadSession) error); ok { 92 r1 = rf(session) 93 } else { 94 r1 = ret.Error(1) 95 } 96 97 return r0, r1 98 } 99 100 // Update provides a mock function with given fields: session 101 func (_m *UploadSessionStore) Update(session *model.UploadSession) error { 102 ret := _m.Called(session) 103 104 var r0 error 105 if rf, ok := ret.Get(0).(func(*model.UploadSession) error); ok { 106 r0 = rf(session) 107 } else { 108 r0 = ret.Error(0) 109 } 110 111 return r0 112 }