Documentation ¶
Overview ¶
Package db contains database usage methods.
Index ¶
Constants ¶
View Source
const (
// KeyLen is a number of bytes for random db key.
KeyLen = 64
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Cfg ¶ added in v0.0.2
type Cfg struct { Host string `json:"host"` Port uint `json:"port"` Network string `json:"network"` Db int `json:"db"` Timeout int64 `json:"timeout"` Password string `json:"password"` IndleCon int `json:"indlecon"` MaxCon int `json:"maxcon"` // contains filtered or unexported fields }
Cfg is configuration redis settings.
type Item ¶
type Item struct { Content string TTL int Times int Password string Key string // contains filtered or unexported fields }
Item is data for new saving.
func (*Item) CheckPassword ¶
CheckPassword checks that password is correct.
Click to show internal directories.
Click to hide internal directories.