postgres

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AccountsTableSchema = `` /* 1264-byte string literal not displayed */

AccountsTableSchema is the SQL schema for the accounts table

Variables

This section is empty.

Functions

func CreateAccountsTable

func CreateAccountsTable(db database.Database) error

CreateAccountsTable creates the accounts table

func New

func New(cfg *Config) (database.Database, error)

New creates a new PostgreSQL database connection

Types

type Config

type Config struct {
	Host     string
	Port     int
	User     string
	Password string
	Database string
	SSLMode  string // disable, require, verify-ca, verify-full
	TimeZone string
	AppName  string
}

Config represents PostgreSQL-specific configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns a Config with sensible defaults

Jump to

Keyboard shortcuts

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