helmclassic

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChartVersion added in v0.7.0

type ChartVersion struct {
	Name    string   `json:"name"`
	Version string   `json:"version"`
	URLs    []string `json:"urls"`
}

ChartVersion type

type Metadata added in v0.7.0

type Metadata struct {
	AppVersion string `json:"appVersion"`
	Name       string `json:"name"`
	Version    string `json:"version"`
}

Metadata in Chart.yaml files

type Repo

type Repo struct {

	// NOTE: We need a lock for index to allow concurrency
	Index *repo.IndexFile
	// 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 fetches a chart

func (*Repo) GetChartDetails

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

GetChartDetails returns the details of a chart

func (*Repo) GetDownloadURL

func (r *Repo) GetDownloadURL(n string, v string) (string, error)

GetDownloadURL returns the URL to download a chart

func (*Repo) GetIndexURL

func (r *Repo) GetIndexURL() string

GetIndexURL returns the URL to download the index.yaml

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 a 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(_ string, _ *chart.Metadata) error

Upload uploads a chart to the repo

type RepoTester added in v0.7.0

type RepoTester struct {

	// Set to simulate HTTP error responses for specific API calls.
	ChartsPostError *httpError
	// contains filtered or unexported fields
}

RepoTester allows to unit test each repo implementation

func NewTester added in v0.7.0

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

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

func (*RepoTester) GetChart added in v0.7.0

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

GetChart returns the chart info from the index

func (*RepoTester) GetChartPackage added in v0.7.0

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

GetChartPackage returns a packaged helm chart

func (*RepoTester) GetIndex added in v0.7.0

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

GetIndex returns an index file

func (*RepoTester) GetURL added in v0.7.0

func (rt *RepoTester) GetURL() string

GetURL returns the URL of the server

func (*RepoTester) PostChart added in v0.7.0

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

PostChart push a packaged chart

func (*RepoTester) ServeHTTP added in v0.7.0

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