2016-01-22 01:28:15 +01:00
|
|
|
package main
|
|
|
|
|
2016-01-25 07:26:53 +01:00
|
|
|
import "time"
|
|
|
|
|
|
|
|
// MakeBucketArgs - make bucket args.
|
|
|
|
type MakeBucketArgs struct {
|
|
|
|
BucketName string `json:"bucketName"`
|
|
|
|
}
|
|
|
|
|
2016-01-24 04:44:32 +01:00
|
|
|
// ListBucketsArgs - list bucket args.
|
|
|
|
type ListBucketsArgs struct{}
|
|
|
|
|
|
|
|
// ListObjectsArgs - list object args.
|
|
|
|
type ListObjectsArgs struct {
|
|
|
|
BucketName string `json:"bucketName"`
|
|
|
|
Prefix string `json:"prefix"`
|
|
|
|
}
|
|
|
|
|
2016-01-25 07:26:53 +01:00
|
|
|
// 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"`
|
|
|
|
}
|
|
|
|
|
2016-01-24 04:44:32 +01:00
|
|
|
// GetObjectURLArgs - get object url.
|
|
|
|
type GetObjectURLArgs struct {
|
|
|
|
BucketName string `json:"bucketName"`
|
|
|
|
ObjectName string `json:"objectName"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// AuthToken - auth token reply
|
2016-01-22 01:28:15 +01:00
|
|
|
type AuthToken struct {
|
|
|
|
Token string `json:"token" form:"token"`
|
|
|
|
}
|
|
|
|
|
2016-01-24 04:44:32 +01:00
|
|
|
// LoginArgs - login arguments.
|
|
|
|
type LoginArgs struct {
|
2016-01-22 01:28:15 +01:00
|
|
|
Username string `json:"username" form:"username"`
|
|
|
|
Password string `json:"password" form:"password"`
|
|
|
|
}
|