Documentation ¶
Index ¶
- Constants
- type Client
- func (c *Client) Deletable() bool
- func (c *Client) Delete(ctx context.Context, p string) (err error)
- func (c *Client) Fetch(ctx context.Context, p, url string) (err error)
- func (c *Client) Fetchable() bool
- func (c *Client) GetZone() (zone string, err error)
- func (c *Client) InitPart(ctx context.Context, p string, size int64) (uploadID string, partSize int64, partNumbers int, err error)
- func (c *Client) List(ctx context.Context, j *model.DirectoryObject, fn func(o model.Object)) (err error)
- func (c *Client) Name(ctx context.Context) (name string)
- func (c *Client) Partable() bool
- func (c *Client) Reach(ctx context.Context, p string) (url string, err error)
- func (c *Client) Reachable() bool
- func (c *Client) Read(ctx context.Context, p string) (r io.Reader, err error)
- func (c *Client) ReadRange(ctx context.Context, p string, offset, size int64) (r io.Reader, err error)
- func (c *Client) Stat(ctx context.Context, p string) (o *model.SingleObject, err error)
- func (c *Client) UploadPart(ctx context.Context, o *model.PartialObject, r io.Reader) (err error)
- func (c *Client) Writable() bool
- func (c *Client) Write(ctx context.Context, p string, size int64, r io.Reader) (err error)
- type ObjectParts
Constants ¶
View Source
const ( StorageClassStandard = "STANDARD" StorageClassStandardIA = "STANDARD_IA" )
Constants for storage class.
View Source
const ( // DefaultMultipartBoundarySize is the default multipart size. // 64 * 1024 * 1024 = 67108864 B = 64 MB DefaultMultipartSize = 67108864 // MaxAutoMultipartSize is the max auto multipart size. // If part size is over MaxAutoMultipartSize, we will not detect it any more. // 1024 * 1024 * 1024 = 1073741824 B = 1 GB MaxAutoMultipartSize = 1073741824 // MaxMultipartNumber is the max part that QingStor supported. MaxMultipartNumber = 10000 // MaxMultipartBoundarySize is the max multipart boundary size. // Over this, put object will be reset by server. // 5 * 1024 * 1024 * 1024 = 5368709120 B = 5 GB MaxMultipartBoundarySize = 5368709120 )
Multipart related constants. ref: https://docs.qingcloud.com/qingstor/api/object/multipart/index.html
View Source
const DirectoryContentType = "application/x-directory"
DirectoryContentType is the content type for qingstor directory.
View Source
const MaxListObjectsLimit = 1000
MaxListObjectsLimit is the max limit for list objects.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Protocol string `yaml:"protocol"` Host string `yaml:"host"` Port int `yaml:"port"` Zone string `yaml:"zone"` BucketName string `yaml:"bucket_name"` AccessKeyID string `yaml:"access_key_id"` SecretAccessKey string `yaml:"secret_access_key"` StorageClass string `yaml:"storage_class"` Path string // contains filtered or unexported fields }
Client is the client to visit QingStor service.
func (*Client) InitPart ¶
func (c *Client) InitPart(ctx context.Context, p string, size int64) (uploadID string, partSize int64, partNumbers int, err error)
InitPart implement destination.InitPart
func (*Client) List ¶
func (c *Client) List(ctx context.Context, j *model.DirectoryObject, fn func(o model.Object)) (err error)
List implement source.List
func (*Client) ReadRange ¶
func (c *Client) ReadRange( ctx context.Context, p string, offset, size int64, ) (r io.Reader, err error)
ReadRange implement source.ReadRange
func (*Client) UploadPart ¶
UploadPart implement destination.UploadPart
type ObjectParts ¶
ObjectParts will store multipart upload status.
Click to show internal directories.
Click to hide internal directories.