Documentation ¶
Index ¶
- func NewPool(ctx context.Context, conf config.Postgres) (*pgxpool.Pool, error)
- type Repository
- type URLRepository
- type UserRepository
- func (r *UserRepository) Create(ctx context.Context, user domain.User) (interface{}, error)
- func (r *UserRepository) Delete(ctx context.Context, username, password string) error
- func (r *UserRepository) Get(ctx context.Context, username, password string) (domain.User, error)
- func (r *UserRepository) Update(ctx context.Context, user domain.User) error
- func (r *UserRepository) UsernameExists(ctx context.Context, username string) (bool, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Repository ¶
type Repository struct { URL domain.URLRepository User domain.UserRepository }
func NewRepository ¶
func NewRepository(pool *pgxpool.Pool) *Repository
type URLRepository ¶
type URLRepository struct {
// contains filtered or unexported fields
}
func NewURLRepository ¶
func NewURLRepository(pool *pgxpool.Pool) *URLRepository
func (*URLRepository) GetURLByHash ¶
type UserRepository ¶
type UserRepository struct {
// contains filtered or unexported fields
}
func NewUserRepository ¶
func NewUserRepository(pool *pgxpool.Pool) *UserRepository
func (*UserRepository) Delete ¶
func (r *UserRepository) Delete(ctx context.Context, username, password string) error
func (*UserRepository) UsernameExists ¶
Click to show internal directories.
Click to hide internal directories.