MCPcopy
hub / github.com/cortexlabs/cortex / asyncAPITable

Function asyncAPITable

cli/cmd/lib_async_apis.go:32–56  ·  view source on GitHub ↗
(asyncAPI schema.APIResponse, env cliconfig.Environment)

Source from the content-addressed store, hash-verified

30)
31
32func asyncAPITable(asyncAPI schema.APIResponse, env cliconfig.Environment) (string, error) {
33 var out string
34
35 t := asyncAPIsTable([]schema.APIResponse{asyncAPI}, []string{env.Name})
36
37 out += t.MustFormat()
38
39 if asyncAPI.DashboardURL != nil && *asyncAPI.DashboardURL != "" {
40 out += "\n" + console.Bold("metrics dashboard: ") + *asyncAPI.DashboardURL + "\n"
41 }
42
43 if asyncAPI.Endpoint != nil {
44 out += "\n" + console.Bold("endpoint: ") + *asyncAPI.Endpoint + "\n"
45 }
46
47 out += "\n" + apiHistoryTable(asyncAPI.APIVersions)
48
49 if !_flagVerbose {
50 return out, nil
51 }
52
53 out += titleStr("configuration") + strings.TrimSpace(asyncAPI.Spec.UserStr())
54
55 return out, nil
56}
57
58func asyncDescribeAPITable(asyncAPI schema.APIResponse, env cliconfig.Environment) (string, error) {
59 if asyncAPI.Metadata == nil {

Callers 1

getAPIFunction · 0.85

Calls 6

BoldFunction · 0.92
asyncAPIsTableFunction · 0.85
apiHistoryTableFunction · 0.85
titleStrFunction · 0.85
MustFormatMethod · 0.80
UserStrMethod · 0.45

Tested by

no test coverage detected