// Code generated by MockGen. DO NOT EDIT. // Source: auth/auth.go // Package mock_auth is a generated GoMock package. package mock_auth import ( json "encoding/json" reflect "reflect" time "time" gomock "github.com/golang/mock/gomock" auth "github.com/tinode/chat/server/auth" types "github.com/tinode/chat/server/store/types" ) // MockAuthHandler is a mock of AuthHandler interface. type MockAuthHandler struct { ctrl *gomock.Controller recorder *MockAuthHandlerMockRecorder } // MockAuthHandlerMockRecorder is the mock recorder for MockAuthHandler. type MockAuthHandlerMockRecorder struct { mock *MockAuthHandler } // NewMockAuthHandler creates a new mock instance. func NewMockAuthHandler(ctrl *gomock.Controller) *MockAuthHandler { mock := &MockAuthHandler{ctrl: ctrl} mock.recorder = &MockAuthHandlerMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockAuthHandler) EXPECT() *MockAuthHandlerMockRecorder { return m.recorder } // AddRecord mocks base method. func (m *MockAuthHandler) AddRecord(ctx auth.AuthContext, rec *auth.Rec, secret []byte) (*auth.Rec, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AddRecord", ctx, rec, secret) ret0, _ := ret[0].(*auth.Rec) ret1, _ := ret[1].(error) return ret0, ret1 } // AddRecord indicates an expected call of AddRecord. func (mr *MockAuthHandlerMockRecorder) AddRecord(ctx, rec, secret interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AddRecord", reflect.TypeOf((*MockAuthHandler)(nil).AddRecord), ctx, rec, secret) } // AsTag mocks base method. func (m *MockAuthHandler) AsTag(token string) string { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "AsTag", token) ret0, _ := ret[0].(string) return ret0 } // AsTag indicates an expected call of AsTag. func (mr *MockAuthHandlerMockRecorder) AsTag(token interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "AsTag", reflect.TypeOf((*MockAuthHandler)(nil).AsTag), token) } // Authenticate mocks base method. func (m *MockAuthHandler) Authenticate(ctx auth.AuthContext, secret []byte) (*auth.Rec, []byte, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Authenticate", ctx, secret) ret0, _ := ret[0].(*auth.Rec) ret1, _ := ret[1].([]byte) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } // Authenticate indicates an expected call of Authenticate. func (mr *MockAuthHandlerMockRecorder) Authenticate(ctx, secret interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Authenticate", reflect.TypeOf((*MockAuthHandler)(nil).Authenticate), ctx, secret) } // DelRecords mocks base method. func (m *MockAuthHandler) DelRecords(tenantID types.TenantID, uid types.Uid) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "DelRecords", tenantID, uid) ret0, _ := ret[0].(error) return ret0 } // DelRecords indicates an expected call of DelRecords. func (mr *MockAuthHandlerMockRecorder) DelRecords(tenantID, uid interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DelRecords", reflect.TypeOf((*MockAuthHandler)(nil).DelRecords), tenantID, uid) } // GenSecret mocks base method. func (m *MockAuthHandler) GenSecret(rec *auth.Rec) ([]byte, time.Time, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GenSecret", rec) ret0, _ := ret[0].([]byte) ret1, _ := ret[1].(time.Time) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } // GenSecret indicates an expected call of GenSecret. func (mr *MockAuthHandlerMockRecorder) GenSecret(rec interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GenSecret", reflect.TypeOf((*MockAuthHandler)(nil).GenSecret), rec) } // GetRealName mocks base method. func (m *MockAuthHandler) GetRealName() string { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetRealName") ret0, _ := ret[0].(string) return ret0 } // GetRealName indicates an expected call of GetRealName. func (mr *MockAuthHandlerMockRecorder) GetRealName() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRealName", reflect.TypeOf((*MockAuthHandler)(nil).GetRealName)) } // GetResetParams mocks base method. func (m *MockAuthHandler) GetResetParams(tenantID types.TenantID, uid types.Uid) (map[string]any, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetResetParams", tenantID, uid) ret0, _ := ret[0].(map[string]any) ret1, _ := ret[1].(error) return ret0, ret1 } // GetResetParams indicates an expected call of GetResetParams. func (mr *MockAuthHandlerMockRecorder) GetResetParams(tenantID, uid interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetResetParams", reflect.TypeOf((*MockAuthHandler)(nil).GetResetParams), tenantID, uid) } // Init mocks base method. func (m *MockAuthHandler) Init(jsonconf json.RawMessage, name string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Init", jsonconf, name) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. func (mr *MockAuthHandlerMockRecorder) Init(jsonconf, name interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockAuthHandler)(nil).Init), jsonconf, name) } // IsInitialized mocks base method. func (m *MockAuthHandler) IsInitialized() bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IsInitialized") ret0, _ := ret[0].(bool) return ret0 } // IsInitialized indicates an expected call of IsInitialized. func (mr *MockAuthHandlerMockRecorder) IsInitialized() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsInitialized", reflect.TypeOf((*MockAuthHandler)(nil).IsInitialized)) } // IsUnique mocks base method. func (m *MockAuthHandler) IsUnique(ctx auth.AuthContext, secret []byte) (bool, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IsUnique", ctx, secret) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // IsUnique indicates an expected call of IsUnique. func (mr *MockAuthHandlerMockRecorder) IsUnique(ctx, secret interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsUnique", reflect.TypeOf((*MockAuthHandler)(nil).IsUnique), ctx, secret) } // RestrictedTags mocks base method. func (m *MockAuthHandler) RestrictedTags() ([]string, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RestrictedTags") ret0, _ := ret[0].([]string) ret1, _ := ret[1].(error) return ret0, ret1 } // RestrictedTags indicates an expected call of RestrictedTags. func (mr *MockAuthHandlerMockRecorder) RestrictedTags() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RestrictedTags", reflect.TypeOf((*MockAuthHandler)(nil).RestrictedTags)) } // UpdateRecord mocks base method. func (m *MockAuthHandler) UpdateRecord(ctx auth.AuthContext, rec *auth.Rec, secret []byte) (*auth.Rec, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateRecord", ctx, rec, secret) ret0, _ := ret[0].(*auth.Rec) ret1, _ := ret[1].(error) return ret0, ret1 } // UpdateRecord indicates an expected call of UpdateRecord. func (mr *MockAuthHandlerMockRecorder) UpdateRecord(ctx, rec, secret interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateRecord", reflect.TypeOf((*MockAuthHandler)(nil).UpdateRecord), ctx, rec, secret) }