database

package
v3.10.66 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidDSNAddr      = errors.New("invalid dsn addr")
	ErrInvalidDSNUnescaped = errors.New("dsn must be escaped")
	ErrInvalidDSNNoSlash   = errors.New("dsn must contains slash")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	TLSConfig *tls.Config
	Username  string
	Password  string
	Scheme    string
	Host      string
	Port      string
	Database  string
	Params    []string
}

func ParseDSN

func ParseDSN(dsn string) (*Config, error)

func (*Config) FormatDSN added in v3.10.31

func (cfg *Config) FormatDSN() string

Jump to

Keyboard shortcuts

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