database

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PostgresClient

type PostgresClient struct {
	// contains filtered or unexported fields
}

PostgresClient клиент для работы с PostgreSQL

func NewPostgresClient

func NewPostgresClient(cfg config.PostgresConfig) (*PostgresClient, error)

NewPostgresClient создает новый клиент для работы с PostgreSQL

func (*PostgresClient) Close

func (c *PostgresClient) Close()

Close закрывает подключение к базе данных

func (*PostgresClient) GetPool

func (c *PostgresClient) GetPool() *pgxpool.Pool

GetPool возвращает пул подключений

func (*PostgresClient) Ping

func (c *PostgresClient) Ping() error

Ping проверяет подключение к базе данных

type RedisClient

type RedisClient struct {
	// contains filtered or unexported fields
}

RedisClient обертка для клиента Redis

func NewRedisClient

func NewRedisClient(cfg *config.Config) (*RedisClient, error)

NewRedisClient создает новый экземпляр Redis клиента

func (*RedisClient) Close

func (r *RedisClient) Close() error

Close закрывает соединение с Redis

func (*RedisClient) GetClient

func (r *RedisClient) GetClient() *redis.Client

GetClient возвращает экземпляр Redis клиента

Jump to

Keyboard shortcuts

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