mirror of
https://github.com/foomo/posh-providers.git
synced 2025-10-16 12:35:41 +00:00
670 B
670 B
POSH harbor provider
Usage
Plugin
package main
type Plugin struct {
l log.Logger
harbor *harbor.Harbor
commands command.Commands
}
func New(l log.Logger) (plugin.Plugin, error) {
var err error
inst := &Plugin{
l: l,
commands: command.Commands{},
}
// ...
inst.harbor, err = harbor.New(l)
if err != nil {
return nil, errors.Wrap(err, "failed to create harbor")
}
// ...
inst.commands.Add(harbor.New(l, inst.harbor))
// ...
return inst, nil
}
Config
## Harbor
harbor:
url: https://harbor.foomo.org
authUrl: https://harbor.foomo.org/c/oidc/login
project: "foomo"