package
Version:
v0.0.0-...-cc299b8
Opens a new window with list of versions in this module.
Published: Apr 10, 2021
License: MIT
Opens a new window with license information.
Imports: 3
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Storage keeps pool of connections for redis, number of saved URLs and channel required for generation of short
aliases for new incoming URLs.
New returns an instance of Storage.
Close closes all connections to Redis, releasing all resources.
Longer searches the original URL in Redis by given short alias.
SaveFull generates a unique short alias for the given URL, saves the match between this alias and the given
URL into Redis and returns alias.
Shorter checks if the given URL has a short version saved earlier. If not, it saves it into Redis and returns
a short alias for the given URL.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.