Commit from m3o/m3o action

This commit is contained in:
m3o-actions
2021-12-10 15:30:19 +00:00
parent 17032521e6
commit 99dd48cf66
21 changed files with 997 additions and 933 deletions

View File

@@ -76,6 +76,14 @@ func (t *SpaceService) Update(request *UpdateRequest) (*UpdateResponse, error) {
}
// Upload a large object. Returns a time limited presigned URL to be used for uploading the object
func (t *SpaceService) Upload(request *UploadRequest) (*UploadResponse, error) {
rsp := &UploadResponse{}
return rsp, t.client.Call("space", "Upload", request, rsp)
}
type CreateRequest struct {
// The name of the object. Use forward slash delimiter to implement a nested directory-like structure e.g. images/foo.jpg
Name string `json:"name"`
@@ -185,3 +193,14 @@ type UpdateResponse struct {
// A public URL to access the object if visibility is "public"
Url string `json:"url"`
}
type UploadRequest struct {
Name string `json:"name"`
// is this object public or private
Visibility string `json:"visibility"`
}
type UploadResponse struct {
// a presigned url to be used for uploading
Url string `json:"url"`
}