func (s *RepositoriesService) GetImageDetails(repoName, tag string) ([]VulnerabilityItem, *gorequest.Response, []error) {
	var v []VulnerabilityItem
	resp, _, errs := s.client.
		NewRequest(gorequest.GET, fmt.Sprintf("repositories/%s/tags/%s/vulnerability/details", repoName, tag)).
		EndStruct(&v)
	return v, &resp, errs
}
Get vulnerability details of the image.

Call Clair API to get the vulnerability based on the previous successful scan.

Harbor API docs: https://github.com/vmware/harbor/blob/release-1.4.0/docs/swagger.yaml#L1177
package harbor
import (
	"fmt"
	"github.com/goharbor/harbor/src/common/models"
	"github.com/parnurzeal/gorequest"
	"time"
)
type VulnerabilityItem struct {
	ID          string `json:"id"`
	Severity    int64  `json:"severity"`
	Pkg         string `json:"package"`
	Version     string `json:"version"`
	Description string `json:"description"`
	Link        string `json:"link"`
	Fixed       string `json:"fixedVersion,omitempty"`
}
type RepoResp struct {
	ID           int64     `json:"id"`
	Name         string    `json:"name"`
	ProjectID    int64     `json:"project_id"`
	Description  string    `json:"description"`
	PullCount    int64     `json:"pull_count"`
	StarCount    int64     `json:"star_count"`
	TagsCount    int64     `json:"tags_count"`
	CreationTime time.Time `json:"creation_time"`
	UpdateTime   time.Time `json:"update_time"`
}
type RepoRecord struct {
	*models.RepoRecord
}
type cfg struct {
	Labels map[string]string `json:"labels"`
}
type ComponentsOverview struct {
	Total   int                        `json:"total"`
	Summary []*ComponentsOverviewEntry `json:"summary"`
}
type ComponentsOverviewEntry struct {
	Sev   int `json:"severity"`
	Count int `json:"count"`
}
type ImgScanOverview struct {
	ID              int64               `json:"-"`
	Digest          string              `json:"image_digest"`
	Status          string              `json:"scan_status"`
	JobID           int64               `json:"job_id"`
	Sev             int                 `json:"severity"`
	CompOverviewStr string              `json:"-"`
	CompOverview    *ComponentsOverview `json:"components,omitempty"`
	DetailsKey      string              `json:"details_key"`
	CreationTime    time.Time           `json:"creation_time,omitempty"`
	UpdateTime      time.Time           `json:"update_time,omitempty"`
}
type tagDetail struct {
	Digest        string    `json:"digest"`
	Name          string    `json:"name"`
	Size          int64     `json:"size"`
	Architecture  string    `json:"architecture"`
	OS            string    `json:"os"`
	DockerVersion string    `json:"docker_version"`
	Author        string    `json:"author"`
	Created       time.Time `json:"created"`
	Config        *cfg      `json:"config"`
}
type Signature struct {
	Tag    string            `json:"tag"`
	Hashes map[string][]byte `json:"hashes"`
}
type TagResp struct {
	tagDetail
	Signature    *Signature       `json:"signature"`
	ScanOverview *ImgScanOverview `json:"scan_overview,omitempty"`
}
type RepositoriesService struct {
	client *Client
}
type ListRepositoriesOption struct {
	ListOptions
	ProjectId   int64  `url:"project_id,omitempty" json:"project_id,omitempty"`
	ProjectName string `url:"project_name,omitempty" json:"project_name,omitempty"`
	Q           string `url:"q,omitempty" json:"q,omitempty"`
	Sort        string `url:"sort,omitempty" json:"sort,omitempty"`
}
type ManifestResp struct {
	Manifest interface{} `json:"manifest"`
	Config   interface{} `json:"config,omitempty" `
}
func (s *RepositoriesService) ListRepository(opt *ListRepositoriesOption) ([]RepoRecord, *gorequest.Response, []error) {
	var v []RepoRecord
	resp, _, errs := s.client.
		NewRequest(gorequest.GET, fmt.Sprintf("/projects/%s/repositories", opt.ProjectName)).
		Query(*opt).
		EndStruct(&v)
	return v, &resp, errs
}
func (s *RepositoriesService) DeleteRepository(repoName string) (*gorequest.Response, []error) {
	resp, _, errs := s.client.
		NewRequest(gorequest.DELETE, fmt.Sprintf("repositories/%s", repoName)).
		End()
	return &resp, errs
}
type RepositoryDescription struct {
	Description string `url:"description,omitempty" json:"description,omitempty"`
}
func (s *RepositoriesService) UpdateRepository(repoName string, d RepositoryDescription) (*gorequest.Response, []error) {
	resp, _, errs := s.client.
		NewRequest(gorequest.PUT, fmt.Sprintf("repositories/%s", repoName)).
		Send(d).
		End()
	return &resp, errs
}
func (s *RepositoriesService) GetRepositoryTag(repoName, tag string) (TagResp, *gorequest.Response, []error) {
	var v TagResp
	resp, _, errs := s.client.
		NewRequest(gorequest.GET, fmt.Sprintf("repositories/%s/tags/%s", repoName, tag)).
		EndStruct(&v)
	return v, &resp, errs
}
func (s *RepositoriesService) DeleteRepositoryTag(repoName, tag string) (*gorequest.Response, []error) {
	resp, _, errs := s.client.
		NewRequest(gorequest.DELETE, fmt.Sprintf("repositories/%s/tags/%s", repoName, tag)).
		End()
	return &resp, errs
}
func (s *RepositoriesService) ListRepositoryTags(repoName string) ([]TagResp, *gorequest.Response, []error) {
	var v []TagResp
	resp, _, errs := s.client.
		NewRequest(gorequest.GET, fmt.Sprintf("repositories/%s/tags", repoName)).
		EndStruct(&v)
	return v, &resp, errs
}
func (s *RepositoriesService) GetRepositoryTagManifests(repoName, tag string, version string) (ManifestResp, *gorequest.Response, []error) {
	var v ManifestResp
	resp, _, errs := s.client.
		NewRequest(gorequest.GET, func() string {
			if version == "" {
				return fmt.Sprintf("repositories/%s/tags/%s/manifest", repoName, tag)
			}
			return fmt.Sprintf("repositories/%s/tags/%s/manifest?version=%s", repoName, tag, version)
		}()).
		EndStruct(&v)
	return v, &resp, errs
}
func (s *RepositoriesService) ScanImage(repoName, tag string) (*gorequest.Response, []error) {
	resp, _, errs := s.client.
		NewRequest(gorequest.POST, fmt.Sprintf("repositories/%s/tags/%s/scan", repoName, tag)).
		End()
	return &resp, errs
}