Documentation ¶
Index ¶
- func MySQLResetRootPassword(password string) error
- type MySQL
- func (m *MySQL) Close() error
- func (m *MySQL) DatabaseCreate(name string) error
- func (m *MySQL) DatabaseDrop(name string) error
- func (m *MySQL) Databases() ([]types.MySQLDatabase, error)
- func (m *MySQL) Exec(query string, args ...any) (sql.Result, error)
- func (m *MySQL) Ping() error
- func (m *MySQL) Prepare(query string) (*sql.Stmt, error)
- func (m *MySQL) PrivilegesGrant(user, database string) error
- func (m *MySQL) PrivilegesRevoke(user, database string) error
- func (m *MySQL) Query(query string, args ...any) (*sql.Rows, error)
- func (m *MySQL) QueryRow(query string, args ...any) *sql.Row
- func (m *MySQL) UserCreate(user, password string) error
- func (m *MySQL) UserDrop(user string) error
- func (m *MySQL) UserPassword(user, password string) error
- func (m *MySQL) Users() ([]types.MySQLUser, error)
- type Postgres
- func (m *Postgres) Close() error
- func (m *Postgres) DatabaseCreate(name string) error
- func (m *Postgres) DatabaseDrop(name string) error
- func (m *Postgres) Databases() ([]types.PostgresDatabase, error)
- func (m *Postgres) Exec(query string, args ...any) (sql.Result, error)
- func (m *Postgres) HostAdd(database, user, host string) error
- func (m *Postgres) HostRemove(database, user, host string) error
- func (m *Postgres) Ping() error
- func (m *Postgres) Prepare(query string) (*sql.Stmt, error)
- func (m *Postgres) PrivilegesGrant(user, database string) error
- func (m *Postgres) PrivilegesRevoke(user, database string) error
- func (m *Postgres) Query(query string, args ...any) (*sql.Rows, error)
- func (m *Postgres) QueryRow(query string, args ...any) *sql.Row
- func (m *Postgres) UserCreate(user, password string) error
- func (m *Postgres) UserDrop(user string) error
- func (m *Postgres) UserPassword(user, password string) error
- func (m *Postgres) Users() ([]types.PostgresUser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MySQLResetRootPassword ¶
MySQLResetRootPassword 重置 MySQL root密码
Types ¶
type MySQL ¶
type MySQL struct {
// contains filtered or unexported fields
}
func (*MySQL) DatabaseCreate ¶
func (*MySQL) DatabaseDrop ¶
func (*MySQL) PrivilegesGrant ¶
func (*MySQL) PrivilegesRevoke ¶
func (*MySQL) UserCreate ¶
func (*MySQL) UserPassword ¶
type Postgres ¶
type Postgres struct {
// contains filtered or unexported fields
}
func NewPostgres ¶
func (*Postgres) DatabaseCreate ¶
func (*Postgres) DatabaseDrop ¶
func (*Postgres) HostRemove ¶
func (*Postgres) PrivilegesGrant ¶
func (*Postgres) PrivilegesRevoke ¶
func (*Postgres) UserCreate ¶
func (*Postgres) UserPassword ¶
Click to show internal directories.
Click to hide internal directories.