Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Storage ¶
type Storage interface { Write(short string, long string) error Delete(short string) error Read(short string) (string, error) }
Storage interface is the contract that a struct should meet in order to be used as storage for the API
type StorageDB ¶
type StorageDB struct {
// contains filtered or unexported fields
}
StorageDB implements Storage interface and it is used to save URL in a real key/value db
func NewStorageDB ¶
NewStorageDB create a new instance of the db
Click to show internal directories.
Click to hide internal directories.