wdb

package
v0.0.0-...-3134978 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package storage loads the configuration file with only storage information.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIdsFromResult

func GetIdsFromResult(sqlRes sql.Result) []int

GetIdsFromResult will build a []int from sql.Result

func ParseDateLayout

func ParseDateLayout() string

Types

type Connection

type Connection interface {
	Exec(query string, args ...interface{}) (sql.Result, error)
	Get(dest interface{}, query string, args ...interface{}) error
	Select(dest interface{}, query string, args ...interface{}) error
}

Connection is an interface for making queries.

type Info

type Info struct {
	MySQL mysql.Info `json:"MySQL"`
}

Info contains the database connection information for the different storage.

func LoadConfig

func LoadConfig(configFile string) (*Info, error)

LoadConfig reads the configuration file.

func (*Info) ParseJSON

func (c *Info) ParseJSON(b []byte) error

ParseJSON unmarshals bytes to structs.

Directories

Path Synopsis
driver
mysql
Package mysql provides a wrapper around the sqlx package.
Package mysql provides a wrapper around the sqlx package.

Jump to

Keyboard shortcuts

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