postgres

package
v0.0.0-...-82802e3 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client object gives access to db connection.

func New

func New(lc fx.Lifecycle, log *zap.Logger, cfg *config.Config) (*Client, error)

New return a singleton client object.

func TestClient

func TestClient(t testing.TB) *Client

TestClient ...

func (*Client) Close

func (c *Client) Close()

Close closes db connection.

func (*Client) L

func (c *Client) L() *zap.Logger

L returns prepared logger object.

func (*Client) P

func (c *Client) P() *pgxpool.Pool

P return pool object with opened connection.

Jump to

Keyboard shortcuts

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