mirror of
https://github.com/foomo/posh-providers.git
synced 2025-10-16 12:35:41 +00:00
| .. | ||
| command.go | ||
| config_test.go | ||
| config.go | ||
| config.schema.json | ||
| README.md | ||
POSH sqlc provider
Usage
Plugin
package plugin
type Plugin struct {
l log.Logger
cache cache.Cache
commands command.Commands
}
func New(l log.Logger) (plugin.Plugin, error) {
inst := &Plugin{
l: l,
commands: command.Commands{},
}
// ...
inst.commands.MustAdd(sqlc.NewCommand(l, inst.cache))
// ...
return inst, nil
}
Config
To install binary locally, add:
sqlc:
tempDir: .posh/tmp/sqlc
cacheDirDir: .posh/cache/sqlc
Ownbrew
To install binary locally, add:
ownbrew:
packages:
- name: sqlc
tap: foomo/tap/sqlc-dev/sqlc
version: 1.28.0