mocks

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2026 License: MIT Imports: 11 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 AuthMiddleware

type AuthMiddleware struct {
	mock.Mock
}

AuthMiddleware is an autogenerated mock type for the AuthMiddleware type

func NewAuthMiddleware

func NewAuthMiddleware(t interface {
	mock.TestingT
	Cleanup(func())
}) *AuthMiddleware

NewAuthMiddleware creates a new instance of AuthMiddleware. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*AuthMiddleware) APIKey

func (_m *AuthMiddleware) APIKey() gin.HandlerFunc

APIKey provides a mock function with no fields

func (*AuthMiddleware) JWT

func (_m *AuthMiddleware) JWT() gin.HandlerFunc

JWT provides a mock function with no fields

func (*AuthMiddleware) Optional

func (_m *AuthMiddleware) Optional() gin.HandlerFunc

Optional provides a mock function with no fields

func (*AuthMiddleware) RequireAuth

func (_m *AuthMiddleware) RequireAuth() gin.HandlerFunc

RequireAuth provides a mock function with no fields

func (*AuthMiddleware) RequirePermission

func (_m *AuthMiddleware) RequirePermission(resource string, action string) gin.HandlerFunc

RequirePermission provides a mock function with given fields: resource, action

func (*AuthMiddleware) RequireRole

func (_m *AuthMiddleware) RequireRole(role string) gin.HandlerFunc

RequireRole provides a mock function with given fields: role

type GoogleSignin

type GoogleSignin struct {
	mock.Mock
}

GoogleSignin is an autogenerated mock type for the GoogleSignin type

func NewGoogleSignin

func NewGoogleSignin(t interface {
	mock.TestingT
	Cleanup(func())
}) *GoogleSignin

NewGoogleSignin creates a new instance of GoogleSignin. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*GoogleSignin) Exchange

func (_m *GoogleSignin) Exchange(ctx context.Context, code string) (*pkg.GoogleUser, error)

Exchange provides a mock function with given fields: ctx, code

func (*GoogleSignin) GetAuthURL

func (_m *GoogleSignin) GetAuthURL(state string) string

GetAuthURL provides a mock function with given fields: state

func (*GoogleSignin) VerifyGoogleIDToken

func (_m *GoogleSignin) VerifyGoogleIDToken(ctx context.Context, tokenString string) (*pkg.GoogleUser, error)

VerifyGoogleIDToken provides a mock function with given fields: ctx, tokenString

type SocialAccount

type SocialAccount struct {
	mock.Mock
}

SocialAccount is an autogenerated mock type for the SocialAccount type

func NewSocialAccount

func NewSocialAccount(t interface {
	mock.TestingT
	Cleanup(func())
}) *SocialAccount

NewSocialAccount creates a new instance of SocialAccount. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*SocialAccount) GetID

func (_m *SocialAccount) GetID() string

GetID provides a mock function with no fields

func (*SocialAccount) GetMetadata

func (_m *SocialAccount) GetMetadata() map[string]interface{}

GetMetadata provides a mock function with no fields

func (*SocialAccount) GetProvider

func (_m *SocialAccount) GetProvider() string

GetProvider provides a mock function with no fields

func (*SocialAccount) GetProviderUserID

func (_m *SocialAccount) GetProviderUserID() string

GetProviderUserID provides a mock function with no fields

func (*SocialAccount) GetUser

func (_m *SocialAccount) GetUser() interfaces.User

GetUser provides a mock function with no fields

func (*SocialAccount) GetUserID

func (_m *SocialAccount) GetUserID() string

GetUserID provides a mock function with no fields

type SocialAccountRepository

type SocialAccountRepository struct {
	mock.Mock
}

SocialAccountRepository is an autogenerated mock type for the SocialAccountRepository type

func NewSocialAccountRepository

func NewSocialAccountRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *SocialAccountRepository

NewSocialAccountRepository creates a new instance of SocialAccountRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*SocialAccountRepository) Create

Create provides a mock function with given fields: ctx, data

func (*SocialAccountRepository) DeleteByUserID

func (_m *SocialAccountRepository) DeleteByUserID(ctx context.Context, userID string) error

DeleteByUserID provides a mock function with given fields: ctx, userID

func (*SocialAccountRepository) FindByProvider

func (_m *SocialAccountRepository) FindByProvider(ctx context.Context, provider types.AuthProvider, providerUserID string) (*models.SocialAccount, error)

FindByProvider provides a mock function with given fields: ctx, provider, providerUserID

func (*SocialAccountRepository) FindByUserID

func (_m *SocialAccountRepository) FindByUserID(ctx context.Context, userID string) (*models.SocialAccount, error)

FindByUserID provides a mock function with given fields: ctx, userID

type TokenIssuer

type TokenIssuer struct {
	mock.Mock
}

TokenIssuer is an autogenerated mock type for the TokenIssuer type

func NewTokenIssuer

func NewTokenIssuer(t interface {
	mock.TestingT
	Cleanup(func())
}) *TokenIssuer

NewTokenIssuer creates a new instance of TokenIssuer. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*TokenIssuer) IssueToken

func (_m *TokenIssuer) IssueToken(user interfaces.User) (*responses.TokenResponse, error)

IssueToken provides a mock function with given fields: user

func (*TokenIssuer) RefreshToken

func (_m *TokenIssuer) RefreshToken(refreshToken string) (*responses.TokenResponse, error)

RefreshToken provides a mock function with given fields: refreshToken

func (*TokenIssuer) RevokeToken

func (_m *TokenIssuer) RevokeToken(token string) error

RevokeToken provides a mock function with given fields: token

func (*TokenIssuer) ValidateToken

func (_m *TokenIssuer) ValidateToken(token string) (map[string]interface{}, error)

ValidateToken provides a mock function with given fields: token

type User

type User struct {
	mock.Mock
}

User is an autogenerated mock type for the User type

func NewUser

func NewUser(t interface {
	mock.TestingT
	Cleanup(func())
}) *User

NewUser creates a new instance of User. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*User) GetEmail

func (_m *User) GetEmail() string

GetEmail provides a mock function with no fields

func (*User) GetEmailVerified

func (_m *User) GetEmailVerified() bool

GetEmailVerified provides a mock function with no fields

func (*User) GetEmailVerifiedAt

func (_m *User) GetEmailVerifiedAt() *types.DateTime

GetEmailVerifiedAt provides a mock function with no fields

func (*User) GetID

func (_m *User) GetID() uuid.UUID

GetID provides a mock function with no fields

func (*User) GetLastLoginAt

func (_m *User) GetLastLoginAt() *time.Time

GetLastLoginAt provides a mock function with no fields

func (*User) GetMetadata

func (_m *User) GetMetadata() map[string]interface{}

GetMetadata provides a mock function with no fields

func (*User) GetPasswordHash

func (_m *User) GetPasswordHash() string

GetPasswordHash provides a mock function with no fields

func (*User) GetPasswordResetAt

func (_m *User) GetPasswordResetAt() *time.Time

GetPasswordResetAt provides a mock function with no fields

func (*User) GetPasswordResetToken

func (_m *User) GetPasswordResetToken() *string

GetPasswordResetToken provides a mock function with no fields

func (*User) GetPhoneNumber

func (_m *User) GetPhoneNumber() string

GetPhoneNumber provides a mock function with no fields

func (*User) GetRole

func (_m *User) GetRole() string

GetRole provides a mock function with no fields

func (*User) GetUsername

func (_m *User) GetUsername() string

GetUsername provides a mock function with no fields

func (*User) IsActive

func (_m *User) IsActive() bool

IsActive provides a mock function with no fields

func (*User) SetPassword

func (_m *User) SetPassword(password string)

SetPassword provides a mock function with given fields: password

func (*User) SetPasswordResetAt

func (_m *User) SetPasswordResetAt(at *time.Time)

SetPasswordResetAt provides a mock function with given fields: at

func (*User) SetPasswordResetToken

func (_m *User) SetPasswordResetToken(token *string)

SetPasswordResetToken provides a mock function with given fields: token

type UserRepository

type UserRepository struct {
	mock.Mock
}

UserRepository is an autogenerated mock type for the UserRepository type

func NewUserRepository

func NewUserRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *UserRepository

NewUserRepository creates a new instance of UserRepository. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.

func (*UserRepository) ChangePassword

func (_m *UserRepository) ChangePassword(ctx context.Context, user interfaces.User, newPasswordHash string) error

ChangePassword provides a mock function with given fields: ctx, user, newPasswordHash

func (*UserRepository) Create

func (_m *UserRepository) Create(ctx context.Context, data map[string]interface{}) (interfaces.User, error)

Create provides a mock function with given fields: ctx, data

func (*UserRepository) FindByEmail

func (_m *UserRepository) FindByEmail(ctx context.Context, email string) (interfaces.User, error)

FindByEmail provides a mock function with given fields: ctx, email

func (*UserRepository) FindByID

func (_m *UserRepository) FindByID(ctx context.Context, id uuid.UUID) (interfaces.User, error)

FindByID provides a mock function with given fields: ctx, id

func (*UserRepository) FindByIdentifier

func (_m *UserRepository) FindByIdentifier(ctx context.Context, identifier string) (interfaces.User, error)

FindByIdentifier provides a mock function with given fields: ctx, identifier

func (*UserRepository) FindByPhoneNumber

func (_m *UserRepository) FindByPhoneNumber(ctx context.Context, phone string) (interfaces.User, error)

FindByPhoneNumber provides a mock function with given fields: ctx, phone

func (*UserRepository) FindByResetToken

func (_m *UserRepository) FindByResetToken(ctx context.Context, token string) (interfaces.User, error)

FindByResetToken provides a mock function with given fields: ctx, token

func (*UserRepository) FindByUsername

func (_m *UserRepository) FindByUsername(ctx context.Context, username string) (interfaces.User, error)

FindByUsername provides a mock function with given fields: ctx, username

func (*UserRepository) Update

func (_m *UserRepository) Update(ctx context.Context, user interfaces.User, updates map[string]interface{}) error

Update provides a mock function with given fields: ctx, user, updates

func (*UserRepository) UpdateLastLogin

func (_m *UserRepository) UpdateLastLogin(ctx context.Context, user interfaces.User) error

UpdateLastLogin provides a mock function with given fields: ctx, user

Jump to

Keyboard shortcuts

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