Discover Packages
github.com/gilcrest/go-API-template
pkg
datastore
package
Version:
v0.0.2
Opens a new window with list of versions in this module.
Published: Oct 20, 2017
License: MIT
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
type Datastore struct {
MainDb *sql .DB
LogDb *sql .DB
}
Datastore struct stores common environment related items
NewDatastore initializes the datastore struct
Tx opens a database connection and starts a database transaction using the
BeginTx method which allows for rollback of the transaction if the context
is cancelled
Source Files
¶
Click to show internal directories.
Click to hide internal directories.