Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TestingConn ¶
type TestingConn struct {
// contains filtered or unexported fields
}
TestingConn is struct helping to keep conn to database and help to close it when needed.
func (*TestingConn) Get ¶
func (t *TestingConn) Get() *pg.DB
Get return conn to database which is type orm.DB
type TestingConnTx ¶
type TestingConnTx struct {
// contains filtered or unexported fields
}
TestingConnTx is struct helping to keep conn to database and help to close it when needed.
func NewConnTx ¶
func NewConnTx(t testing.TB) *TestingConnTx
NewConnTx creates new testing connection. Also create transaction which will be closed one .Close() is called
func (*TestingConnTx) Close ¶
func (t *TestingConnTx) Close()
Close will close connection to db and rollback transaction
func (*TestingConnTx) Get ¶
func (t *TestingConnTx) Get() *pg.Tx
Get return conn to database which is type orm.DB
Click to show internal directories.
Click to hide internal directories.