Add MakeBucket API.

This commit is contained in:
Harshavardhana
2016-01-24 22:26:53 -08:00
parent 3f1c4bb4b0
commit 432a073e6b
5 changed files with 113 additions and 60 deletions
+25
View File
@@ -1,5 +1,12 @@
package main
import "time"
// MakeBucketArgs - make bucket args.
type MakeBucketArgs struct {
BucketName string `json:"bucketName"`
}
// ListBucketsArgs - list bucket args.
type ListBucketsArgs struct{}
@@ -9,6 +16,24 @@ type ListObjectsArgs struct {
Prefix string `json:"prefix"`
}
// BucketInfo container for list buckets metadata.
type BucketInfo struct {
// The name of the bucket.
Name string `json:"name"`
// Date the bucket was created.
CreationDate time.Time `json:"creationDate"`
}
// ObjectInfo container for list objects metadata.
type ObjectInfo struct {
// Name of the object
Key string `json:"name"`
// Date and time the object was last modified.
LastModified time.Time `json:"lastModified"`
// Size in bytes of the object.
Size int64 `json:"size"`
}
// GetObjectURLArgs - get object url.
type GetObjectURLArgs struct {
BucketName string `json:"bucketName"`