Tunnel implementation, allow using ssh on connection screen

This commit is contained in:
Dan Sosedoff
2016-01-14 19:50:01 -06:00
parent fb66acebc3
commit f0f447857f
11 changed files with 229 additions and 93 deletions

View File

@@ -8,22 +8,19 @@ import (
"github.com/BurntSushi/toml"
"github.com/mitchellh/go-homedir"
"github.com/sosedoff/pgweb/pkg/shared"
)
type Bookmark struct {
Url string `json:"url"` // Postgres connection URL
Host string `json:"host"` // Server hostname
Port string `json:"port"` // Server port
User string `json:"user"` // Database user
Password string `json:"password"` // User password
Database string `json:"database"` // Database name
Ssl string `json:"ssl"` // Connection SSL mode
SshHost string `json:"ssh_user"`
SshPort string `json:"ssh_port"`
SshUser string `json:"ssh_user"`
SshPassword string `json:"ssh_password"`
SshKey string `json:"ssh_key"`
Url string `json:"url"` // Postgres connection URL
Host string `json:"host"` // Server hostname
Port string `json:"port"` // Server port
User string `json:"user"` // Database user
Password string `json:"password"` // User password
Database string `json:"database"` // Database name
Ssl string `json:"ssl"` // Connection SSL mode
Ssh shared.SSHInfo `json:"ssh,omitempty"`
}
func readServerConfig(path string) (Bookmark, error) {