Refactor providers data

This commit is contained in:
2024-04-29 20:03:37 +02:00
parent a8325fd202
commit 87e204ed46
8 changed files with 123 additions and 31 deletions

View File

@ -9,7 +9,6 @@ import (
"github.com/joho/godotenv"
"git.badhouseplants.net/softplayer/softplayer-backend/internal/helpers/kube"
proto "git.badhouseplants.net/softplayer/softplayer-go-proto/pkg/environments"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
@ -28,7 +27,7 @@ type Environemnt struct {
type EnvironemntData struct {
Name string
Description string
Provider proto.Provider
Provider string
Kubernetes string
Location string
ServerType string
@ -58,7 +57,7 @@ func (env *Environemnt) isNsVerified(ctx context.Context) error {
val, ok := ns.GetLabels()["email-verified"]
if !ok || val == "false" {
return errors.New("User email is not verified, can't create an new env")
return errors.New("user email is not verified, can't create an new env")
}
return nil
}