database

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 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 Postgres

type Postgres struct {
	DB *sql.DB
}

Postgres holds the PostgreSQL connection.

func NewPostgres

func NewPostgres(cfg config.Config) (*Postgres, error)

NewPostgres creates a new PostgreSQL connection from config.

func (*Postgres) Close

func (p *Postgres) Close() error

Close closes the database connection.

type Redis

type Redis struct {
	Client *redis.Client
}

Redis holds the Redis client.

func NewRedis

func NewRedis(cfg config.Config) (*Redis, error)

NewRedis creates a new Redis client from config.

func (*Redis) Close

func (r *Redis) Close() error

Close closes the Redis connection.

Jump to

Keyboard shortcuts

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