2020-09-12 15:23:25 +00:00
|
|
|
package api
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
|
|
|
"strings"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Package struct {
|
2021-02-21 20:23:06 +00:00
|
|
|
Name string `toml:"name"`
|
|
|
|
Description string `toml:"description"`
|
|
|
|
Branch string `toml:"branch"`
|
|
|
|
WebURL string `toml:"web_url"`
|
|
|
|
CloneHTTP string `toml:"clone_http"`
|
|
|
|
CloneSSH string `toml:"clone_ssh"`
|
|
|
|
Topics []string `toml:"topics"`
|
2020-09-12 15:23:25 +00:00
|
|
|
|
|
|
|
Private bool `toml:"-"`
|
|
|
|
Fork bool `toml:"-"`
|
|
|
|
Mirror bool `toml:"-"`
|
|
|
|
Archive bool `toml:"-"`
|
|
|
|
}
|
|
|
|
|
|
|
|
func (p *Package) Module(domain string) string {
|
|
|
|
return fmt.Sprintf("%s/%s", domain, strings.ToLower(p.Name))
|
|
|
|
}
|