2023-06-03 11:08:33 +08:00

71 lines
1.7 KiB
Go

package handlers
import (
"gitlab.com/openapitools/petstore/models"
"github.com/labstack/echo/v4"
"net/http"
)
// AddPet - Add a new pet to the store
func (c *Container) AddPet(ctx echo.Context) error {
return ctx.JSON(http.StatusOK, models.HelloWorld {
Message: "Hello World",
})
}
// DeletePet - Deletes a pet
func (c *Container) DeletePet(ctx echo.Context) error {
return ctx.JSON(http.StatusOK, models.HelloWorld {
Message: "Hello World",
})
}
// FindPetsByStatus - Finds Pets by status
func (c *Container) FindPetsByStatus(ctx echo.Context) error {
return ctx.JSON(http.StatusOK, models.HelloWorld {
Message: "Hello World",
})
}
// FindPetsByTags - Finds Pets by tags
// Deprecated
func (c *Container) FindPetsByTags(ctx echo.Context) error {
return ctx.JSON(http.StatusOK, models.HelloWorld {
Message: "Hello World",
})
}
// GetPetById - Find pet by ID
func (c *Container) GetPetById(ctx echo.Context) error {
return ctx.JSON(http.StatusOK, models.HelloWorld {
Message: "Hello World",
})
}
// UpdatePet - Update an existing pet
func (c *Container) UpdatePet(ctx echo.Context) error {
return ctx.JSON(http.StatusOK, models.HelloWorld {
Message: "Hello World",
})
}
// UpdatePetWithForm - Updates a pet in the store with form data
func (c *Container) UpdatePetWithForm(ctx echo.Context) error {
return ctx.JSON(http.StatusOK, models.HelloWorld {
Message: "Hello World",
})
}
// UploadFile - uploads an image
func (c *Container) UploadFile(ctx echo.Context) error {
return ctx.JSON(http.StatusOK, models.HelloWorld {
Message: "Hello World",
})
}