database

package
v0.0.0-...-312545f Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2019 License: MIT Imports: 5 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 {
	DB *gorm.DB
}

DB is the root database for all operations

func Connect

func Connect() (*DB, error)

Connect to the database instance

func (*DB) Seed

func (db *DB) Seed()

Seed the database with test data

func (*DB) User

func (db *DB) User(ctx context.Context, id string) (*model.User, error)

User fetches the user from the database by their id

Jump to

Keyboard shortcuts

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