Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var GetChartsFromRepoIndexFile = func(repo *models.Repo) ([]*swaggermodels.ChartPackage, error) { u, _ := url.Parse(repo.URL) u.Path = path.Join(u.Path, "index.yaml") // 1 - Download repo index var client http.Client req, err := http.NewRequest("GET", u.String(), nil) if err != nil { return nil, err } req.Header.Set("User-Agent", version.GetUserAgent()) resp, err := client.Do(req) if err != nil { return nil, err } defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) if err != nil { return nil, err } charts, err := helpers.ParseYAMLRepo(body, repo.Name) if err != nil { return nil, err } return charts, nil }
GetRepoIndexFile Get the charts from the index file
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.