github.com/pyroscope-io/pyroscope@v0.37.3-0.20230725203016-5f6947968bd0/pkg/api/mocks/auth.go (about) 1 // Code generated by MockGen. DO NOT EDIT. 2 // Source: github.com/pyroscope-io/pyroscope/pkg/api (interfaces: AuthService) 3 4 // Package mocks is a generated GoMock package. 5 package mocks 6 7 import ( 8 context "context" 9 reflect "reflect" 10 11 gomock "github.com/golang/mock/gomock" 12 model "github.com/pyroscope-io/pyroscope/pkg/model" 13 ) 14 15 // MockAuthService is a mock of AuthService interface. 16 type MockAuthService struct { 17 ctrl *gomock.Controller 18 recorder *MockAuthServiceMockRecorder 19 } 20 21 // MockAuthServiceMockRecorder is the mock recorder for MockAuthService. 22 type MockAuthServiceMockRecorder struct { 23 mock *MockAuthService 24 } 25 26 // NewMockAuthService creates a new mock instance. 27 func NewMockAuthService(ctrl *gomock.Controller) *MockAuthService { 28 mock := &MockAuthService{ctrl: ctrl} 29 mock.recorder = &MockAuthServiceMockRecorder{mock} 30 return mock 31 } 32 33 // EXPECT returns an object that allows the caller to indicate expected use. 34 func (m *MockAuthService) EXPECT() *MockAuthServiceMockRecorder { 35 return m.recorder 36 } 37 38 // APIKeyFromToken mocks base method. 39 func (m *MockAuthService) APIKeyFromToken(arg0 context.Context, arg1 string) (model.APIKey, error) { 40 m.ctrl.T.Helper() 41 ret := m.ctrl.Call(m, "APIKeyFromToken", arg0, arg1) 42 ret0, _ := ret[0].(model.APIKey) 43 ret1, _ := ret[1].(error) 44 return ret0, ret1 45 } 46 47 // APIKeyFromToken indicates an expected call of APIKeyFromToken. 48 func (mr *MockAuthServiceMockRecorder) APIKeyFromToken(arg0, arg1 interface{}) *gomock.Call { 49 mr.mock.ctrl.T.Helper() 50 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "APIKeyFromToken", reflect.TypeOf((*MockAuthService)(nil).APIKeyFromToken), arg0, arg1) 51 } 52 53 // AuthenticateUser mocks base method. 54 func (m *MockAuthService) AuthenticateUser(arg0 context.Context, arg1, arg2 string) (model.User, error) { 55 m.ctrl.T.Helper() 56 ret := m.ctrl.Call(m, "AuthenticateUser", arg0, arg1, arg2) 57 ret0, _ := ret[0].(model.User) 58 ret1, _ := ret[1].(error) 59 return ret0, ret1 60 } 61 62 // AuthenticateUser indicates an expected call of AuthenticateUser. 63 func (mr *MockAuthServiceMockRecorder) AuthenticateUser(arg0, arg1, arg2 interface{}) *gomock.Call { 64 mr.mock.ctrl.T.Helper() 65 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AuthenticateUser", reflect.TypeOf((*MockAuthService)(nil).AuthenticateUser), arg0, arg1, arg2) 66 } 67 68 // UserFromJWTToken mocks base method. 69 func (m *MockAuthService) UserFromJWTToken(arg0 context.Context, arg1 string) (model.User, error) { 70 m.ctrl.T.Helper() 71 ret := m.ctrl.Call(m, "UserFromJWTToken", arg0, arg1) 72 ret0, _ := ret[0].(model.User) 73 ret1, _ := ret[1].(error) 74 return ret0, ret1 75 } 76 77 // UserFromJWTToken indicates an expected call of UserFromJWTToken. 78 func (mr *MockAuthServiceMockRecorder) UserFromJWTToken(arg0, arg1 interface{}) *gomock.Call { 79 mr.mock.ctrl.T.Helper() 80 return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UserFromJWTToken", reflect.TypeOf((*MockAuthService)(nil).UserFromJWTToken), arg0, arg1) 81 }