Categorygithub.com/hchenc/go-harbor
repositorypackage
0.0.3
Repository: https://github.com/hchenc/go-harbor.git
Documentation: pkg.go.dev

# README

go-harbor

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

NOTE

Generated by Harbor V2 swagger

Usage

import (
    "context"
    "fmt"
    harbor2 "github.com/hchenc/go-harbor"
)
ctx := context.WithValue(context.Background(), ContextBasicAuth, BasicAuth{
    UserName: "your username",
    Password: "your password",
})
config := NewConfigurationWithContext("your harbor basePath", ctx)

client := NewAPIClient(config)

projects, resp, err := client.ProjectApi.ListProjects(ctx, &ProjectApiListProjectsOpts{})
defer resp.Body.Close()
fmt.Println(projects, resp, err)

ToDo

  • The biggest thing this package still needs is tests :disappointed:

Issues