Documentation ¶
Index ¶
- func NewMongoDB(podName string) util.Database
- func NewMysql(podName, masterPodName string) util.Database
- func NewPostgreSQL(podName, masterPodName string) util.Database
- type MongoDB
- func (m MongoDB) IsReady(oc *util.CLI) (bool, error)
- func (m MongoDB) PodName() string
- func (m MongoDB) Query(oc *util.CLI, query string) (string, error)
- func (m MongoDB) QueryPrimary(oc *util.CLI, query string) (string, error)
- func (m MongoDB) QueryPrivileged(oc *util.CLI, query string) (string, error)
- func (m MongoDB) TestRemoteLogin(oc *util.CLI, hostAddress string) error
- type MySQL
- type PodConfig
- type PostgreSQL
- func (m PostgreSQL) IsReady(oc *util.CLI) (bool, error)
- func (m PostgreSQL) PodName() string
- func (m PostgreSQL) Query(oc *util.CLI, query string) (string, error)
- func (m PostgreSQL) QueryPrivileged(oc *util.CLI, query string) (string, error)
- func (m PostgreSQL) TestRemoteLogin(oc *util.CLI, hostAddress string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewMongoDB ¶
NewMongoDB creates a new util.Database instance.
func NewPostgreSQL ¶
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) QueryPrimary ¶
// QueryPrimary queries the database on primary node as a regular user.
func (MongoDB) QueryPrivileged ¶
QueryPrivileged queries the database as a privileged user.
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
MySQL is a MySQL helper for executing commands.
func (MySQL) QueryPrivileged ¶
QueryPrivileged executes an SQL query as a root user and returns the result.
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) QueryPrivileged ¶
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.