Documentation ¶
Index ¶
- func FetchAndPopulateRedis() error
- func ListenForNewURL(redisClient *redis.Client)
- func ListenForNewUrl(ctx *gin.Context, redisClient *redis.Client)
- func RemoveUrl(shortUrl string) (string, error)
- func SaveUrlMapping(shortUrl, originalUrl, userid string) error
- type DynamoDBEntry
- type DynamoDBService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchAndPopulateRedis ¶
func FetchAndPopulateRedis() error
Fetches data from dynamodb on cold restart and populates data to redis
func ListenForNewURL ¶
func ListenForNewURL(redisClient *redis.Client)
ListenForNewURL listens for new URL added events from Redis and saves to DynamoDB
func ListenForNewUrl ¶
Listens to redis subscription for new push events
func SaveUrlMapping ¶
save url mapping to dynamodb
Types ¶
type DynamoDBEntry ¶
DynamoDBEntry represents the structure of data in DynamoDB
type DynamoDBService ¶
type DynamoDBService struct {
// contains filtered or unexported fields
}
DynamoDB wrapper
func InitializeDynamoDB ¶
func InitializeDynamoDB() *DynamoDBService
Click to show internal directories.
Click to hide internal directories.