Documentation ¶
Overview ¶
Package storage wraps access to the persistence layer.
Package storage is a wrapper package designed to simplify utilization of the MongoDB Go driver. It creates an interface that facilitates access to Get, Save, and Info functions related to the database storage and retrieval of shortened urls.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveURL ¶
SaveURL accepts a single url parameter and returns a string containing the encoded version of the url that has been saved in the database.
func SetStorage ¶
func SetStorage(s Storage)
SetStorage is a function that accepts a single parameter of type Storage and assigns the repository type to the received variable param
Types ¶
Directories ¶
Path | Synopsis |
---|---|
Package mongodb is an example MongoDB client implementation written in Go This package extends a Repository metaphor which wraps access methods for the MongoDB database and collections that are used in the example.
|
Package mongodb is an example MongoDB client implementation written in Go This package extends a Repository metaphor which wraps access methods for the MongoDB database and collections that are used in the example. |
Click to show internal directories.
Click to hide internal directories.