dbutil

package
v1.1.0-preview Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2017 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCADataSource added in v1.1.0

func GetCADataSource(dbtype, datasource string, cacount int) string

GetCADataSource returns a datasource with a unqiue database name

func MaskDBCred added in v1.0.5

func MaskDBCred(str string) string

MaskDBCred hides DB credentials in connection string

func NewUserRegistryMySQL

func NewUserRegistryMySQL(datasource string, clientTLSConfig *tls.ClientTLSConfig, csp bccsp.BCCSP) (*sqlx.DB, error)

NewUserRegistryMySQL opens a connection to a postgres database

func NewUserRegistryPostgres

func NewUserRegistryPostgres(datasource string, clientTLSConfig *tls.ClientTLSConfig) (*sqlx.DB, error)

NewUserRegistryPostgres opens a connection to a postgres database

func NewUserRegistrySQLLite3

func NewUserRegistrySQLLite3(datasource string) (*sqlx.DB, error)

NewUserRegistrySQLLite3 returns a pointer to a sqlite database

func UpdateSchema added in v1.1.0

func UpdateSchema(db *sqlx.DB) error

UpdateSchema updates the database tables to use the latest schema

Types

This section is empty.

Jump to

Keyboard shortcuts

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