database

package
v0.0.0-...-736cfa7 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPostgresConnection

func NewPostgresConnection(cfg PostgresConfig) (*gorm.DB, error)

NewPostgresConnection establishes a connection to the PostgreSQL database

func NewRedisClient

func NewRedisClient(cfg RedisConfig) (*redis.Client, error)

NewRedisClient creates a new Redis client

Types

type PostgresConfig

type PostgresConfig struct {
	Host     string
	Port     string
	User     string
	Password string
	DBName   string
	SSLMode  string
}

PostgresConfig holds connection information

type RedisConfig

type RedisConfig struct {
	Host     string
	Port     string
	Password string
	DB       int
}

RedisConfig holds redis connection information

Jump to

Keyboard shortcuts

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