postgres

package
v0.0.0-...-3b7b480 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package postgres provides a Postgres client for database operations. It initializes the client with the provided configuration and ensures a successful connection to the Postgres server. If the connection fails, it logs the error using the internal logger and returns the error for further handling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGormDB

func NewGormDB(ctx context.Context, cfg config.PostgresConfig) (*gorm.DB, error)

func NewPool

func NewPool(ctx context.Context, cfg config.PostgresConfig) (*pgxpool.Pool, error)

Types

This section is empty.

Directories

Path Synopsis
Package persistence implements the restaurant repository using GORM for PostgreSQL It implements the restaurant.Repository interface defined in the restaurant domain, providing methods for creating, retrieving, updating, and deleting restaurant records in a PostgreSQL database using GORM as the ORM.
Package persistence implements the restaurant repository using GORM for PostgreSQL It implements the restaurant.Repository interface defined in the restaurant domain, providing methods for creating, retrieving, updating, and deleting restaurant records in a PostgreSQL database using GORM as the ORM.

Jump to

Keyboard shortcuts

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