Documentation
¶
Index ¶
- type PgRepository
- func (r *PgRepository) Add(model *entities.ShortURL) error
- func (r *PgRepository) AddURLVisit(urlID int64, userIP string) error
- func (r *PgRepository) FindAll(limit, offset int64) ([]dto.ShortURLReportDto, error)
- func (r *PgRepository) FindByToken(token string) (*entities.ShortURL, error)
- func (r *PgRepository) FindByURL(url string) (*entities.ShortURL, error)
- type ShortURLRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PgRepository ¶
type PgRepository struct {
// contains filtered or unexported fields
}
func NewPgRepository ¶
func NewPgRepository(db *sqlx.DB, timeout time.Duration) *PgRepository
func (*PgRepository) AddURLVisit ¶
func (r *PgRepository) AddURLVisit(urlID int64, userIP string) error
func (*PgRepository) FindAll ¶
func (r *PgRepository) FindAll(limit, offset int64) ([]dto.ShortURLReportDto, error)
func (*PgRepository) FindByToken ¶
func (r *PgRepository) FindByToken(token string) (*entities.ShortURL, error)
Click to show internal directories.
Click to hide internal directories.