Documentation
¶
Overview ¶
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 2.0 * Generated by: Swagger Codegen (https://github.com/swagger-api/swagger-codegen.git)
Index ¶
- Variables
- func CacheExpires(r *http.Response) time.Time
- type APIClient
- type APIKey
- type APIResponse
- type ArtifactApiAddLabelOpts
- type ArtifactApiCopyArtifactOpts
- type ArtifactApiCreateTagOpts
- type ArtifactApiDeleteArtifactOpts
- type ArtifactApiDeleteTagOpts
- type ArtifactApiGetAdditionOpts
- type ArtifactApiGetArtifactOpts
- type ArtifactApiListArtifactsOpts
- type ArtifactApiListTagsOpts
- type ArtifactApiRemoveLabelOpts
- type ArtifactApiService
- func (a *ArtifactApiService) AddLabel(ctx context.Context, body HarborLabel, projectName string, ...) (*http.Response, error)
- func (a *ArtifactApiService) CopyArtifact(ctx context.Context, projectName string, repositoryName string, from string, ...) (*http.Response, error)
- func (a *ArtifactApiService) CreateTag(ctx context.Context, body HarborTag, projectName string, repositoryName string, ...) (*http.Response, error)
- func (a *ArtifactApiService) DeleteArtifact(ctx context.Context, projectName string, repositoryName string, ...) (*http.Response, error)
- func (a *ArtifactApiService) DeleteTag(ctx context.Context, projectName string, repositoryName string, ...) (*http.Response, error)
- func (a *ArtifactApiService) GetAddition(ctx context.Context, projectName string, repositoryName string, ...) (string, *http.Response, error)
- func (a *ArtifactApiService) GetArtifact(ctx context.Context, projectName string, repositoryName string, ...) (HarborArtifact, *http.Response, error)
- func (a *ArtifactApiService) ListArtifacts(ctx context.Context, projectName string, repositoryName string, ...) ([]HarborArtifact, *http.Response, error)
- func (a *ArtifactApiService) ListTags(ctx context.Context, projectName string, repositoryName string, ...) ([]HarborTag, *http.Response, error)
- func (a *ArtifactApiService) RemoveLabel(ctx context.Context, projectName string, repositoryName string, ...) (*http.Response, error)
- type AuditlogApiListAuditLogsOpts
- type AuditlogApiService
- type BasicAuth
- type Configuration
- type GenericSwaggerError
- type HarborAdditionLink
- type HarborArtifact
- type HarborAuditLog
- type HarborCveAllowlist
- type HarborCveAllowlistItem
- type HarborError
- type HarborErrors
- type HarborExecution
- type HarborIcon
- type HarborInstance
- type HarborInstanceCreatedResp
- type HarborInstanceDeletedResp
- type HarborInstanceUpdateResp
- type HarborLabel
- type HarborMetadata
- type HarborMetrics
- type HarborNativeReportSummary
- type HarborPlatform
- type HarborPreheatPolicy
- type HarborProject
- type HarborProjectDeletable
- type HarborProjectMetadata
- type HarborProjectReq
- type HarborProjectSummary
- type HarborProjectSummaryQuota
- type HarborProviderUnderProject
- type HarborReference
- type HarborRegistry
- type HarborRegistryCredential
- type HarborRepository
- type HarborTag
- type HarborTask
- type HarborVulnerabilitySummary
- type IconApiGetIconOpts
- type IconApiService
- type PreheatApiCreateInstanceOpts
- type PreheatApiCreatePolicyOpts
- type PreheatApiDeleteInstanceOpts
- type PreheatApiDeletePolicyOpts
- type PreheatApiGetExecutionOpts
- type PreheatApiGetInstanceOpts
- type PreheatApiGetPolicyOpts
- type PreheatApiGetPreheatLogOpts
- type PreheatApiListExecutionsOpts
- type PreheatApiListInstancesOpts
- type PreheatApiListPoliciesOpts
- type PreheatApiListProvidersOpts
- type PreheatApiListProvidersUnderProjectOpts
- type PreheatApiListTasksOpts
- type PreheatApiManualPreheatOpts
- type PreheatApiPingInstancesOpts
- type PreheatApiService
- func (a *PreheatApiService) CreateInstance(ctx context.Context, body HarborInstance, ...) (HarborInstanceCreatedResp, *http.Response, error)
- func (a *PreheatApiService) CreatePolicy(ctx context.Context, body HarborPreheatPolicy, projectName string, ...) (*http.Response, error)
- func (a *PreheatApiService) DeleteInstance(ctx context.Context, preheatInstanceName string, ...) (HarborInstanceDeletedResp, *http.Response, error)
- func (a *PreheatApiService) DeletePolicy(ctx context.Context, projectName string, preheatPolicyName string, ...) (*http.Response, error)
- func (a *PreheatApiService) GetExecution(ctx context.Context, projectName string, preheatPolicyName string, ...) (HarborExecution, *http.Response, error)
- func (a *PreheatApiService) GetInstance(ctx context.Context, preheatInstanceName string, ...) (HarborInstance, *http.Response, error)
- func (a *PreheatApiService) GetPolicy(ctx context.Context, projectName string, preheatPolicyName string, ...) (HarborPreheatPolicy, *http.Response, error)
- func (a *PreheatApiService) GetPreheatLog(ctx context.Context, projectName string, preheatPolicyName string, ...) (string, *http.Response, error)
- func (a *PreheatApiService) ListExecutions(ctx context.Context, projectName string, preheatPolicyName string, ...) ([]HarborExecution, *http.Response, error)
- func (a *PreheatApiService) ListInstances(ctx context.Context, localVarOptionals *PreheatApiListInstancesOpts) ([]HarborInstance, *http.Response, error)
- func (a *PreheatApiService) ListPolicies(ctx context.Context, projectName string, ...) ([]HarborPreheatPolicy, *http.Response, error)
- func (a *PreheatApiService) ListProviders(ctx context.Context, localVarOptionals *PreheatApiListProvidersOpts) ([]HarborMetadata, *http.Response, error)
- func (a *PreheatApiService) ListProvidersUnderProject(ctx context.Context, projectName string, ...) ([]HarborProviderUnderProject, *http.Response, error)
- func (a *PreheatApiService) ListTasks(ctx context.Context, projectName string, preheatPolicyName string, ...) ([]HarborTask, *http.Response, error)
- func (a *PreheatApiService) ManualPreheat(ctx context.Context, body HarborPreheatPolicy, projectName string, ...) (*http.Response, error)
- func (a *PreheatApiService) PingInstances(ctx context.Context, body HarborInstance, ...) (*http.Response, error)
- func (a *PreheatApiService) StopExecution(ctx context.Context, body HarborExecution, projectName string, ...) (*http.Response, error)
- func (a *PreheatApiService) UpdateInstance(ctx context.Context, body HarborInstance, preheatInstanceName string, ...) (HarborInstanceUpdateResp, *http.Response, error)
- func (a *PreheatApiService) UpdatePolicy(ctx context.Context, body HarborPreheatPolicy, projectName string, ...) (*http.Response, error)
- type PreheatApiStopExecutionOpts
- type PreheatApiUpdateInstanceOpts
- type PreheatApiUpdatePolicyOpts
- type ProjectApiCreateProjectOpts
- type ProjectApiDeleteProjectOpts
- type ProjectApiGetLogsOpts
- type ProjectApiGetProjectDeletableOpts
- type ProjectApiGetProjectOpts
- type ProjectApiGetProjectSummaryOpts
- type ProjectApiHeadProjectOpts
- type ProjectApiListProjectsOpts
- type ProjectApiService
- func (a *ProjectApiService) CreateProject(ctx context.Context, body HarborProjectReq, ...) (*http.Response, error)
- func (a *ProjectApiService) DeleteProject(ctx context.Context, projectId int64, ...) (*http.Response, error)
- func (a *ProjectApiService) GetLogs(ctx context.Context, projectName string, ...) ([]HarborAuditLog, *http.Response, error)
- func (a *ProjectApiService) GetProject(ctx context.Context, projectId int64, ...) (HarborProject, *http.Response, error)
- func (a *ProjectApiService) GetProjectDeletable(ctx context.Context, projectId int64, ...) (HarborProjectDeletable, *http.Response, error)
- func (a *ProjectApiService) GetProjectSummary(ctx context.Context, projectId int64, ...) (HarborProjectSummary, *http.Response, error)
- func (a *ProjectApiService) HeadProject(ctx context.Context, projectName string, ...) (*http.Response, error)
- func (a *ProjectApiService) ListProjects(ctx context.Context, localVarOptionals *ProjectApiListProjectsOpts) ([]HarborProject, *http.Response, error)
- func (a *ProjectApiService) UpdateProject(ctx context.Context, body HarborProjectReq, projectId int64, ...) (*http.Response, error)
- type ProjectApiUpdateProjectOpts
- type RepositoryApiDeleteRepositoryOpts
- type RepositoryApiGetRepositoryOpts
- type RepositoryApiListRepositoriesOpts
- type RepositoryApiService
- func (a *RepositoryApiService) DeleteRepository(ctx context.Context, projectName string, repositoryName string, ...) (*http.Response, error)
- func (a *RepositoryApiService) GetRepository(ctx context.Context, projectName string, repositoryName string, ...) (HarborRepository, *http.Response, error)
- func (a *RepositoryApiService) ListRepositories(ctx context.Context, projectName string, ...) ([]HarborRepository, *http.Response, error)
- func (a *RepositoryApiService) UpdateRepository(ctx context.Context, body HarborRepository, projectName string, ...) (*http.Response, error)
- type RepositoryApiUpdateRepositoryOpts
- type ScanApiGetReportLogOpts
- type ScanApiScanArtifactOpts
- type ScanApiService
Constants ¶
This section is empty.
Variables ¶
var ( // ContextOAuth2 takes a oauth2.TokenSource as authentication for the request. ContextOAuth2 = contextKey("token") // ContextBasicAuth takes BasicAuth as authentication for the request. ContextBasicAuth = contextKey("basic") // ContextAccessToken takes a string oauth2 access token as authentication for the request. ContextAccessToken = contextKey("accesstoken") // ContextAPIKey takes an APIKey as authentication for the request ContextAPIKey = contextKey("apikey") )
Functions ¶
Types ¶
type APIClient ¶
type APIClient struct { ArtifactApi *ArtifactApiService AuditlogApi *AuditlogApiService IconApi *IconApiService PreheatApi *PreheatApiService ProjectApi *ProjectApiService RepositoryApi *RepositoryApiService ScanApi *ScanApiService // contains filtered or unexported fields }
APIClient manages communication with the Harbor API API v2.0 In most cases there should be only one, shared, APIClient.
func NewAPIClient ¶
func NewAPIClient(cfg *Configuration) *APIClient
NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.
func (*APIClient) ChangeBasePath ¶
Change base path to allow switching to mocks
type APIKey ¶
APIKey provides API key based authentication to a request passed via context using ContextAPIKey
type APIResponse ¶
type APIResponse struct { *http.Response `json:"-"` Message string `json:"message,omitempty"` // Operation is the name of the swagger operation. Operation string `json:"operation,omitempty"` // RequestURL is the request URL. This value is always available, even if the // embedded *http.Response is nil. RequestURL string `json:"url,omitempty"` // Method is the HTTP method used for the request. This value is always // available, even if the embedded *http.Response is nil. Method string `json:"method,omitempty"` // Payload holds the contents of the response body (which may be nil or empty). // This is provided here as the raw response.Body() reader will have already // been drained. Payload []byte `json:"-"` }
func NewAPIResponse ¶
func NewAPIResponse(r *http.Response) *APIResponse
func NewAPIResponseWithError ¶
func NewAPIResponseWithError(errorMessage string) *APIResponse
type ArtifactApiAddLabelOpts ¶
type ArtifactApiListTagsOpts ¶
type ArtifactApiService ¶
type ArtifactApiService service
func (*ArtifactApiService) AddLabel ¶
func (a *ArtifactApiService) AddLabel(ctx context.Context, body HarborLabel, projectName string, repositoryName string, reference string, localVarOptionals *ArtifactApiAddLabelOpts) (*http.Response, error)
func (*ArtifactApiService) CopyArtifact ¶
func (a *ArtifactApiService) CopyArtifact(ctx context.Context, projectName string, repositoryName string, from string, localVarOptionals *ArtifactApiCopyArtifactOpts) (*http.Response, error)
func (*ArtifactApiService) DeleteArtifact ¶
func (a *ArtifactApiService) DeleteArtifact(ctx context.Context, projectName string, repositoryName string, reference string, localVarOptionals *ArtifactApiDeleteArtifactOpts) (*http.Response, error)
func (*ArtifactApiService) GetAddition ¶
func (*ArtifactApiService) GetArtifact ¶
func (a *ArtifactApiService) GetArtifact(ctx context.Context, projectName string, repositoryName string, reference string, localVarOptionals *ArtifactApiGetArtifactOpts) (HarborArtifact, *http.Response, error)
func (*ArtifactApiService) ListArtifacts ¶
func (a *ArtifactApiService) ListArtifacts(ctx context.Context, projectName string, repositoryName string, localVarOptionals *ArtifactApiListArtifactsOpts) ([]HarborArtifact, *http.Response, error)
func (*ArtifactApiService) RemoveLabel ¶
type AuditlogApiService ¶
type AuditlogApiService service
func (*AuditlogApiService) ListAuditLogs ¶
func (a *AuditlogApiService) ListAuditLogs(ctx context.Context, localVarOptionals *AuditlogApiListAuditLogsOpts) ([]HarborAuditLog, *http.Response, error)
type BasicAuth ¶
type BasicAuth struct { UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` }
BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth
type Configuration ¶
type Configuration struct { BasePath string `json:"basePath,omitempty"` Host string `json:"host,omitempty"` Scheme string `json:"scheme,omitempty"` DefaultHeader map[string]string `json:"defaultHeader,omitempty"` UserAgent string `json:"userAgent,omitempty"` HTTPClient *http.Client }
func NewConfiguration ¶
func NewConfiguration() *Configuration
func (*Configuration) AddDefaultHeader ¶
func (c *Configuration) AddDefaultHeader(key string, value string)
type GenericSwaggerError ¶
type GenericSwaggerError struct {
// contains filtered or unexported fields
}
GenericSwaggerError Provides access to the body, error and model on returned errors.
func (GenericSwaggerError) Body ¶
func (e GenericSwaggerError) Body() []byte
Body returns the raw bytes of the response
func (GenericSwaggerError) Error ¶
func (e GenericSwaggerError) Error() string
Error returns non-empty string if there was an error.
func (GenericSwaggerError) Model ¶
func (e GenericSwaggerError) Model() interface{}
Model returns the unpacked model of the error
type HarborAdditionLink ¶
type HarborArtifact ¶
type HarborArtifact struct { // The ID of the artifact Id int64 `json:"id,omitempty"` // The type of the artifact, e.g. image, chart, etc Type_ string `json:"type,omitempty"` // The media type of the artifact MediaType string `json:"media_type,omitempty"` // The manifest media type of the artifact ManifestMediaType string `json:"manifest_media_type,omitempty"` // The ID of the project that the artifact belongs to ProjectId int64 `json:"project_id,omitempty"` // The ID of the repository that the artifact belongs to RepositoryId int64 `json:"repository_id,omitempty"` // The digest of the artifact Digest string `json:"digest,omitempty"` // The size of the artifact Size int64 `json:"size,omitempty"` // The digest of the icon Icon string `json:"icon,omitempty"` // The push time of the artifact PushTime time.Time `json:"push_time,omitempty"` // The latest pull time of the artifact PullTime time.Time `json:"pull_time,omitempty"` ExtraAttrs *map[string]interface{} `json:"extra_attrs,omitempty"` Annotations *map[string]string `json:"annotations,omitempty"` References []HarborReference `json:"references,omitempty"` Tags []HarborTag `json:"tags,omitempty"` AdditionLinks *map[string]HarborAdditionLink `json:"addition_links,omitempty"` Labels []HarborLabel `json:"labels,omitempty"` ScanOverview *map[string]HarborNativeReportSummary `json:"scan_overview,omitempty"` }
type HarborAuditLog ¶
type HarborAuditLog struct { // The ID of the audit log entry. Id int32 `json:"id,omitempty"` // Username of the user in this log entry. Username string `json:"username,omitempty"` // Name of the repository in this log entry. Resource string `json:"resource,omitempty"` // Tag of the repository in this log entry. ResourceType string `json:"resource_type,omitempty"` // The operation against the repository in this log entry. Operation string `json:"operation,omitempty"` // The time when this operation is triggered. OpTime time.Time `json:"op_time,omitempty"` }
type HarborCveAllowlist ¶
type HarborCveAllowlist struct { // ID of the allowlist Id int32 `json:"id,omitempty"` // ID of the project which the allowlist belongs to. For system level allowlist this attribute is zero. ProjectId int32 `json:"project_id,omitempty"` // the time for expiration of the allowlist, in the form of seconds since epoch. This is an optional attribute, if it's not set the CVE allowlist does not expire. ExpiresAt int32 `json:"expires_at,omitempty"` Items []HarborCveAllowlistItem `json:"items,omitempty"` // The creation time of the allowlist. CreationTime time.Time `json:"creation_time,omitempty"` // The update time of the allowlist. UpdateTime time.Time `json:"update_time,omitempty"` }
The CVE Allowlist for system or project
type HarborCveAllowlistItem ¶
type HarborCveAllowlistItem struct { // The ID of the CVE, such as \"CVE-2019-10164\" CveId string `json:"cve_id,omitempty"` }
The item in CVE allowlist
type HarborError ¶
type HarborError struct { // The error code Code string `json:"code,omitempty"` // The error message Message string `json:"message,omitempty"` }
a model for all the error response coming from harbor
type HarborErrors ¶
type HarborErrors struct {
Errors []HarborError `json:"errors,omitempty"`
}
The error array that describe the errors got during the handling of request
type HarborExecution ¶
type HarborExecution struct { // The ID of execution Id int32 `json:"id,omitempty"` // The vendor type of execution VendorType string `json:"vendor_type,omitempty"` // The vendor id of execution VendorId int32 `json:"vendor_id,omitempty"` // The status of execution Status string `json:"status,omitempty"` // The status message of execution StatusMessage string `json:"status_message,omitempty"` Metrics *HarborMetrics `json:"metrics,omitempty"` // The trigger of execution Trigger string `json:"trigger,omitempty"` ExtraAttrs *map[string]interface{} `json:"extra_attrs,omitempty"` // The start time of execution StartTime string `json:"start_time,omitempty"` // The end time of execution EndTime string `json:"end_time,omitempty"` }
type HarborIcon ¶
type HarborInstance ¶
type HarborInstance struct { // Unique ID Id int32 `json:"id,omitempty"` // Instance name Name string `json:"name,omitempty"` // Description of instance Description string `json:"description,omitempty"` // Based on which driver, identified by ID Vendor string `json:"vendor,omitempty"` // The service endpoint of this instance Endpoint string `json:"endpoint,omitempty"` // The authentication way supported AuthMode string `json:"auth_mode,omitempty"` // The auth credential data if exists AuthInfo map[string]string `json:"auth_info,omitempty"` // The health status Status string `json:"status,omitempty"` // Whether the instance is activated or not Enabled bool `json:"enabled,omitempty"` // Whether the instance is default or not Default_ bool `json:"default,omitempty"` // Whether the instance endpoint is insecure or not Insecure bool `json:"insecure,omitempty"` // The timestamp of instance setting up SetupTimestamp int64 `json:"setup_timestamp,omitempty"` }
type HarborInstanceCreatedResp ¶
type HarborInstanceCreatedResp struct { // ID of instance created Id int32 `json:"id,omitempty"` }
type HarborInstanceDeletedResp ¶
type HarborInstanceDeletedResp struct { // ID of instance removed Removed int32 `json:"removed,omitempty"` }
type HarborInstanceUpdateResp ¶
type HarborInstanceUpdateResp struct { // ID of instance updated Updated int32 `json:"updated,omitempty"` }
type HarborLabel ¶
type HarborLabel struct { // The ID of the label Id int64 `json:"id,omitempty"` // The name the label Name string `json:"name,omitempty"` // The description the label Description string `json:"description,omitempty"` // The color the label Color string `json:"color,omitempty"` // The scope the label Scope string `json:"scope,omitempty"` // The ID of project that the label belongs to ProjectId int64 `json:"project_id,omitempty"` // The creation time the label CreationTime time.Time `json:"creation_time,omitempty"` // The update time of the label UpdateTime time.Time `json:"update_time,omitempty"` }
type HarborMetadata ¶
type HarborMetadata struct { // id Id string `json:"id,omitempty"` // name Name string `json:"name,omitempty"` // icon Icon string `json:"icon,omitempty"` // maintainers Maintainers []string `json:"maintainers,omitempty"` // version Version string `json:"version,omitempty"` // source Source string `json:"source,omitempty"` }
type HarborMetrics ¶
type HarborMetrics struct { // The count of task TaskCount int32 `json:"task_count,omitempty"` // The count of success task SuccessTaskCount int32 `json:"success_task_count,omitempty"` // The count of error task ErrorTaskCount int32 `json:"error_task_count,omitempty"` // The count of pending task PendingTaskCount int32 `json:"pending_task_count,omitempty"` // The count of running task RunningTaskCount int32 `json:"running_task_count,omitempty"` // The count of scheduled task ScheduledTaskCount int32 `json:"scheduled_task_count,omitempty"` // The count of stopped task StoppedTaskCount int32 `json:"stopped_task_count,omitempty"` }
type HarborNativeReportSummary ¶
type HarborNativeReportSummary struct { // id of the native scan report ReportId string `json:"report_id,omitempty"` // The status of the report generating process ScanStatus string `json:"scan_status,omitempty"` // The overall severity Severity string `json:"severity,omitempty"` // The seconds spent for generating the report Duration int64 `json:"duration,omitempty"` Summary *HarborVulnerabilitySummary `json:"summary,omitempty"` // The start time of the scan process that generating report StartTime time.Time `json:"start_time,omitempty"` // The end time of the scan process that generating report EndTime time.Time `json:"end_time,omitempty"` // The complete percent of the scanning which value is between 0 and 100 CompletePercent int32 `json:"complete_percent,omitempty"` }
The summary for the native report
type HarborPlatform ¶
type HarborPlatform struct { // The architecture that the artifact applys to Architecture string `json:"architecture,omitempty"` // The OS that the artifact applys to Os string `json:"os,omitempty"` // The version of the OS that the artifact applys to OsVersion string `json:"'os.version',omitempty"` // The features of the OS that the artifact applys to OsFeatures []string `json:"'os.features',omitempty"` // The variant of the CPU Variant string `json:"variant,omitempty"` }
type HarborPreheatPolicy ¶
type HarborPreheatPolicy struct { // The ID of preheat policy Id int32 `json:"id,omitempty"` // The Name of preheat policy Name string `json:"name,omitempty"` // The Description of preheat policy Description string `json:"description,omitempty"` // The ID of preheat policy project ProjectId int32 `json:"project_id,omitempty"` // The ID of preheat policy provider ProviderId int32 `json:"provider_id,omitempty"` // The Name of preheat policy provider ProviderName string `json:"provider_name,omitempty"` // The Filters of preheat policy Filters string `json:"filters,omitempty"` // The Trigger of preheat policy Trigger string `json:"trigger,omitempty"` // Whether the preheat policy enabled Enabled bool `json:"enabled,omitempty"` // The Create Time of preheat policy CreationTime time.Time `json:"creation_time,omitempty"` // The Update Time of preheat policy UpdateTime time.Time `json:"update_time,omitempty"` }
type HarborProject ¶
type HarborProject struct { // Project ID ProjectId int32 `json:"project_id,omitempty"` // The owner ID of the project always means the creator of the project. OwnerId int32 `json:"owner_id,omitempty"` // The name of the project. Name string `json:"name,omitempty"` // The ID of referenced registry when the project is a proxy cache project. RegistryId int64 `json:"registry_id,omitempty"` // The creation time of the project. CreationTime time.Time `json:"creation_time,omitempty"` // The update time of the project. UpdateTime time.Time `json:"update_time,omitempty"` // A deletion mark of the project. Deleted bool `json:"deleted,omitempty"` // The owner name of the project. OwnerName string `json:"owner_name,omitempty"` // Correspond to the UI about whether the project's publicity is updatable (for UI) Togglable bool `json:"togglable,omitempty"` // The role ID with highest permission of the current user who triggered the API (for UI). This attribute is deprecated and will be removed in future versions. CurrentUserRoleId int32 `json:"current_user_role_id,omitempty"` // The list of role ID of the current user who triggered the API (for UI) CurrentUserRoleIds []int32 `json:"current_user_role_ids,omitempty"` // The number of the repositories under this project. RepoCount int32 `json:"repo_count,omitempty"` // The total number of charts under this project. ChartCount int32 `json:"chart_count,omitempty"` Metadata *HarborProjectMetadata `json:"metadata,omitempty"` CveAllowlist *HarborCveAllowlist `json:"cve_allowlist,omitempty"` }
type HarborProjectDeletable ¶
type HarborProjectMetadata ¶
type HarborProjectMetadata struct { // The public status of the project. The valid values are \"true\", \"false\". Public string `json:"public,omitempty"` // Whether content trust is enabled or not. If it is enabled, user can't pull unsigned images from this project. The valid values are \"true\", \"false\". EnableContentTrust string `json:"enable_content_trust,omitempty"` // Whether prevent the vulnerable images from running. The valid values are \"true\", \"false\". PreventVul string `json:"prevent_vul,omitempty"` // If the vulnerability is high than severity defined here, the images can't be pulled. The valid values are \"none\", \"low\", \"medium\", \"high\", \"critical\". Severity string `json:"severity,omitempty"` // Whether scan images automatically when pushing. The valid values are \"true\", \"false\". AutoScan string `json:"auto_scan,omitempty"` // Whether this project reuse the system level CVE allowlist as the allowlist of its own. The valid values are \"true\", \"false\". If it is set to \"true\" the actual allowlist associate with this project, if any, will be ignored. ReuseSysCveAllowlist string `json:"reuse_sys_cve_allowlist,omitempty"` // The ID of the tag retention policy for the project RetentionId string `json:"retention_id,omitempty"` }
type HarborProjectReq ¶
type HarborProjectReq struct { // The name of the project. ProjectName string `json:"project_name,omitempty"` // deprecated, reserved for project creation in replication Public bool `json:"public,omitempty"` Metadata *HarborProjectMetadata `json:"metadata,omitempty"` CveAllowlist *HarborCveAllowlist `json:"cve_allowlist,omitempty"` // The storage quota of the project. StorageLimit int64 `json:"storage_limit,omitempty"` // The ID of referenced registry when creating the proxy cache project RegistryId int64 `json:"registry_id,omitempty"` }
type HarborProjectSummary ¶
type HarborProjectSummary struct { // The number of the repositories under this project. RepoCount int32 `json:"repo_count,omitempty"` // The total number of charts under this project. ChartCount int32 `json:"chart_count,omitempty"` // The total number of project admin members. ProjectAdminCount int32 `json:"project_admin_count,omitempty"` // The total number of maintainer members. MaintainerCount int32 `json:"maintainer_count,omitempty"` // The total number of developer members. DeveloperCount int32 `json:"developer_count,omitempty"` // The total number of guest members. GuestCount int32 `json:"guest_count,omitempty"` // The total number of limited guest members. LimitedGuestCount int32 `json:"limited_guest_count,omitempty"` Quota *HarborProjectSummaryQuota `json:"quota,omitempty"` Registry *HarborRegistry `json:"registry,omitempty"` }
type HarborReference ¶
type HarborReference struct { // The parent ID of the reference ParentId int64 `json:"parent_id,omitempty"` // The child ID of the reference ChildId int64 `json:"child_id,omitempty"` // The digest of the child artifact ChildDigest string `json:"child_digest,omitempty"` Platform *HarborPlatform `json:"platform,omitempty"` Annotations *map[string]string `json:"annotations,omitempty"` // The download URLs Urls []string `json:"urls,omitempty"` }
type HarborRegistry ¶
type HarborRegistry struct { // The registry ID. Id int64 `json:"id,omitempty"` // The registry URL string. Url string `json:"url,omitempty"` // The registry name. Name string `json:"name,omitempty"` Credential *HarborRegistryCredential `json:"credential,omitempty"` // Type of the registry, e.g. 'harbor'. Type_ string `json:"type,omitempty"` // Whether or not the certificate will be verified when Harbor tries to access the server. Insecure bool `json:"insecure,omitempty"` // Description of the registry. Description string `json:"description,omitempty"` // Health status of the registry. Status string `json:"status,omitempty"` // The create time of the policy. CreationTime string `json:"creation_time,omitempty"` // The update time of the policy. UpdateTime string `json:"update_time,omitempty"` }
type HarborRegistryCredential ¶
type HarborRegistryCredential struct { // Credential type, such as 'basic', 'oauth'. Type_ string `json:"type,omitempty"` // Access key, e.g. user name when credential type is 'basic'. AccessKey string `json:"access_key,omitempty"` // Access secret, e.g. password when credential type is 'basic'. AccessSecret string `json:"access_secret,omitempty"` }
type HarborRepository ¶
type HarborRepository struct { // The ID of the repository Id int64 `json:"id,omitempty"` // The ID of the project that the repository belongs to ProjectId int64 `json:"project_id,omitempty"` // The name of the repository Name string `json:"name,omitempty"` // The description of the repository Description string `json:"description,omitempty"` // The count of the artifacts inside the repository ArtifactCount int64 `json:"artifact_count,omitempty"` // The count that the artifact inside the repository pulled PullCount int64 `json:"pull_count,omitempty"` // The creation time of the repository CreationTime time.Time `json:"creation_time,omitempty"` // The update time of the repository UpdateTime time.Time `json:"update_time,omitempty"` }
type HarborTag ¶
type HarborTag struct { // The ID of the tag Id int64 `json:"id,omitempty"` // The ID of the repository that the tag belongs to RepositoryId int64 `json:"repository_id,omitempty"` // The ID of the artifact that the tag attached to ArtifactId int64 `json:"artifact_id,omitempty"` // The name of the tag Name string `json:"name,omitempty"` // The push time of the tag PushTime time.Time `json:"push_time,omitempty"` // The latest pull time of the tag PullTime time.Time `json:"pull_time,omitempty"` // The immutable status of the tag Immutable bool `json:"immutable,omitempty"` // The attribute indicates whether the tag is signed or not Signed bool `json:"signed,omitempty"` }
type HarborTask ¶
type HarborTask struct { // The ID of task Id int32 `json:"id,omitempty"` // The ID of task execution ExecutionId int32 `json:"execution_id,omitempty"` // The status of task Status string `json:"status,omitempty"` // The status message of task StatusMessage string `json:"status_message,omitempty"` // The count of task run RunCount int32 `json:"run_count,omitempty"` ExtraAttrs *map[string]interface{} `json:"extra_attrs,omitempty"` // The creation time of task CreationTime string `json:"creation_time,omitempty"` // The update time of task UpdateTime string `json:"update_time,omitempty"` // The start time of task StartTime string `json:"start_time,omitempty"` // The end time of task EndTime string `json:"end_time,omitempty"` }
type HarborVulnerabilitySummary ¶
type HarborVulnerabilitySummary struct { // The total number of the found vulnerabilities Total int32 `json:"total,omitempty"` // The number of the fixable vulnerabilities Fixable int32 `json:"fixable,omitempty"` // Numbers of the vulnerabilities with different severity Summary map[string]int32 `json:"summary,omitempty"` }
VulnerabilitySummary contains the total number of the foun d vulnerabilities number and numbers of each severity level.
type IconApiGetIconOpts ¶
type IconApiService ¶
type IconApiService service
func (*IconApiService) GetIcon ¶
func (a *IconApiService) GetIcon(ctx context.Context, digest string, localVarOptionals *IconApiGetIconOpts) (HarborIcon, *http.Response, error)
type PreheatApiGetPolicyOpts ¶
type PreheatApiListTasksOpts ¶
type PreheatApiService ¶
type PreheatApiService service
func (*PreheatApiService) CreateInstance ¶
func (a *PreheatApiService) CreateInstance(ctx context.Context, body HarborInstance, localVarOptionals *PreheatApiCreateInstanceOpts) (HarborInstanceCreatedResp, *http.Response, error)
func (*PreheatApiService) CreatePolicy ¶
func (a *PreheatApiService) CreatePolicy(ctx context.Context, body HarborPreheatPolicy, projectName string, localVarOptionals *PreheatApiCreatePolicyOpts) (*http.Response, error)
func (*PreheatApiService) DeleteInstance ¶
func (a *PreheatApiService) DeleteInstance(ctx context.Context, preheatInstanceName string, localVarOptionals *PreheatApiDeleteInstanceOpts) (HarborInstanceDeletedResp, *http.Response, error)
func (*PreheatApiService) DeletePolicy ¶
func (a *PreheatApiService) DeletePolicy(ctx context.Context, projectName string, preheatPolicyName string, localVarOptionals *PreheatApiDeletePolicyOpts) (*http.Response, error)
func (*PreheatApiService) GetExecution ¶
func (a *PreheatApiService) GetExecution(ctx context.Context, projectName string, preheatPolicyName string, executionId int32, localVarOptionals *PreheatApiGetExecutionOpts) (HarborExecution, *http.Response, error)
func (*PreheatApiService) GetInstance ¶
func (a *PreheatApiService) GetInstance(ctx context.Context, preheatInstanceName string, localVarOptionals *PreheatApiGetInstanceOpts) (HarborInstance, *http.Response, error)
func (*PreheatApiService) GetPolicy ¶
func (a *PreheatApiService) GetPolicy(ctx context.Context, projectName string, preheatPolicyName string, localVarOptionals *PreheatApiGetPolicyOpts) (HarborPreheatPolicy, *http.Response, error)
func (*PreheatApiService) GetPreheatLog ¶
func (*PreheatApiService) ListExecutions ¶
func (a *PreheatApiService) ListExecutions(ctx context.Context, projectName string, preheatPolicyName string, localVarOptionals *PreheatApiListExecutionsOpts) ([]HarborExecution, *http.Response, error)
func (*PreheatApiService) ListInstances ¶
func (a *PreheatApiService) ListInstances(ctx context.Context, localVarOptionals *PreheatApiListInstancesOpts) ([]HarborInstance, *http.Response, error)
func (*PreheatApiService) ListPolicies ¶
func (a *PreheatApiService) ListPolicies(ctx context.Context, projectName string, localVarOptionals *PreheatApiListPoliciesOpts) ([]HarborPreheatPolicy, *http.Response, error)
func (*PreheatApiService) ListProviders ¶
func (a *PreheatApiService) ListProviders(ctx context.Context, localVarOptionals *PreheatApiListProvidersOpts) ([]HarborMetadata, *http.Response, error)
func (*PreheatApiService) ListProvidersUnderProject ¶
func (a *PreheatApiService) ListProvidersUnderProject(ctx context.Context, projectName string, localVarOptionals *PreheatApiListProvidersUnderProjectOpts) ([]HarborProviderUnderProject, *http.Response, error)
func (*PreheatApiService) ListTasks ¶
func (a *PreheatApiService) ListTasks(ctx context.Context, projectName string, preheatPolicyName string, executionId int32, localVarOptionals *PreheatApiListTasksOpts) ([]HarborTask, *http.Response, error)
func (*PreheatApiService) ManualPreheat ¶
func (a *PreheatApiService) ManualPreheat(ctx context.Context, body HarborPreheatPolicy, projectName string, preheatPolicyName string, localVarOptionals *PreheatApiManualPreheatOpts) (*http.Response, error)
func (*PreheatApiService) PingInstances ¶
func (a *PreheatApiService) PingInstances(ctx context.Context, body HarborInstance, localVarOptionals *PreheatApiPingInstancesOpts) (*http.Response, error)
func (*PreheatApiService) StopExecution ¶
func (a *PreheatApiService) StopExecution(ctx context.Context, body HarborExecution, projectName string, preheatPolicyName string, executionId int32, localVarOptionals *PreheatApiStopExecutionOpts) (*http.Response, error)
func (*PreheatApiService) UpdateInstance ¶
func (a *PreheatApiService) UpdateInstance(ctx context.Context, body HarborInstance, preheatInstanceName string, localVarOptionals *PreheatApiUpdateInstanceOpts) (HarborInstanceUpdateResp, *http.Response, error)
func (*PreheatApiService) UpdatePolicy ¶
func (a *PreheatApiService) UpdatePolicy(ctx context.Context, body HarborPreheatPolicy, projectName string, preheatPolicyName string, localVarOptionals *PreheatApiUpdatePolicyOpts) (*http.Response, error)
type ProjectApiGetLogsOpts ¶
type ProjectApiService ¶
type ProjectApiService service
func (*ProjectApiService) CreateProject ¶
func (a *ProjectApiService) CreateProject(ctx context.Context, body HarborProjectReq, localVarOptionals *ProjectApiCreateProjectOpts) (*http.Response, error)
func (*ProjectApiService) DeleteProject ¶
func (a *ProjectApiService) DeleteProject(ctx context.Context, projectId int64, localVarOptionals *ProjectApiDeleteProjectOpts) (*http.Response, error)
func (*ProjectApiService) GetLogs ¶
func (a *ProjectApiService) GetLogs(ctx context.Context, projectName string, localVarOptionals *ProjectApiGetLogsOpts) ([]HarborAuditLog, *http.Response, error)
func (*ProjectApiService) GetProject ¶
func (a *ProjectApiService) GetProject(ctx context.Context, projectId int64, localVarOptionals *ProjectApiGetProjectOpts) (HarborProject, *http.Response, error)
func (*ProjectApiService) GetProjectDeletable ¶
func (a *ProjectApiService) GetProjectDeletable(ctx context.Context, projectId int64, localVarOptionals *ProjectApiGetProjectDeletableOpts) (HarborProjectDeletable, *http.Response, error)
func (*ProjectApiService) GetProjectSummary ¶
func (a *ProjectApiService) GetProjectSummary(ctx context.Context, projectId int64, localVarOptionals *ProjectApiGetProjectSummaryOpts) (HarborProjectSummary, *http.Response, error)
func (*ProjectApiService) HeadProject ¶
func (a *ProjectApiService) HeadProject(ctx context.Context, projectName string, localVarOptionals *ProjectApiHeadProjectOpts) (*http.Response, error)
func (*ProjectApiService) ListProjects ¶
func (a *ProjectApiService) ListProjects(ctx context.Context, localVarOptionals *ProjectApiListProjectsOpts) ([]HarborProject, *http.Response, error)
func (*ProjectApiService) UpdateProject ¶
func (a *ProjectApiService) UpdateProject(ctx context.Context, body HarborProjectReq, projectId int64, localVarOptionals *ProjectApiUpdateProjectOpts) (*http.Response, error)
type RepositoryApiService ¶
type RepositoryApiService service
func (*RepositoryApiService) DeleteRepository ¶
func (a *RepositoryApiService) DeleteRepository(ctx context.Context, projectName string, repositoryName string, localVarOptionals *RepositoryApiDeleteRepositoryOpts) (*http.Response, error)
func (*RepositoryApiService) GetRepository ¶
func (a *RepositoryApiService) GetRepository(ctx context.Context, projectName string, repositoryName string, localVarOptionals *RepositoryApiGetRepositoryOpts) (HarborRepository, *http.Response, error)
func (*RepositoryApiService) ListRepositories ¶
func (a *RepositoryApiService) ListRepositories(ctx context.Context, projectName string, localVarOptionals *RepositoryApiListRepositoriesOpts) ([]HarborRepository, *http.Response, error)
func (*RepositoryApiService) UpdateRepository ¶
func (a *RepositoryApiService) UpdateRepository(ctx context.Context, body HarborRepository, projectName string, repositoryName string, localVarOptionals *RepositoryApiUpdateRepositoryOpts) (*http.Response, error)
type ScanApiGetReportLogOpts ¶
type ScanApiScanArtifactOpts ¶
type ScanApiService ¶
type ScanApiService service
func (*ScanApiService) GetReportLog ¶
func (*ScanApiService) ScanArtifact ¶
func (a *ScanApiService) ScanArtifact(ctx context.Context, projectName string, repositoryName string, reference string, localVarOptionals *ScanApiScanArtifactOpts) (*http.Response, error)
Source Files
¶
- api_artifact.go
- api_auditlog.go
- api_icon.go
- api_preheat.go
- api_project.go
- api_repository.go
- api_scan.go
- client.go
- configuration.go
- harbor_model_addition_link.go
- harbor_model_artifact.go
- harbor_model_audit_log.go
- harbor_model_cve_allowlist.go
- harbor_model_cve_allowlist_item.go
- harbor_model_error.go
- harbor_model_errors.go
- harbor_model_execution.go
- harbor_model_icon.go
- harbor_model_instance.go
- harbor_model_instance_created_resp.go
- harbor_model_instance_deleted_resp.go
- harbor_model_instance_update_resp.go
- harbor_model_label.go
- harbor_model_metadata.go
- harbor_model_metrics.go
- harbor_model_native_report_summary.go
- harbor_model_platform.go
- harbor_model_preheat_policy.go
- harbor_model_project.go
- harbor_model_project_deletable.go
- harbor_model_project_metadata.go
- harbor_model_project_req.go
- harbor_model_project_summary.go
- harbor_model_project_summary_quota.go
- harbor_model_provider_under_project.go
- harbor_model_reference.go
- harbor_model_registry.go
- harbor_model_registry_credential.go
- harbor_model_repository.go
- harbor_model_tag.go
- harbor_model_task.go
- harbor_model_vulnerability_summary.go
- response.go