rename response objects

This commit is contained in:
Victor Lacasse-Beaudoin 2024-08-22 12:26:32 -04:00
parent 52f671cb03
commit 53f41d64a8

View file

@ -19,14 +19,14 @@ func (R *APIResponse) SetStatusCode(code int) {
R.statusCode = code
}
type V1BucketsGET struct {
type ListBucketsResponse struct {
APIResponse
Data struct {
Buckets map[string]string
}
}
type V1BucketGET struct {
type ReadBucketResponse struct {
APIResponse
Data struct {
Keys []string
@ -38,7 +38,7 @@ type DataDocument struct {
Size int64
}
type V1DocumentsPOST struct {
type CreateDocumentsResponse struct {
APIResponse
Data struct {
Bucket string
@ -46,8 +46,7 @@ type V1DocumentsPOST struct {
}
}
// Deprecated: Use V1DocumentsPOST instead
type V1DocumentPOST struct {
type CreateDocumentResponse struct {
APIResponse
Data struct {
Bucket string
@ -55,11 +54,11 @@ type V1DocumentPOST struct {
}
}
type V1DocumentDELETE struct {
type DeleteDocumentResponse struct {
APIResponse
}
type V1DocumentKeyPUT struct {
type UpdateDocumentKeyResponse struct {
APIResponse
Data struct {
Bucket string
@ -67,20 +66,21 @@ type V1DocumentKeyPUT struct {
}
}
type V1SeedPOST struct {
type ExecuteSeedResponse struct {
APIResponse
Data struct {
Buckets []string
}
}
type V1SpecGET struct {
type ReadSpecResponse struct {
APIResponse
Data struct {
Spec string
}
}
// Deprecated: Use ListBucketsResponse instead
type HandleAdminDocumentsUploadResponse struct {
APIResponse
Data struct {
@ -88,6 +88,7 @@ type HandleAdminDocumentsUploadResponse struct {
}
}
// Deprecated: Use ListBucketsResponse instead
type HandleDocumentationResponse struct {
APIResponse
Data struct {
@ -95,11 +96,13 @@ type HandleDocumentationResponse struct {
}
}
// Deprecated: Use CreateDocumentResponse instead
type UploadDocumentAPIResponse struct {
APIResponse
Data UploadDocumentResponseData
}
// Deprecated: Use DataDocument instead
type UploadDocumentResponseData struct {
Bucket string
Object string