Documentation
¶
Index ¶
- Constants
- type Client
- 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) List(ctx context.Context, j *model.Job, fn func(o *model.Object)) (err error)
- func (c *Client) MD5(ctx context.Context, p string) (b string, err error)
- func (c *Client) MD5able() 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.ReadCloser, err error)
- func (c *Client) Readable() bool
- func (c *Client) Stat(ctx context.Context, p string) (o *model.Object, err error)
- func (c *Client) Writable() bool
- func (c *Client) Write(ctx context.Context, p string, size int64, r io.ReadCloser) (err error)
Constants ¶
View Source
const ( StorageClassStandard = "STANDARD" StorageClassStandardIA = "STANDARD_IA" )
Constants for storage class.
View Source
const ( // DefaultMultipartBoundarySize is the default multipart boundary size. // 64 * 1024 * 1024 = 67108864 B = 64 MB DefaultMultipartBoundarySize = 67108864 // 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"` MultipartBoundarySize int64 `yaml:"multipart_boundary_size"` Path string // contains filtered or unexported fields }
Client is the client to visit QingStor service.
Click to show internal directories.
Click to hide internal directories.