Add the get method

This commit is contained in:
2024-04-30 09:47:00 +02:00
parent bbef71c512
commit 9f2489fc55
6 changed files with 110 additions and 32 deletions

View File

@ -38,11 +38,13 @@ func (e *EnvironemntData) buildVars() (string, error) {
SP_PROVIDER=%s
SP_KUBERNETES=%s
SP_SERVER_TYPE=%s
SP_SERVER_LOCATION=%s`,
SP_SERVER_LOCATION=%s
SP_DESCRIPTION=%s`,
e.Provider,
e.Kubernetes,
e.ServerType,
e.Location,
e.Description,
)
return vars, nil
@ -190,7 +192,11 @@ func (env *Environemnt) Get(ctx context.Context) error {
return err
}
// env.Data.Provider = res["SP_PROVIDER"]
env.Data.Description = res["SP_DESCRIPTION"]
env.Data.Provider = res["SP_PROVIDER"]
env.Data.Kubernetes = res["SP_KUBERNETES"]
env.Data.ServerType = res["SP_SERVER_TYPE"]
env.Data.Location = res["SP_SERVER_LOCATION"]
return nil
}