Documentation ¶
Index ¶
- func CreateTestSession(t *testing.T, usr *user.User, store sessions.Store) []*http.Cookie
- func CreateTestUser(t *testing.T, login string, userRepo user.Repository) *user.User
- func GetValidContactDetails() domain.ContactDetails
- func RemoveTestUser(t *testing.T, id uuid.UUID, userRepo user.Repository)
- type PostgresUserRepository
- func (repo PostgresUserRepository) Add(ctx context.Context, user *user.User) error
- func (repo PostgresUserRepository) Delete(ctx context.Context, id uuid.UUID) error
- func (repo PostgresUserRepository) Exists(ctx context.Context, login string) (bool, error)
- func (repo PostgresUserRepository) GetByID(ctx context.Context, id uuid.UUID) (*user.User, error)
- func (repo PostgresUserRepository) GetByLogin(ctx context.Context, login string) (*user.User, error)
- type RepositoryMock
- func (_m *RepositoryMock) Add(ctx context.Context, _a1 *user.User) error
- func (_m *RepositoryMock) Delete(ctx context.Context, id uuid.UUID) error
- func (_m *RepositoryMock) Exists(ctx context.Context, login string) (bool, error)
- func (_m *RepositoryMock) GetByID(ctx context.Context, id uuid.UUID) (*user.User, error)
- func (_m *RepositoryMock) GetByLogin(ctx context.Context, login string) (*user.User, error)
- type UserDB
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateTestSession ¶
func CreateTestUser ¶
func GetValidContactDetails ¶
func GetValidContactDetails() domain.ContactDetails
func RemoveTestUser ¶
Types ¶
type PostgresUserRepository ¶
type PostgresUserRepository struct {
// contains filtered or unexported fields
}
func NewPostgresUserRepository ¶
func NewPostgresUserRepository(db *gorp.DbMap) *PostgresUserRepository
func (PostgresUserRepository) GetByLogin ¶
type RepositoryMock ¶
RepositoryMock is an autogenerated mock type for the Repository type
func (*RepositoryMock) GetByLogin ¶
GetByLogin provides a mock function with given fields: ctx, login
Click to show internal directories.
Click to hide internal directories.