Versions in this module Expand all Collapse all v0 v0.4.2 Apr 5, 2018 v0.4.1 Apr 3, 2018 v0.4.0 Apr 2, 2018 v0.3.0 Dec 3, 2017 Changes in this version + const DBMongoDB + const DBMySQL + const DBPostgres + const DBSQLite + const DatabaseNotSupportedErrMsg + const DefaultSQLiteDBName + var ErrorDBNotSupported = errors.New(DatabaseNotSupportedErrMsg) + func CreateConnection(opts Options) (sqlbuilder.Database, error) + func CreateNoSQLConnection(opts Options) (db.Database, error) + func IsSupportedDB(s string) bool + type CreateDBConnFunc func(Options) (sqlbuilder.Database, error) + type InsertFunc func(string, interface{}) error + type NoSQLRepo struct + func (r NoSQLRepo) CloseConn() error + func (r NoSQLRepo) Insert(tableName string, data interface{}) error + func (r NoSQLRepo) Truncate(tableName string) error + type Options struct + Host string + Name string + Pass string + Path string + Port int + Type string + User string + Verbose bool + func (o Options) String() string + type Repo struct + func (r Repo) CloseConn() error + func (r Repo) Insert(tableName string, data interface{}) error + func (r Repo) Truncate(tableName string) error + type Repository interface + CloseConn func() error + Insert func(string, interface{}) error + Truncate func(string) error + func CreateNoSQLRepo(sd db.Database) Repository + func CreateRepo(sd sqlbuilder.Database) Repository