Refactor du projet réduire le nombre de packages et sous-dossiers #200

Merged
vlbeaudoin merged 15 commits from vlbeaudoin/rework/single-package into main 2024-08-22 13:42:33 -04:00 AGit
3 changed files with 7 additions and 10 deletions
Showing only changes of commit 103745fe76 - Show all commits

View file

@ -1,4 +1,4 @@
package models
package main
type Bucket struct {
Name string

View file

@ -11,16 +11,14 @@ import (
"codeberg.org/vlbeaudoin/pave/v2"
"codeberg.org/vlbeaudoin/voki/v3"
"git.agecem.com/agecem/agecem-org/api"
"git.agecem.com/agecem/agecem-org/config"
"git.agecem.com/agecem/agecem-org/media"
"git.agecem.com/agecem/agecem-org/models"
"git.agecem.com/agecem/agecem-org/version"
"github.com/labstack/echo/v4"
"github.com/minio/minio-go/v7"
)
type V1Handler struct {
Config config.Config
Config Config
MediaClient *media.MediaClient
Pave *pave.Pave
}
@ -628,7 +626,7 @@ func (h *WebHandler) HandleDocumentation(c echo.Context) error {
return c.Render(http.StatusOK, "documentation-html", response)
}
response.Data.Buckets = append(response.Data.Buckets, models.Bucket{
response.Data.Buckets = append(response.Data.Buckets, Bucket{
Name: bucket,
DisplayName: displayName,
Documents: v1BucketReadResponse.Data.Keys,
@ -698,7 +696,7 @@ func (h *WebHandler) HandleAdminDocumentsUpload(c echo.Context) error {
}
for bucketName, displayName := range v1BucketsGET.Data.Buckets {
response.Data.Buckets = append(response.Data.Buckets, models.Bucket{
response.Data.Buckets = append(response.Data.Buckets, Bucket{
Name: bucketName,
DisplayName: displayName,
})
@ -722,7 +720,7 @@ func (h *WebHandler) HandleAdminDocumentsUploadPOST(c echo.Context) error {
}
for bucketName, displayName := range v1BucketsGET.Data.Buckets {
response.Data.Buckets = append(response.Data.Buckets, models.Bucket{
response.Data.Buckets = append(response.Data.Buckets, Bucket{
Name: bucketName,
DisplayName: displayName,
})

View file

@ -7,7 +7,6 @@ package main
import (
"codeberg.org/vlbeaudoin/voki/v3"
"git.agecem.com/agecem/agecem-org/models"
)
type APIResponse struct {
@ -89,7 +88,7 @@ type ReadSpecResponse struct {
type HandleAdminDocumentsUploadResponse struct {
APIResponse
Data struct {
Buckets []models.Bucket
Buckets []Bucket
}
}
@ -97,7 +96,7 @@ type HandleAdminDocumentsUploadResponse struct {
type HandleDocumentationResponse struct {
APIResponse
Data struct {
Buckets []models.Bucket
Buckets []Bucket
}
}