• Stars
    star
    137
  • Rank 266,121 (Top 6 %)
  • Language
    Go
  • License
    MIT License
  • Created over 6 years ago
  • Updated 7 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Harbor API client enabling Go programs to interact with Harbor in a simple and uniform way

go-harbor

A Harbor API client enabling Go programs to interact with Harbor in a simple and uniform way

GitHub license travis codecov

Coverage

This API client package covers most of the existing Harbor API calls and is updated regularly to add new and/or missing endpoints. Currently the following services are supported:

  • Users
  • Projects
  • Repositories
  • Artifacts
  • Jobs
  • Policies
  • Targets
  • SystemInfo
  • LDAP
  • Configurations

Usage

import "github.com/TimeBye/go-harbor"

Some API methods have optional parameters that can be passed. For example, to list all projects for user "haobor":

harborClient, err := harbor.NewClientSet("host", "username", "password")
if err != nil {
    panic(err)
}
query := model.Query{}
projects, err := harborClient.V2.List(&query)

For complete usage of go-harbor, see the full package docs.

ToDo

  • The biggest thing this package still needs is tests 😞

Issues