Documentation
¶
Index ¶
- type PSQLClient
- func (p *PSQLClient) BackUpDBWithData(password string, username string, host string, dbname string, debug bool) (string, error)
- func (p *PSQLClient) BackUpSchemaOnlyWithData(password string, username string, host string, dbname string, ...) (string, error)
- func (p *PSQLClient) CreateUser(username, password string) (string, error)
- func (p *PSQLClient) CreateUserSchema(username string) (string, error)
- func (p *PSQLClient) DropUser(username string) (string, error)
- func (p *PSQLClient) DropUserSchema(username string) (string, error)
- func (p *PSQLClient) RestoreSchemaWithData(password string, username string, host string, dbname 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 NewPSQLClient ¶
func NewPSQLClient() *PSQLClient
NewPSQLClient returns a new instance of PSQLClient
func NewPSQLClientByHostAndDBName ¶ added in v0.2.12
func NewPSQLClientByHostAndDBName(host string, dbname string) *PSQLClient
NewPSQLClientByHostAndDBName 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) BackUpSchemaOnlyWithData ¶ added in v0.2.12
func (p *PSQLClient) BackUpSchemaOnlyWithData(password string, username string, host string, dbname string, schemaName string, debug bool) (string, error)
BackUpSchemaOnlyWithData backs up all tables from a schema using pg_dump
func (*PSQLClient) CreateUser ¶
func (p *PSQLClient) CreateUser(username, password string) (string, error)
CreateUser creates postgres user
func (*PSQLClient) CreateUserSchema ¶
func (p *PSQLClient) CreateUserSchema(username string) (string, error)
CreateUserSchema creates a schema for the given user
func (*PSQLClient) DropUser ¶
func (p *PSQLClient) DropUser(username string) (string, error)
DropUser drops postgres user
func (*PSQLClient) DropUserSchema ¶
func (p *PSQLClient) DropUserSchema(username string) (string, error)
DropUserSchema drop schema for the given user
Click to show internal directories.
Click to hide internal directories.