From 206b45d41e827c87bea40b35acb7f0690e0c1679 Mon Sep 17 00:00:00 2001 From: Victor Lacasse-Beaudoin Date: Tue, 24 Oct 2023 17:42:39 -0400 Subject: [PATCH] =?UTF-8?q?Split=20apiresponse=20en=20fichiers=20mieux=20n?= =?UTF-8?q?omm=C3=A9s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apiresponse/apiresponse.go | 30 ------------------------------ apiresponse/bucket.go | 15 +++++++++++++++ apiresponse/document.go | 10 ++++++++++ apiresponse/seed.go | 8 ++++++++ 4 files changed, 33 insertions(+), 30 deletions(-) create mode 100644 apiresponse/bucket.go create mode 100644 apiresponse/document.go create mode 100644 apiresponse/seed.go diff --git a/apiresponse/apiresponse.go b/apiresponse/apiresponse.go index 71ca286..6df6774 100644 --- a/apiresponse/apiresponse.go +++ b/apiresponse/apiresponse.go @@ -70,33 +70,3 @@ type UploadDocumentResponseData struct { Object string Size float64 } - -type V1SeedResponse struct { - Response - Data struct { - Buckets []string - } -} - -type V1BucketListResponse struct { - Response - Data struct { - Buckets map[string]string - } -} - -type V1BucketReadResponse struct { - Response - Data struct { - Keys []string - } -} - -type V1DocumentCreateResponse struct { - Response - Data struct { - Bucket string - Key string - Size int64 - } -} diff --git a/apiresponse/bucket.go b/apiresponse/bucket.go new file mode 100644 index 0000000..02c26a3 --- /dev/null +++ b/apiresponse/bucket.go @@ -0,0 +1,15 @@ +package apiresponse + +type V1BucketListResponse struct { + Response + Data struct { + Buckets map[string]string + } +} + +type V1BucketReadResponse struct { + Response + Data struct { + Keys []string + } +} diff --git a/apiresponse/document.go b/apiresponse/document.go new file mode 100644 index 0000000..9e1677b --- /dev/null +++ b/apiresponse/document.go @@ -0,0 +1,10 @@ +package apiresponse + +type V1DocumentCreateResponse struct { + Response + Data struct { + Bucket string + Key string + Size int64 + } +} diff --git a/apiresponse/seed.go b/apiresponse/seed.go new file mode 100644 index 0000000..858beab --- /dev/null +++ b/apiresponse/seed.go @@ -0,0 +1,8 @@ +package apiresponse + +type V1SeedResponse struct { + Response + Data struct { + Buckets []string + } +}