db

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2016 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMongoDB

func NewMongoDB(podName, masterPodName string) util.Database

NewMongoDB creates a new util.Database instance.

func NewMysql

func NewMysql(podName, masterPodName string) util.Database

NewMysql creates a new util.Database instance.

func NewPostgreSQL

func NewPostgreSQL(podName, masterPodName string) util.Database

NewPostgreSQL creates a new util.Database instance.

Types

type MongoDB

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

MongoDB is a MongoDB helper for executing commands.

func (MongoDB) IsReady

func (m MongoDB) IsReady(oc *util.CLI) (bool, error)

IsReady pings the MongoDB server.

func (MongoDB) PodName

func (m MongoDB) PodName() string

PodName implements Database.

func (MongoDB) Query

func (m MongoDB) Query(oc *util.CLI, query string) (string, error)

Query executes a query as an ordinary user and returns the result.

func (MongoDB) QueryPrivileged

func (m MongoDB) QueryPrivileged(oc *util.CLI, query string) (string, error)

QueryPrivileged queries the database as a privileged user.

func (MongoDB) TestRemoteLogin

func (m MongoDB) TestRemoteLogin(oc *util.CLI, hostAddress string) error

TestRemoteLogin tests wheather it is possible to remote login to hostAddress.

type MySQL

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

MySQL is a MySQL helper for executing commands.

func (MySQL) IsReady

func (m MySQL) IsReady(oc *util.CLI) (bool, error)

IsReady pings the MySQL server.

func (MySQL) PodName

func (m MySQL) PodName() string

PodName implements Database.

func (MySQL) Query

func (m MySQL) Query(oc *util.CLI, query string) (string, error)

Query executes an SQL query as an ordinary user and returns the result.

func (MySQL) QueryPrivileged

func (m MySQL) QueryPrivileged(oc *util.CLI, query string) (string, error)

QueryPrivileged executes an SQL query as a root user and returns the result.

func (MySQL) TestRemoteLogin

func (m MySQL) TestRemoteLogin(oc *util.CLI, hostAddress string) error

TestRemoteLogin will test whether we can login through to a remote database.

type PodConfig

type PodConfig struct {
	Container string
	Env       map[string]string
}

PodConfig holds configuration for a pod.

type PostgreSQL

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

PostgreSQL is a PostgreSQL helper for executing commands.

func (PostgreSQL) IsReady

func (m PostgreSQL) IsReady(oc *util.CLI) (bool, error)

IsReady pings the PostgreSQL server.

func (PostgreSQL) PodName

func (m PostgreSQL) PodName() string

PodName implements Database.

func (PostgreSQL) Query

func (m PostgreSQL) Query(oc *util.CLI, query string) (string, error)

Query executes an SQL query as an ordinary user and returns the result.

func (PostgreSQL) QueryPrivileged

func (m PostgreSQL) QueryPrivileged(oc *util.CLI, query string) (string, error)

QueryPrivileged executes an SQL query as a root user and returns the result.

func (PostgreSQL) TestRemoteLogin

func (m PostgreSQL) TestRemoteLogin(oc *util.CLI, hostAddress string) error

TestRemoteLogin will test whether we can login through to a remote database.

Jump to

Keyboard shortcuts

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