artifacthub

package
v0.6.60 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 28, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const AhHelmExporterEndpoint = ArtifactHubAPIEndpint + "/helm-exporter"
View Source
const AhTextSearchQueryFieldName = "ts_query_web"
View Source
const ArtifactHubAPIEndpint = "https://artifacthub.io/api/v1"
View Source
const ArtifactHubChartUrlFieldName = "content_url"

Variables

View Source
var (
	ErrGetChartUrlCode        = "11092"
	ErrGetAhPackageCode       = "1093"
	ErrComponentGenerateCode  = "11094"
	ErrGetAllHelmPackagesCode = "11095"
)
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 ErrComponentGenerate

func ErrComponentGenerate(err error) error

func ErrGetAhPackage

func ErrGetAhPackage(err error) error

func ErrGetAllHelmPackages added in v0.6.6

func ErrGetAllHelmPackages(err error) error

func ErrGetChartUrl

func ErrGetChartUrl(err error) error

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 FilterPackagesWithCrds(pkgs []AhPackage) []AhPackage

func GetAhPackagesWithName

func GetAhPackagesWithName(name string) ([]AhPackage, error)

func GetAllAhHelmPackages added in v0.6.6

func GetAllAhHelmPackages() ([]AhPackage, error)

GetAllAhHelmPackages returns a list of all AhPackages and is super slow to avoid rate limits.

func SortPackagesWithScore

func SortPackagesWithScore(pkgs []AhPackage) []AhPackage

func (AhPackage) GenerateComponents

func (pkg AhPackage) GenerateComponents() ([]v1alpha1.ComponentDefinition, error)

func (*AhPackage) UpdatePackageData

func (pkg *AhPackage) UpdatePackageData() error

function that will take the AhPackage as input and give the helm chart url for that package

type ArtifactHubPackageManager added in v0.6.17

type ArtifactHubPackageManager struct {
	PackageName string
}

func (ArtifactHubPackageManager) GetPackage added in v0.6.17

func (ahpm ArtifactHubPackageManager) GetPackage() (models.Package, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL