package main
import (
"context"
"fmt"
"github.com/XuHaoIgeneral/goharbor"
)
const (
username = "admin"
password = "admin"
host = "http://myharbor.company.com"
)
func main() {
// create harbor client
c, err := harbor.NewClient(nil, host, username, password, true)
if err != nil {
panic(err)
}
// list project
ps, err := c.ListProjects(context.Background(), nil)
if err != nil {
panic(err)
}
// dump projects
for _, p := range ps {
fmt.Printf("%+v\n", p)
}
}
-
Notifications
You must be signed in to change notification settings - Fork 1
A harbor api sdk。直接可以进行harbor调用,方便好用,开箱即用那种。
License
XuHaoIgeneral/goharbor
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
A harbor api sdk。直接可以进行harbor调用,方便好用,开箱即用那种。
Topics
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published