Documentation ¶
Index ¶
- Variables
- type Conf
- type Store
- func (s *Store) Close() error
- func (s *Store) CreateShortURL(ctx context.Context, url string, title string, slug string, ...) (string, error)
- func (s *Store) DeleteURL(ctx context.Context, shortCode string) error
- func (s *Store) GetRedirectData(ctx context.Context, shortCode string) (models.URLData, error)
- func (s *Store) GetURLs(ctx context.Context, page, perPage int64) ([]models.URLData, int64, error)
- func (s *Store) Ping(ctx context.Context) error
- func (s *Store) StartExpiryWorker(ctx context.Context)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotExist = errors.New("the URL does not exist")
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CreateShortURL ¶
func (*Store) GetRedirectData ¶
func (*Store) StartExpiryWorker ¶
StartExpiryWorker starts a background goroutine that periodically checks and removes expired URLs
Click to show internal directories.
Click to hide internal directories.