controllers

package
v0.0.0-...-e44992b Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrPetNotFound error = errors.New("pet not found")

Functions

This section is empty.

Types

type Controller

type Controller interface {
	CreatePet(pet *Pet) (*Pet, error)
	ReadPet(id int64) (*Pet, error)
	UpdatePet(pet *Pet) error
	DeletePet(id int64) error
	ListPets() ([]*Pet, error)
}

func NewController

func NewController() Controller

type Pet

type Pet struct {
	ID    int64  `json:"id"`
	Name  string `json:"name"`
	Breed string `json:"breed"`
}

Jump to

Keyboard shortcuts

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