ports

package
v0.0.0-...-82892ca Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package ports is a generated GoMock package.

Package ports is a generated GoMock package.

Package ports is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessService

type AccessService interface {
	GrantTmpAccess(payload map[string]string, ttl time.Duration) (string, error)
	CheckTmpToken(tmpToken string) error
}

type AuthService

type AuthService interface {
	Register(ctx context.Context, email, password string) (*domain.User, error)
	Login(ctx context.Context, email, password string) (*domain.TokenPair, error)
	Refresh(ctx context.Context, refreshToken string) (*domain.TokenPair, error)
	ValidateToken(ctx context.Context, accessToken string) (*domain.Claims, error)
}

type MockAuthService

type MockAuthService struct {
	// contains filtered or unexported fields
}

MockAuthService is a mock of AuthService interface.

func NewMockAuthService

func NewMockAuthService(ctrl *gomock.Controller) *MockAuthService

NewMockAuthService creates a new mock instance.

func (*MockAuthService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockAuthService) Login

func (m *MockAuthService) Login(ctx context.Context, email, password string) (*domain.TokenPair, error)

Login mocks base method.

func (*MockAuthService) Refresh

func (m *MockAuthService) Refresh(ctx context.Context, refreshToken string) (*domain.TokenPair, error)

Refresh mocks base method.

func (*MockAuthService) Register

func (m *MockAuthService) Register(ctx context.Context, email, password string) (*domain.User, error)

Register mocks base method.

func (*MockAuthService) ValidateToken

func (m *MockAuthService) ValidateToken(ctx context.Context, accessToken string) (*domain.Claims, error)

ValidateToken mocks base method.

type MockAuthServiceMockRecorder

type MockAuthServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockAuthServiceMockRecorder is the mock recorder for MockAuthService.

func (*MockAuthServiceMockRecorder) Login

func (mr *MockAuthServiceMockRecorder) Login(ctx, email, password any) *gomock.Call

Login indicates an expected call of Login.

func (*MockAuthServiceMockRecorder) Refresh

func (mr *MockAuthServiceMockRecorder) Refresh(ctx, refreshToken any) *gomock.Call

Refresh indicates an expected call of Refresh.

func (*MockAuthServiceMockRecorder) Register

func (mr *MockAuthServiceMockRecorder) Register(ctx, email, password any) *gomock.Call

Register indicates an expected call of Register.

func (*MockAuthServiceMockRecorder) ValidateToken

func (mr *MockAuthServiceMockRecorder) ValidateToken(ctx, accessToken any) *gomock.Call

ValidateToken indicates an expected call of ValidateToken.

type MockPasswordHasher

type MockPasswordHasher struct {
	// contains filtered or unexported fields
}

MockPasswordHasher is a mock of PasswordHasher interface.

func NewMockPasswordHasher

func NewMockPasswordHasher(ctrl *gomock.Controller) *MockPasswordHasher

NewMockPasswordHasher creates a new mock instance.

func (*MockPasswordHasher) Compare

func (m *MockPasswordHasher) Compare(hashedPassword, password string) error

Compare mocks base method.

func (*MockPasswordHasher) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPasswordHasher) Hash

func (m *MockPasswordHasher) Hash(password string) (string, error)

Hash mocks base method.

type MockPasswordHasherMockRecorder

type MockPasswordHasherMockRecorder struct {
	// contains filtered or unexported fields
}

MockPasswordHasherMockRecorder is the mock recorder for MockPasswordHasher.

func (*MockPasswordHasherMockRecorder) Compare

func (mr *MockPasswordHasherMockRecorder) Compare(hashedPassword, password any) *gomock.Call

Compare indicates an expected call of Compare.

func (*MockPasswordHasherMockRecorder) Hash

func (mr *MockPasswordHasherMockRecorder) Hash(password any) *gomock.Call

Hash indicates an expected call of Hash.

type MockProfileProvider

type MockProfileProvider struct {
	// contains filtered or unexported fields
}

