Documentation ¶
Index ¶
- func MockJSONPost(c *gin.Context, content interface{})
- type MockImageRepository
- type MockTokenRepository
- func (m *MockTokenRepository) DeleteRefreshToken(ctx context.Context, userID string, prevTokenID string) error
- func (m *MockTokenRepository) DeleteUserRefreshToken(ctx context.Context, userID string) error
- func (m *MockTokenRepository) SetRefreshToken(ctx context.Context, userID string, tokenID string, expiresIn time.Duration) error
- type MockTokenService
- func (m *MockTokenService) NewPairFromUser(ctx context.Context, u *model.User, prevTokenID string) (*model.Token, error)
- func (m *MockTokenService) Signout(ctx context.Context, uid uuid.UUID) error
- func (m *MockTokenService) ValidateIDToken(tokenString string) (*model.User, error)
- func (m *MockTokenService) ValidateRefreshToken(refreshTokenString string) (*model.RefreshToken, error)
- type MockUserRepository
- func (m *MockUserRepository) Create(ctx context.Context, user *model.User) error
- func (m *MockUserRepository) FindByEmail(ctx context.Context, email string) (*model.User, error)
- func (m *MockUserRepository) FindByID(ctx context.Context, uid uuid.UUID) (*model.User, error)
- func (m *MockUserRepository) Update(ctx context.Context, u *model.User) error
- func (m *MockUserRepository) UpdateImage(ctx context.Context, uid uuid.UUID, imageURL string) (*model.User, error)
- type MockUserService
- func (m *MockUserService) DeleteProfileImage(ctx context.Context, uid uuid.UUID) error
- func (m *MockUserService) Get(ctx context.Context, uid uuid.UUID) (*model.User, error)
- func (m *MockUserService) SetProfileImage(ctx context.Context, uid uuid.UUID, imageFileHeader *multipart.FileHeader) (*model.User, error)
- func (m *MockUserService) Signin(ctx context.Context, u *model.User) error
- func (m *MockUserService) Signup(ctx context.Context, u *model.User) error
- func (m *MockUserService) UpdateDetails(ctx context.Context, u *model.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MockJSONPost ¶
MockJSONPost mock test for context with json
Types ¶
type MockImageRepository ¶
MockImageRepository is a mock type for model.ImageRepository
func (*MockImageRepository) DeleteProfile ¶
func (m *MockImageRepository) DeleteProfile(ctx context.Context, objName string) error
DeleteProfile is mock of representations of ImageRepository DeleteProfile
func (*MockImageRepository) UpdateProfile ¶
func (m *MockImageRepository) UpdateProfile(ctx context.Context, objName string, imageFile multipart.File) (string, error)
UpdateProfile is mock of representations of ImageRepository Update Profile
type MockTokenRepository ¶
MockTokenRepository is a mock type for model.TokenRepository
func (*MockTokenRepository) DeleteRefreshToken ¶
func (m *MockTokenRepository) DeleteRefreshToken(ctx context.Context, userID string, prevTokenID string) error
DeleteRefreshToken is a mock of model.TokenRepository DeleteRefreshToken
func (*MockTokenRepository) DeleteUserRefreshToken ¶
func (m *MockTokenRepository) DeleteUserRefreshToken(ctx context.Context, userID string) error
DeleteUserRefreshToken mocks concrete DeleteUserRefreshToken
func (*MockTokenRepository) SetRefreshToken ¶
func (m *MockTokenRepository) SetRefreshToken(ctx context.Context, userID string, tokenID string, expiresIn time.Duration) error
SetRefreshToken is a mock of model.TokenRepository SetRefreshToken
type MockTokenService ¶
MockTokenService is a mock type for model.TokenService
func (*MockTokenService) NewPairFromUser ¶
func (m *MockTokenService) NewPairFromUser(ctx context.Context, u *model.User, prevTokenID string) (*model.Token, error)
NewPairFromUser mocks concrete NewPairFromUser
func (*MockTokenService) ValidateIDToken ¶
func (m *MockTokenService) ValidateIDToken(tokenString string) (*model.User, error)
ValidateIDToken mocks concrete ValidateIDToken
func (*MockTokenService) ValidateRefreshToken ¶
func (m *MockTokenService) ValidateRefreshToken(refreshTokenString string) (*model.RefreshToken, error)
ValidateRefreshToken mocks concrete ValidateRefreshToken
type MockUserRepository ¶
MockUserRepository is a mock type for model.UserRepository
func (*MockUserRepository) FindByEmail ¶
FindByEmail is mock of UserRepository.FindByEmail
type MockUserService ¶
MockUserService is a mock type for model.UserService
func (*MockUserService) DeleteProfileImage ¶
DeleteProfileImage is a mock of UserService.DeleteProfileImage
func (*MockUserService) SetProfileImage ¶
func (m *MockUserService) SetProfileImage( ctx context.Context, uid uuid.UUID, imageFileHeader *multipart.FileHeader, ) (*model.User, error)
SetProfileImage is a mock of UserService.SetProfileImage
func (*MockUserService) UpdateDetails ¶
UpdateDetails is a mock of UserService.UpdateDetails