Documentation ¶
Index ¶
Constants ¶
View Source
const ( CreateLink = `INSERT INTO links (original_url, short_code, creator_ip_address) VALUES ($1, $2, $3)` GetLinkByShortCode = `SELECT * from links WHERE short_code = $1` ToggleLinkEnabledState = `UPDATE links SET enabled = NOT enabled, updated_at = NOW() WHERE short_code = $1` UpdateShortendLinkURL = `UPDATE links SET original_url = $1, updated_at = NOW() WHERE short_code = $2` UpdateVisitAndReturnLink = `UPDATE links SET visits = visits + 1 WHERE short_code = $1 RETURNING *` )
Variables ¶
This section is empty.
Functions ¶
func CreateRedisClient ¶
func CreateRedisClient() *redis.Client
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.