| 34 | ) |
| 35 | |
| 36 | type ApiOptions struct { |
| 37 | AppVersion string |
| 38 | InvokingAgent string |
| 39 | BaseRepo func() (ghrepo.Interface, error) |
| 40 | Branch func() (string, error) |
| 41 | Config func() (gh.Config, error) |
| 42 | HttpClient func() (*http.Client, error) |
| 43 | IO *iostreams.IOStreams |
| 44 | |
| 45 | Hostname string |
| 46 | RequestMethod string |
| 47 | RequestMethodPassed bool |
| 48 | RequestPath string |
| 49 | RequestInputFile string |
| 50 | MagicFields []string |
| 51 | RawFields []string |
| 52 | RequestHeaders []string |
| 53 | Previews []string |
| 54 | ShowResponseHeaders bool |
| 55 | Paginate bool |
| 56 | Slurp bool |
| 57 | Silent bool |
| 58 | Template string |
| 59 | CacheTTL time.Duration |
| 60 | FilterOutput string |
| 61 | Verbose bool |
| 62 | |
| 63 | AllowEscapeSequences bool |
| 64 | } |
| 65 | |
| 66 | func NewCmdApi(f *cmdutil.Factory, runF func(*ApiOptions) error) *cobra.Command { |
| 67 | opts := ApiOptions{ |
nothing calls this directly
no outgoing calls
no test coverage detected