testdb

package
v0.0.0-...-68c1abf Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2019 License: MIT Imports: 7 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 {
	// contains filtered or unexported fields
}

func New

func New(db *database.Database) (*DB, error)

func (*DB) GetActiveUsers

func (db *DB) GetActiveUsers(ctx context.Context) ([]User, error)

func (*DB) InsertUser

func (db *DB) InsertUser(ctx context.Context, username string) (int, error)

type Entity

type Entity struct {
	ID        int        `db:"id"`
	CreatedAt time.Time  `db:"created_at"`
	UpdatedAt time.Time  `db:"updated_at"`
	DeletedAt *time.Time `db:"deleted_at"`
	CreatedBy string     `db:"created_by"`
	UpdatedBy string     `db:"updated_by"`
	DeletedBy *string    `db:"deleted_by"`
}

type Logger

type Logger struct {
}

func (Logger) After

func (l Logger) After(ctx context.Context, err error, name, statement string, args ...interface{}) error

func (Logger) Before

func (l Logger) Before(ctx context.Context, name, statement string, args ...interface{}) (context.Context, error)

type NewRelic

type NewRelic struct {
}

func (NewRelic) After

func (l NewRelic) After(ctx context.Context, err error, name, statement string, args ...interface{}) error

func (NewRelic) Before

func (l NewRelic) Before(ctx context.Context, name, statement string, args ...interface{}) (context.Context, error)

type User

type User struct {
	Entity

	Username string `db:"username"`
}

Jump to

Keyboard shortcuts

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