aliyun

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const MaxKeys = 1000

MaxKeys is the max limit for list objects.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Endpoint        string `yaml:"endpoint"`
	BucketName      string `yaml:"bucket_name"`
	AccessKeyID     string `yaml:"access_key_id"`
	AccessKeySecret string `yaml:"access_key_secret"`

	Path string
	// contains filtered or unexported fields
}

Client is the client to visit aliyun oss service.

func New

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

New will create a client.

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) Name

func (c *Client) Name(ctx context.Context) (name string)

Name implement base.Read

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) ReadAt

func (c *Client) ReadAt(
	ctx context.Context, p string, start, end int64,
) (b []byte, err error)

ReadAt implement source.ReadAt

func (*Client) Stat

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

Stat implement source.Stat and destination.Stat

Jump to

Keyboard shortcuts

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