mocks

package
v0.1.0-2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessTokenCacheDs

type AccessTokenCacheDs struct {
	mock.Mock
}

AccessTokenCacheDs is an autogenerated mock type for the AccessTokenCacheDs type

func NewAccessTokenCacheDs

func NewAccessTokenCacheDs(t interface {
	mock.TestingT
	Cleanup(func())
}) *AccessTokenCacheDs

NewAccessTokenCacheDs creates a new instance of AccessTokenCacheDs. 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 (*AccessTokenCacheDs) CreateAccessToken

func (_m *AccessTokenCacheDs) CreateAccessToken(ctx context.Context, accessToken *domain.AccessToken) error

CreateAccessToken provides a mock function with given fields: ctx, accessToken

func (*AccessTokenCacheDs) DeleteAccessToken

func (_m *AccessTokenCacheDs) DeleteAccessToken(ctx context.Context, id uuid.UUID) error

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

func (*AccessTokenCacheDs) GetAccessTokenById

func (_m *AccessTokenCacheDs) GetAccessTokenById(ctx context.Context, id uuid.UUID) (*domain.AccessToken, error)

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

type AccessTokenDatabaseDs

type AccessTokenDatabaseDs struct {
	mock.Mock
}

AccessTokenDatabaseDs is an autogenerated mock type for the AccessTokenDatabaseDs type

func NewAccessTokenDatabaseDs

func NewAccessTokenDatabaseDs(t interface {
	mock.TestingT
	Cleanup(func())
}) *AccessTokenDatabaseDs

NewAccessTokenDatabaseDs creates a new instance of AccessTokenDatabaseDs. 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 (*AccessTokenDatabaseDs) CreateAccessToken

func (_m *AccessTokenDatabaseDs) CreateAccessToken(ctx context.Context, accessToken *domain.AccessToken) (*domain.AccessToken, error)

CreateAccessToken provides a mock function with given fields: ctx, accessToken

func (*AccessTokenDatabaseDs) DeleteAccessTokenByUserId

func (_m *AccessTokenDatabaseDs) DeleteAccessTokenByUserId(ctx context.Context, userId uuid.UUID) (*uuid.UUID, error)

DeleteAccessTokenByUserId provides a mock function with given fields: ctx, userId

func (*AccessTokenDatabaseDs) GetAccessTokenById

func (_m *AccessTokenDatabaseDs) GetAccessTokenById(ctx context.Context, id uuid.UUID) (*domain.AccessToken, error)

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

type AccessTokenRepository

type AccessTokenRepository struct {
	mock.Mock
}

AccessTokenRepository is an autogenerated mock type for the AccessTokenRepository type

func NewAccessTokenRepository

func NewAccessTokenRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *AccessTokenRepository

NewAccessTokenRepository creates a new instance of AccessTokenRepository. 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 (*AccessTokenRepository) CreateAccessToken

func (_m *AccessTokenRepository) CreateAccessToken(ctx context.Context, userId uuid.UUID, refreshTokenId uuid.UUID) (*domain.AccessToken, error)

CreateAccessToken provides a mock function with given fields: ctx, userId, refreshTokenId

func (*AccessTokenRepository) DeleteAccessTokenByUserId

func (_m *AccessTokenRepository) DeleteAccessTokenByUserId(ctx context.Context, userId uuid.UUID) error

DeleteAccessTokenByUserId provides a mock function with given fields: ctx, userId

func (*AccessTokenRepository) GetAccessToken

func (_m *AccessTokenRepository) GetAccessToken(ctx context.Context, id uuid.UUID) (*domain.AccessToken, error)

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

type AuthenticationService

type AuthenticationService struct {
	mock.Mock
}

AuthenticationService is an autogenerated mock type for the AuthenticationService type

func NewAuthenticationService

func NewAuthenticationService(t interface {
	mock.TestingT
	Cleanup(func())
}) *AuthenticationService

NewAuthenticationService creates a new instance of AuthenticationService. 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 (*AuthenticationService) SignIn

func (_m *AuthenticationService) SignIn(ctx context.Context, email string, password string) (*service.SignInResponse, error)

SignIn provides a mock function with given fields: ctx, email, password

type DBTX

type DBTX struct {
	mock.Mock
}

DBTX is an autogenerated mock type for the DBTX type

