Documentation ¶
Index ¶
Constants ¶
View Source
const ( // DatabaseName -> Name of the Database DatabaseName = "gme-shorts" // ShortenedCollectionName -> Name of the collection ShortenedCollectionName = "stonks" )
Variables ¶
This section is empty.
Functions ¶
func NewRedisClient ¶
func NewRedisClient(cfg *config.RedisConfig) *redis.Client
NewRedisClient -> Create a new Redis client
Types ¶
type Database ¶
type Database interface { FindShortenedURL(id string) (res *short.ShortURL, err error) SaveShortenedURL(url short.ShortURL) (err error) BreakCache(id string) (found bool) }
Database -> Database Interface
func NewBBoltDatabase ¶
NewBBoltDatabase -> Create new BBoltDatabase
func NewMongoDatabase ¶
NewMongoDatabase -> Create a new MongoDB
Click to show internal directories.
Click to hide internal directories.