Documentation ¶
Index ¶
- Constants
- type MySQLPassword
- func (p MySQLPassword) Admin() string
- func (p MySQLPassword) Agent() string
- func (p MySQLPassword) Backup() string
- func (p MySQLPassword) Donor() string
- func (p MySQLPassword) Exporter() string
- func (p MySQLPassword) ReadOnly() string
- func (p MySQLPassword) Replicator() string
- func (p MySQLPassword) ToMyCnfSecret() *corev1.Secret
- func (p MySQLPassword) ToSecret() *corev1.Secret
- func (p MySQLPassword) Writable() string
Constants ¶
const ( AdminPasswordKey = "ADMIN_PASSWORD" BackupPasswordKey = "BACKUP_PASSWORD" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MySQLPassword ¶
type MySQLPassword struct {
// contains filtered or unexported fields
}
MySQLPassword represents a set of passwords of MySQL users for MOCO
func NewMySQLPassword ¶
func NewMySQLPassword() (*MySQLPassword, error)
NewMySQLPassword generates random passwords for NewMySQLPassword and return it.
func NewMySQLPasswordFromSecret ¶
func NewMySQLPasswordFromSecret(secret *corev1.Secret) (*MySQLPassword, error)
NewMySQLPasswordFromSecret constructs MySQLPassword from Secret.
func (MySQLPassword) Admin ¶
func (p MySQLPassword) Admin() string
Admin returns the password for moco-admin.
func (MySQLPassword) Agent ¶
func (p MySQLPassword) Agent() string
Agent returns the password for moco-agent.
func (MySQLPassword) Backup ¶ added in v0.8.1
func (p MySQLPassword) Backup() string
Backup returns the password for backup jobs.
func (MySQLPassword) Donor ¶
func (p MySQLPassword) Donor() string
Donor returns the password for moco-clone-donor.
func (MySQLPassword) Exporter ¶ added in v0.8.1
func (p MySQLPassword) Exporter() string
Exporter returns the password for mysqld_exporter.
func (MySQLPassword) ReadOnly ¶
func (p MySQLPassword) ReadOnly() string
ReadOnly returns the password for moco-readonly.
func (MySQLPassword) Replicator ¶
func (p MySQLPassword) Replicator() string
Replicator returns the password for moco-repl.
func (MySQLPassword) ToMyCnfSecret ¶
func (p MySQLPassword) ToMyCnfSecret() *corev1.Secret
ToMyCnfSecret converts MySQLPassword to Secret in my.cnf format. The caller have to fill Name and Namespace of the returned Secret.
func (MySQLPassword) ToSecret ¶
func (p MySQLPassword) ToSecret() *corev1.Secret
ToSecret converts MySQLPassword to Secret. The caller have to fill Name and Namespace of the returned Secret.
func (MySQLPassword) Writable ¶
func (p MySQLPassword) Writable() string
Writable returns the password for moco-writable.