cmd

package
v0.0.0-...-5183472 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AccountGet

func AccountGet(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

func ConnectDB

func ConnectDB(c Connection) *exec.Cmd

func CreateProxy

func CreateProxy(c Connection) (*exec.Cmd, int)

functions

func Execute

func Execute()

func RoleGet

func RoleGet(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective)

Types

type Config

type Config struct {
	Pgconn []struct {
		Account string `yaml:"account"`
		Dbs     []struct {
			Name     string `yaml:"name"`
			Hostname string `yaml:"hostname"`
			Proxy    struct {
				Kind string `yaml:"kind"`
				Host string `yaml:"host"`
			} `yaml:"proxy"`
			Roles []struct {
				Username string `yaml:"username"`
				Password string `yaml:"password"`
				Dbname   string `yaml:"dbname"`
			} `yaml:"roles"`
		} `yaml:"dbs"`
	} `yaml:"pgconn"`
}

read raw config

type ConnectCommand

type ConnectCommand struct{}

func (*ConnectCommand) Help

func (c *ConnectCommand) Help() string

func (*ConnectCommand) Synopsis

func (c *ConnectCommand) Synopsis() string

type Connection

type Connection struct {
	Hostname  string
	ProxyKind string
	ProxyHost string
	Port      int
	Username  string
	Password  string
	Dbname    string
}

Jump to

Keyboard shortcuts

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