posh-providers/postgres
2025-04-09 14:21:20 +02:00
..
command.go fix(postgres): dbname docu and add create 2025-04-09 14:21:20 +02:00
README.md feat(postgres/postgres): add postgres 2024-07-12 16:19:57 +02:00

POSH gotsrpc provider

Usage

Plugin

package plugin

type Plugin struct {
	l        log.Logger
	commands command.Commands
}

func New(l log.Logger) (plugin.Plugin, error) {
	inst := &Plugin{
		l:        l,
		commands: command.Commands{},
	}

	// ...

  inst.commands.Add(postgres.NewCommand(l))

	// ...

	return inst, nil
}

Dependencies

This requires you to have:

  • psql
  • pg_dump
  • pg_restore