MCPcopy Create free account
hub / github.com/OctopusDeploy/cli / GetAllEnvironments

Function GetAllEnvironments

pkg/question/selectors/environments.go:13–24  ·  view source on GitHub ↗
(client *client.Client)

Source from the content-addressed store, hash-verified

11type GetAllEnvironmentsCallback func() ([]*environments.Environment, error)
12
13func GetAllEnvironments(client *client.Client) ([]*environments.Environment, error) {
14 envResources, err := client.Environments.Get(environments.EnvironmentsQuery{})
15 if err != nil {
16 return nil, err
17 }
18 allEnvs, err := envResources.GetAllPages(client.Environments.GetClient())
19 if err != nil {
20 return nil, err
21 }
22
23 return allEnvs, nil
24}
25
26func EnvironmentSelect(ask question.Asker, getAllEnvironmentsCallback GetAllEnvironmentsCallback, message string) (*environments.Environment, error) {
27 allEnvs, err := getAllEnvironmentsCallback()

Callers 10

NewUpdateOptionsFunction · 0.92
getEnvironmentMapFunction · 0.92
NewCreateOptionsFunction · 0.92
NewCreateOptionsFunction · 0.92
NewCreateOptionsFunction · 0.92
NewCreateOptionsFunction · 0.92
NewCreateOptionsFunction · 0.92
NewCreateOptionsFunction · 0.92
NewCreateOptionsFunction · 0.92
NewCreateOptionsFunction · 0.92

Calls 1

GetMethod · 0.65

Tested by

no test coverage detected