mockclient

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 28, 2026 License: MIT Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfirmationMailCall

type ConfirmationMailCall struct {
	User        *models.User
	OTP         string
	ReferrerURL string
	ExternalURL *url.URL
}

type EmailChangeMailCall

type EmailChangeMailCall struct {
	User        *models.User
	OTPNew      string
	OTPCurrent  string
	ReferrerURL string
	ExternalURL *url.URL
}

type EmailChangedMailCall

type EmailChangedMailCall struct {
	User     *models.User
	OldEmail string
}

type GetEmailActionLinkCall

type GetEmailActionLinkCall struct {
	User        *models.User
	ActionType  string
	ReferrerURL string
	ExternalURL *url.URL
	Result      string
	Error       error
}

type IdentityLinkedMailCall

type IdentityLinkedMailCall struct {
	User     *models.User
	Provider string
}

type IdentityUnlinkedMailCall

type IdentityUnlinkedMailCall struct {
	User     *models.User
	Provider string
}

type InviteMailCall

type InviteMailCall struct {
	User        *models.User
	OTP         string
	ReferrerURL string
	ExternalURL *url.URL
}

type MFAFactorEnrolledMailCall

type MFAFactorEnrolledMailCall struct {
	User       *models.User
	FactorType string
}

type MFAFactorUnenrolledMailCall

type MFAFactorUnenrolledMailCall struct {
	User       *models.User
	FactorType string
}

type MagicLinkMailCall

type MagicLinkMailCall struct {
	User        *models.User
	OTP         string
	ReferrerURL string
	ExternalURL *url.URL
}

type MockMailer

type MockMailer struct {
	InviteMailCalls         []InviteMailCall
	ConfirmationMailCalls   []ConfirmationMailCall
	RecoveryMailCalls       []RecoveryMailCall
	MagicLinkMailCalls      []MagicLinkMailCall
	EmailChangeMailCalls    []EmailChangeMailCall
	ReauthenticateMailCalls []ReauthenticateMailCall
	GetEmailActionLinkCalls []GetEmailActionLinkCall

	PasswordChangedMailCalls     []PasswordChangedMailCall
	EmailChangedMailCalls        []EmailChangedMailCall
	PhoneChangedMailCalls        []PhoneChangedMailCall
	IdentityLinkedMailCalls      []IdentityLinkedMailCall
	IdentityUnlinkedMailCalls    []IdentityUnlinkedMailCall
	MFAFactorEnrolledMailCalls   []MFAFactorEnrolledMailCall
	MFAFactorUnenrolledMailCalls []MFAFactorUnenrolledMailCall
}

MockMailer implements the mailer.Mailer interface for testing

func (*MockMailer) ConfirmationMail

func (m *MockMailer) ConfirmationMail(r *http.Request, user *models.User, otp, referrerURL string, externalURL *url.URL) error

func (*MockMailer) EmailChangeMail

func (m *MockMailer) EmailChangeMail(r *http.Request, user *models.User, otpNew, otpCurrent, referrerURL string, externalURL *url.URL) error

func (*MockMailer) EmailChangedNotificationMail

func (m *MockMailer) EmailChangedNotificationMail(r *http.Request, user *models.User, oldEmail string) error
func (m *MockMailer) GetEmailActionLink(user *models.User, actionType, referrerURL string, externalURL *url.URL) (string, error)

func (*MockMailer) IdentityLinkedNotificationMail

func (m *MockMailer) IdentityLinkedNotificationMail(r *http.Request, user *models.User, provider string) error

func (*MockMailer) IdentityUnlinkedNotificationMail

func (m *MockMailer) IdentityUnlinkedNotificationMail(r *http.Request, user *models.User, provider string) error

func (*MockMailer) InviteMail

func (m *MockMailer) InviteMail(r *http.Request, user *models.User, otp, referrerURL string, externalURL *url.URL) error

func (*MockMailer) MFAFactorEnrolledNotificationMail

func (m *MockMailer) MFAFactorEnrolledNotificationMail(r *http.Request, user *models.User, factorType string) error

func (*MockMailer) MFAFactorUnenrolledNotificationMail

func (m *MockMailer) MFAFactorUnenrolledNotificationMail(r *http.Request, user *models.User, factorType string) error

func (*MockMailer) MagicLinkMail

func (m *MockMailer) MagicLinkMail(r *http.Request, user *models.User, otp, referrerURL string, externalURL *url.URL) error

func (*MockMailer) PasswordChangedNotificationMail

func (m *MockMailer) PasswordChangedNotificationMail(r *http.Request, user *models.User) error

func (*MockMailer) PhoneChangedNotificationMail

func (m *MockMailer) PhoneChangedNotificationMail(r *http.Request, user *models.User, oldPhone string) error

func (*MockMailer) ReauthenticateMail

func (m *MockMailer) ReauthenticateMail(r *http.Request, user *models.User, otp string) error

func (*MockMailer) RecoveryMail

func (m *MockMailer) RecoveryMail(r *http.Request, user *models.User, otp, referrerURL string, externalURL *url.URL) error

func (*MockMailer) Reset

func (m *MockMailer) Reset()

type PasswordChangedMailCall

type PasswordChangedMailCall struct {
	User *models.User
}

type PhoneChangedMailCall

type PhoneChangedMailCall struct {
	User     *models.User
	OldPhone string
}

type ReauthenticateMailCall

type ReauthenticateMailCall struct {
	User *models.User
	OTP  string
}

type RecoveryMailCall

type RecoveryMailCall struct {
	User        *models.User
	OTP         string
	ReferrerURL string
	ExternalURL *url.URL
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL