postgres

package
v0.0.0-...-d57715f Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPGEngine

func NewPGEngine(pg DSNProvidor, ping, verbose bool) (engine *xorm.Engine, err error)

NewPGEngine returns db engine of PG

Types

type ConnectInfo

type ConnectInfo struct {
	Host    string `yaml:"host"`
	Port    int    `yaml:"port"`
	User    string `yaml:"user"`
	Passwd  string `yaml:"passwd"`
	DB      string `yaml:"db"`
	Sslmode string `yaml:"sslmode"`
}

func (ConnectInfo) DSN

func (m ConnectInfo) DSN() string

DSN returns PG DataSourceName

type DSNProvidor

type DSNProvidor interface {
	DSN() string
}

DSNProvidor provides DataSourceName

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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