Documentation
¶
Index ¶
- type OSSAPI
- type OSSStore
- func (store OSSStore) AsConcatableUpload(upload handler.Upload) handler.ConcatableUpload
- func (store OSSStore) AsLengthDeclarableUpload(upload handler.Upload) handler.LengthDeclarableUpload
- func (store OSSStore) AsTerminatableUpload(upload handler.Upload) handler.TerminatableUpload
- func (store OSSStore) GetUpload(ctx context.Context, id string) (handler.Upload, error)
- func (store OSSStore) NewUpload(ctx context.Context, info handler.FileInfo) (handler.Upload, error)
- func (store OSSStore) UseIn(composer *handler.StoreComposer)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OSSAPI ¶
type OSSAPI interface { // GetObject // // download object by a object key // // io.ReadCloser reader instance for reading data from response. // It must be called close() after the usage and only valid when error is nil. // // error it's nil if no error, otherwise it's an error object. // ReadObject(ctx context.Context, objectKey string) (io.ReadCloser, error) // GetObjectSize // // get the object size by a object key // get size from metadata // // error it's nil if no error, otherwise it's an error object. // GetObjectSize(ctx context.Context, objectKey string) (int64, error) // DeleteObject // // remove the object by object keys // // error it's nil if no error, otherwise it's an error object. // DeleteObject(ctx context.Context, objectKey ...string) error // WriteObject // creates a new object and it will overwrite the original one if it exists already. // // objectKey the object key in UTF-8 encoding. The length must be between 1 and 1023, and cannot start with "/" or "\". // reader io.Reader instance for reading the data for uploading // // error it's nil if no error, otherwise it's an error object. // WriteObject(ctx context.Context, objectKey string, r io.Reader) error // AppendObject // // uploads the data in the way of appending an existing or new object. // // reader io.Reader. The read instance for reading the data to append. // offset the start position to append. // // int64 the next append position, it's valid when error is nil. // error it's nil if no error, otherwise it's an error object. // AppendObject(ctx context.Context, objectKey string, r io.Reader, offset int64) (int64, error) }
OSSAPI aliyun oss sdk API
func NewOSSService ¶
NewOSSService aliyun OSS(Object Storage Service) https://www.aliyun.com/product/oss
type OSSStore ¶
type OSSStore struct {
// contains filtered or unexported fields
}
func New ¶
aliyun OSS(Object Storage Service) https://www.aliyun.com/product/oss
func (OSSStore) AsConcatableUpload ¶
func (store OSSStore) AsConcatableUpload(upload handler.Upload) handler.ConcatableUpload
func (OSSStore) AsLengthDeclarableUpload ¶
func (store OSSStore) AsLengthDeclarableUpload(upload handler.Upload) handler.LengthDeclarableUpload
func (OSSStore) AsTerminatableUpload ¶
func (store OSSStore) AsTerminatableUpload(upload handler.Upload) handler.TerminatableUpload
func (OSSStore) UseIn ¶
func (store OSSStore) UseIn(composer *handler.StoreComposer)
Click to show internal directories.
Click to hide internal directories.