Documentation
¶
Index ¶
- type Access
- type CVEItem
- type CVEWhitelist
- type Harbor
- func (h *Harbor) CreateRobotAccount(projectId int, robotRequest *NewRobotAccountRequest) (*RobotAccount, error)
- func (h *Harbor) DeleteProject(projectId int) error
- func (h *Harbor) DeleteRobotAccount(projectId, robotId int) error
- func (h *Harbor) ExistProject(name string) (bool, error)
- func (h *Harbor) GetRobotAccounts(projectId int) ([]*RobotAccount, error)
- func (h *Harbor) ListProjects() ([]Project, error)
- func (h *Harbor) NewProject(p *NewProjectRequest) error
- func (h *Harbor) SetTransport(t http.RoundTripper)
- type NewProjectRequest
- type NewRobotAccountRequest
- type Project
- type ProjectMetadata
- type RobotAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CVEWhitelist ¶
type CVEWhitelist struct {
Items []CVEItem `json:"items,omitempty"`
}
type Harbor ¶
type Harbor struct {
// contains filtered or unexported fields
}
func (*Harbor) CreateRobotAccount ¶
func (h *Harbor) CreateRobotAccount(projectId int, robotRequest *NewRobotAccountRequest) (*RobotAccount, error)
func (*Harbor) DeleteProject ¶
func (*Harbor) DeleteRobotAccount ¶
func (*Harbor) GetRobotAccounts ¶
func (h *Harbor) GetRobotAccounts(projectId int) ([]*RobotAccount, error)
func (*Harbor) ListProjects ¶
func (*Harbor) NewProject ¶
func (h *Harbor) NewProject(p *NewProjectRequest) error
func (*Harbor) SetTransport ¶
func (h *Harbor) SetTransport(t http.RoundTripper)
type NewProjectRequest ¶
type NewProjectRequest struct { ProjectName string `json:"project_name"` CVEWhitelist CVEWhitelist `json:"cve_whitelist,omitempty"` CountLimit int `json:"count_limit,omitempty"` StorageLimit int `json:"storage_limit,omitempty"` Metadata ProjectMetadata `json:"metadata,omitempty"` }
type NewRobotAccountRequest ¶
type Project ¶
type Project struct { Id int `json:"project_id,omitempty"` OwnerId int `json:"owner_id,omitempty"` Name string `json:"name"` Metadata ProjectMetadata `json:"metadata"` }
type ProjectMetadata ¶
type ProjectMetadata struct { Public string `json:"public,omitempty"` EnableContentTrust string `json:"enable_content_trust,omitempty"` AutoScan string `json:"auto_scan,omitempty"` Severity string `json:"severity,omitempty"` ReuseSysCVEWhitelist string `json:"reuse_sys_cve_whitelist,omitempty"` PreventVUL string `json:"prevent_vul,omitempty"` }
type RobotAccount ¶
type RobotAccount struct { Id int `json:"id,omitempty"` ProjectId int `json:"project_id,omitempty"` Name string `json:"name"` Description string `json:"description,omitempty"` Token string `json:"token,omitempty"` Disabled bool `json:"disabled,omitempty"` ExpiresAt int `json:"expires_at,omitempty"` CreationTime string `json:"creation_time,omitempty"` UpdateTime string `json:"update_time,omitempty"` }
Click to show internal directories.
Click to hide internal directories.