Documentation
¶
Index ¶
- func FetchMetadata(key string) (userid string, url string)
- func RemoveKey(key string) (int64, error)
- func RetreiveAllKeys() ([]string, error)
- func RetreiveKeyCount() (int64, error)
- func RetreiveUserId(shortUrl string) string
- func RetrieveInitialUrl(shortUrl string) string
- func SaveUrlMapping(shortUrl string, originalUrl string, userid string)
- type StorageService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchMetadata ¶
func RetreiveKeyCount ¶
Returns total number of keys in the redis.
func RetreiveUserId ¶
func RetrieveInitialUrl ¶
func SaveUrlMapping ¶
Save URL mapping by taking the shortened url, original url and user id
Types ¶
type StorageService ¶
type StorageService struct {
// contains filtered or unexported fields
}
Raw wrapper
func (*StorageService) GetRedisClient ¶
func (s *StorageService) GetRedisClient() *redis.Client
Returns the Redis client
Click to show internal directories.
Click to hide internal directories.