Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateShortUrl ¶
CreateShortUrl creates a short ID by hashing the original link then encoding it with base58
func GetAppApiAddr ¶
func GetAppApiAddr() string
func GetUrlMapping ¶
GetUrlMapping loads up the original url to redirect from short url
func SaveUrlMapping ¶
SaveUrlMapping persists the url shortening record to the redis
Types ¶
type StorageService ¶
type StorageService struct {
// contains filtered or unexported fields
}
func NewStorageService ¶
func NewStorageService(redisAddr string, redisPassword string, redisDB int) *StorageService
Click to show internal directories.
Click to hide internal directories.