(asyncAPI schema.APIResponse, env cliconfig.Environment)
| 30 | ) |
| 31 | |
| 32 | func 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 | |
| 58 | func asyncDescribeAPITable(asyncAPI schema.APIResponse, env cliconfig.Environment) (string, error) { |
| 59 | if asyncAPI.Metadata == nil { |
no test coverage detected