mirror of
https://github.com/foomo/posh-providers.git
synced 2025-10-16 12:35:41 +00:00
38 lines
422 B
Markdown
38 lines
422 B
Markdown
# POSH gotsrpc provider
|
|
|
|
## Usage
|
|
|
|
### Plugin
|
|
|
|
```go
|
|
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
|