pet

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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

Jump to

Keyboard shortcuts

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