Documentation ¶
Overview ¶
* Harbor API * * These APIs provide services for manipulating Harbor project. * * API version: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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: 1.0.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 BasicAuth
- type ChartRepositoryApiService
- func (a *ChartRepositoryApiService) ChartrepoChartsPost(ctx context.Context, chart *os.File) (*http.Response, error)
- func (a *ChartRepositoryApiService) ChartrepoHealthGet(ctx context.Context) (HarborInlineResponse2001, *http.Response, error)
- func (a *ChartRepositoryApiService) ChartrepoRepoChartsGet(ctx context.Context, repo string) ([]HarborChartInfoEntry, *http.Response, error)
- func (a *ChartRepositoryApiService) ChartrepoRepoChartsNameDelete(ctx context.Context, repo string, name string) (*http.Response, error)
- func (a *ChartRepositoryApiService) ChartrepoRepoChartsNameGet(ctx context.Context, repo string, name string) ([]HarborChartVersion, *http.Response, error)
- func (a *ChartRepositoryApiService) ChartrepoRepoChartsNameVersionDelete(ctx context.Context, repo string, name string, version string) (*http.Response, error)
- func (a *ChartRepositoryApiService) ChartrepoRepoChartsNameVersionGet(ctx context.Context, repo string, name string, version string) (HarborChartVersionDetails, *http.Response, error)
- func (a *ChartRepositoryApiService) ChartrepoRepoChartsPost(ctx context.Context, chart *os.File, repo string) (*http.Response, error)
- func (a *ChartRepositoryApiService) ChartrepoRepoProvPost(ctx context.Context, prov *os.File, repo string) (*http.Response, error)
- type Configuration
- type GenericSwaggerError
- type HarborBody
- type HarborBody1
- type HarborBody2
- type HarborChartApiError
- type HarborChartInfoEntry
- type HarborChartMetadata
- type HarborChartVersion
- type HarborChartVersionDetails
- type HarborDependency
- type HarborDigitalSignature
- type HarborForbiddenChartApiError
- type HarborInlineResponse200
- type HarborInlineResponse2001
- type HarborInsufficientStorageChartApiError
- type HarborInternalChartApiError
- type HarborLabel
- type HarborNotFoundChartApiError
- type HarborSecurityReport
- type HarborUnauthorizedChartApiError
- type VersionApiService
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 { ChartRepositoryApi *ChartRepositoryApiService VersionApi *VersionApiService // contains filtered or unexported fields }
APIClient manages communication with the Harbor API API v1.0.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 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 ChartRepositoryApiService ¶
type ChartRepositoryApiService service
func (*ChartRepositoryApiService) ChartrepoChartsPost ¶
func (a *ChartRepositoryApiService) ChartrepoChartsPost(ctx context.Context, chart *os.File) (*http.Response, error)
ChartRepositoryApiService Upload a chart file to the defult 'library' project. Upload a chart file to the default 'library' project. Uploading together with the prov file at the same time is also supported.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param chart
func (*ChartRepositoryApiService) ChartrepoHealthGet ¶
func (a *ChartRepositoryApiService) ChartrepoHealthGet(ctx context.Context) (HarborInlineResponse2001, *http.Response, error)
ChartRepositoryApiService Check the health of chart repository service. Check the health of chart repository service.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return HarborInlineResponse2001
func (*ChartRepositoryApiService) ChartrepoRepoChartsGet ¶
func (a *ChartRepositoryApiService) ChartrepoRepoChartsGet(ctx context.Context, repo string) ([]HarborChartInfoEntry, *http.Response, error)
ChartRepositoryApiService Get all the charts under the specified project Get all the charts under the specified project
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param repo The project name
@return []HarborChartInfoEntry
func (*ChartRepositoryApiService) ChartrepoRepoChartsNameDelete ¶
func (a *ChartRepositoryApiService) ChartrepoRepoChartsNameDelete(ctx context.Context, repo string, name string) (*http.Response, error)
ChartRepositoryApiService Delete all the versions of the specified chart Delete all the versions of the specified chart
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param repo The project name
- @param name The chart name
func (*ChartRepositoryApiService) ChartrepoRepoChartsNameGet ¶
func (a *ChartRepositoryApiService) ChartrepoRepoChartsNameGet(ctx context.Context, repo string, name string) ([]HarborChartVersion, *http.Response, error)
ChartRepositoryApiService Get all the versions of the specified chart Get all the versions of the specified chart
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param repo The project name
- @param name The chart name
@return []HarborChartVersion
func (*ChartRepositoryApiService) ChartrepoRepoChartsNameVersionDelete ¶
func (a *ChartRepositoryApiService) ChartrepoRepoChartsNameVersionDelete(ctx context.Context, repo string, name string, version string) (*http.Response, error)
ChartRepositoryApiService Delete the specified chart version Delete the specified chart version
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param repo The project name
- @param name The chart name
- @param version The chart version
func (*ChartRepositoryApiService) ChartrepoRepoChartsNameVersionGet ¶
func (a *ChartRepositoryApiService) ChartrepoRepoChartsNameVersionGet(ctx context.Context, repo string, name string, version string) (HarborChartVersionDetails, *http.Response, error)
ChartRepositoryApiService Get the specified chart version Get the specified chart version
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param repo The project name
- @param name The chart name
- @param version The chart version
@return HarborChartVersionDetails
func (*ChartRepositoryApiService) ChartrepoRepoChartsPost ¶
func (a *ChartRepositoryApiService) ChartrepoRepoChartsPost(ctx context.Context, chart *os.File, repo string) (*http.Response, error)
ChartRepositoryApiService Upload a chart file to the specified project. Upload a chart file to the specified project. With this API, the corresponding provance file can be uploaded together with chart file at once.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param chart
- @param repo The project name
func (*ChartRepositoryApiService) ChartrepoRepoProvPost ¶
func (a *ChartRepositoryApiService) ChartrepoRepoProvPost(ctx context.Context, prov *os.File, repo string) (*http.Response, error)
ChartRepositoryApiService Upload a provance file to the specified project. Upload a provance file to the specified project. The provance file should be targeted for an existing chart file.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
- @param prov
- @param repo The project name
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 HarborBody ¶
type HarborBody1 ¶
type HarborBody2 ¶
type HarborChartApiError ¶
type HarborChartApiError struct { // The error message returned by the chart API Error_ string `json:"error"` }
The error object returned by chart repository API
type HarborChartInfoEntry ¶
type HarborChartInfoEntry struct { // Name of chart Name string `json:"name"` // Total count of chart versions TotalVersions int32 `json:"total_versions"` // latest version of chart LatestVersion string `json:"latest_version,omitempty"` // The created time of chart Created string `json:"created"` // The created time of chart Updated string `json:"updated,omitempty"` // The icon path of chart Icon string `json:"icon,omitempty"` // The home website of chart Home string `json:"home,omitempty"` // Flag to indicate if the chart is deprecated Deprecated bool `json:"deprecated,omitempty"` }
The object contains basic chart information
type HarborChartMetadata ¶
type HarborChartMetadata struct { // The name of the chart Name string `json:"name"` // The URL to the relevant project page Home string `json:"home,omitempty"` // The URL to the source code of chart Sources []string `json:"sources,omitempty"` // A SemVer 2 version of chart Version string `json:"version"` // A one-sentence description of chart Description string `json:"description,omitempty"` // A list of string keywords Keywords []string `json:"keywords,omitempty"` // The name of template engine Engine string `json:"engine"` // The URL to an icon file Icon string `json:"icon"` // The API version of this chart ApiVersion string `json:"apiVersion"` // The version of the application enclosed in the chart AppVersion string `json:"appVersion"` // Whether or not this chart is deprecated Deprecated bool `json:"deprecated,omitempty"` }
The metadata of chart version
type HarborChartVersion ¶
type HarborChartVersion struct { // The name of the chart Name string `json:"name"` // The URL to the relevant project page Home string `json:"home,omitempty"` // The URL to the source code of chart Sources []string `json:"sources,omitempty"` // A SemVer 2 version of chart Version string `json:"version"` // A one-sentence description of chart Description string `json:"description,omitempty"` // A list of string keywords Keywords []string `json:"keywords,omitempty"` // The name of template engine Engine string `json:"engine"` // The URL to an icon file Icon string `json:"icon"` // The API version of this chart ApiVersion string `json:"apiVersion"` // The version of the application enclosed in the chart AppVersion string `json:"appVersion"` // Whether or not this chart is deprecated Deprecated bool `json:"deprecated,omitempty"` // The created time of the chart entry Created string `json:"created,omitempty"` // A flag to indicate if the chart entry is removed Removed bool `json:"removed,omitempty"` // The digest value of the chart entry Digest string `json:"digest,omitempty"` // The urls of the chart entry Urls []string `json:"urls,omitempty"` Labels *[]HarborLabel `json:"labels,omitempty"` }
A specified chart entry
type HarborChartVersionDetails ¶
type HarborChartVersionDetails struct { Metadata *HarborChartVersion `json:"metadata,omitempty"` Security *HarborSecurityReport `json:"security,omitempty"` Dependencies []HarborDependency `json:"dependencies,omitempty"` Values map[string]interface{} `json:"values,omitempty"` Files map[string]string `json:"files,omitempty"` Labels *[]HarborLabel `json:"labels,omitempty"` }
The detailed information of the chart entry
type HarborDependency ¶
type HarborDependency struct { // The name of the chart denpendency Name string `json:"name"` // The version of the chart dependency Version string `json:"version"` // The URL to the repository Repository string `json:"repository,omitempty"` }
Another chart the chart depends on
type HarborDigitalSignature ¶
type HarborDigitalSignature struct { // A flag to indicate if the chart is signed Signed bool `json:"signed,omitempty"` // The URL of the provance file ProvFile string `json:"prov_file,omitempty"` }
The signature of the chart
type HarborForbiddenChartApiError ¶
type HarborForbiddenChartApiError struct { // The error message returned by the chart API Error_ string `json:"error"` }
Operation is forbidden or quota exceeded
type HarborInlineResponse200 ¶
type HarborInlineResponse200 struct {
Version string `json:"version,omitempty"`
}
type HarborInlineResponse2001 ¶
type HarborInlineResponse2001 struct {
Healthy bool `json:"healthy,omitempty"`
}
type HarborInsufficientStorageChartApiError ¶
type HarborInsufficientStorageChartApiError struct { // The error message returned by the chart API Error_ string `json:"error"` }
Insufficient storage
type HarborInternalChartApiError ¶
type HarborInternalChartApiError struct { // The error message returned by the chart API Error_ string `json:"error"` }
Internal server error occurred
type HarborLabel ¶
type HarborLabel struct { // The ID of label. Id int32 `json:"id,omitempty"` // The name of label. Name string `json:"name,omitempty"` // The description of label. Description string `json:"description,omitempty"` // The color of label. Color string `json:"color,omitempty"` // The scope of label, g for global labels and p for project labels. Scope string `json:"scope,omitempty"` // The project ID if the label is a project label. ProjectId int32 `json:"project_id,omitempty"` // The creation time of label. CreationTime string `json:"creation_time,omitempty"` // The update time of label. UpdateTime string `json:"update_time,omitempty"` // The label is deleted or not. Deleted bool `json:"deleted,omitempty"` }
type HarborNotFoundChartApiError ¶
type HarborNotFoundChartApiError struct { // The error message returned by the chart API Error_ string `json:"error"` }
Not found
type HarborSecurityReport ¶
type HarborSecurityReport struct {
Signature *HarborDigitalSignature `json:"signature,omitempty"`
}
The security information of the chart
type HarborUnauthorizedChartApiError ¶
type HarborUnauthorizedChartApiError struct { string `json:"error"` }Error_
Unauthorized
type VersionApiService ¶
type VersionApiService service
func (*VersionApiService) VersionGet ¶
func (a *VersionApiService) VersionGet(ctx context.Context) (HarborInlineResponse200, *http.Response, error)
VersionApiService Get API version Get the version of API that supported by the Harbor instance.
- @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
@return HarborInlineResponse200
Source Files ¶
- api_chart_repository.go
- api_version.go
- client.go
- configuration.go
- harbor_model_body.go
- harbor_model_body_1.go
- harbor_model_body_2.go
- harbor_model_chart_api_error.go
- harbor_model_chart_info_entry.go
- harbor_model_chart_metadata.go
- harbor_model_chart_version.go
- harbor_model_chart_version_details.go
- harbor_model_dependency.go
- harbor_model_digital_signature.go
- harbor_model_forbidden_chart_api_error.go
- harbor_model_inline_response_200.go
- harbor_model_inline_response_200_1.go
- harbor_model_insufficient_storage_chart_api_error.go
- harbor_model_internal_chart_api_error.go
- harbor_model_label.go
- harbor_model_not_found_chart_api_error.go
- harbor_model_security_report.go
- harbor_model_unauthorized_chart_api_error.go
- response.go