go library for chartmuseum
- 🌈 Wrap the chartmuseum api as a go library.
- 📦 Plain and simple error handling.
- 🛡 Perfect test cases.
Helm Chart Repository
-
GET /index.yaml
- retrieved when you runhelm repo add chartmuseum http://localhost:8080/
-
GET /charts/mychart-0.1.0.tgz
retrieved when you runhelm install chartmuseum/mychart
-
GET /charts/mychart-0.1.0.tgz.prov
- retrieved when you runhelm install
with the--verify flag
Chart Manipulation
-
POST /api/charts
- upload a new chart version -
POST /api/prov
- upload a new provenance file -
DELETE /api/charts/<name>/<version>
- delete a chart version (and corresponding provenance file) -
GET /api/charts
- list all charts -
GET /api/charts/<name>
- list all versions of a chart -
GET /api/charts/<name>/<version>
- describe a chart version -
HEAD /api/charts/<name>
- check if chart exists (any versions) -
HEAD /api/charts/<name>/<version>
- check if chart version exists
Server Info
-
GET /
- HTML welcome page -
GET /info
- returns current ChartMuseum version -
GET /health
- returns 200 OK
go get github.com/yidaqiang/go-chartmuseum
package main
import (
"fmt"
"github.com/yidaqiang/go-chartmuseum"
)
const (
chartmuseumServer = "https://chart.example.com"
chartRepo = "test/repo"
username = "admin"
password = "password"
)
func main() {
client, err := chartmuseum.NewBasicAuthClient(username, password, chartmuseum.WithBaseURL(chartmuseumServer))
if err != nil {
fmt.Error(err)
}
charts, _, err := client.Charts.ListCharts(chartRepo)
if err != nil {
return
}
fmt.Printf("found %d charts", len(*charts))
}
clone locally:
$ git clone [email protected]:yidaqiang/go-chartmuseum.git
$ cd go-chartmuseum
$ go mod tidy
Read our contributing guide and let's build a better antd together.
We welcome all contributions. Please read our CONTRIBUTING.md first. You can submit any ideas as pull requests or as GitHub issues. If you'd like to improve code, check out the Development Instructions and have a good time! :)
If you are a collaborator, please follow our Pull Request principle to create a Pull Request with collaborator template.