Documentation ¶
Index ¶
- func GetDB(config *config.PostgresConfig) (*bun.DB, error)
- type PGShortenedURL
- type PGShortenedURLDomainReport
- type PGShortenedURLStorage
- func (p *PGShortenedURLStorage) GetOriginalURL(ctx context.Context, shortURL string) (*models.ShortenedURL, error)
- func (p *PGShortenedURLStorage) ReportTopDomains(ctx context.Context, n int) ([]*models.JSONDomainReport, error)
- func (p *PGShortenedURLStorage) StoreShortURL(ctx context.Context, shortenedURL *models.ShortenedURL) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type PGShortenedURL ¶
type PGShortenedURLStorage ¶
func (*PGShortenedURLStorage) GetOriginalURL ¶
func (p *PGShortenedURLStorage) GetOriginalURL(ctx context.Context, shortURL string) (*models.ShortenedURL, error)
GetOriginalURL implements storage.URLStorage.
func (*PGShortenedURLStorage) ReportTopDomains ¶
func (p *PGShortenedURLStorage) ReportTopDomains(ctx context.Context, n int) ([]*models.JSONDomainReport, error)
func (*PGShortenedURLStorage) StoreShortURL ¶
func (p *PGShortenedURLStorage) StoreShortURL(ctx context.Context, shortenedURL *models.ShortenedURL) error
StoreShortURL implements storage.URLStorage.
Click to show internal directories.
Click to hide internal directories.