Documentation
¶
Overview ¶
Package cli contains the command-line interface for pgxcli.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRootCmd ¶
func NewRootCmd(ctx context.Context, cliCtx *CliContext) *cobra.Command
NewRootCmd builds the root cobra command and wires the CLI lifecycle hooks.
Types ¶
type CliContext ¶
type CliContext struct {
// Logger is used for logging messages and errors
Logger *logger.Logger
// Printer is used for outputting messages to the user
Printer cliio.Printer
// Client is the database client used to interact with the Postgres database
Client *database.Client
// App is the application layer that contains the business logic of pgxcli
// App orchestrates the execution of commands and interacts with the database client
// printer to perform operations and display results.
App app.Application
// contains filtered or unexported fields
}
CliContext holds the dependencies for cli.
Click to show internal directories.
Click to hide internal directories.