github.com/vnforks/kid/v5@v5.22.1-0.20200408055009-b89d99c65676/einterfaces/mocks/MfaInterface.go (about) 1 // Code generated by mockery v1.0.0. DO NOT EDIT. 2 3 // Regenerate this file using `make einterfaces-mocks`. 4 5 package mocks 6 7 import ( 8 model "github.com/vnforks/kid/v5/model" 9 mock "github.com/stretchr/testify/mock" 10 ) 11 12 // MfaInterface is an autogenerated mock type for the MfaInterface type 13 type MfaInterface struct { 14 mock.Mock 15 } 16 17 // Activate provides a mock function with given fields: user, token 18 func (_m *MfaInterface) Activate(user *model.User, token string) *model.AppError { 19 ret := _m.Called(user, token) 20 21 var r0 *model.AppError 22 if rf, ok := ret.Get(0).(func(*model.User, string) *model.AppError); ok { 23 r0 = rf(user, token) 24 } else { 25 if ret.Get(0) != nil { 26 r0 = ret.Get(0).(*model.AppError) 27 } 28 } 29 30 return r0 31 } 32 33 // Deactivate provides a mock function with given fields: userId 34 func (_m *MfaInterface) Deactivate(userId string) *model.AppError { 35 ret := _m.Called(userId) 36 37 var r0 *model.AppError 38 if rf, ok := ret.Get(0).(func(string) *model.AppError); ok { 39 r0 = rf(userId) 40 } else { 41 if ret.Get(0) != nil { 42 r0 = ret.Get(0).(*model.AppError) 43 } 44 } 45 46 return r0 47 } 48 49 // GenerateSecret provides a mock function with given fields: user 50 func (_m *MfaInterface) GenerateSecret(user *model.User) (string, []byte, *model.AppError) { 51 ret := _m.Called(user) 52 53 var r0 string 54 if rf, ok := ret.Get(0).(func(*model.User) string); ok { 55 r0 = rf(user) 56 } else { 57 r0 = ret.Get(0).(string) 58 } 59 60 var r1 []byte 61 if rf, ok := ret.Get(1).(func(*model.User) []byte); ok { 62 r1 = rf(user) 63 } else { 64 if ret.Get(1) != nil { 65 r1 = ret.Get(1).([]byte) 66 } 67 } 68 69 var r2 *model.AppError 70 if rf, ok := ret.Get(2).(func(*model.User) *model.AppError); ok { 71 r2 = rf(user) 72 } else { 73 if ret.Get(2) != nil { 74 r2 = ret.Get(2).(*model.AppError) 75 } 76 } 77 78 return r0, r1, r2 79 } 80 81 // ValidateToken provides a mock function with given fields: secret, token 82 func (_m *MfaInterface) ValidateToken(secret string, token string) (bool, *model.AppError) { 83 ret := _m.Called(secret, token) 84 85 var r0 bool 86 if rf, ok := ret.Get(0).(func(string, string) bool); ok { 87 r0 = rf(secret, token) 88 } else { 89 r0 = ret.Get(0).(bool) 90 } 91 92 var r1 *model.AppError 93 if rf, ok := ret.Get(1).(func(string, string) *model.AppError); ok { 94 r1 = rf(secret, token) 95 } else { 96 if ret.Get(1) != nil { 97 r1 = ret.Get(1).(*model.AppError) 98 } 99 } 100 101 return r0, r1 102 }