postgres

package
v1.20.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Name = "postgres"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enable         bool   `env:"POSTGRES_ENABLE" default:"false" yaml:"enable"`
	Uri            string `env:"POSTGRES_URI" default:"postgres://postgres:postgres@localhost:5432/postgres?sslmode=disable" yaml:"uri"`
	DatabaseName   string `env:"POSTGRES_DATABASE_NAME" default:"" yaml:"databaseName"`
	MigrationsPath string `env:"POSTGRES_MIGRATIONS_PATH" default:"/migrations" yaml:"migrationsPath"`
}

type GolangMigrator

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

func NewGolangMigrator

func NewGolangMigrator(logger *logrus.Entry, migrationsTable string) *GolangMigrator

func (*GolangMigrator) PerformMigrations

func (m *GolangMigrator) PerformMigrations(db *sql.DB, path string, databaseName string) error

type Migrator

type Migrator interface {
	PerformMigrations(db *sql.DB, path string, databaseName string) error
}

type Plugin

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

func New

func New() *Plugin

func (*Plugin) Boot

func (p *Plugin) Boot(conf interface{}, dependencies ...interface{}) plugins.Plugin

func (*Plugin) Close

func (p *Plugin) Close() error

func (*Plugin) DB

func (p *Plugin) DB() *sqlx.DB

func (*Plugin) IsEnabled

func (p *Plugin) IsEnabled() bool

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Start

func (p *Plugin) Start() error

Jump to

Keyboard shortcuts

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