Documentation ¶ Index ¶ Variables type Pet type PetClient func NewPetClient(host string) *PetClient func (c *PetClient) Add(pet Pet) error func (c *PetClient) All() (Pets, error) func (c *PetClient) ByID(id int) (Pet, error) type Pets Constants ¶ This section is empty. Variables ¶ View Source var NotFoundError = errors.New("pet not found") Functions ¶ This section is empty. Types ¶ type Pet ¶ type Pet struct { Name string `json:"name"` Age int `json:"age"` } type PetClient ¶ type PetClient struct { // contains filtered or unexported fields } func NewPetClient ¶ func NewPetClient(host string) *PetClient func (*PetClient) Add ¶ func (c *PetClient) Add(pet Pet) error func (*PetClient) All ¶ func (c *PetClient) All() (Pets, error) func (*PetClient) ByID ¶ func (c *PetClient) ByID(id int) (Pet, error) type Pets ¶ type Pets []Pet Source Files ¶ View all Source files client.go Click to show internal directories. Click to hide internal directories.