mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Revert "Add Debian package registry" (#24412)
Reverts go-gitea/gitea#22854
This commit is contained in:
@@ -36,7 +36,6 @@ const (
|
||||
TypeConan Type = "conan"
|
||||
TypeConda Type = "conda"
|
||||
TypeContainer Type = "container"
|
||||
TypeDebian Type = "debian"
|
||||
TypeGeneric Type = "generic"
|
||||
TypeHelm Type = "helm"
|
||||
TypeMaven Type = "maven"
|
||||
@@ -56,7 +55,6 @@ var TypeList = []Type{
|
||||
TypeConan,
|
||||
TypeConda,
|
||||
TypeContainer,
|
||||
TypeDebian,
|
||||
TypeGeneric,
|
||||
TypeHelm,
|
||||
TypeMaven,
|
||||
@@ -84,8 +82,6 @@ func (pt Type) Name() string {
|
||||
return "Conda"
|
||||
case TypeContainer:
|
||||
return "Container"
|
||||
case TypeDebian:
|
||||
return "Debian"
|
||||
case TypeGeneric:
|
||||
return "Generic"
|
||||
case TypeHelm:
|
||||
@@ -125,8 +121,6 @@ func (pt Type) SVGName() string {
|
||||
return "gitea-conda"
|
||||
case TypeContainer:
|
||||
return "octicon-container"
|
||||
case TypeDebian:
|
||||
return "gitea-debian"
|
||||
case TypeGeneric:
|
||||
return "octicon-package"
|
||||
case TypeHelm:
|
||||
@@ -160,7 +154,6 @@ type Package struct {
|
||||
Name string `xorm:"NOT NULL"`
|
||||
LowerName string `xorm:"UNIQUE(s) INDEX NOT NULL"`
|
||||
SemverCompatible bool `xorm:"NOT NULL DEFAULT false"`
|
||||
IsInternal bool `xorm:"INDEX NOT NULL DEFAULT false"`
|
||||
}
|
||||
|
||||
// TryInsertPackage inserts a package. If a package exists already, ErrDuplicatePackage is returned
|
||||
@@ -221,10 +214,9 @@ func GetPackageByID(ctx context.Context, packageID int64) (*Package, error) {
|
||||
// GetPackageByName gets a package by name
|
||||
func GetPackageByName(ctx context.Context, ownerID int64, packageType Type, name string) (*Package, error) {
|
||||
var cond builder.Cond = builder.Eq{
|
||||
"package.owner_id": ownerID,
|
||||
"package.type": packageType,
|
||||
"package.lower_name": strings.ToLower(name),
|
||||
"package.is_internal": false,
|
||||
"package.owner_id": ownerID,
|
||||
"package.type": packageType,
|
||||
"package.lower_name": strings.ToLower(name),
|
||||
}
|
||||
|
||||
p := &Package{}
|
||||
@@ -244,9 +236,8 @@ func GetPackageByName(ctx context.Context, ownerID int64, packageType Type, name
|
||||
// GetPackagesByType gets all packages of a specific type
|
||||
func GetPackagesByType(ctx context.Context, ownerID int64, packageType Type) ([]*Package, error) {
|
||||
var cond builder.Cond = builder.Eq{
|
||||
"package.owner_id": ownerID,
|
||||
"package.type": packageType,
|
||||
"package.is_internal": false,
|
||||
"package.owner_id": ownerID,
|
||||
"package.type": packageType,
|
||||
}
|
||||
|
||||
ps := make([]*Package, 0, 10)
|
||||
|
Reference in New Issue
Block a user