applying

package
v0.0.0-...-7c18459 Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestLoad_happyPath

func TestLoad_happyPath(t *testing.T)

Types

type Person

type Person struct {
	// ID is the unique ID for this person
	ID int
	// FullName is the name of this person
	FullName string
	// Phone is the phone for this person
	Phone string
	// Currency is the currency this person has paid in
	Currency string
	// Price is the amount (in the above currency) paid by this person
	Price float64
}

Person is the data transfer object (DTO) for this package

func Load

func Load(ID int) (*Person, error)

Load will attempt to load and return a person. It will return ErrNotFound when the requested person does not exist. Any other errors returned are caused by the underlying database or our connection to it.

Jump to

Keyboard shortcuts

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