pgsql

package
v0.0.0-...-a210b3a Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SSLMode         string `mapstructure:"sslmode" yaml:"sslmode"` // disable, allow, prefer, require, verify-ca, verify-full
	SSLRootCert     string `mapstructure:"sslrootcert" yaml:"sslrootcert"`
	Addr            string `mapstructure:"addr" yaml:"addr"`
	Port            uint16 `mapstructure:"port" yaml:"port"`
	Username        string `mapstructure:"username" yaml:"username"`
	Password        string `mapstructure:"password" yaml:"password"`
	DBNames         string `mapstructure:"db_names" yaml:"db_names"`
	MaxOpenConns    int    `mapstructure:"max_open_conns" yaml:"max_open_conns"`
	MaxIdleConns    int    `mapstructure:"max_idle_conns" yaml:"max_idle_conns"`
	ConnMaxLifetime int    `mapstructure:"conn_max_lifetime_sec" yaml:"conn_max_lifetime_sec"`
	PingTimeoutSec  int    `mapstructure:"ping_timeout_sec" yaml:"ping_timeout_sec"`
}

type Module

type Module struct {
	// contains filtered or unexported fields
}

func New

func New(opt ...Options) *Module

func (*Module) Cli

func (m *Module) Cli() *db.DB

func (*Module) Health

func (m *Module) Health() error

func (*Module) Init

func (m *Module) Init(reg framework.Registry) error

func (*Module) Name

func (m *Module) Name() string

func (*Module) Start

func (m *Module) Start(ctx framework.Context) error

func (*Module) Stop

func (m *Module) Stop(ctx framework.Context) error

type Options

type Options func(*Module)

func WithName

func WithName(name string) Options

Jump to

Keyboard shortcuts

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