func NewDBTX

func NewDBTX(t interface {
	mock.TestingT
	Cleanup(func())
}) *DBTX

NewDBTX creates a new instance of DBTX. 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 (*DBTX) ExecContext

func (_m *DBTX) ExecContext(_a0 context.Context, _a1 string, _a2 ...interface{}) (sql.Result, error)

ExecContext provides a mock function with given fields: _a0, _a1, _a2

func (*DBTX) PrepareContext

func (_m *DBTX) PrepareContext(_a0 context.Context, _a1 string) (*sql.Stmt, error)

PrepareContext provides a mock function with given fields: _a0, _a1

func (*DBTX) QueryContext

func (_m *DBTX) QueryContext(_a0 context.Context, _a1 string, _a2 ...interface{}) (*sql.Rows, error)

QueryContext provides a mock function with given fields: _a0, _a1, _a2

func (*DBTX) QueryRowContext

func (_m *DBTX) QueryRowContext(_a0 context.Context, _a1 string, _a2 ...interface{}) *sql.Row

QueryRowContext provides a mock function with given fields: _a0, _a1, _a2

type HashDatasource

type HashDatasource struct {
	mock.Mock
}

HashDatasource is an autogenerated mock type for the HashDatasource type

func NewHashDatasource

func NewHashDatasource(t interface {
	mock.TestingT
	Cleanup(func())
}) *HashDatasource

NewHashDatasource creates a new instance of HashDatasource. 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 (*HashDatasource) CheckHash

func (_m *HashDatasource) CheckHash(value string, hash string) (bool, error)

CheckHash provides a mock function with given fields: value, hash

func (*HashDatasource) Hash

func (_m *HashDatasource) Hash(value string) (string, error)

Hash provides a mock function with given fields: value

type JwtDatasource

type JwtDatasource struct {
	mock.Mock
}

JwtDatasource is an autogenerated mock type for the JwtDatasource type

func NewJwtDatasource

func NewJwtDatasource(t interface {
	mock.TestingT
	Cleanup(func())
}) *JwtDatasource

NewJwtDatasource creates a new instance of JwtDatasource. 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 (*JwtDatasource) CreateJWT

func (_m *JwtDatasource) CreateJWT(tokenMetadata *domain.JWTMetadata, expirationTime time.Time) (*string, error)

CreateJWT provides a mock function with given fields: tokenMetadata, expirationTime

func (*JwtDatasource) ParseJWT

func (_m *JwtDatasource) ParseJWT(tokenMetadata *domain.JWTMetadata) error

ParseJWT provides a mock function with given fields: tokenMetadata

type NoteCacheDs

type NoteCacheDs struct {
	mock.Mock
}

NoteCacheDs is an autogenerated mock type for the NoteCacheDs type

func NewNoteCacheDs

func NewNoteCacheDs(t interface {
	mock.TestingT
	Cleanup(func())
}) *NoteCacheDs

NewNoteCacheDs creates a new instance of NoteCacheDs. 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 (*NoteCacheDs) CreateNote

func (_m *NoteCacheDs) CreateNote(ctx context.Context, note *domain.Note) (*domain.Note, error)

CreateNote provides a mock function with given fields: ctx, note

func (*NoteCacheDs) DeleteNote

func (_m *NoteCacheDs) DeleteNote(ctx context.Context, id uuid.UUID) error

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

func (*NoteCacheDs) GetNote

func (_m *NoteCacheDs) GetNote(ctx context.Context, id uuid.UUID) (*domain.Note, error)

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

func (*NoteCacheDs) ListNote

func (_m *NoteCacheDs) ListNote(ctx context.Context) (*[]domain.Note, error)

ListNote provides a mock function with given fields: ctx

func (*NoteCacheDs) UpdateNote

func (_m *NoteCacheDs) UpdateNote(ctx context.Context, note *domain.Note) (*domain.Note, error)

UpdateNote provides a mock function with given fields: ctx, note

type NoteDatabaseDs

type NoteDatabaseDs struct {
	mock.Mock
}

NoteDatabaseDs is an autogenerated mock type for the NoteDatabaseDs type

func NewNoteDatabaseDs

func NewNoteDatabaseDs(t interface {
	mock.TestingT
	Cleanup(func())
}) *NoteDatabaseDs

