mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Add support for Vagrant packages (#20930)
* Add support for Vagrant boxes. * Add authentication. * Add tests. * Add integration tests. * Add docs. * Add icons. * Update routers/api/packages/api.go Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
		@@ -42,6 +42,7 @@ const (
 | 
			
		||||
	TypePub       Type = "pub"
 | 
			
		||||
	TypePyPI      Type = "pypi"
 | 
			
		||||
	TypeRubyGems  Type = "rubygems"
 | 
			
		||||
	TypeVagrant   Type = "vagrant"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
// Name gets the name of the package type
 | 
			
		||||
@@ -69,6 +70,8 @@ func (pt Type) Name() string {
 | 
			
		||||
		return "PyPI"
 | 
			
		||||
	case TypeRubyGems:
 | 
			
		||||
		return "RubyGems"
 | 
			
		||||
	case TypeVagrant:
 | 
			
		||||
		return "Vagrant"
 | 
			
		||||
	}
 | 
			
		||||
	panic(fmt.Sprintf("unknown package type: %s", string(pt)))
 | 
			
		||||
}
 | 
			
		||||
@@ -98,6 +101,8 @@ func (pt Type) SVGName() string {
 | 
			
		||||
		return "gitea-python"
 | 
			
		||||
	case TypeRubyGems:
 | 
			
		||||
		return "gitea-rubygems"
 | 
			
		||||
	case TypeVagrant:
 | 
			
		||||
		return "gitea-vagrant"
 | 
			
		||||
	}
 | 
			
		||||
	panic(fmt.Sprintf("unknown package type: %s", string(pt)))
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user