datastore

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package datastore TODO

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datastore

type Datastore struct {
	MainDb *sql.DB
	LogDb  *sql.DB
}

Datastore struct stores common environment related items

func NewDatastore

func NewDatastore() (*Datastore, error)

NewDatastore initializes the datastore struct

func (Datastore) Tx

func (ds Datastore) Tx(ctx context.Context, opts *sql.TxOptions) (*sql.Tx, error)

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

Jump to

Keyboard shortcuts

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