Documentation ¶
Index ¶
- Constants
- func StsSessionToken(ak string, sk string, duration int, acl string) (*sts_api.GetSessionTokenResult, error)
- type Bos
- func (storage Bos) AbortUpload(key string, uploadID string) error
- func (storage Bos) CompleteUpload(key string, uploadID string, parts []*Part) error
- func (storage Bos) Copy(newKey, copySource string) error
- func (storage Bos) CreateMultipartUpload(key string) (*MultipartCommitOutPut, error)
- func (storage Bos) Deletes(keys []string) error
- func (storage Bos) Get(key string, off, limit int64) (io.ReadCloser, error)
- func (storage Bos) Head(key string) (*HeadObjectOutput, error)
- func (storage Bos) List(input *ListInput) (*ListBlobsOutput, error)
- func (storage Bos) Put(key string, in io.Reader) error
- func (storage Bos) String() string
- func (storage Bos) UploadPart(key string, uploadID string, num int64, body []byte) (*Part, error)
- type HeadObjectOutput
- type ItemOutput
- type ListBlobsOutput
- type ListInput
- type MultipartCommitOutPut
- type ObjectStorage
- type Part
- type PendingPart
- type PrefixOutput
- type S3Storage
- func (storage S3Storage) AbortUpload(key string, uploadID string) error
- func (storage S3Storage) CompleteUpload(key string, uploadID string, parts []*Part) error
- func (storage S3Storage) Copy(newKey, copySource string) error
- func (storage S3Storage) CreateMultipartUpload(key string) (*MultipartCommitOutPut, error)
- func (storage S3Storage) Deletes(keys []string) error
- func (storage S3Storage) Get(key string, off, limit int64) (io.ReadCloser, error)
- func (storage S3Storage) Head(key string) (*HeadObjectOutput, error)
- func (storage S3Storage) List(input *ListInput) (*ListBlobsOutput, error)
- func (storage S3Storage) Put(key string, in io.Reader) error
- func (storage S3Storage) String() string
- func (storage S3Storage) UploadPart(key string, uploadID string, num int64, body []byte) (*Part, error)
Constants ¶
View Source
const (
BosName = "bos"
)
View Source
const S3Name = "s3"
Variables ¶
This section is empty.
Functions ¶
func StsSessionToken ¶
Types ¶
type Bos ¶
type Bos struct {
// contains filtered or unexported fields
}
func (Bos) CompleteUpload ¶
func (Bos) CreateMultipartUpload ¶
func (storage Bos) CreateMultipartUpload(key string) (*MultipartCommitOutPut, error)
type HeadObjectOutput ¶
type HeadObjectOutput struct { ItemOutput ContentType string Metadata map[string]*string IsDir bool }
type ItemOutput ¶
type ListBlobsOutput ¶
type ListBlobsOutput struct { Prefixes []PrefixOutput Items []ItemOutput NextContinuationToken string IsTruncated bool RequestId string }
type MultipartCommitOutPut ¶
type ObjectStorage ¶
type ObjectStorage interface { // Description of the object storage. String() string // Get the data for the given object specified by key. Get(key string, off, limit int64) (io.ReadCloser, error) // Put data read from a reader to an object specified by key. Put(key string, in io.Reader) error // Delete a object. Deletes(key []string) error // Copy Object Copy(key, copySource string) error // Head returns some information about the object or an error if not found. Head(key string) (*HeadObjectOutput, error) // List returns a list of objects. List(input *ListInput) (*ListBlobsOutput, error) // CreateMultipartUpload starts to upload a large object part by part. CreateMultipartUpload(key string) (*MultipartCommitOutPut, error) // UploadPart upload a part of an object. UploadPart(key string, uploadID string, num int64, body []byte) (*Part, error) // AbortUpload abort a multipart upload. AbortUpload(key string, uploadID string) error // CompleteUpload finish an multipart upload. CompleteUpload(key string, uploadID string, parts []*Part) error }
ObjectStorage is the interface for object storage. all of these API should be idempotent.
type PrefixOutput ¶
type PrefixOutput struct {
Prefix string
}
type S3Storage ¶
type S3Storage struct {
// contains filtered or unexported fields
}
func (S3Storage) AbortUpload ¶
func (S3Storage) CompleteUpload ¶
func (S3Storage) CreateMultipartUpload ¶
func (storage S3Storage) CreateMultipartUpload(key string) (*MultipartCommitOutPut, error)
Click to show internal directories.
Click to hide internal directories.