modulepackage
0.0.0-20190211052452-df75d3cef842
Repository: https://github.com/ygqbasic/go-harbor.git
Documentation: pkg.go.dev
# README
go-harbor
A Harbor API client enabling Go programs to interact with Harbor in a simple and uniform way
开始
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
- Jobs
- Policies
- Targets
- SystemInfo
- LDAP
- Configurations
Usage
import "github.com/ygqbasic/go-harbor"
Construct a new Harbor client, then use the various services on the client to access different parts of the Harbor API. For example, to list all users:
harborClient := harbor.NewClient(nil, "url","username","password")
statisticMap, _, errs := harborClient.GetStatistics()
Some API methods have optional parameters that can be passed. For example, to list all projects for user "haobor":
harborClient := harbor.NewClient(nil, "url","username","password")
opt := &ListProjectsOptions{Name: "haobor"}
projects, _, err := harborClient.Projects.ListProject(opt)
For complete usage of go-harbor, see the full package docs.
ToDo
- The biggest thing this package still needs is tests :disappointed:
Issues
- If you have an issue: report it on the issue tracker
# Functions
No description provided by the author
# Structs
AccessLog holds information about logs which are used to record the actions that user take to the resourses.
No description provided by the author
ComponentsOverview has the total number and a list of components number of different serverity level.
ComponentsOverviewEntry ...
ImgScanOverview mapped to a record of image scan overview.
LogQueryParam is used to set query conditions when listing access logs.
ListOptions specifies the optional parameters to various List methods that support pagination.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Project holds the details of a project.
ProjectMetadata holds the metadata of a project.
ProjectRequest holds informations that need for creating project API.
ProjectsService handles communication with the user related methods of the Harbor API.
RepoRecord holds the record of an repository in DB, all the infors are from the registry notification event.
No description provided by the author
RepositoriesService handles communication with the user related methods of the Harbor API.
No description provided by the author
Role holds the details of a role.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
User holds the details of a user.
VulnerabilityItem is an item in the vulnerability result returned by vulnerability details API.