Documentation ¶
Index ¶
- type LinkStorage
- func (s *LinkStorage) CreateNewLink(link *models.CreateLinkRequest, creatorIPAddress string) (*string, error)
- func (s *LinkStorage) GetLinkByShortCode(shortCode string) (*models.Link, error)
- func (s *LinkStorage) ToggleLinkEnabledState(shortCode string) error
- func (s *LinkStorage) UpdateShortendLink(shortCode string, newURL string) error
- func (s *LinkStorage) UpdateVisitAndReturnRedirectLink(shortCode string) (*models.Link, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LinkStorage ¶
type LinkStorage struct {
// contains filtered or unexported fields
}
func NewLinkStorage ¶
func NewLinkStorage(db *sqlx.DB, redis *redis.Client) *LinkStorage
func (*LinkStorage) CreateNewLink ¶
func (s *LinkStorage) CreateNewLink(link *models.CreateLinkRequest, creatorIPAddress string) (*string, error)
func (*LinkStorage) GetLinkByShortCode ¶
func (s *LinkStorage) GetLinkByShortCode(shortCode string) (*models.Link, error)
func (*LinkStorage) ToggleLinkEnabledState ¶
func (s *LinkStorage) ToggleLinkEnabledState(shortCode string) error
func (*LinkStorage) UpdateShortendLink ¶
func (s *LinkStorage) UpdateShortendLink(shortCode string, newURL string) error
func (*LinkStorage) UpdateVisitAndReturnRedirectLink ¶
func (s *LinkStorage) UpdateVisitAndReturnRedirectLink(shortCode string) (*models.Link, error)
Click to show internal directories.
Click to hide internal directories.