MockProfileProvider is a mock of ProfileProvider interface.

func NewMockProfileProvider

func NewMockProfileProvider(ctrl *gomock.Controller) *MockProfileProvider

NewMockProfileProvider creates a new mock instance.

func (*MockProfileProvider) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockProfileProvider) GetExtraClaims

func (m *MockProfileProvider) GetExtraClaims(ctx context.Context, email string) (map[string]string, error)

GetExtraClaims mocks base method.

type MockProfileProviderMockRecorder

type MockProfileProviderMockRecorder struct {
	// contains filtered or unexported fields
}

MockProfileProviderMockRecorder is the mock recorder for MockProfileProvider.

func (*MockProfileProviderMockRecorder) GetExtraClaims

func (mr *MockProfileProviderMockRecorder) GetExtraClaims(ctx, email any) *gomock.Call

GetExtraClaims indicates an expected call of GetExtraClaims.

type MockTmpTokenManager

type MockTmpTokenManager struct {
	// contains filtered or unexported fields
}

MockTmpTokenManager is a mock of TmpTokenManager interface.

func NewMockTmpTokenManager

func NewMockTmpTokenManager(ctrl *gomock.Controller) *MockTmpTokenManager

NewMockTmpTokenManager creates a new mock instance.

func (*MockTmpTokenManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTmpTokenManager) GenerateTmpToken

func (m *MockTmpTokenManager) GenerateTmpToken(payload map[string]string, ttl time.Duration) (string, error)

GenerateTmpToken mocks base method.

func (*MockTmpTokenManager) ValidateTmpToken

func (m *MockTmpTokenManager) ValidateTmpToken(tmpToken string) error

ValidateTmpToken mocks base method.

type MockTmpTokenManagerMockRecorder

type MockTmpTokenManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockTmpTokenManagerMockRecorder is the mock recorder for MockTmpTokenManager.

func (*MockTmpTokenManagerMockRecorder) GenerateTmpToken

func (mr *MockTmpTokenManagerMockRecorder) GenerateTmpToken(payload, ttl any) *gomock.Call

GenerateTmpToken indicates an expected call of GenerateTmpToken.

func (*MockTmpTokenManagerMockRecorder) ValidateTmpToken

func (mr *MockTmpTokenManagerMockRecorder) ValidateTmpToken(tmpToken any) *gomock.Call

ValidateTmpToken indicates an expected call of ValidateTmpToken.

type MockTokenManager

type MockTokenManager struct {
	// contains filtered or unexported fields
}

MockTokenManager is a mock of TokenManager interface.

func NewMockTokenManager

func NewMockTokenManager(ctrl *gomock.Controller) *MockTokenManager

NewMockTokenManager creates a new mock instance.

func (*MockTokenManager) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockTokenManager) NewPair

func (m *MockTokenManager) NewPair(user *domain.User) (*domain.TokenPair, error)

NewPair mocks base method.

func (*MockTokenManager) Parse

func (m *MockTokenManager) Parse(accessToken string) (*domain.Claims, error)

Parse mocks base method.

func (*MockTokenManager) ValidateRefreshToken

func (m *MockTokenManager) ValidateRefreshToken(refreshToken string) (string, error)

ValidateRefreshToken mocks base method.

type MockTokenManagerMockRecorder

type MockTokenManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockTokenManagerMockRecorder is the mock recorder for MockTokenManager.

func (*MockTokenManagerMockRecorder) NewPair

func (mr *MockTokenManagerMockRecorder) NewPair(user any) *gomock.Call

NewPair indicates an expected call of NewPair.

func (*MockTokenManagerMockRecorder) Parse

func (mr *MockTokenManagerMockRecorder) Parse(accessToken any) *gomock.Call

Parse indicates an expected call of Parse.

func (*MockTokenManagerMockRecorder) ValidateRefreshToken

func (mr *MockTokenManagerMockRecorder) ValidateRefreshToken(refreshToken any) *gomock.Call

