MCPcopy Index your code
hub / github.com/cortexlabs/cortex / GetAPIs

Function GetAPIs

cli/cluster/get.go:27–38  ·  view source on GitHub ↗
(operatorConfig OperatorConfig)

Source from the content-addressed store, hash-verified

25)
26
27func GetAPIs(operatorConfig OperatorConfig) ([]schema.APIResponse, error) {
28 httpRes, err := HTTPGet(operatorConfig, "/get")
29 if err != nil {
30 return nil, err
31 }
32
33 var apisRes []schema.APIResponse
34 if err = json.Unmarshal(httpRes, &apisRes); err != nil {
35 return nil, errors.Wrap(err, "/get", string(httpRes))
36 }
37 return apisRes, nil
38}
39
40func GetAPI(operatorConfig OperatorConfig, apiName string) ([]schema.APIResponse, error) {
41 httpRes, err := HTTPGet(operatorConfig, "/get/"+apiName)

Callers 3

getAPIsInAllEnvironmentsFunction · 0.92
getAPIsByEnvFunction · 0.92
cluster.goFile · 0.92

Calls 3

UnmarshalFunction · 0.92
WrapFunction · 0.92
HTTPGetFunction · 0.85

Tested by

no test coverage detected