Documentation ¶
Index ¶
- func BuildURL(baseURL string, p *hub.Package, version string) string
- type Handlers
- func (h *Handlers) AddProductionUsage(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) DeleteProductionUsage(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GenerateChangelogMD(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) Get(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetChangelog(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetChartTemplates(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetChartValues(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetHarborReplicationDump(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetHelmExporterDump(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetNovaDump(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetProductionUsage(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) GetSummary(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetValuesSchema(w http.ResponseWriter, r *http.Request)
- func (h *Handlers) GetViews(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)
- func (h *Handlers) TrackView(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, repoManager hub.RepositoryManager, cfg *viper.Viper, hc hub.HTTPClient, op hub.OCIPuller, vt hub.ViewsTracker, ) *Handlers
NewHandlers creates a new Handlers instance.
func (*Handlers) AddProductionUsage ¶
func (h *Handlers) AddProductionUsage(w http.ResponseWriter, r *http.Request)
AddProductionUsage is an http handler used to add the given organization to the list of production users for the provided package.
func (*Handlers) DeleteProductionUsage ¶
func (h *Handlers) DeleteProductionUsage(w http.ResponseWriter, r *http.Request)
DeleteProductionUsage is an http handler used to add the given organization from the list of production users for the provided package.
func (*Handlers) GenerateChangelogMD ¶
func (h *Handlers) GenerateChangelogMD(w http.ResponseWriter, r *http.Request)
GenerateChangelogMD is an http handler used to generate a changelog in markdown format for a given package.
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 ¶
func (h *Handlers) GetChangelog(w http.ResponseWriter, r *http.Request)
GetChangelog is an http handler used to get a package's changelog.
func (*Handlers) GetChartTemplates ¶
func (h *Handlers) GetChartTemplates(w http.ResponseWriter, r *http.Request)
GetChartTemplates is an http handler used to get the templates for a given Helm chart package snapshot.
func (*Handlers) GetChartValues ¶
func (h *Handlers) GetChartValues(w http.ResponseWriter, r *http.Request)
GetChartValues is an http handler used to get the default values for a given Helm chart package snapshot.
func (*Handlers) GetHarborReplicationDump ¶
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) GetHelmExporterDump ¶
func (h *Handlers) GetHelmExporterDump(w http.ResponseWriter, r *http.Request)
GetHelmExporterDump is an http handler used to get a summary of the latest version available of all packages of kind Helm in the hub database so that they can be used by Helm exporter.
func (*Handlers) GetNovaDump ¶
func (h *Handlers) GetNovaDump(w http.ResponseWriter, r *http.Request)
GetNovaDump is an http handler used to get a summary of all packages of kind Helm in the hub database so that they can be used by Fairwinds Nova.
func (*Handlers) GetProductionUsage ¶
func (h *Handlers) GetProductionUsage(w http.ResponseWriter, r *http.Request)
GetProductionUsage is an http handler used to get a summary of which of the organizations the user belongs to are using the package in production.
func (*Handlers) GetRandom ¶
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 ¶
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) GetSummary ¶
func (h *Handlers) GetSummary(w http.ResponseWriter, r *http.Request)
GetSummary is an http handler used to get a package summary.
func (*Handlers) GetValuesSchema ¶
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) GetViews ¶
func (h *Handlers) GetViews(w http.ResponseWriter, r *http.Request)
GetViews is an http handler used to get the views of the package provided.
func (*Handlers) InjectIndexMeta ¶
InjectIndexMeta is a middleware that injects the some index metadata related to a given package,
func (*Handlers) RssFeed ¶
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 ¶
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.