added config

This commit is contained in:
ston1th 2020-10-31 21:54:59 +01:00
commit 928086aea9
2 changed files with 68 additions and 19 deletions

View file

@ -9,7 +9,10 @@ import (
"strings"
)
const PVEScheme = "pve"
const (
PVEScheme = "pve"
PVESchemeURL = PVEScheme + "://"
)
var (
ErrInvalidPVEURL = errors.New("invalid pve url scheme")
@ -51,7 +54,7 @@ func ServerRefFromURL(s string) (ref *ServerRef, err error) {
}
func NewURL(pool, node, id string) string {
return fmt.Sprintf("%s://%s/%s/%s", PVEScheme, pool, node, id)
return fmt.Sprintf("%s%s/%s/%s", PVESchemeURL, pool, node, id)
}
func K8sURL(url string) (string, error) {