Versions in this module Expand all Collapse all v0 v0.1.1 Mar 25, 2020 Changes in this version + func WrapLogrus(log *logrus.Logger) *logger + type Logger interface + Print func(...interface{}) type Postgres + func (p *Postgres) GetChatsRating() ([]model.ChatStatistics, error) + type Redis struct + Pool *redis.Pool + func NewRedis(p *redis.Pool) *Redis + func (r *Redis) LookupForMachine(m *crocodile.Machine) error + func (r *Redis) SaveMachineState(m crocodile.Machine) error + type Storage struct + func NewStorage(conn string, pool *redis.Pool, logger Logger) (*Storage, error) v0.1.0 Jan 13, 2020 Changes in this version + func NewConnString(host, user, pass, dbname string, port int, kw KW) string + type KW map[string]interface + type Postgres struct + func NewPostgres(conn string) (*Postgres, error) + func (p *Postgres) GetGlobalRating() ([]model.UserInChat, error) + func (p *Postgres) GetRating(chatID int64) ([]model.UserInChat, error) + func (p *Postgres) GetStatistics() (model.Statistics, error) + func (p *Postgres) IncrementUserStats(givenUser model.UserInChat) error