github.com/haalcala/mattermost-server-change-repo/v5@v5.33.2/store/storetest/mocks/SchemeStore.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 // SchemeStore is an autogenerated mock type for the SchemeStore type 13 type SchemeStore struct { 14 mock.Mock 15 } 16 17 // CountByScope provides a mock function with given fields: scope 18 func (_m *SchemeStore) CountByScope(scope string) (int64, error) { 19 ret := _m.Called(scope) 20 21 var r0 int64 22 if rf, ok := ret.Get(0).(func(string) int64); ok { 23 r0 = rf(scope) 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(scope) 31 } else { 32 r1 = ret.Error(1) 33 } 34 35 return r0, r1 36 } 37 38 // CountWithoutPermission provides a mock function with given fields: scope, permissionID, roleScope, roleType 39 func (_m *SchemeStore) CountWithoutPermission(scope string, permissionID string, roleScope model.RoleScope, roleType model.RoleType) (int64, error) { 40 ret := _m.Called(scope, permissionID, roleScope, roleType) 41 42 var r0 int64 43 if rf, ok := ret.Get(0).(func(string, string, model.RoleScope, model.RoleType) int64); ok { 44 r0 = rf(scope, permissionID, roleScope, roleType) 45 } else { 46 r0 = ret.Get(0).(int64) 47 } 48 49 var r1 error 50 if rf, ok := ret.Get(1).(func(string, string, model.RoleScope, model.RoleType) error); ok { 51 r1 = rf(scope, permissionID, roleScope, roleType) 52 } else { 53 r1 = ret.Error(1) 54 } 55 56 return r0, r1 57 } 58 59 // Delete provides a mock function with given fields: schemeId 60 func (_m *SchemeStore) Delete(schemeId string) (*model.Scheme, error) { 61 ret := _m.Called(schemeId) 62 63 var r0 *model.Scheme 64 if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok { 65 r0 = rf(schemeId) 66 } else { 67 if ret.Get(0) != nil { 68 r0 = ret.Get(0).(*model.Scheme) 69 } 70 } 71 72 var r1 error 73 if rf, ok := ret.Get(1).(func(string) error); ok { 74 r1 = rf(schemeId) 75 } else { 76 r1 = ret.Error(1) 77 } 78 79 return r0, r1 80 } 81 82 // Get provides a mock function with given fields: schemeId 83 func (_m *SchemeStore) Get(schemeId string) (*model.Scheme, error) { 84 ret := _m.Called(schemeId) 85 86 var r0 *model.Scheme 87 if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok { 88 r0 = rf(schemeId) 89 } else { 90 if ret.Get(0) != nil { 91 r0 = ret.Get(0).(*model.Scheme) 92 } 93 } 94 95 var r1 error 96 if rf, ok := ret.Get(1).(func(string) error); ok { 97 r1 = rf(schemeId) 98 } else { 99 r1 = ret.Error(1) 100 } 101 102 return r0, r1 103 } 104 105 // GetAllPage provides a mock function with given fields: scope, offset, limit 106 func (_m *SchemeStore) GetAllPage(scope string, offset int, limit int) ([]*model.Scheme, error) { 107 ret := _m.Called(scope, offset, limit) 108 109 var r0 []*model.Scheme 110 if rf, ok := ret.Get(0).(func(string, int, int) []*model.Scheme); ok { 111 r0 = rf(scope, offset, limit) 112 } else { 113 if ret.Get(0) != nil { 114 r0 = ret.Get(0).([]*model.Scheme) 115 } 116 } 117 118 var r1 error 119 if rf, ok := ret.Get(1).(func(string, int, int) error); ok { 120 r1 = rf(scope, offset, limit) 121 } else { 122 r1 = ret.Error(1) 123 } 124 125 return r0, r1 126 } 127 128 // GetByName provides a mock function with given fields: schemeName 129 func (_m *SchemeStore) GetByName(schemeName string) (*model.Scheme, error) { 130 ret := _m.Called(schemeName) 131 132 var r0 *model.Scheme 133 if rf, ok := ret.Get(0).(func(string) *model.Scheme); ok { 134 r0 = rf(schemeName) 135 } else { 136 if ret.Get(0) != nil { 137 r0 = ret.Get(0).(*model.Scheme) 138 } 139 } 140 141 var r1 error 142 if rf, ok := ret.Get(1).(func(string) error); ok { 143 r1 = rf(schemeName) 144 } else { 145 r1 = ret.Error(1) 146 } 147 148 return r0, r1 149 } 150 151 // PermanentDeleteAll provides a mock function with given fields: 152 func (_m *SchemeStore) PermanentDeleteAll() error { 153 ret := _m.Called() 154 155 var r0 error 156 if rf, ok := ret.Get(0).(func() error); ok { 157 r0 = rf() 158 } else { 159 r0 = ret.Error(0) 160 } 161 162 return r0 163 } 164 165 // Save provides a mock function with given fields: scheme 166 func (_m *SchemeStore) Save(scheme *model.Scheme) (*model.Scheme, error) { 167 ret := _m.Called(scheme) 168 169 var r0 *model.Scheme 170 if rf, ok := ret.Get(0).(func(*model.Scheme) *model.Scheme); ok { 171 r0 = rf(scheme) 172 } else { 173 if ret.Get(0) != nil { 174 r0 = ret.Get(0).(*model.Scheme) 175 } 176 } 177 178 var r1 error 179 if rf, ok := ret.Get(1).(func(*model.Scheme) error); ok { 180 r1 = rf(scheme) 181 } else { 182 r1 = ret.Error(1) 183 } 184 185 return r0, r1 186 }