// Code generated by MockGen. DO NOT EDIT.
// Source: git.canopsis.net/canopsis/canopsis-community/community/go-engines-community/lib/security (interfaces: Enforcer,Provider,HttpProvider,UserProvider,RoleProvider)
//
// Generated by this command:
//
//	mockgen -destination=../../mocks/lib/security/security.go git.canopsis.net/canopsis/canopsis-community/community/go-engines-community/lib/security Enforcer,Provider,HttpProvider,UserProvider,RoleProvider
//

// Package mock_security is a generated GoMock package.
package mock_security

import (
	context "context"
	http "net/http"
	reflect "reflect"
	time "time"

	security "git.canopsis.net/canopsis/canopsis-community/community/go-engines-community/lib/security"
	gomock "go.uber.org/mock/gomock"
)

// MockEnforcer is a mock of Enforcer interface.
type MockEnforcer struct {
	ctrl     *gomock.Controller
	recorder *MockEnforcerMockRecorder
	isgomock struct{}
}

// MockEnforcerMockRecorder is the mock recorder for MockEnforcer.
type MockEnforcerMockRecorder struct {
	mock *MockEnforcer
}

// NewMockEnforcer creates a new mock instance.
func NewMockEnforcer(ctrl *gomock.Controller) *MockEnforcer {
	mock := &MockEnforcer{ctrl: ctrl}
	mock.recorder = &MockEnforcerMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockEnforcer) EXPECT() *MockEnforcerMockRecorder {
	return m.recorder
}

