Documentation ¶
Index ¶
- Variables
- func CheckConnection() bool
- func Connect(d DatabaseInfo)
- func DSN(ci MySQLInfo) string
- func Update(bucket_name string, key string, dataStruct interface{}) error
- func View(bucket_name string, key string, dataStruct interface{}) error
- type BoltInfo
- type DatabaseInfo
- type DatabaseType
- type MongoDBInfo
- type MySQLInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BoltDB *bolt.DB // Bolt wrapper Mongo *mgo.Session // Mongo wrapper Sql *sqlx.DB // SQL wrapper )
Functions ¶
func CheckConnection ¶
func CheckConnection() bool
CheckConnection returns true if MongoDB is available
Types ¶
type BoltInfo ¶
type BoltInfo struct {
Path string
}
BoltInfo is the details for the database connection
type DatabaseInfo ¶
type DatabaseInfo struct { Type DatabaseType MySQL MySQLInfo Bolt BoltInfo MongoDB MongoDBInfo }
type DatabaseType ¶
type DatabaseType string
const ( TypeBolt DatabaseType = "Bolt" TypeMongoDB DatabaseType = "MongoDB" TypeMySQL DatabaseType = "MySQL" )
type MongoDBInfo ¶
MongoDBInfo is the details for the database connection
Click to show internal directories.
Click to hide internal directories.