database

package
v0.0.0-...-ffd3783 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	DSN string

	Now func() time.Time
	// contains filtered or unexported fields
}

func NewDB

func NewDB(dsn string) *DB

func (*DB) BeginTx

func (db *DB) BeginTx(ctx context.Context, opts *sql.TxOptions) (*Tx, error)

func (*DB) Close

func (db *DB) Close() error

func (*DB) Open

func (db *DB) Open() (err error)

type StringTime

type StringTime time.Time

func (*StringTime) Scan

func (n *StringTime) Scan(value interface{}) error

func (*StringTime) Value

func (n *StringTime) Value() (driver.Value, error)

type Tx

type Tx struct {
	*sql.Tx

	Now time.Time
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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