// Code generated by moq; DO NOT EDIT.
// github.com/matryer/moq

package mocks

import (
	"context"
	"github.com/aliml92/anor"
	"sync"
)

// Ensure, that AuthServiceMock does implement anor.AuthService.
// If this is not the case, regenerate this file with moq.
var _ anor.AuthService = &AuthServiceMock{}

// AuthServiceMock is a mock implementation of anor.AuthService.
//
//	func TestSomethingThatUsesAuthService(t *testing.T) {
//
//		// make and configure a mocked anor.AuthService
//		mockedAuthService := &AuthServiceMock{
//			GetUserFunc: func(ctx context.Context, id int64) (*anor.User, error) {
//				panic("mock out the getUser method")
//			},
//			ResendOTPFunc: func(ctx context.Context, email string) error {
//				panic("mock out the ResendOTP method")
//			},
//			ResetPasswordFunc: func(ctx context.Context, token string, password string) error {
//				panic("mock out the ResetPassword method")
//			},
//			SendResetPasswordLinkFunc: func(ctx context.Context, email string) error {
//				panic("mock out the SendResetPasswordLink method")
//			},
//			SigninFunc: func(ctx context.Context, email string, password string) (int64, error) {
//				panic("mock out the Signin method")
//			},
//			SignupFunc: func(ctx context.Context, name string, email string, password string) error {
//				panic("mock out the Signup method")
//			},
//			SignupConfirmFunc: func(ctx context.Context, otp string, email string) error {
//				panic("mock out the SignupConfirm method")
//			},
//			VerifyResetPasswordTokenFunc: func(ctx context.Context, token string) (bool, error) {
//				panic("mock out the VerifyResetPasswordToken method")
//			},
//		}
//
//		// use mockedAuthService in code that requires anor.AuthService
//		// and then make assertions.
//
//	}
type AuthServiceMock struct {
	// GetUserFunc mocks the GetUser method.
	GetUserFunc func(ctx context.Context, id int64) (*anor.User, error)

	// ResendOTPFunc mocks the ResendOTP method.
	ResendOTPFunc func(ctx context.Context, email string) error

	// ResetPasswordFunc mocks the ResetPassword method.
	ResetPasswordFunc func(ctx context.Context, token string, password string) error

	// SendResetPasswordLinkFunc mocks the SendResetPasswordLink method.
	SendResetPasswordLinkFunc func(ctx context.Context, email string) error

	// SigninFunc mocks the Signin method.
	SigninFunc func(ctx context.Context, email string, password string) (int64, error)

	// SignupFunc mocks the Signup method.
	SignupFunc func(ctx context.Context, name string, email string, password string) error

	// SignupConfirmFunc mocks the SignupConfirm method.
	SignupConfirmFunc func(ctx context.Context, otp string, email string) error

	// VerifyResetPasswordTokenFunc mocks the VerifyResetPasswordToken method.
	VerifyResetPasswordTokenFunc func(ctx context.Context, token string) (bool, error)

	// calls tracks calls to the methods.
	calls struct {
		// GetUser holds details about calls to the GetUser method.
		GetUser []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// ID is the id argument value.
			ID int64
		}
		// ResendOTP holds details about calls to the ResendOTP method.
		ResendOTP []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Email is the email argument value.
			Email string
		}
		// ResetPassword holds details about calls to the ResetPassword method.
		ResetPassword []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Token is the token argument value.
			Token string
			// Password is the password argument value.
			Password string
		}
		// SendResetPasswordLink holds details about calls to the SendResetPasswordLink method.
		SendResetPasswordLink []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Email is the email argument value.
			Email string
		}
		// Signin holds details about calls to the Signin method.
		Signin []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Email is the email argument value.
			Email string
			// Password is the password argument value.
			Password string
		}
		// Signup holds details about calls to the Signup method.
		Signup []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Name is the name argument value.
			Name string
			// Email is the email argument value.
			Email string
			// Password is the password argument value.
			Password string
		}
		// SignupConfirm holds details about calls to the SignupConfirm method.
		SignupConfirm []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Otp is the otp argument value.
			Otp string
			// Email is the email argument value.
			Email string
		}
		// VerifyResetPasswordToken holds details about calls to the VerifyResetPasswordToken method.
		VerifyResetPasswordToken []struct {
			// Ctx is the ctx argument value.
			Ctx context.Context
			// Token is the token argument value.
			Token string
		}
	}
	lockGetUser                  sync.RWMutex
	lockResendOTP                sync.RWMutex
	lockResetPassword            sync.RWMutex
	lockSendResetPasswordLink    sync.RWMutex
	lockSignin                   sync.RWMutex
	lockSignup                   sync.RWMutex
	lockSignupConfirm            sync.RWMutex
	lockVerifyResetPasswordToken sync.RWMutex
}

