Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Cmd = &cobra.Command{ Use: "connect [database] [role]", Short: "Connect to a database with specified role", ValidArgsFunction: connectionInfoGet, Run: func(cmd *cobra.Command, args []string) { if len(args) == 0 { fmt.Println("Please specify an account, database and role") os.Exit(1) } else if len(args) == 1 { fmt.Println("Please specify a database and role") os.Exit(1) } else if len(args) == 2 { fmt.Println("Please specify a role") os.Exit(1) } else if len(args) > 3 { fmt.Println("`connect` only requires three argument") os.Exit(1) } connInfo := connMap[args[0]][args[1]][args[2]] c := connection{connInfo, 0, nil} if c.ProxyKind != "" { c.ProxyPort = c.SetProxyPort() c.ProxyCmd = c.InitProxy() c.Connect() c.KillProxyPid() } else { c.ProxyPort = c.Port c.Connect() } }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.