MCPcopy Create free account
hub / github.com/cli/cli / ApiOptions

Struct ApiOptions

pkg/cmd/api/api.go:38–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36)
37
38type ApiOptions struct {
39 AppVersion string
40 InvokingAgent string
41 Detector fd.Detector
42 BaseRepo func() (ghrepo.Interface, error)
43 Branch func() (string, error)
44 Config func() (gh.Config, error)
45 HttpClient func(api.HTTPClientOptions) (*http.Client, error)
46 FactoryHttpClient func() (*http.Client, error)
47 IO *iostreams.IOStreams
48 TelemetryDisabler ghtelemetry.Disabler
49
50 Hostname string
51 RequestMethod string
52 RequestMethodPassed bool
53 RequestPath string
54 RequestInputFile string
55 MagicFields []string
56 RawFields []string
57 RequestHeaders []string
58 Previews []string
59 ShowResponseHeaders bool
60 Paginate bool
61 Slurp bool
62 Silent bool
63 Template string
64 CacheTTL time.Duration
65 FilterOutput string
66 Verbose bool
67
68 AllowEscapeSequences bool
69}
70
71func NewCmdApi(f *cmdutil.Factory, runF func(*ApiOptions) error) *cobra.Command {
72 opts := ApiOptions{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected