chartmuseum

package
v0.20.3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Repo

type Repo struct {
	// contains filtered or unexported fields
}

Repo allows to operate a chart repository.

func New

func New(repo *api.Repo, c cache.Cacher, insecure bool) (*Repo, error)

New creates a Repo object from an api.Repo object.

func NewRaw

func NewRaw(u *url.URL, user string, pass string, c cache.Cacher, insecure bool) (*Repo, error)

NewRaw creates a Repo object.

func (*Repo) Fetch

func (r *Repo) Fetch(name string, version string) (string, error)

Fetch downloads a chart from the repo

func (*Repo) GetChartDetails

func (r *Repo) GetChartDetails(name string, version string) (*types.ChartDetails, error)

GetChartDetails returns the details of a chart

func (*Repo) GetUploadURL

func (r *Repo) GetUploadURL() string

GetUploadURL returns the URL to upload a chart

func (*Repo) Has

func (r *Repo) Has(name string, version string) (bool, error)

Has checks if a repo has a specific chart

func (*Repo) List

func (r *Repo) List() ([]string, error)

List lists all chart names in the repo

func (*Repo) ListChartVersions

func (r *Repo) ListChartVersions(name string) ([]string, error)

ListChartVersions lists all versions of a chart

func (*Repo) Reload

func (r *Repo) Reload() error

Reload reloads the index

func (*Repo) Upload

func (r *Repo) Upload(file string, _ *chart.Metadata) error

Upload uploads a chart to the repo.

type RepoTester

type RepoTester struct {
	// contains filtered or unexported fields
}

RepoTester allows to unit test each repo implementation

func NewTester

func NewTester(t *testing.T, repo *api.Repo, emptyIndex bool, indexFile string) *RepoTester

NewTester creates fake HTTP server to handle requests and return a RepoTester object with useful info for testing

func (*RepoTester) GetChart

func (rt *RepoTester) GetChart(w http.ResponseWriter, r *http.Request, chart string)

GetChart returns the chart info from the index

func (*RepoTester) GetChartPackage

func (rt *RepoTester) GetChartPackage(w http.ResponseWriter, r *http.Request, chartPackageName string)

GetChartPackage returns a packaged helm chart

func (*RepoTester) GetIndex

func (rt *RepoTester) GetIndex(w http.ResponseWriter, r *http.Request, emptyIndex bool, indexFile string)

GetIndex returns an index file

func (*RepoTester) GetURL

func (rt *RepoTester) GetURL() string

GetURL returns the URL of the server

func (*RepoTester) PostChart

func (rt *RepoTester) PostChart(w http.ResponseWriter, r *http.Request)

PostChart push a packaged chart

func (*RepoTester) ServeHTTP

func (rt *RepoTester) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP implements the the http Handler type

Jump to

Keyboard shortcuts

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