change!: renommer HandleV1 à V1GET

BREAKING: renommer `HandleV1` à `V1GET`
This commit is contained in:
Victor Lacasse-Beaudoin 2023-11-20 15:40:52 -05:00
parent 9a8a0abe2e
commit a54fff1192
3 changed files with 12 additions and 12 deletions

View file

@ -19,9 +19,9 @@ type V1Handler struct {
// API Handlers
// HandleV1 affiche les routes accessibles.
// V1GET affiche les routes accessibles.
// Les routes sont triées selon .Path, pour les rendre plus facilement navigables.
func (h *V1Handler) HandleV1(c echo.Context) error {
func (h *V1Handler) V1GET(c echo.Context) error {
routes := c.Echo().Routes()
sort.Slice(routes, func(i, j int) bool { return routes[i].Path < routes[j].Path })
return c.JSON(http.StatusOK, routes)

View file

@ -69,8 +69,8 @@ func (h *V1Handler) V1DocumentPOST(c echo.Context) error {
return c.JSON(response.StatusCode, response)
}
// HandleV1DocumentRead permet de lire le contenu d'un fichier et protentiellement de le télécharger
func (h *V1Handler) HandleV1DocumentRead(c echo.Context) error {
// V1DocumentGET permet de lire le contenu d'un fichier et protentiellement de le télécharger
func (h *V1Handler) V1DocumentGET(c echo.Context) error {
bucket := c.Param("bucket")
document := c.Param("document")
@ -125,13 +125,13 @@ func (h *V1Handler) HandleV1DocumentRead(c echo.Context) error {
return c.Stream(http.StatusOK, document_info.ContentType, document_object)
}
// HandleV1DocumentUpdate permet de mettre à jour certains champs d'un object, comme le Content-Type ou le Filename
func (h *V1Handler) HandleV1DocumentUpdate(c echo.Context) error {
// V1DocumentPUT permet de mettre à jour certains champs d'un object, comme le Content-Type ou le Filename
func (h *V1Handler) V1DocumentPUT(c echo.Context) error {
return c.JSON(apiresponse.NotImplementedResponse())
}
// HandleV1DocumentDelete permet de supprimer un object
func (h *V1Handler) HandleV1DocumentDelete(c echo.Context) error {
// V1DocumentDELETE permet de supprimer un object
func (h *V1Handler) V1DocumentDELETE(c echo.Context) error {
bucket := c.Param("bucket")
document := c.Param("document")