NewNoteDatabaseDs creates a new instance of NoteDatabaseDs. 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 (*NoteDatabaseDs) CreateNote

func (_m *NoteDatabaseDs) CreateNote(ctx context.Context, note *domain.Note) (*domain.Note, error)

CreateNote provides a mock function with given fields: ctx, note

func (*NoteDatabaseDs) DeleteNote

func (_m *NoteDatabaseDs) DeleteNote(ctx context.Context, id uuid.UUID) error

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

func (*NoteDatabaseDs) GetNote

func (_m *NoteDatabaseDs) GetNote(ctx context.Context, id uuid.UUID) (*domain.Note, error)

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

func (*NoteDatabaseDs) ListNotesByUserId

func (_m *NoteDatabaseDs) ListNotesByUserId(ctx context.Context, user_id uuid.UUID) (*[]domain.Note, error)

ListNotesByUserId provides a mock function with given fields: ctx, user_id

func (*NoteDatabaseDs) UpdateNote

func (_m *NoteDatabaseDs) UpdateNote(ctx context.Context, note *domain.Note) (*domain.Note, error)

UpdateNote provides a mock function with given fields: ctx, note

type NoteRepository

type NoteRepository struct {
	mock.Mock
}

NoteRepository is an autogenerated mock type for the NoteRepository type

func NewNoteRepository

func NewNoteRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *NoteRepository

NewNoteRepository creates a new instance of NoteRepository. 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 (*NoteRepository) CreateNote

func (_m *NoteRepository) CreateNote(ctx context.Context, note *domain.Note) (*domain.Note, error)

CreateNote provides a mock function with given fields: ctx, note

func (*NoteRepository) DeleteNote

func (_m *NoteRepository) DeleteNote(ctx context.Context, id uuid.UUID) error

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

func (*NoteRepository) GetNote

func (_m *NoteRepository) GetNote(ctx context.Context, id uuid.UUID) (*domain.Note, error)

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

func (*NoteRepository) ListNote

func (_m *NoteRepository) ListNote(ctx context.Context) (*[]domain.Note, error)

ListNote provides a mock function with given fields: ctx

func (*NoteRepository) UpdateNote

func (_m *NoteRepository) UpdateNote(ctx context.Context, note *domain.Note) (*domain.Note, error)

UpdateNote provides a mock function with given fields: ctx, note

type RefreshTokenCacheDs

type RefreshTokenCacheDs struct {
	mock.Mock
}

RefreshTokenCacheDs is an autogenerated mock type for the RefreshTokenCacheDs type

func NewRefreshTokenCacheDs

func NewRefreshTokenCacheDs(t interface {
	mock.TestingT
	Cleanup(func())
}) *RefreshTokenCacheDs

NewRefreshTokenCacheDs creates a new instance of RefreshTokenCacheDs. 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 (*RefreshTokenCacheDs) CreateRefreshToken

func (_m *RefreshTokenCacheDs) CreateRefreshToken(ctx context.Context, refreshToken *domain.RefreshToken) error

CreateRefreshToken provides a mock function with given fields: ctx, refreshToken

func (*RefreshTokenCacheDs) DeleteRefreshToken

func (_m *RefreshTokenCacheDs) DeleteRefreshToken(ctx context.Context, id uuid.UUID) error

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

func (*RefreshTokenCacheDs) GetRefreshToken

func (_m *RefreshTokenCacheDs) GetRefreshToken(ctx context.Context, id uuid.UUID) (*domain.RefreshToken, error)

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

type RefreshTokenDatabaseDs

type RefreshTokenDatabaseDs struct {
	mock.Mock
}

RefreshTokenDatabaseDs is an autogenerated mock type for the RefreshTokenDatabaseDs type

func NewRefreshTokenDatabaseDs

func NewRefreshTokenDatabaseDs(t interface {
	mock.TestingT
	Cleanup(func())
}) *RefreshTokenDatabaseDs

NewRefreshTokenDatabaseDs creates a new instance of RefreshTokenDatabaseDs. 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 (*RefreshTokenDatabaseDs) CreateRefreshToken

func (_m *RefreshTokenDatabaseDs) CreateRefreshToken(ctx context.Context, refreshToken *domain.RefreshToken) (*domain.RefreshToken, error)

