controllers

package
v0.0.0-...-b8f4ccc Latest Latest
Warning

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

Go to latest
Published: May 23, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidPetFormat = "Invalid Pet format"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type SvcController

type SvcController struct {
	// contains filtered or unexported fields
}

func NewSvcController

func NewSvcController(da interfaces.IDataAccessor) *SvcController

func (*SvcController) AddPet

func (c *SvcController) AddPet(ctx echo.Context) error

AddPet adds a new pet to the DB

func (*SvcController) DeletePet

func (c *SvcController) DeletePet(ctx echo.Context, petId int64) error

DeletePet deletes a pet from the DB

func (*SvcController) GetPetById

func (c *SvcController) GetPetById(ctx echo.Context, petId int64) error

GetPetById gets a pet by id from the DB

func (*SvcController) GetPets

func (c *SvcController) GetPets(ctx echo.Context) error

GetPets returns all pets from the DB

func (*SvcController) UpdatePetById

func (c *SvcController) UpdatePetById(ctx echo.Context, petId int64) error

UpdatePetById updates pet in the DB

Jump to

Keyboard shortcuts

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