Documentation
¶
Index ¶
- Variables
- func Execute() error
- func GetConfigFile() string
- func GetRootCmd() *cobra.Command
- func IsInteractive() bool
- func IsVerbose() bool
- func IsYesMode() bool
- func PrintError(msg string, args ...interface{})
- func PrintInfo(msg string, args ...interface{})
- func PrintSuccess(msg string, args ...interface{})
- func PrintVerbose(msg string, args ...interface{})
- func PrintVerboseCommand(command string)
- func PrintWarning(msg string, args ...interface{})
- func PromptSelect(message string, options []string) int
- type ServerConnection
Constants ¶
This section is empty.
Variables ¶
var (
// Version is set at build time
Version = "dev"
)
Functions ¶
func GetRootCmd ¶
GetRootCmd returns the root command for documentation generation
func IsInteractive ¶ added in v0.2.0
func IsInteractive() bool
IsInteractive returns true if stdin is a terminal and --yes flag is not set
func PrintError ¶
func PrintError(msg string, args ...interface{})
PrintError prints a formatted error message
func PrintSuccess ¶
func PrintSuccess(msg string, args ...interface{})
PrintSuccess prints a success message
func PrintVerbose ¶
func PrintVerbose(msg string, args ...interface{})
PrintVerbose prints a message only in verbose mode
func PrintVerboseCommand ¶ added in v0.7.0
func PrintVerboseCommand(command string)
PrintVerboseCommand prints a command in verbose mode with sensitive values masked
func PrintWarning ¶
func PrintWarning(msg string, args ...interface{})
PrintWarning prints a warning message
func PromptSelect ¶ added in v0.2.0
PromptSelect displays numbered options and returns the selected index Returns -1 if cancelled (user enters "0" or empty)
Types ¶
type ServerConnection ¶ added in v0.7.0
type ServerConnection struct {
Client *ssh.Client
Project *config.ProjectConfig
Server *config.ServerConfig
Global *config.GlobalConfig
}
ServerConnection holds a connected SSH client along with project and server config.
func ConnectToServer ¶ added in v0.7.0
func ConnectToServer(serverName string, opts ...ssh.ClientOption) (*ServerConnection, error)
ConnectToServer validates the server name, loads project + global config, and establishes an SSH connection. The caller must defer conn.Client.Close().
func ConnectToServerNoProject ¶ added in v0.7.0
func ConnectToServerNoProject(serverName string, opts ...ssh.ClientOption) (*ServerConnection, error)
ConnectToServerNoProject validates the server name, loads global config only, and establishes an SSH connection. Used for commands that don't require a project config (e.g., server setup, app list). The caller must defer conn.Client.Close().