ValidateRefreshToken indicates an expected call of ValidateRefreshToken.

type MockUserRepository

type MockUserRepository struct {
	// contains filtered or unexported fields
}

MockUserRepository is a mock of UserRepository interface.

func NewMockUserRepository

func NewMockUserRepository(ctrl *gomock.Controller) *MockUserRepository

NewMockUserRepository creates a new mock instance.

func (*MockUserRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUserRepository) GetByEmail

func (m *MockUserRepository) GetByEmail(ctx context.Context, email string) (*domain.User, error)

GetByEmail mocks base method.

func (*MockUserRepository) GetByID

func (m *MockUserRepository) GetByID(ctx context.Context, id string) (*domain.User, error)

GetByID mocks base method.

func (*MockUserRepository) Save

func (m *MockUserRepository) Save(ctx context.Context, user *domain.User) error

Save mocks base method.

type MockUserRepositoryMockRecorder

type MockUserRepositoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockUserRepositoryMockRecorder is the mock recorder for MockUserRepository.

func (*MockUserRepositoryMockRecorder) GetByEmail

func (mr *MockUserRepositoryMockRecorder) GetByEmail(ctx, email any) *gomock.Call

GetByEmail indicates an expected call of GetByEmail.

func (*MockUserRepositoryMockRecorder) GetByID

func (mr *MockUserRepositoryMockRecorder) GetByID(ctx, id any) *gomock.Call

GetByID indicates an expected call of GetByID.

func (*MockUserRepositoryMockRecorder) Save

func (mr *MockUserRepositoryMockRecorder) Save(ctx, user any) *gomock.Call

Save indicates an expected call of Save.

type MockValidationService

type MockValidationService struct {
	// contains filtered or unexported fields
}

MockValidationService is a mock of ValidationService interface.

func NewMockValidationService

func NewMockValidationService(ctrl *gomock.Controller) *MockValidationService

NewMockValidationService creates a new mock instance.

func (*MockValidationService) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockValidationService) ValidateEmail

func (m *MockValidationService) ValidateEmail(email string) error

ValidateEmail mocks base method.

func (*MockValidationService) ValidatePassword

func (m *MockValidationService) ValidatePassword(password string) error

ValidatePassword mocks base method.

type MockValidationServiceMockRecorder

type MockValidationServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockValidationServiceMockRecorder is the mock recorder for MockValidationService.

func (*MockValidationServiceMockRecorder) ValidateEmail

func (mr *MockValidationServiceMockRecorder) ValidateEmail(email any) *gomock.Call

ValidateEmail indicates an expected call of ValidateEmail.

func (*MockValidationServiceMockRecorder) ValidatePassword

func (mr *MockValidationServiceMockRecorder) ValidatePassword(password any) *gomock.Call

ValidatePassword indicates an expected call of ValidatePassword.

type PasswordHasher

type PasswordHasher interface {
	Hash(password string) (string, error)
	Compare(hashedPassword, password string) error
}

type ProfileProvider

type ProfileProvider interface {
	GetExtraClaims(ctx context.Context, email string) (map[string]string, error)
}

type TmpTokenManager

type TmpTokenManager interface {
	GenerateTmpToken(payload map[string]string, ttl time.Duration) (string, error)
	ValidateTmpToken(tmpToken string) error
}

type TokenManager

type TokenManager interface {
	NewPair(user *domain.User) (*domain.TokenPair, error)
	Parse(accessToken string) (*domain.Claims, error)
	ValidateRefreshToken(refreshToken string) (string, error)
}

type UserRepository

type UserRepository interface {
	Save(ctx context.Context, user *domain.User) error
	GetByEmail(ctx context.Context, email string) (*domain.User, error)
	GetByID(ctx context.Context, id string) (*domain.User, error)
}

type ValidationService

type ValidationService interface {
	ValidateEmail(email string) error
	ValidatePassword(password string) error
}

Jump to

Keyboard shortcuts

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