Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Postgres ¶
type Postgres struct {
}
Postgres implements the Repository interface for PostgreSQL.
type Repository ¶
type Repository interface {
Create(req *models.Password) error
// GetByUserID returns a slice of passwords for the given user ID.
// sorted by created_at field in descending order.
GetByUserID(userID string) ([]*models.Password, error)
// returns last 100 passwords.
GetByID(id string) (*models.Password, error)
}
Repository represents a repository for managing passwords.
Click to show internal directories.
Click to hide internal directories.