posh-providers/goharbor/harbor
2025-09-22 10:25:50 +02:00
..
checker.go feat: add gokazi 2025-04-07 16:08:19 +02:00
command.go refactor: add context 2024-05-09 14:11:47 +02:00
config_test.go feat: use json required 2025-09-22 07:05:37 +02:00
config.base.json feat: generate schema 2025-09-19 16:29:28 +02:00
config.go feat: add harbor checker 2023-05-26 14:21:50 +02:00
config.schema.json feat: update schema 2025-09-22 10:25:50 +02:00
harbor.go feat: add harbor checker 2023-05-26 14:21:50 +02:00
README.md docs: simplify docs 2023-12-05 14:10:17 +01:00

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"