postgres

package
v0.0.0-...-264c737 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: Apache-2.0 Imports: 10 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 {
	Host     string `koanf:"host"`
	Port     int    `koanf:"port"`
	User     string `koanf:"user"`
	Password string `koanf:"password"`
	Database string `koanf:"database"`
}

type Postgres

type Postgres struct {
	*sqlx.DB

	Vectors *vectors
	// contains filtered or unexported fields
}

func Open

func Open(cfg *Config, migrations string) (*Postgres, error)

func (*Postgres) MigrateDown

func (r *Postgres) MigrateDown(ctx context.Context) error

func (*Postgres) MigrateUp

func (r *Postgres) MigrateUp(ctx context.Context) error

Jump to

Keyboard shortcuts

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