Documentation ¶
Index ¶
- Variables
- type Conns
- func (c *Conns) Close()
- func (c *Conns) GetDB() (*sqlx.DB, error)deprecated
- func (c *Conns) GetElastic() (*elasticsearch.Client, error)
- func (c *Conns) GetGoQuConn(nameConn string) (connectors.DBConnector[*goqu.Database, *goqu.TxDatabase], error)
- func (c *Conns) GetKafka() (*kafka.Kafka, error)
- func (c *Conns) GetPGXConnByName(nameConn string) (connectors.DBConnector[dbtypes.PgxConn, dbtypes.PgxTx], error)
- func (c *Conns) GetSQLConn() (connectors.DBConnector[*sqlx.DB, *sqlx.Tx], error)deprecated
- func (c *Conns) GetSQLConnByName(nameConn string) (connectors.DBConnector[*sqlx.DB, *sqlx.Tx], error)
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Conns ¶
type Conns struct {
// contains filtered or unexported fields
}
func NewConns ¶
func NewConns( logger *zap.Logger, elastic *elasticsearch.Client, sqlxPoolDB map[string]*sqlx.DB, pgxPoolDB map[string]*pgxpool.Pool, sqlConns map[string]connectors.DBConnector[*sqlx.DB, *sqlx.Tx], goquConns map[string]connectors.DBConnector[*goqu.Database, *goqu.TxDatabase], pgxConns map[string]connectors.DBConnector[dbtypes.PgxConn, dbtypes.PgxTx], kafka *kafka.Kafka, ) *Conns
func (*Conns) GetElastic ¶
GetElastic возвращает клиент для работы с эластиком
func (*Conns) GetGoQuConn ¶
func (c *Conns) GetGoQuConn(nameConn string) (connectors.DBConnector[*goqu.Database, *goqu.TxDatabase], error)
GetGoQuConn создает слой sql-builder'а для конструирования запросов в БД. Также он умеет делать scan в структуры
func (*Conns) GetPGXConnByName ¶ added in v1.0.7
func (c *Conns) GetPGXConnByName(nameConn string) (connectors.DBConnector[dbtypes.PgxConn, dbtypes.PgxTx], error)
GetPGXConnByName возвращает коннект к бд, если он есть
func (*Conns) GetSQLConn
deprecated
func (c *Conns) GetSQLConn() (connectors.DBConnector[*sqlx.DB, *sqlx.Tx], error)
Deprecated: Use GetSQLConnByName instead
func (*Conns) GetSQLConnByName ¶ added in v1.0.1
func (c *Conns) GetSQLConnByName(nameConn string) (connectors.DBConnector[*sqlx.DB, *sqlx.Tx], error)
GetSQLConnByName возвращает коннект к бд, если он есть
Click to show internal directories.
Click to hide internal directories.