storage

package
v0.0.0-...-927a41b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 (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 (s *LinkStorage) UpdateShortendLink(shortCode string, newURL string) error
func (s *LinkStorage) UpdateVisitAndReturnRedirectLink(shortCode string) (*models.Link, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL