2023-08-19 15:49:57 -04:00
|
|
|
package models
|
|
|
|
|
|
|
|
type Responder interface {
|
|
|
|
Respond() Responder
|
|
|
|
}
|
|
|
|
|
|
|
|
type Response struct {
|
|
|
|
StatusCode int `json:"status_code"`
|
|
|
|
Message string
|
2023-08-19 19:25:13 -04:00
|
|
|
Error string
|
2023-08-19 15:49:57 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
func (r Response) Respond() Responder {
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
2023-08-22 15:24:57 -04:00
|
|
|
type SimpleResponse struct {
|
|
|
|
Message string
|
|
|
|
}
|
|
|
|
|
|
|
|
func (r SimpleResponse) Respond() Responder {
|
|
|
|
return r
|
|
|
|
}
|
|
|
|
|
|
|
|
func NotFoundResponse() SimpleResponse {
|
|
|
|
return SimpleResponse{
|
|
|
|
Message: "Not Found",
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-20 17:56:49 -04:00
|
|
|
type HandleAdminDocumentsUploadResponse struct {
|
|
|
|
Response
|
|
|
|
Data struct {
|
|
|
|
Buckets []Bucket
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
type HandleDocumentationResponse struct {
|
|
|
|
Response
|
|
|
|
Data struct {
|
|
|
|
Buckets []Bucket
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2023-08-19 15:49:57 -04:00
|
|
|
type UploadDocumentResponse struct {
|
|
|
|
Response
|
|
|
|
Data UploadDocumentResponseData
|
|
|
|
}
|
|
|
|
|
|
|
|
type UploadDocumentResponseData struct {
|
|
|
|
Bucket string
|
|
|
|
Object string
|
|
|
|
Size float64
|
|
|
|
}
|
2023-08-19 19:57:47 -04:00
|
|
|
|
|
|
|
type V1SeedResponse struct {
|
|
|
|
Response
|
|
|
|
Data struct {
|
|
|
|
Buckets []string
|
|
|
|
}
|
|
|
|
}
|
2023-08-20 17:56:49 -04:00
|
|
|
|
|
|
|
type V1BucketListResponse struct {
|
|
|
|
Response
|
|
|
|
Data struct {
|
|
|
|
Buckets map[string]string
|
|
|
|
}
|
|
|
|
}
|
2023-08-22 15:08:10 -04:00
|
|
|
|
|
|
|
type V1BucketReadResponse struct {
|
|
|
|
Response
|
|
|
|
Data struct {
|
|
|
|
Keys []string
|
|
|
|
}
|
|
|
|
}
|