Documentation ¶
Index ¶
- Constants
- Variables
- func ErrChartUrlEmpty(modelName string, registrantName string) error
- func ErrComponentGenerate(err error) error
- func ErrGetAhPackage(err error) error
- func ErrGetAllHelmPackages(err error) error
- func ErrGetChartUrl(err error) error
- func ErrNoPackageFound(modelName string, registrantName string) error
- type AhPackage
- func FilterPackageWithGivenSourceURL(pkgs []AhPackage, url string) []AhPackage
- func FilterPackagesWithCrds(pkgs []AhPackage) []AhPackage
- func GetAhPackagesWithName(name string) ([]AhPackage, error)
- func GetAllAhHelmPackages() ([]AhPackage, error)
- func SortPackagesWithScore(pkgs []AhPackage) []AhPackage
- type ArtifactHubPackageManager
Constants ¶
View Source
const AhHelmExporterEndpoint = ArtifactHubAPIEndpoint + "/helm-exporter"
View Source
const AhTextSearchQueryFieldName = "ts_query_web"
View Source
const (
ArtifactHub = "artifacthub"
)
View Source
const ArtifactHubAPIEndpoint = "https://artifacthub.io/api/v1"
View Source
const ArtifactHubChartUrlFieldName = "content_url"
Variables ¶
View Source
var ( ErrGetChartUrlCode = "meshkit-11134" ErrGetAhPackageCode = "meshkit-11135" ErrComponentGenerateCode = "meshkit-11136" ErrGetAllHelmPackagesCode = "meshkit-11137" ErrChartUrlEmptyCode = "replace_me" ErrNoPackageFoundCode = "replace_me" )
View Source
var AhApiSearchParams = map[string]string{
"offset": "0",
"limit": "10",
"facets": "false",
"kind": "0",
"sort": "relevance",
}
View Source
var RankingParameterWeightage = map[string]int{
"official": 5,
"verifiedPublisher": 10,
}
Functions ¶
func ErrChartUrlEmpty ¶ added in v0.7.40
func ErrComponentGenerate ¶
func ErrGetAhPackage ¶
func ErrGetAllHelmPackages ¶
func ErrGetChartUrl ¶
func ErrNoPackageFound ¶ added in v0.7.40
Types ¶
type AhPackage ¶
type AhPackage struct { Name string `yaml:"name"` Repository string `yaml:"repository"` Organization string `yaml:"organization"` RepoUrl string `yaml:"repo_url"` ChartUrl string `yaml:"chart_url"` Official bool `yaml:"official"` VerifiedPublisher bool `yaml:"verified_publisher"` CNCF bool `yaml:"cncf"` Version string `yaml:"version"` }
internal representation of artifacthub package it contains information we need to identify a package using ArtifactHub API
func FilterPackagesWithCrds ¶
func GetAhPackagesWithName ¶
func GetAllAhHelmPackages ¶
GetAllAhHelmPackages returns a list of all AhPackages and is super slow to avoid rate limits.
func SortPackagesWithScore ¶
func (AhPackage) GenerateComponents ¶
func (pkg AhPackage) GenerateComponents() ([]_component.ComponentDefinition, error)
func (AhPackage) GetVersion ¶
func (*AhPackage) UpdatePackageData ¶
function that will take the AhPackage as input and give the helm chart url for that package
type ArtifactHubPackageManager ¶
func (ArtifactHubPackageManager) GetPackage ¶
func (ahpm ArtifactHubPackageManager) GetPackage() (models.Package, error)
Click to show internal directories.
Click to hide internal directories.