cfssl: Index | Files

package dbconf

import ""


Package Files


func DBFromConfig Uses

func DBFromConfig(path string) (db *sqlx.DB, err error)

DBFromConfig opens a sql.DB from settings in a db config file

type DBConfig Uses

type DBConfig struct {
    DriverName     string `json:"driver"`
    DataSourceName string `json:"data_source"`

DBConfig contains the database driver name and configuration to be passed to Open

func LoadFile Uses

func LoadFile(path string) (cfg *DBConfig, err error)

LoadFile attempts to load the db configuration file stored at the path and returns the configuration. On error, it returns nil.

Package dbconf imports 6 packages (graph) and is imported by 280 packages. Updated 2017-07-17. Refresh now. Tools for package owners.