// GetUser calls GetUserFunc.
func (mock *AuthServiceMock) GetUser(ctx context.Context, id int64) (*anor.User, error) {
	if mock.GetUserFunc == nil {
		panic("AuthServiceMock.GetUserFunc: method is nil but AuthService.getUser was just called")
	}
	callInfo := struct {
		Ctx context.Context
		ID  int64
	}{
		Ctx: ctx,
		ID:  id,
	}
	mock.lockGetUser.Lock()
	mock.calls.GetUser = append(mock.calls.GetUser, callInfo)
	mock.lockGetUser.Unlock()
	return mock.GetUserFunc(ctx, id)
}

// GetUserCalls gets all the calls that were made to GetUser.
// Check the length with:
//
//	len(mockedAuthService.GetUserCalls())
func (mock *AuthServiceMock) GetUserCalls() []struct {
	Ctx context.Context
	ID  int64
} {
	var calls []struct {
		Ctx context.Context
		ID  int64
	}
	mock.lockGetUser.RLock()
	calls = mock.calls.GetUser
	mock.lockGetUser.RUnlock()
	return calls
}

// ResendOTP calls ResendOTPFunc.
func (mock *AuthServiceMock) ResendOTP(ctx context.Context, email string) error {
	if mock.ResendOTPFunc == nil {
		panic("AuthServiceMock.ResendOTPFunc: method is nil but AuthService.ResendOTP was just called")
	}
	callInfo := struct {
		Ctx   context.Context
		Email string
	}{
		Ctx:   ctx,
		Email: email,
	}
	mock.lockResendOTP.Lock()
	mock.calls.ResendOTP = append(mock.calls.ResendOTP, callInfo)
	mock.lockResendOTP.Unlock()
	return mock.ResendOTPFunc(ctx, email)
}

// ResendOTPCalls gets all the calls that were made to ResendOTP.
// Check the length with:
//
//	len(mockedAuthService.ResendOTPCalls())
func (mock *AuthServiceMock) ResendOTPCalls() []struct {
	Ctx   context.Context
	Email string
} {
	var calls []struct {
		Ctx   context.Context
		Email string
	}
	mock.lockResendOTP.RLock()
	calls = mock.calls.ResendOTP
	mock.lockResendOTP.RUnlock()
	return calls
}

// ResetPassword calls ResetPasswordFunc.
func (mock *AuthServiceMock) ResetPassword(ctx context.Context, token string, password string) error {
	if mock.ResetPasswordFunc == nil {
		panic("AuthServiceMock.ResetPasswordFunc: method is nil but AuthService.ResetPassword was just called")
	}
	callInfo := struct {
		Ctx      context.Context
		Token    string
		Password string
	}{
		Ctx:      ctx,
		Token:    token,
		Password: password,
	}
	mock.lockResetPassword.Lock()
	mock.calls.ResetPassword = append(mock.calls.ResetPassword, callInfo)
	mock.lockResetPassword.Unlock()
	return mock.ResetPasswordFunc(ctx, token, password)
}

// ResetPasswordCalls gets all the calls that were made to ResetPassword.
// Check the length with:
//
//	len(mockedAuthService.ResetPasswordCalls())
func (mock *AuthServiceMock) ResetPasswordCalls() []struct {
	Ctx      context.Context
	Token    string
	Password string
} {
	var calls []struct {
		Ctx      context.Context
		Token    string
		Password string
	}
	mock.lockResetPassword.RLock()
	calls = mock.calls.ResetPassword
	mock.lockResetPassword.RUnlock()
	return calls
}

// SendResetPasswordLink calls SendResetPasswordLinkFunc.
func (mock *AuthServiceMock) SendResetPasswordLink(ctx context.Context, email string) error {
	if mock.SendResetPasswordLinkFunc == nil {
		panic("AuthServiceMock.SendResetPasswordLinkFunc: method is nil but AuthService.SendResetPasswordLink was just called")
	}
	callInfo := struct {
		Ctx   context.Context
		Email string
	}{
		Ctx:   ctx,
		Email: email,
	}
	mock.lockSendResetPasswordLink.Lock()
	mock.calls.SendResetPasswordLink = append(mock.calls.SendResetPasswordLink, callInfo)
	mock.lockSendResetPasswordLink.Unlock()
	return mock.SendResetPasswordLinkFunc(ctx, email)
}

// SendResetPasswordLinkCalls gets all the calls that were made to SendResetPasswordLink.
// Check the length with:
//
//	len(mockedAuthService.SendResetPasswordLinkCalls())
func (mock *AuthServiceMock) SendResetPasswordLinkCalls() []struct {
	Ctx   context.Context
	Email string
} {
	var calls []struct {
		Ctx   context.Context
		Email string
	}
	mock.lockSendResetPasswordLink.RLock()
	calls = mock.calls.SendResetPasswordLink
	mock.lockSendResetPasswordLink.RUnlock()
	return calls
}

