Documentation
¶
Index ¶
- func ConnWithSSL(ssl, skipVerify bool, clientKey, clientCert, rootCert string) (string, error)
- func VerifyPeerCertFunc(pool *x509.CertPool) func([][]byte, [][]*x509.Certificate) error
- type AccessChangeInfo
- type BackupInfo
- type CreateInfo
- type DBInfo
- type DeleteInfo
- type Local
- func (r *Local) Backup(info BackupInfo) error
- func (r *Local) ChangeAccess(info AccessChangeInfo) error
- func (r *Local) ChangePassword(info PasswordChangeInfo) error
- func (r *Local) Close()
- func (r *Local) Create(info CreateInfo) error
- func (r *Local) CreateUser(info CreateInfo, withDeleteDB bool) error
- func (r *Local) Delete(info DeleteInfo) error
- func (r *Local) ExecSQL(command string, timeout uint) error
- func (r *Local) ExecSQLForRows(command string, timeout uint) ([]string, error)
- func (r *Local) Recover(info RecoverInfo) error
- func (r *Local) SyncDB(version string) ([]SyncDBInfo, error)
- type PasswordChangeInfo
- type RecoverInfo
- type Remote
- func (r *Remote) Backup(info BackupInfo) error
- func (r *Remote) ChangeAccess(info AccessChangeInfo) error
- func (r *Remote) ChangePassword(info PasswordChangeInfo) error
- func (r *Remote) Close()
- func (r *Remote) Create(info CreateInfo) error
- func (r *Remote) CreateUser(info CreateInfo, withDeleteDB bool) error
- func (r *Remote) Delete(info DeleteInfo) error
- func (r *Remote) ExecSQL(command string, timeout uint) error
- func (r *Remote) ExecSQLForHosts(timeout uint) ([]string, error)
- func (r *Remote) Recover(info RecoverInfo) error
- func (r *Remote) SyncDB(version string) ([]SyncDBInfo, error)
- type SyncDBInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConnWithSSL ¶ added in v1.9.0
func VerifyPeerCertFunc ¶ added in v1.9.0
Types ¶
type AccessChangeInfo ¶
type BackupInfo ¶
type CreateInfo ¶
type DBInfo ¶
type DBInfo struct {
From string `json:"from"`
Database string `json:"database"`
Address string `json:"address"`
Port uint `json:"port"`
Username string `json:"userName"`
Password string `json:"password"`
SSL bool `json:"ssl"`
RootCert string `json:"rootCert"`
ClientKey string `json:"clientKey"`
ClientCert string `json:"clientCert"`
SkipVerify bool `json:"skipVerify"`
Timeout uint `json:"timeout"` // second
}
type DeleteInfo ¶
type Local ¶
func (*Local) Backup ¶
func (r *Local) Backup(info BackupInfo) error
func (*Local) ChangeAccess ¶
func (r *Local) ChangeAccess(info AccessChangeInfo) error
func (*Local) ChangePassword ¶
func (r *Local) ChangePassword(info PasswordChangeInfo) error
func (*Local) Create ¶
func (r *Local) Create(info CreateInfo) error
func (*Local) CreateUser ¶
func (r *Local) CreateUser(info CreateInfo, withDeleteDB bool) error
func (*Local) Delete ¶
func (r *Local) Delete(info DeleteInfo) error
func (*Local) ExecSQLForRows ¶
func (*Local) Recover ¶
func (r *Local) Recover(info RecoverInfo) error
type PasswordChangeInfo ¶
type RecoverInfo ¶
type Remote ¶
type Remote struct {
Client *sql.DB
Database string
User string
Password string
Address string
Port uint
SSL bool
RootCert string
ClientKey string
ClientCert string
SkipVerify bool
}
func (*Remote) Backup ¶
func (r *Remote) Backup(info BackupInfo) error
func (*Remote) ChangeAccess ¶
func (r *Remote) ChangeAccess(info AccessChangeInfo) error
func (*Remote) ChangePassword ¶
func (r *Remote) ChangePassword(info PasswordChangeInfo) error
func (*Remote) Create ¶
func (r *Remote) Create(info CreateInfo) error
func (*Remote) CreateUser ¶
func (r *Remote) CreateUser(info CreateInfo, withDeleteDB bool) error
func (*Remote) Delete ¶
func (r *Remote) Delete(info DeleteInfo) error
func (*Remote) Recover ¶
func (r *Remote) Recover(info RecoverInfo) error
Click to show internal directories.
Click to hide internal directories.