Documentation ¶
Index ¶
- type ChartVersion
- type Metadata
- type Repo
- func (r *Repo) Fetch(name string, version string) (string, error)
- func (r *Repo) GetChartDetails(name string, version string) (*types.ChartDetails, error)
- func (r *Repo) GetDownloadURL(n string, v string) (string, error)
- func (r *Repo) GetIndexURL() string
- func (r *Repo) Has(name string, version string) (bool, error)
- func (r *Repo) List() ([]string, error)
- func (r *Repo) ListChartVersions(name string) ([]string, error)
- func (r *Repo) Reload() error
- func (r *Repo) Upload(_ string, _ *chart.Metadata) error
- type RepoTester
- func (rt *RepoTester) GetChart(w http.ResponseWriter, r *http.Request, chart string)
- func (rt *RepoTester) GetChartPackage(w http.ResponseWriter, r *http.Request, chartPackageName string)
- func (rt *RepoTester) GetIndex(w http.ResponseWriter, r *http.Request, emptyIndex bool, indexFile string)
- func (rt *RepoTester) GetURL() string
- func (rt *RepoTester) PostChart(w http.ResponseWriter, r *http.Request)
- func (rt *RepoTester) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChartVersion ¶
type ChartVersion struct { Name string `json:"name"` Version string `json:"version"` URLs []string `json:"urls"` }
ChartVersion type
type Metadata ¶
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 (*Repo) GetChartDetails ¶
GetChartDetails returns the details of a chart
func (*Repo) GetDownloadURL ¶
GetDownloadURL returns the URL to download a chart
func (*Repo) GetIndexURL ¶
GetIndexURL returns the URL to download the index.yaml
func (*Repo) ListChartVersions ¶
ListChartVersions lists all versions of a chart
type RepoTester ¶
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 ¶
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 ¶
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