// Enforce mocks base method.
func (m *MockEnforcer) Enforce(rvals ...any) (bool, error) {
	m.ctrl.T.Helper()
	varargs := []any{}
	for _, a := range rvals {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "Enforce", varargs...)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Enforce indicates an expected call of Enforce.
func (mr *MockEnforcerMockRecorder) Enforce(rvals ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Enforce", reflect.TypeOf((*MockEnforcer)(nil).Enforce), rvals...)
}

// GetPermissionsForUser mocks base method.
func (m *MockEnforcer) GetPermissionsForUser(user string, domain ...string) ([][]string, error) {
	m.ctrl.T.Helper()
	varargs := []any{user}
	for _, a := range domain {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "GetPermissionsForUser", varargs...)
	ret0, _ := ret[0].([][]string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetPermissionsForUser indicates an expected call of GetPermissionsForUser.
func (mr *MockEnforcerMockRecorder) GetPermissionsForUser(user any, domain ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{user}, domain...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPermissionsForUser", reflect.TypeOf((*MockEnforcer)(nil).GetPermissionsForUser), varargs...)
}

// GetRolesForUser mocks base method.
func (m *MockEnforcer) GetRolesForUser(name string, domain ...string) ([]string, error) {
	m.ctrl.T.Helper()
	varargs := []any{name}
	for _, a := range domain {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "GetRolesForUser", varargs...)
	ret0, _ := ret[0].([]string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetRolesForUser indicates an expected call of GetRolesForUser.
func (mr *MockEnforcerMockRecorder) GetRolesForUser(name any, domain ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{name}, domain...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRolesForUser", reflect.TypeOf((*MockEnforcer)(nil).GetRolesForUser), varargs...)
}

// HasPermissionForUser mocks base method.
func (m *MockEnforcer) HasPermissionForUser(user string, permission ...string) (bool, error) {
	m.ctrl.T.Helper()
	varargs := []any{user}
	for _, a := range permission {
		varargs = append(varargs, a)
	}
	ret := m.ctrl.Call(m, "HasPermissionForUser", varargs...)
	ret0, _ := ret[0].(bool)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// HasPermissionForUser indicates an expected call of HasPermissionForUser.
func (mr *MockEnforcerMockRecorder) HasPermissionForUser(user any, permission ...any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]any{user}, permission...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasPermissionForUser", reflect.TypeOf((*MockEnforcer)(nil).HasPermissionForUser), varargs...)
}

// LoadPolicy mocks base method.
func (m *MockEnforcer) LoadPolicy() error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "LoadPolicy")
	ret0, _ := ret[0].(error)
	return ret0
}

// LoadPolicy indicates an expected call of LoadPolicy.
func (mr *MockEnforcerMockRecorder) LoadPolicy() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "LoadPolicy", reflect.TypeOf((*MockEnforcer)(nil).LoadPolicy))
}

// StartAutoLoadPolicy mocks base method.
func (m *MockEnforcer) StartAutoLoadPolicy(arg0 context.Context, arg1 time.Duration) {
	m.ctrl.T.Helper()
	m.ctrl.Call(m, "StartAutoLoadPolicy", arg0, arg1)
}

// StartAutoLoadPolicy indicates an expected call of StartAutoLoadPolicy.
func (mr *MockEnforcerMockRecorder) StartAutoLoadPolicy(arg0, arg1 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartAutoLoadPolicy", reflect.TypeOf((*MockEnforcer)(nil).StartAutoLoadPolicy), arg0, arg1)
}

// MockProvider is a mock of Provider interface.
type MockProvider struct {
	ctrl     *gomock.Controller
	recorder *MockProviderMockRecorder
	isgomock struct{}
}

// MockProviderMockRecorder is the mock recorder for MockProvider.
type MockProviderMockRecorder struct {
	mock *MockProvider
}

// NewMockProvider creates a new mock instance.
func NewMockProvider(ctrl *gomock.Controller) *MockProvider {
	mock := &MockProvider{ctrl: ctrl}
	mock.recorder = &MockProviderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockProvider) EXPECT() *MockProviderMockRecorder {
	return m.recorder
}

// Auth mocks base method.
func (m *MockProvider) Auth(ctx context.Context, username, password string) (*security.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Auth", ctx, username, password)
	ret0, _ := ret[0].(*security.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// Auth indicates an expected call of Auth.
func (mr *MockProviderMockRecorder) Auth(ctx, username, password any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Auth", reflect.TypeOf((*MockProvider)(nil).Auth), ctx, username, password)
}

// GetName mocks base method.
func (m *MockProvider) GetName() string {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetName")
	ret0, _ := ret[0].(string)
	return ret0
}

// GetName indicates an expected call of GetName.
func (mr *MockProviderMockRecorder) GetName() *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetName", reflect.TypeOf((*MockProvider)(nil).GetName))
}

// MockHttpProvider is a mock of HttpProvider interface.
type MockHttpProvider struct {
	ctrl     *gomock.Controller
	recorder *MockHttpProviderMockRecorder
	isgomock struct{}
}

// MockHttpProviderMockRecorder is the mock recorder for MockHttpProvider.
type MockHttpProviderMockRecorder struct {
	mock *MockHttpProvider
}

// NewMockHttpProvider creates a new mock instance.
func NewMockHttpProvider(ctrl *gomock.Controller) *MockHttpProvider {
	mock := &MockHttpProvider{ctrl: ctrl}
	mock.recorder = &MockHttpProviderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockHttpProvider) EXPECT() *MockHttpProviderMockRecorder {
	return m.recorder
}

// Auth mocks base method.
func (m *MockHttpProvider) Auth(arg0 *http.Request) (*security.User, error, bool) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Auth", arg0)
	ret0, _ := ret[0].(*security.User)
	ret1, _ := ret[1].(error)
	ret2, _ := ret[2].(bool)
	return ret0, ret1, ret2
}

// Auth indicates an expected call of Auth.
func (mr *MockHttpProviderMockRecorder) Auth(arg0 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Auth", reflect.TypeOf((*MockHttpProvider)(nil).Auth), arg0)
}

// MockUserProvider is a mock of UserProvider interface.
type MockUserProvider struct {
	ctrl     *gomock.Controller
	recorder *MockUserProviderMockRecorder
	isgomock struct{}
}

// MockUserProviderMockRecorder is the mock recorder for MockUserProvider.
type MockUserProviderMockRecorder struct {
	mock *MockUserProvider
}

// NewMockUserProvider creates a new mock instance.
func NewMockUserProvider(ctrl *gomock.Controller) *MockUserProvider {
	mock := &MockUserProvider{ctrl: ctrl}
	mock.recorder = &MockUserProviderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockUserProvider) EXPECT() *MockUserProviderMockRecorder {
	return m.recorder
}

// FindByAuthApiKey mocks base method.
func (m *MockUserProvider) FindByAuthApiKey(ctx context.Context, apiKey string) (*security.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindByAuthApiKey", ctx, apiKey)
	ret0, _ := ret[0].(*security.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// FindByAuthApiKey indicates an expected call of FindByAuthApiKey.
func (mr *MockUserProviderMockRecorder) FindByAuthApiKey(ctx, apiKey any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByAuthApiKey", reflect.TypeOf((*MockUserProvider)(nil).FindByAuthApiKey), ctx, apiKey)
}

// FindByExternalSource mocks base method.
func (m *MockUserProvider) FindByExternalSource(ctx context.Context, externalID, source string) (*security.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindByExternalSource", ctx, externalID, source)
	ret0, _ := ret[0].(*security.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// FindByExternalSource indicates an expected call of FindByExternalSource.
func (mr *MockUserProviderMockRecorder) FindByExternalSource(ctx, externalID, source any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByExternalSource", reflect.TypeOf((*MockUserProvider)(nil).FindByExternalSource), ctx, externalID, source)
}

// FindByID mocks base method.
func (m *MockUserProvider) FindByID(ctx context.Context, id string) (*security.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindByID", ctx, id)
	ret0, _ := ret[0].(*security.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// FindByID indicates an expected call of FindByID.
func (mr *MockUserProviderMockRecorder) FindByID(ctx, id any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByID", reflect.TypeOf((*MockUserProvider)(nil).FindByID), ctx, id)
}

// FindByUsername mocks base method.
func (m *MockUserProvider) FindByUsername(ctx context.Context, username string) (*security.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindByUsername", ctx, username)
	ret0, _ := ret[0].(*security.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// FindByUsername indicates an expected call of FindByUsername.
func (mr *MockUserProviderMockRecorder) FindByUsername(ctx, username any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindByUsername", reflect.TypeOf((*MockUserProvider)(nil).FindByUsername), ctx, username)
}

// FindWithoutPermission mocks base method.
func (m *MockUserProvider) FindWithoutPermission(ctx context.Context, perm string) ([]security.User, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "FindWithoutPermission", ctx, perm)
	ret0, _ := ret[0].([]security.User)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// FindWithoutPermission indicates an expected call of FindWithoutPermission.
func (mr *MockUserProviderMockRecorder) FindWithoutPermission(ctx, perm any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FindWithoutPermission", reflect.TypeOf((*MockUserProvider)(nil).FindWithoutPermission), ctx, perm)
}

// Save mocks base method.
func (m *MockUserProvider) Save(ctx context.Context, user *security.User) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "Save", ctx, user)
	ret0, _ := ret[0].(error)
	return ret0
}

// Save indicates an expected call of Save.
func (mr *MockUserProviderMockRecorder) Save(ctx, user any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Save", reflect.TypeOf((*MockUserProvider)(nil).Save), ctx, user)
}

// UpdateHashedPassword mocks base method.
func (m *MockUserProvider) UpdateHashedPassword(ctx context.Context, id, hash string) error {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "UpdateHashedPassword", ctx, id, hash)
	ret0, _ := ret[0].(error)
	return ret0
}

// UpdateHashedPassword indicates an expected call of UpdateHashedPassword.
func (mr *MockUserProviderMockRecorder) UpdateHashedPassword(ctx, id, hash any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateHashedPassword", reflect.TypeOf((*MockUserProvider)(nil).UpdateHashedPassword), ctx, id, hash)
}

// MockRoleProvider is a mock of RoleProvider interface.
type MockRoleProvider struct {
	ctrl     *gomock.Controller
	recorder *MockRoleProviderMockRecorder
	isgomock struct{}
}

// MockRoleProviderMockRecorder is the mock recorder for MockRoleProvider.
type MockRoleProviderMockRecorder struct {
	mock *MockRoleProvider
}

// NewMockRoleProvider creates a new mock instance.
func NewMockRoleProvider(ctrl *gomock.Controller) *MockRoleProvider {
	mock := &MockRoleProvider{ctrl: ctrl}
	mock.recorder = &MockRoleProviderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockRoleProvider) EXPECT() *MockRoleProviderMockRecorder {
	return m.recorder
}

// GetRoleID mocks base method.
func (m *MockRoleProvider) GetRoleID(ctx context.Context, name string) (string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetRoleID", ctx, name)
	ret0, _ := ret[0].(string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetRoleID indicates an expected call of GetRoleID.
func (mr *MockRoleProviderMockRecorder) GetRoleID(ctx, name any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetRoleID", reflect.TypeOf((*MockRoleProvider)(nil).GetRoleID), ctx, name)
}

// GetValidRoleIDs mocks base method.
func (m *MockRoleProvider) GetValidRoleIDs(ctx context.Context, potentialRoles []string, defaultRole string) ([]string, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "GetValidRoleIDs", ctx, potentialRoles, defaultRole)
	ret0, _ := ret[0].([]string)
	ret1, _ := ret[1].(error)
	return ret0, ret1
}

// GetValidRoleIDs indicates an expected call of GetValidRoleIDs.
func (mr *MockRoleProviderMockRecorder) GetValidRoleIDs(ctx, potentialRoles, defaultRole any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetValidRoleIDs", reflect.TypeOf((*MockRoleProvider)(nil).GetValidRoleIDs), ctx, potentialRoles, defaultRole)
}
