mysql

package
v0.0.0-...-23ae872 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SqlN     = " "
	SqlAnd   = " AND "
	SqlOr    = " OR "
	SqlLike  = " LIKE ?"
	SqlEq    = " = ?"
	SqlWhere = " WHERE "
	SqlOrder = " ORDER BY "
	SqlComma = " , "
)

Variables

This section is empty.

Functions

func New

func New(cfg Config, logger *logrus.Logger) (storage.UserService, error)

func NewChats

func NewChats(cfg Config, logger *logrus.Logger) (storage.ChatsService, error)

Types

type Config

type Config struct {
	DSN                  string `env:"DB_DSN,default=root:pass@tcp(localhost:3306)/project"`
	MaxOpenConnections   int    `env:"DB_MAX_OPEN_CONNECTIONS,default=5"`
	DSNro                string `env:"DB_DSN_RO"`
	MaxOpenConnectionsRo int    `env:"DB_RO_MAX_OPEN_CONNECTIONS,default=5"`
	RoDisable            bool   `env:"DB_RO_DISABLE,default=false"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL