demo

package module
v0.0.0-...-b8bc3a5 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2017 License: MIT Imports: 5 Imported by: 0

README

Demo of using Minute Lab in "unit" tests

Build Status

Demo of using [MinuteLab](http://minutelab.io in "unit" tests

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNothingDone = errors.New("nothing done")

ErrNothingDone is returned by DB operations that didn't do anything but there was no error Like using ExecOnce to delete a specific row that does not exist

Functions

func Init

func Init(d *sql.DB)

Init initialize the library by supply database object

func Store

func Store(u User) error

Store a user in the DB

Types

type User

type User struct {
	ID    string
	Name  string
	Email string
}

User is a user stored in the database

func Get

func Get(id string) (*User, error)

Get a user by ID

Jump to

Keyboard shortcuts

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