MCPcopy Index your code
hub / github.com/spacecloud-io/space-cloud / GetProjectsFromSC

Function GetProjectsFromSC

space-cli/cmd/utils/projects.go:31–42  ·  view source on GitHub ↗

GetProjectsFromSC returns the projects array from sc

()

Source from the content-addressed store, hash-verified

29
30// GetProjectsFromSC returns the projects array from sc
31func GetProjectsFromSC() ([]*model.Projects, error) {
32 type response struct {
33 Result []*model.Projects `json:"result"`
34 }
35
36 res := new(response)
37 if err := Get(http.MethodGet, "/v1/config/projects/*", map[string]string{}, res); err != nil {
38 return nil, err
39 }
40
41 return res.Result, nil
42}
43
44// GetProjectID checks if project is specified in flags
45func GetProjectID() (string, bool) {

Callers 1

SetDefaultProjectFunction · 0.85

Calls 1

GetFunction · 0.85

Tested by

no test coverage detected