sqlengine

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2017 License: Apache-2.0 Imports: 8 Imported by: 3

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) Config added in v1.0.0

func (d *MySQLEngine) Config() config.DBConfig

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(dbname string, username string, password string) string

func (*MySQLEngine) Open

func (d *MySQLEngine) Open(conf config.DBConfig) error

func (*MySQLEngine) RevokePrivileges

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

func (*MySQLEngine) SetExtensions added in v1.0.0

func (d *MySQLEngine) SetExtensions(extensions []string) error

func (*MySQLEngine) URI

func (d *MySQLEngine) URI(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) Config added in v1.0.0

func (d *PostgresEngine) Config() config.DBConfig

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(dbname string, username string, password string) string

func (*PostgresEngine) Open

func (d *PostgresEngine) Open(conf config.DBConfig) error

func (*PostgresEngine) RevokePrivileges

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

func (*PostgresEngine) SetExtensions added in v1.0.0

func (d *PostgresEngine) SetExtensions(extensions []string) error

func (*PostgresEngine) URI

func (d *PostgresEngine) URI(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(conf config.DBConfig) 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
	GrantPrivileges(dbname string, username string) error
	RevokePrivileges(dbname string, username string) error
	SetExtensions(extensions []string) error
	URI(dbname string, username string, password string) string
	JDBCURI(dbname string, username string, password string) string
	Config() config.DBConfig
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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