postgres

package
v0.0.0-...-4404386 Latest Latest
Warning

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

Go to latest
Published: May 10, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDB

func NewDB(cfg *Config) (*sqlx.DB, error)

func PrepareInstrumentsStmt

func PrepareInstrumentsStmt(ctx context.Context, db *sqlx.DB) (*sql.Stmt, error)

func PrepareStocksStmt

func PrepareStocksStmt(ctx context.Context, db *sqlx.DB) (*sql.Stmt, error)

Types

type Config

type Config struct {
	Host     string
	Port     string
	Username string
	Password string
	DBName   string
	SSLMode  string
}

func NewConfigFromEnv

func NewConfigFromEnv() *Config

func (*Config) Setup

func (c *Config) Setup() *Config

func (*Config) String

func (c *Config) String() string

Jump to

Keyboard shortcuts

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