Documentation
¶
Index ¶
- type PSQLClient
- func (p *PSQLClient) BackUpDBWithData(password string, username string, host string, dbname string, debug bool) (string, error)
- func (p *PSQLClient) BackUpSchemaWithData(password string, username string, host string, dbname string, ...) (string, string, error)
- func (p *PSQLClient) CreateUser(username, password string, debug bool) (string, error)
- func (p *PSQLClient) CreateUserSchema(username string, debug bool) (string, error)
- func (p *PSQLClient) DropUser(username string, debug bool) (string, error)
- func (p *PSQLClient) DropUserSchema(username string, debug bool) (string, error)
- func (p *PSQLClient) ExecuteLocalShell(script string, debug bool) (string, error)
- func (p *PSQLClient) ExecutePSQLScriptOverSSH(script string, debug bool) (string, error)
- func (p *PSQLClient) ListDBUsers(debug bool) (string, error)
- func (p *PSQLClient) RestoreSchemaWithData(password string, username string, host string, dbname string, ...) (string, string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PSQLClient ¶
PSQLClient psql client
func NewPSQLClientByHostAndDBName ¶ added in v0.2.12
func NewPSQLClientByHostAndDBName(host string, dbname string) *PSQLClient
NewPSQLClientByHostAndDBName returns a new instance of PSQLClient
func NewPSQLClientForSharedDB ¶ added in v0.3.0
func NewPSQLClientForSharedDB() *PSQLClient
NewPSQLClientForSharedDB returns a new instance of PSQLClient
func (*PSQLClient) BackUpDBWithData ¶ added in v0.2.12
func (p *PSQLClient) BackUpDBWithData(password string, username string, host string, dbname string, debug bool) (string, error)
BackUpDBWithData backs up all tables from a schema using pg_dump
func (*PSQLClient) BackUpSchemaWithData ¶ added in v0.3.0
func (p *PSQLClient) BackUpSchemaWithData(password string, username string, host string, dbname string, schemaName string, debug bool) (string, string, error)
BackUpSchemaWithData backs up all tables from a schema using pg_dump
func (*PSQLClient) CreateUser ¶
func (p *PSQLClient) CreateUser(username, password string, debug bool) (string, error)
CreateUser creates postgres user
func (*PSQLClient) CreateUserSchema ¶
func (p *PSQLClient) CreateUserSchema(username string, debug bool) (string, error)
CreateUserSchema creates a schema for the given user
func (*PSQLClient) DropUser ¶
func (p *PSQLClient) DropUser(username string, debug bool) (string, error)
DropUser drops postgres user
func (*PSQLClient) DropUserSchema ¶
func (p *PSQLClient) DropUserSchema(username string, debug bool) (string, error)
DropUserSchema drop schema for the given user
func (*PSQLClient) ExecuteLocalShell ¶ added in v0.3.0
func (p *PSQLClient) ExecuteLocalShell(script string, debug bool) (string, error)
ExecuteLocalShell executes local shell script
func (*PSQLClient) ExecutePSQLScriptOverSSH ¶ added in v0.3.0
func (p *PSQLClient) ExecutePSQLScriptOverSSH(script string, debug bool) (string, error)
ExecutePSQLScriptOverSSH executes psql script over ssh
func (*PSQLClient) ListDBUsers ¶ added in v0.3.0
func (p *PSQLClient) ListDBUsers(debug bool) (string, error)
ListDBUsers list db users
Click to show internal directories.
Click to hide internal directories.