// Signin calls SigninFunc.
func (mock *AuthServiceMock) Signin(ctx context.Context, email string, password string) (int64, error) {
	if mock.SigninFunc == nil {
		panic("AuthServiceMock.SigninFunc: method is nil but AuthService.Signin was just called")
	}
	callInfo := struct {
		Ctx      context.Context
		Email    string
		Password string
	}{
		Ctx:      ctx,
		Email:    email,
		Password: password,
	}
	mock.lockSignin.Lock()
	mock.calls.Signin = append(mock.calls.Signin, callInfo)
	mock.lockSignin.Unlock()
	return mock.SigninFunc(ctx, email, password)
}

// SigninCalls gets all the calls that were made to Signin.
// Check the length with:
//
//	len(mockedAuthService.SigninCalls())
func (mock *AuthServiceMock) SigninCalls() []struct {
	Ctx      context.Context
	Email    string
	Password string
} {
	var calls []struct {
		Ctx      context.Context
		Email    string
		Password string
	}
	mock.lockSignin.RLock()
	calls = mock.calls.Signin
	mock.lockSignin.RUnlock()
	return calls
}

// Signup calls SignupFunc.
func (mock *AuthServiceMock) Signup(ctx context.Context, name string, email string, password string) error {
	if mock.SignupFunc == nil {
		panic("AuthServiceMock.SignupFunc: method is nil but AuthService.Signup was just called")
	}
	callInfo := struct {
		Ctx      context.Context
		Name     string
		Email    string
		Password string
	}{
		Ctx:      ctx,
		Name:     name,
		Email:    email,
		Password: password,
	}
	mock.lockSignup.Lock()
	mock.calls.Signup = append(mock.calls.Signup, callInfo)
	mock.lockSignup.Unlock()
	return mock.SignupFunc(ctx, name, email, password)
}

// SignupCalls gets all the calls that were made to Signup.
// Check the length with:
//
//	len(mockedAuthService.SignupCalls())
func (mock *AuthServiceMock) SignupCalls() []struct {
	Ctx      context.Context
	Name     string
	Email    string
	Password string
} {
	var calls []struct {
		Ctx      context.Context
		Name     string
		Email    string
		Password string
	}
	mock.lockSignup.RLock()
	calls = mock.calls.Signup
	mock.lockSignup.RUnlock()
	return calls
}

// SignupConfirm calls SignupConfirmFunc.
func (mock *AuthServiceMock) SignupConfirm(ctx context.Context, otp string, email string) error {
	if mock.SignupConfirmFunc == nil {
		panic("AuthServiceMock.SignupConfirmFunc: method is nil but AuthService.SignupConfirm was just called")
	}
	callInfo := struct {
		Ctx   context.Context
		Otp   string
		Email string
	}{
		Ctx:   ctx,
		Otp:   otp,
		Email: email,
	}
	mock.lockSignupConfirm.Lock()
	mock.calls.SignupConfirm = append(mock.calls.SignupConfirm, callInfo)
	mock.lockSignupConfirm.Unlock()
	return mock.SignupConfirmFunc(ctx, otp, email)
}

// SignupConfirmCalls gets all the calls that were made to SignupConfirm.
// Check the length with:
//
//	len(mockedAuthService.SignupConfirmCalls())
func (mock *AuthServiceMock) SignupConfirmCalls() []struct {
	Ctx   context.Context
	Otp   string
	Email string
} {
	var calls []struct {
		Ctx   context.Context
		Otp   string
		Email string
	}
	mock.lockSignupConfirm.RLock()
	calls = mock.calls.SignupConfirm
	mock.lockSignupConfirm.RUnlock()
	return calls
}

// VerifyResetPasswordToken calls VerifyResetPasswordTokenFunc.
func (mock *AuthServiceMock) VerifyResetPasswordToken(ctx context.Context, token string) (bool, error) {
	if mock.VerifyResetPasswordTokenFunc == nil {
		panic("AuthServiceMock.VerifyResetPasswordTokenFunc: method is nil but AuthService.VerifyResetPasswordToken was just called")
	}
	callInfo := struct {
		Ctx   context.Context
		Token string
	}{
		Ctx:   ctx,
		Token: token,
	}
	mock.lockVerifyResetPasswordToken.Lock()
	mock.calls.VerifyResetPasswordToken = append(mock.calls.VerifyResetPasswordToken, callInfo)
	mock.lockVerifyResetPasswordToken.Unlock()
	return mock.VerifyResetPasswordTokenFunc(ctx, token)
}

// VerifyResetPasswordTokenCalls gets all the calls that were made to VerifyResetPasswordToken.
// Check the length with:
//
//	len(mockedAuthService.VerifyResetPasswordTokenCalls())
func (mock *AuthServiceMock) VerifyResetPasswordTokenCalls() []struct {
	Ctx   context.Context
	Token string
} {
	var calls []struct {
		Ctx   context.Context
		Token string
	}
	mock.lockVerifyResetPasswordToken.RLock()
	calls = mock.calls.VerifyResetPasswordToken
	mock.lockVerifyResetPasswordToken.RUnlock()
	return calls
}
