chartmuseum

package
v0.10.4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2023 License: Apache-2.0 Imports: 11 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*http.Client
	// contains filtered or unexported fields
}

Client is an HTTP client to connect to ChartMuseum

func NewClient

func NewClient(opts ...Option) (*Client, error)

NewClient creates a new client.

func (*Client) DownloadFile added in v0.2.0

func (client *Client) DownloadFile(filePath string) (*http.Response, error)

DownloadFile downloads a file from ChartMuseum

func (*Client) Option

func (client *Client) Option(opts ...Option) *Client

Option configures the client with the provided options.

func (*Client) UploadChartPackage

func (client *Client) UploadChartPackage(chartPackagePath string, force bool) (*http.Response, error)

UploadChartPackage uploads a chart package to ChartMuseum (POST /api/charts)

type Option

type Option func(*options)

Option allows specifying various settings

func AccessToken added in v0.2.0

func AccessToken(accessToken string) Option

AccessToken is sent in the authorization header

func AuthHeader added in v0.3.0

func AuthHeader(authHeader string) Option

AuthHeader is an alternative header to use for token auth

func CAFile added in v0.6.0

func CAFile(caFile string) Option

CAFile specifies the path of CA bundle

func CertFile added in v0.6.0

func CertFile(certFile string) Option

CertFile specifies the path of SSL certificate file

func ContextPath

func ContextPath(contextPath string) Option

ContextPath is the URL prefix for ChartMuseum installation

func InsecureSkipVerify added in v0.6.0

func InsecureSkipVerify(insecureSkipVerify bool) Option

InsecureSkipVerify to indicate if verify the certificate when connecting

func KeyFile added in v0.6.0

func KeyFile(keyFile string) Option

KeyFile specifies the path of SSL key file

func Password

func Password(password string) Option

Password is HTTP basic auth password

func Timeout

func Timeout(timeout int64) Option

Timeout specifies the duration (in seconds) before timing out request

func URL

func URL(url string) Option

URL specifies the chart repo URL

func Username

func Username(username string) Option

Username is HTTP basic auth username

Jump to

Keyboard shortcuts

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