utils

package
v1.15.1 Latest Latest
Warning

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

Go to latest
Published: May 16, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BoshCommand

func BoshCommand() string

func ConnectMysql added in v1.4.2

func ConnectMysql(dbHostname string, dbPassword string, dbUsername string, dbPort int, proxyHost string, proxyUsername string, proxyPrivateKey string) (*sql.DB, *gexec.Session)

func DisambiguationString

func DisambiguationString() string

func DisambiguationStringOfLength added in v1.4.2

func DisambiguationStringOfLength(length int) string

func EscapeNewLines added in v1.5.0

func EscapeNewLines(txt string) string

func FetchSQLColumn added in v1.4.2

func FetchSQLColumn(command string, connection *sql.DB) []string

func MustHaveEnv

func MustHaveEnv(keyname string) string

func RunCommand

func RunCommand(cmd string, args ...string) *gexec.Session

func RunCommandWithStream

func RunCommandWithStream(stdout, stderr io.Writer, cmd string, args ...string) *gexec.Session

func RunSQLCommand added in v1.4.2

func RunSQLCommand(command string, connection *sql.DB)

Types

type JobInstance

type JobInstance struct {
	Deployment    string
	Instance      string
	InstanceIndex string
}

func (*JobInstance) GetIPOfInstance

func (jobInstance *JobInstance) GetIPOfInstance() string

func (*JobInstance) RunMysqlSqlCommand

func (jobInstance *JobInstance) RunMysqlSqlCommand(command string) *gexec.Session

func (*JobInstance) RunMysqlSqlCommandOnDatabase

func (jobInstance *JobInstance) RunMysqlSqlCommandOnDatabase(database, command string) *gexec.Session

func (*JobInstance) RunOnInstance

func (jobInstance *JobInstance) RunOnInstance(cmd ...string) *gexec.Session

func (*JobInstance) RunOnVMAndSucceed

func (jobInstance *JobInstance) RunOnVMAndSucceed(command string) *gexec.Session

func (*JobInstance) RunPostgresSqlCommand

func (jobInstance *JobInstance) RunPostgresSqlCommand(command, database, user, postgresPackage string) *gexec.Session

type PostgresConnection added in v1.5.0

type PostgresConnection struct {
	// contains filtered or unexported fields
}

func NewMutualTlsPostgresConnection added in v1.5.0

func NewMutualTlsPostgresConnection(hostname string, port int, username, password, clientCertPath, clientKeyPath, proxyHost, proxyUsername, proxyPrivateKey string, sslEnabled bool) *PostgresConnection

func NewPostgresConnection added in v1.5.0

func NewPostgresConnection(hostname string, port int, username, password, proxyHost, proxyUsername, proxyPrivateKey string, sslEnabled bool) *PostgresConnection

func (*PostgresConnection) Close added in v1.5.0

func (c *PostgresConnection) Close()

func (*PostgresConnection) FetchSQLColumn added in v1.5.0

func (c *PostgresConnection) FetchSQLColumn(command string) []string

func (*PostgresConnection) Open added in v1.5.0

func (c *PostgresConnection) Open(dbName string) error

func (*PostgresConnection) OpenSuccessfully added in v1.5.0

func (c *PostgresConnection) OpenSuccessfully(dbName string)

func (*PostgresConnection) RunSQLCommand added in v1.5.0

func (c *PostgresConnection) RunSQLCommand(command string)

func (*PostgresConnection) SwitchToDb added in v1.5.0

func (c *PostgresConnection) SwitchToDb(dbName string)

Jump to

Keyboard shortcuts

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