postgres

package
v0.46.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: Apache-2.0 Imports: 15 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package postgres contains repository implementations using PostgreSQL as the underlying database.

Index

Constants

This section is empty.

Variables

View Source
var ErrMigrate = errors.New("error executing database migrations")

ErrMigrate indicates error during database migrations.

Functions

func Connect

func Connect(cfg Config) (*sqlx.DB, error)

Connect creates a connection to the PostgreSQL instance and applies any unapplied database migrations. A non-nil error is returned to indicate failure.

func NewRepository

func NewRepository(db dbutil.Database) certs.Repository

Types

type Config

type Config struct {
	Host        string
	Port        string
	User        string
	Pass        string
	Name        string
	SSLMode     string
	SSLCert     string
	SSLKey      string
	SSLRootCert string
}

Config defines the options that are used when connecting to a PostgreSQL instance

type StringArray added in v0.32.1

type StringArray []string

func (*StringArray) Scan added in v0.32.1

func (a *StringArray) Scan(src any) error

func (StringArray) Value added in v0.32.1

func (a StringArray) Value() (driver.Value, error)

Jump to

Keyboard shortcuts

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