database

package
v0.0.0-...-c01e8ca Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTLSConfig

func BuildTLSConfig(cfg *TLSConfig) (*tls.Config, error)

func NewPostgresClient

func NewPostgresClient(
	host, port, dbname, userName, password string,
	tlsCfg *TLSConfig,
	retryCfg *RetryConfig,
) (*bun.DB, error)

Types

type RetryConfig

type RetryConfig struct {
	MaxRetries int
	Interval   time.Duration
	MaxBackoff time.Duration
}

type TLSConfig

type TLSConfig struct {
	EnableTLS       bool
	CAFile          string
	ClientCertFile  string
	ClientKeyFile   string
	InsecureSkipTLS bool
}

Jump to

Keyboard shortcuts

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