aboutsummaryrefslogtreecommitdiffstats
path: root/models
diff options
context:
space:
mode:
authorKN4CK3R <admin@oldschoolhack.me>2022-04-19 18:55:35 +0200
committerGitHub <noreply@github.com>2022-04-19 12:55:35 -0400
commit18727df73a00e7d05d3e1a68d6dae521cca7ff49 (patch)
treede06d623e932c8aef1720ac3399d3a7bc658e802 /models
parentb74322dfce8d15e9204900913bb815a7b0ba073f (diff)
downloadgitea-18727df73a00e7d05d3e1a68d6dae521cca7ff49.tar.gz
gitea-18727df73a00e7d05d3e1a68d6dae521cca7ff49.zip
Add Helm Chart registry (#19406)
Diffstat (limited to 'models')
-rw-r--r--models/packages/descriptor.go3
-rw-r--r--models/packages/package.go25
2 files changed, 18 insertions, 10 deletions
diff --git a/models/packages/descriptor.go b/models/packages/descriptor.go
index 3249260f80..fbdc40f37f 100644
--- a/models/packages/descriptor.go
+++ b/models/packages/descriptor.go
@@ -15,6 +15,7 @@ import (
"code.gitea.io/gitea/modules/packages/composer"
"code.gitea.io/gitea/modules/packages/conan"
"code.gitea.io/gitea/modules/packages/container"
+ "code.gitea.io/gitea/modules/packages/helm"
"code.gitea.io/gitea/modules/packages/maven"
"code.gitea.io/gitea/modules/packages/npm"
"code.gitea.io/gitea/modules/packages/nuget"
@@ -129,6 +130,8 @@ func GetPackageDescriptor(ctx context.Context, pv *PackageVersion) (*PackageDesc
metadata = &container.Metadata{}
case TypeGeneric:
// generic packages have no metadata
+ case TypeHelm:
+ metadata = &helm.Metadata{}
case TypeNuGet:
metadata = &nuget.Metadata{}
case TypeNpm:
diff --git a/models/packages/package.go b/models/packages/package.go
index 373bd86d9f..bdb535492b 100644
--- a/models/packages/package.go
+++ b/models/packages/package.go
@@ -35,9 +35,10 @@ const (
TypeConan Type = "conan"
TypeContainer Type = "container"
TypeGeneric Type = "generic"
- TypeNuGet Type = "nuget"
- TypeNpm Type = "npm"
+ TypeHelm Type = "helm"
TypeMaven Type = "maven"
+ TypeNpm Type = "npm"
+ TypeNuGet Type = "nuget"
TypePyPI Type = "pypi"
TypeRubyGems Type = "rubygems"
)
@@ -53,12 +54,14 @@ func (pt Type) Name() string {
return "Container"
case TypeGeneric:
return "Generic"
- case TypeNuGet:
- return "NuGet"
- case TypeNpm:
- return "npm"
+ case TypeHelm:
+ return "Helm"
case TypeMaven:
return "Maven"
+ case TypeNpm:
+ return "npm"
+ case TypeNuGet:
+ return "NuGet"
case TypePyPI:
return "PyPI"
case TypeRubyGems:
@@ -78,12 +81,14 @@ func (pt Type) SVGName() string {
return "octicon-container"
case TypeGeneric:
return "octicon-package"
- case TypeNuGet:
- return "gitea-nuget"
- case TypeNpm:
- return "gitea-npm"
+ case TypeHelm:
+ return "gitea-helm"
case TypeMaven:
return "gitea-maven"
+ case TypeNpm:
+ return "gitea-npm"
+ case TypeNuGet:
+ return "gitea-nuget"
case TypePyPI:
return "gitea-python"
case TypeRubyGems: