Documentation
¶
Overview ¶
Package docs defines the root Cobra command and all subcommands for the stripe docs plugin. Commands are methods on RootCommand, which holds shared dependencies injected via [WithOptions].
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option func(*RootCommand)
Option is a functional option for configuring RootCommand.
func WithClient ¶
WithClient sets the docs HTTP client used to fetch pages.
func WithConfig ¶
WithConfig sets the shared Stripe CLI configuration whose fields are populated by cobra flag parsing at runtime (e.g. --color, --log-level).
func WithRenderer ¶
WithRenderer sets the Markdown renderer used to display pages.
type RootCommand ¶
type RootCommand struct {
// contains filtered or unexported fields
}
RootCommand is the root command for the docs plugin.
func (*RootCommand) Root ¶
func (r *RootCommand) Root() *cobra.Command
Root returns the cobra command, used by tools like the doc generator.
func (*RootCommand) WithOptions ¶
func (r *RootCommand) WithOptions(opts ...Option) *RootCommand
WithOptions applies the given options to the RootCommand.