cli

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 16 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL