TAKAHiRO TOMiNAGA 004c7e8c8d
[Style][Go] standardize the format of mustache (tiny change) (#17363)
* fix: change indent style to tab in the mustache to generate Go code

* docs: standardize the language names for code blocks

* docs: change indent style to tab in the code blocks

* update: regenerate samples

* `./bin/generate-samples.sh ./bin/configs/*.yaml`
2023-12-10 10:13:49 +08:00

72 lines
1.6 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",
})
}