Documentation
¶
Index ¶
- Constants
- func ColorTextBlue(s string) string
- func ColorTextBold(s string) string
- func ColorTextCyan(s string) string
- func ColorTextGray(s string) string
- func ColorTextGreen(s string) string
- func ColorTextRed(s string) string
- func ColorTextYellow(s string) string
- func FormatDuration(d time.Duration) string
- func GetConfigDir() string
- func GetConfigPath() string
- func GetDefaultDumpPath(dbName string) (string, error)
- func GetDefaultExportPath(table string) (string, error)
- func GetLogDir() string
- func PrintDivider(cmd *cobra.Command)
- func PrintError(cmd *cobra.Command, format string, args ...interface{})
- func PrintInfo(cmd *cobra.Command, format string, args ...interface{})
- func PrintMuted(cmd *cobra.Command, format string, args ...interface{})
- func PrintNote(cmd *cobra.Command, format string, args ...interface{})
- func PrintSuccess(cmd *cobra.Command, format string, args ...interface{})
- func PrintTitle(cmd *cobra.Command, title string)
- func PrintWarning(cmd *cobra.Command, format string, args ...interface{})
- func ReadPrivateKey(path string) ([]byte, error)deprecated
Constants ¶
View Source
const ( ColorReset = "\033[0m" ColorRed = "\033[31m" ColorGreen = "\033[32m" ColorYellow = "\033[33m" ColorBlue = "\033[34m" ColorCyan = "\033[36m" ColorGray = "\033[90m" ColorBold = "\033[1m" )
Variables ¶
This section is empty.
Functions ¶
func ColorTextBlue ¶
func ColorTextBold ¶
func ColorTextCyan ¶
func ColorTextGray ¶
func ColorTextGreen ¶
Inline color helpers for other packages (e.g., log viewer)
func ColorTextRed ¶
func ColorTextYellow ¶
func FormatDuration ¶
func GetConfigDir ¶
func GetConfigDir() string
GetConfigDir returns the ~/.pgtransfer directory path
func GetConfigPath ¶
func GetConfigPath() string
GetConfigPath returns the full path to ~/.pgtransfer/config.yaml
func GetDefaultDumpPath ¶
GetDefaultDumpPath builds a timestamped SQL dump path under ~/.pgtransfer/dumps/
func GetDefaultExportPath ¶
GetDefaultExportPath builds a timestamped export CSV path under ~/.pgtransfer/exports/
func PrintDivider ¶
PrintDivider prints a cyan horizontal divider.
func PrintError ¶
PrintError prints a red error message.
func PrintMuted ¶
PrintMuted prints a gray, low-importance message.
func PrintSuccess ¶
PrintSuccess prints a green success message.
func PrintTitle ¶
PrintTitle prints a bold section title, often used for CLI headers.
func PrintWarning ¶
PrintWarning prints a yellow warning message.
func ReadPrivateKey
deprecated
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.