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