Documentation
¶
Index ¶
- func NewMongoDB(podName string) exutil.Database
- func NewMysql(podName, masterPodName string) util.Database
- func NewPostgreSQL(podName, masterPodName string) util.Database
- type Channel
- type Image
- type MongoDB
- func (m MongoDB) IsReady(oc *exutil.CLI) (bool, error)
- func (m MongoDB) PodName() string
- func (m MongoDB) Query(oc *exutil.CLI, query string) (string, error)
- func (m MongoDB) QueryPrimary(oc *exutil.CLI, query string) (string, error)
- func (m MongoDB) QueryPrivileged(oc *exutil.CLI, query string) (string, error)
- func (m MongoDB) TestRemoteLogin(oc *exutil.CLI, hostAddress string) error
- type MySQL
- func (m MySQL) IsReady(oc *exutil.CLI) (bool, error)
- func (m MySQL) PodName() string
- func (m MySQL) Query(oc *exutil.CLI, query string) (string, error)
- func (m MySQL) QueryPrivileged(oc *exutil.CLI, query string) (string, error)
- func (m MySQL) TestRemoteLogin(oc *exutil.CLI, hostAddress string) error
- type OperatorBundle
- type Package
- type PodConfig
- type PostgreSQL
- func (m PostgreSQL) IsReady(oc *exutil.CLI) (bool, error)
- func (m PostgreSQL) PodName() string
- func (m PostgreSQL) Query(oc *exutil.CLI, query string) (string, error)
- func (m PostgreSQL) QueryPrivileged(oc *exutil.CLI, query string) (string, error)
- func (m PostgreSQL) TestRemoteLogin(oc *exutil.CLI, hostAddress string) error
- type Sqlit
- func (c *Sqlit) CheckOperatorBundleNameExist(dbFilePath string, bundleName string) (bool, error)
- func (c *Sqlit) CheckOperatorBundlePathExist(dbFilePath string, bundlepath string) (bool, error)
- func (c *Sqlit) DBHas(dbFilePath string, table string, column string, valueList []string) (bool, error)
- func (c *Sqlit) DBMatch(dbFilePath string, table string, column string, valueList []string) (bool, error)
- func (c *Sqlit) GetOperatorChannelByColumn(dbFilePath string, column string) ([]string, error)
- func (c *Sqlit) Query(dbFilePath string, table string, column string) ([]string, error)
- func (c *Sqlit) QueryDB(dbFilePath string, query string) (*sql.Rows, error)
- func (c *Sqlit) QueryOperatorBundle(dbFilePath string) ([]OperatorBundle, error)
- func (c *Sqlit) QueryOperatorChannel(dbFilePath string) ([]Channel, error)
- func (c *Sqlit) QueryPackge(dbFilePath string) ([]Package, error)
- func (c *Sqlit) QueryRelatedImage(dbFilePath string) ([]Image, 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 OperatorBundle ¶
type OperatorBundle struct {
// contains filtered or unexported fields
}
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 *exutil.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 *exutil.CLI, hostAddress string) error
TestRemoteLogin will test whether we can login through to a remote database.
type Sqlit ¶
type Sqlit struct {
// contains filtered or unexported fields
}
Sqlit is a Sqlit helper for executing commands.
func (*Sqlit) CheckOperatorBundleNameExist ¶
CheckOperatorBundleNameExist is to check the OperatorBundleName exist
func (*Sqlit) CheckOperatorBundlePathExist ¶
CheckOperatorBundlePathExist is to check the OperatorBundlePath exist
func (*Sqlit) DBHas ¶
func (c *Sqlit) DBHas(dbFilePath string, table string, column string, valueList []string) (bool, error)
DBHas
func (*Sqlit) DBMatch ¶
func (c *Sqlit) DBMatch(dbFilePath string, table string, column string, valueList []string) (bool, error)
DBMatch
func (*Sqlit) GetOperatorChannelByColumn ¶
GetOperatorChannelByColumn
func (*Sqlit) QueryOperatorBundle ¶
func (c *Sqlit) QueryOperatorBundle(dbFilePath string) ([]OperatorBundle, error)
QueryOperatorBundle executes an sqlit query as an ordinary user and returns the result.
func (*Sqlit) QueryOperatorChannel ¶
QueryOperatorChannel executes an sqlit query as an ordinary user and returns the result.
func (*Sqlit) QueryPackge ¶
QueryPackge executes an sqlit query as an ordinary user and returns the result.