helmClient

package
v1.9.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2022 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause, + 8 more Imports: 20 Imported by: 0

README

Go API client for helmClient

These APIs provide services for manipulating Harbor project.

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.go.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

import "./helmClient"

Documentation for API Endpoints

All URIs are relative to http://localhost/api/

Class Method HTTP request Description
ChartRepositoryApi ChartrepoChartsPost Post /chartrepo/charts Upload a chart file to the defult 'library' project.
ChartRepositoryApi ChartrepoHealthGet Get /chartrepo/health Check the health of chart repository service.
ChartRepositoryApi ChartrepoRepoChartsGet Get /chartrepo/{repo}/charts Get all the charts under the specified project
ChartRepositoryApi ChartrepoRepoChartsNameDelete Delete /chartrepo/{repo}/charts/{name} Delete all the versions of the specified chart
ChartRepositoryApi ChartrepoRepoChartsNameGet Get /chartrepo/{repo}/charts/{name} Get all the versions of the specified chart
ChartRepositoryApi ChartrepoRepoChartsNameVersionDelete Delete /chartrepo/{repo}/charts/{name}/{version} Delete the specified chart version
ChartRepositoryApi ChartrepoRepoChartsNameVersionGet Get /chartrepo/{repo}/charts/{name}/{version} Get the specified chart version
ChartRepositoryApi ChartrepoRepoChartsPost Post /chartrepo/{repo}/charts Upload a chart file to the specified project.
ChartRepositoryApi ChartrepoRepoProvPost Post /chartrepo/{repo}/prov Upload a provance file to the specified project.
VersionApi VersionGet Get /version Get API version

Documentation For Models

Documentation For Authorization

basicAuth

  • Type: HTTP basic authentication

Example

auth := context.WithValue(context.Background(), sw.ContextBasicAuth, sw.BasicAuth{
	UserName: "username",
	Password: "password",
})
r, err := client.Service.Operation(auth, args)

Author

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

Constants

This section is empty.

Variables

View Source
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

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

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

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

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

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 HarborBody struct {
	// The chart file
	Chart **os.File `json:"chart"`
}

type HarborBody1

type HarborBody1 struct {
	// The provance file
	Prov **os.File `json:"prov"`
}

type HarborBody2

type HarborBody2 struct {
	// The chart file
	Chart **os.File `json:"chart"`
}

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 {
	// The error message returned by the chart API
	Error_ string `json:"error"`
}

Unauthorized

type VersionApiService

type VersionApiService service

func (*VersionApiService) VersionGet

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL