pqdriver

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultPort       = "5432"
	SSLModeVerifyFull = "verify-full"
	SSLModeDisable    = "disable"
	SSLModeRequire    = "require"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	User         string
	Pass         string
	Host         string
	DatabaseName string
	Port         string
	SSLMode      string
	MaxLifetime  string
	MaxIdleConns string
	MaxOpenConns string
}

Config is a model for connect PosgreSQL

func ConfigEnv

func ConfigEnv() Config

ConfigEnv for create Config by Env

type PostgreSQLDriver

type PostgreSQLDriver interface {
	Connect() *sqlx.DB
}

PostgreSQLDriver is the interface

func New

func New(config Config) PostgreSQLDriver

New for create PostgresSQL driver

Jump to

Keyboard shortcuts

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