qingstor

package
v2.0.0-beta.6+incompat... Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 25, 2018 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

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"`
	BucketName      string `yaml:"bucket_name"`
	AccessKeyID     string `yaml:"access_key_id"`
	SecretAccessKey string `yaml:"secret_access_key"`

	Path string
	// contains filtered or unexported fields
}

Client is the client to visit QingStor service.

func New

func New(ctx context.Context, et uint8) (c *Client, err error)

New will create a new QingStor client.

func (*Client) Fetch

func (c *Client) Fetch(ctx context.Context, p, url string) (err error)

Fetch implement destination.Fetch

func (*Client) Fetchable

func (c *Client) Fetchable() bool

Fetchable implement destination.Fetchable

func (*Client) GetZone

func (c *Client) GetZone() (zone string, err error)

GetZone determines the zone of bucket.

func (*Client) List

func (c *Client) List(ctx context.Context, j *model.Job, fn func(o *model.Object)) (err error)

List implement source.List

func (*Client) MD5

func (c *Client) MD5(ctx context.Context, p string) (b string, err error)

MD5 implement source.MD5 and destination.MD5

func (*Client) Reach

func (c *Client) Reach(ctx context.Context, p string) (url string, err error)

Reach implement source.Fetch

func (*Client) Reachable

func (c *Client) Reachable() bool

Reachable implement source.Reachable

func (*Client) Read

func (c *Client) Read(ctx context.Context, p string) (r io.ReadCloser, err error)

Read implement source.Read

func (*Client) Readable

func (c *Client) Readable() bool

Readable implement source.Readable

func (*Client) Stat

func (c *Client) Stat(ctx context.Context, p string) (o *model.Object, err error)

Stat implement source.Stat and destination.Stat

func (*Client) Writable

func (c *Client) Writable() bool

Writable implement destination.Writable

func (*Client) Write

func (c *Client) Write(ctx context.Context, p string, r io.ReadCloser) (err error)

Write implement destination.Write

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL