postgres

package
v0.0.0-...-c00219f Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package postgres provides a Postgres-specific wrapper around the hesper container library.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithDatabase

func WithDatabase(db string) hesper.Option

func WithHostPort

func WithHostPort(port int) hesper.Option

WithHostPort sets the host port that maps to the container's Postgres port (5432). This is required since the container runtime does not support ephemeral port assignment.

func WithInitScripts

func WithInitScripts(scripts ...string) hesper.Option

func WithPassword

func WithPassword(pass string) hesper.Option

func WithUsername

func WithUsername(user string) hesper.Option

Types

type Container

type Container struct {
	*hesper.Container
	// contains filtered or unexported fields
}

func Run

func Run(ctx context.Context, image string, opts ...hesper.Option) (*Container, error)

func (*Container) ConnectionString

func (c *Container) ConnectionString() (string, error)

func (*Container) MustConnectionString

func (c *Container) MustConnectionString() string

Jump to

Keyboard shortcuts

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