users

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

View Source
const (
	Root         = "root"
	Operator     = "operator"
	Monitor      = "monitor"
	Xtrabackup   = "xtrabackup"
	Replication  = "replication"
	ProxyAdmin   = "proxyadmin"
	PMMServer    = "pmmserver"
	PMMServerKey = "pmmserverkey"
)

Variables

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager(addr string, user, pass string, timeout int32) (Manager, error)

func (*Manager) Close

func (u *Manager) Close() error

func (*Manager) CreateOperatorUser

func (u *Manager) CreateOperatorUser(pass string) error

func (*Manager) CreateReplicationUser added in v1.9.0

func (u *Manager) CreateReplicationUser(password string) error

func (*Manager) DiscardOldPassword added in v1.12.0

func (m *Manager) DiscardOldPassword(user *SysUser) error

DiscardOldPassword discards old passwords of given users

func (*Manager) IsOldPassDiscarded added in v1.12.0

func (m *Manager) IsOldPassDiscarded(user *SysUser) (bool, error)

DiscardOldPassword discards old passwords of given users

func (*Manager) Update1100MonitorUserPrivilege added in v1.14.0

func (u *Manager) Update1100MonitorUserPrivilege() (err error)

Update1100MonitorUserPrivilege grants system_user privilege for monitor

func (*Manager) Update160MonitorUserGrant added in v1.6.0

func (u *Manager) Update160MonitorUserGrant(pass string) (err error)

Update160MonitorUserGrant grants SERVICE_CONNECTION_ADMIN rights to the monitor user if pxc version is 8 or more and sets the MAX_USER_CONNECTIONS parameter to 100 (empirically determined)

func (*Manager) Update170XtrabackupUser added in v1.7.0

func (u *Manager) Update170XtrabackupUser(pass string) (err error)

Update170XtrabackupUser grants all needed rights to the xtrabackup user

func (*Manager) UpdatePassExpirationPolicy added in v1.13.0

func (u *Manager) UpdatePassExpirationPolicy(user *SysUser) error

UpdatePassExpirationPolicy sets user password expiration policy to never

func (*Manager) UpdateProxyUser added in v1.12.0

func (u *Manager) UpdateProxyUser(user *SysUser) error

func (*Manager) UpdateUserPass added in v1.12.0

func (m *Manager) UpdateUserPass(user *SysUser) error

UpdateUserPass updates user passwords but retains the current password using Dual Password feature of MySQL 8.

func (*Manager) UpdateUserPassWithoutDP added in v1.12.0

func (u *Manager) UpdateUserPassWithoutDP(user *SysUser) error

UpdateUserPassWithoutDP updates user pass without Dual Password feature introduced in MsSQL 8

type SysUser

type SysUser struct {
	Name  string   `yaml:"username"`
	Pass  string   `yaml:"password"`
	Hosts []string `yaml:"hosts"`
}

Jump to

Keyboard shortcuts

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