sqlengine

package
v0.0.0-...-0a9cbe1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2015 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MySQLEngine

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

func NewMySQLEngine

func NewMySQLEngine(logger lager.Logger) *MySQLEngine

func (*MySQLEngine) Close

func (d *MySQLEngine) Close()

func (*MySQLEngine) CreateDB

func (d *MySQLEngine) CreateDB(dbname string) error

func (*MySQLEngine) CreateUser

func (d *MySQLEngine) CreateUser(username string, password string) error

func (*MySQLEngine) DropDB

func (d *MySQLEngine) DropDB(dbname string) error

func (*MySQLEngine) DropUser

func (d *MySQLEngine) DropUser(username string) error

func (*MySQLEngine) ExistsDB

func (d *MySQLEngine) ExistsDB(dbname string) (bool, error)

func (*MySQLEngine) GrantPrivileges

func (d *MySQLEngine) GrantPrivileges(dbname string, username string) error

func (*MySQLEngine) JDBCURI

func (d *MySQLEngine) JDBCURI(address string, port int64, dbname string, username string, password string) string

func (*MySQLEngine) Open

func (d *MySQLEngine) Open(address string, port int64, dbname string, username string, password string) error

func (*MySQLEngine) Privileges

func (d *MySQLEngine) Privileges() (map[string][]string, error)

func (*MySQLEngine) RevokePrivileges

func (d *MySQLEngine) RevokePrivileges(dbname string, username string) error

func (*MySQLEngine) URI

func (d *MySQLEngine) URI(address string, port int64, dbname string, username string, password string) string

type PostgresEngine

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

func NewPostgresEngine

func NewPostgresEngine(logger lager.Logger) *PostgresEngine

func (*PostgresEngine) Close

func (d *PostgresEngine) Close()

func (*PostgresEngine) CreateDB

func (d *PostgresEngine) CreateDB(dbname string) error

func (*PostgresEngine) CreateUser

func (d *PostgresEngine) CreateUser(username string, password string) error

func (*PostgresEngine) DropDB

func (d *PostgresEngine) DropDB(dbname string) error

func (*PostgresEngine) DropUser

func (d *PostgresEngine) DropUser(username string) error

func (*PostgresEngine) ExistsDB

func (d *PostgresEngine) ExistsDB(dbname string) (bool, error)

func (*PostgresEngine) GrantPrivileges

func (d *PostgresEngine) GrantPrivileges(dbname string, username string) error

func (*PostgresEngine) JDBCURI

func (d *PostgresEngine) JDBCURI(address string, port int64, dbname string, username string, password string) string

func (*PostgresEngine) Open

func (d *PostgresEngine) Open(address string, port int64, dbname string, username string, password string) error

func (*PostgresEngine) Privileges

func (d *PostgresEngine) Privileges() (map[string][]string, error)

func (*PostgresEngine) RevokePrivileges

func (d *PostgresEngine) RevokePrivileges(dbname string, username string) error

func (*PostgresEngine) URI

func (d *PostgresEngine) URI(address string, port int64, dbname string, username string, password string) string

type Provider

type Provider interface {
	GetSQLEngine(engine string) (SQLEngine, error)
}

type ProviderService

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

func NewProviderService

func NewProviderService(logger lager.Logger) *ProviderService

func (*ProviderService) GetSQLEngine

func (p *ProviderService) GetSQLEngine(engine string) (SQLEngine, error)

type SQLEngine

type SQLEngine interface {
	Open(address string, port int64, dbname string, username string, password string) error
	Close()
	ExistsDB(dbname string) (bool, error)
	CreateDB(dbname string) error
	DropDB(dbname string) error
	CreateUser(username string, password string) error
	DropUser(username string) error
	Privileges() (map[string][]string, error)
	GrantPrivileges(dbname string, username string) error
	RevokePrivileges(dbname string, username string) error
	URI(address string, port int64, dbname string, username string, password string) string
	JDBCURI(address string, port int64, dbname string, username string, password string) string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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