CreateRefreshToken provides a mock function with given fields: ctx, refreshToken

func (*RefreshTokenDatabaseDs) DeleteRefreshTokenByUserId

func (_m *RefreshTokenDatabaseDs) DeleteRefreshTokenByUserId(ctx context.Context, userId uuid.UUID) (*uuid.UUID, error)

DeleteRefreshTokenByUserId provides a mock function with given fields: ctx, userId

func (*RefreshTokenDatabaseDs) GetRefreshTokenById

func (_m *RefreshTokenDatabaseDs) GetRefreshTokenById(ctx context.Context, id uuid.UUID) (*domain.RefreshToken, error)

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

type RefreshTokenRepository

type RefreshTokenRepository struct {
	mock.Mock
}

RefreshTokenRepository is an autogenerated mock type for the RefreshTokenRepository type

func NewRefreshTokenRepository

func NewRefreshTokenRepository(t interface {
	mock.TestingT
	Cleanup(func())
}) *RefreshTokenRepository

NewRefreshTokenRepository creates a new instance of RefreshTokenRepository. 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 (*RefreshTokenRepository) CreateRefreshToken

func (_m *RefreshTokenRepository) CreateRefreshToken(ctx context.Context, refreshToken *domain.RefreshToken) (*domain.RefreshToken, error)

CreateRefreshToken provides a mock function with given fields: ctx, refreshToken

func (*RefreshTokenRepository) DeleteRefreshTokenByUserId

func (_m *RefreshTokenRepository) DeleteRefreshTokenByUserId(ctx context.Context, userId uuid.UUID) error

DeleteRefreshTokenByUserId provides a mock function with given fields: ctx, userId

func (*RefreshTokenRepository) GetRefreshToken

func (_m *RefreshTokenRepository) GetRefreshToken(ctx context.Context, id uuid.UUID) (*domain.RefreshToken, error)

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

type UserCacheDs

type UserCacheDs struct {
	mock.Mock
}

UserCacheDs is an autogenerated mock type for the UserCacheDs type

func NewUserCacheDs

func NewUserCacheDs(t interface {
	mock.TestingT
	Cleanup(func())
}) *UserCacheDs

NewUserCacheDs creates a new instance of UserCacheDs. 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 (*UserCacheDs) CreateUser

func (_m *UserCacheDs) CreateUser(ctx context.Context, user *domain.User) error

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

func (*UserCacheDs) DeleteUser

func (_m *UserCacheDs) DeleteUser(ctx context.Context, id uuid.UUID) error

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

func (*UserCacheDs) GetUserByEmail

func (_m *UserCacheDs) GetUserByEmail(ctx context.Context, email string) (*domain.User, error)

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

func (*UserCacheDs) GetUserById

func (_m *UserCacheDs) GetUserById(ctx context.Context, id uuid.UUID) (*domain.User, error)

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

func (*UserCacheDs) UpdateUser

func (_m *UserCacheDs) UpdateUser(ctx context.Context, user *domain.User) error

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

type UserDatabaseDs

type UserDatabaseDs struct {
	mock.Mock
}

UserDatabaseDs is an autogenerated mock type for the UserDatabaseDs type

func NewUserDatabaseDs

func NewUserDatabaseDs(t interface {
	mock.TestingT
	Cleanup(func())
}) *UserDatabaseDs

NewUserDatabaseDs creates a new instance of UserDatabaseDs. 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 (*UserDatabaseDs) CreateUser

func (_m *UserDatabaseDs) CreateUser(ctx context.Context, user *domain.User) (*domain.User, error)

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

func (*UserDatabaseDs) GetUserByEmail

func (_m *UserDatabaseDs) GetUserByEmail(ctx context.Context, email string) (*domain.User, error)

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

func (*UserDatabaseDs) GetUserById

func (_m *UserDatabaseDs) GetUserById(ctx context.Context, id uuid.UUID) (*domain.User, error)

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

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) CreateUser

func (_m *UserRepository) CreateUser(ctx context.Context, user *domain.User) (*domain.User, error)

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

func (*UserRepository) GetUserByEmail

func (_m *UserRepository) GetUserByEmail(ctx context.Context, email string) (*domain.User, error)

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

func (*UserRepository) GetUserById

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

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

Jump to

Keyboard shortcuts

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