Documentation ¶
Index ¶
Constants ¶
View Source
const ( ErrNegativePuppyID = 400 ErrPuppyNotFound = 404 )
Error codes
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Error ¶
Error (our custom error type) wraps errors with code, message and error itself - what does this even mean??
type Storer ¶
type Storer interface { CreatePuppy(puppy *Puppy) (int, error) // takes a pointer which makes sense since you are modifying that object ReadPuppy(id int) (*Puppy, error) UpdatePuppy(id int, puppy *Puppy) error DeletePuppy(id int) error }
Storer defines standard CRUD operations for Pets
Click to show internal directories.
Click to hide internal directories.