Documentation ¶
Index ¶
- type Client
- type OSSClient
- func (client *OSSClient) Copy(ctx context.Context, src, dst string) error
- func (client *OSSClient) Exist(ctx context.Context, key string) (bool, error)
- func (client *OSSClient) Info(ctx context.Context, key string) (*ObjectInfo, error)
- func (client *OSSClient) List(ctx context.Context, prefix string) ([]ObjectItem, error)
- func (client *OSSClient) Read(ctx context.Context, key string) (io.ReadCloser, error)
- func (client *OSSClient) Remove(ctx context.Context, keys ...string) error
- func (client *OSSClient) Write(ctx context.Context, key string, r io.Reader, o *WriteOptions) error
- type OSSConfig
- type ObjectInfo
- type ObjectItem
- type S3Client
- func (client *S3Client) Copy(ctx context.Context, src, dst string) error
- func (client *S3Client) Exist(ctx context.Context, key string) (bool, error)
- func (client *S3Client) Info(ctx context.Context, key string) (*ObjectInfo, error)
- func (client *S3Client) List(ctx context.Context, prefix string) ([]ObjectItem, error)
- func (client *S3Client) Read(ctx context.Context, key string) (io.ReadCloser, error)
- func (client *S3Client) Remove(ctx context.Context, keys ...string) error
- func (client *S3Client) Write(ctx context.Context, key string, r io.Reader, o *WriteOptions) error
- type S3Config
- type TimeoutReader
- type WriteOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client interface { // The caller should close the returned reader when done. Read(ctx context.Context, key string) (io.ReadCloser, error) // The WriteOptions can be empty for OSS clients. But caller must set the // Size option for S3 clients. Write(ctx context.Context, key string, r io.Reader, o *WriteOptions) error Exist(ctx context.Context, key string) (bool, error) Remove(ctx context.Context, keys ...string) error // Empty prefix will list every objects in the bucket. Otherwise, the // prefix should end with a "/". List(ctx context.Context, prefix string) ([]ObjectItem, error) Info(ctx context.Context, key string) (*ObjectInfo, error) Copy(ctx context.Context, src, dst string) error }
func NewOSSClient ¶
func NewS3Client ¶
type OSSClient ¶
type OSSClient struct {
// contains filtered or unexported fields
}
type ObjectInfo ¶
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
type TimeoutReader ¶
type TimeoutReader struct {
// contains filtered or unexported fields
}
TimeoutReader will call the cancel function if Read() was blocked for about 30 seconds.
func (*TimeoutReader) Close ¶
func (reader *TimeoutReader) Close() error
type WriteOptions ¶
Click to show internal directories.
Click to hide internal directories.