Documentation ¶
Index ¶
- func BuildURL(baseURL string, p *hub.Package, version string) string
- type Handlers
- func (h *Handlers) Get(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetChangeLog(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetHarborReplicationDump(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetRandom(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetSnapshotSecurityReport(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetStarredByUser(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetStars(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetStats(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetValuesSchema(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) InjectIndexMeta(next http.Handler) http.Handler
- func (h *Handlers) RssFeed(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Search(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) SearchMonocular(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) ToggleStar(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handlers ¶
type Handlers struct {
// contains filtered or unexported fields
}
Handlers represents a group of http handlers in charge of handling packages operations.
func NewHandlers ¶
func NewHandlers(pkgManager hub.PackageManager, cfg *viper.Viper) *Handlers
NewHandlers creates a new Handlers instance.
func (*Handlers) Get ¶
func (h *Handlers) Get(w http.ResponseWriter, r *http.Request)
Get is an http handler used to get a package details.
func (*Handlers) GetChangeLog ¶ added in v0.9.0
func (h *Handlers) GetChangeLog(w http.ResponseWriter, r *http.Request)
GetChangeLog is an http handler used to get a package's changelog.
func (*Handlers) GetHarborReplicationDump ¶ added in v0.13.0
func (h *Handlers) GetHarborReplicationDump(w http.ResponseWriter, r *http.Request)
GetHarborReplicationDump is an http handler used to get a summary of all available packages versions of kind Helm in the hub database so that they can be synchronized in Harbor.
func (*Handlers) GetRandom ¶ added in v0.3.0
func (h *Handlers) GetRandom(w http.ResponseWriter, r *http.Request)
GetRandom is an http handler used to get some random packages from the hub database.
func (*Handlers) GetSnapshotSecurityReport ¶ added in v0.7.0
func (h *Handlers) GetSnapshotSecurityReport(w http.ResponseWriter, r *http.Request)
GetSnapshotSecurityReport is an http handler used to get the security report of a package's snapshot.
func (*Handlers) GetStarredByUser ¶
func (h *Handlers) GetStarredByUser(w http.ResponseWriter, r *http.Request)
GetStarredByUser is an http handler used to get the packages starred by the user doing the request.
func (*Handlers) GetStars ¶
func (h *Handlers) GetStars(w http.ResponseWriter, r *http.Request)
GetStars is an http handler used to get the number of stars of the package provided.
func (*Handlers) GetStats ¶
func (h *Handlers) GetStats(w http.ResponseWriter, r *http.Request)
GetStats is an http handler used to get some stats about packages registered in the hub database.
func (*Handlers) GetValuesSchema ¶ added in v0.8.0
func (h *Handlers) GetValuesSchema(w http.ResponseWriter, r *http.Request)
GetValuesSchema is an http handler used to get the values schema of a package's snapshot.
func (*Handlers) InjectIndexMeta ¶
InjectIndexMeta is a middleware that injects the some index metadata related to a given package,
func (*Handlers) RssFeed ¶ added in v0.3.0
func (h *Handlers) RssFeed(w http.ResponseWriter, r *http.Request)
RssFeed is an http handler used to get the RSS feed of a given package.
func (*Handlers) Search ¶
func (h *Handlers) Search(w http.ResponseWriter, r *http.Request)
Search is an http handler used to search for packages in the hub database.
func (*Handlers) SearchMonocular ¶ added in v0.5.0
func (h *Handlers) SearchMonocular(w http.ResponseWriter, r *http.Request)
SearchMonocular is an http handler used to search for packages in the hub database that is compatible with the Monocular search API.
func (*Handlers) ToggleStar ¶
func (h *Handlers) ToggleStar(w http.ResponseWriter, r *http.Request)
ToggleStar is an http handler used to toggle the star on a given package.