Documentation
¶
Index ¶
Constants ¶
View Source
const ( BOLT = "bolt" REDIS = "redis" )
View Source
const KEY_NUMS = "KEY_NUMS"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Database ¶
type Database interface {
Close() error
Len() int64
Store(URL *types.URL) error
GetShort(hashSum string) (URL *types.URL, err error)
GetLong(short string) (URL *types.URL, err error)
}
Database is a KV storage, there are two relationships hashSum -> short & short -> long hashSum is the URL's hashSum
Click to show internal directories.
Click to hide internal directories.