s3

package
v2.0.5+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const ErrorCodeNotFound = "NoSuchKey"

ErrorCodeNotFound is the error code for key not found.

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 {
	BucketName          string `yaml:"bucket_name"`
	Endpoint            string `yaml:"endpoint"`
	Region              string `yaml:"region"`
	AccessKeyID         string `yaml:"access_key_id"`
	SecretAccessKey     string `yaml:"secret_access_key"`
	DisableSSL          bool   `yaml:"disable_ssl"`
	UseAccelerate       bool   `yaml:"use_accelerate"`
	PathStyle           bool   `yaml:"path_style"`
	EnableListObjectsV2 bool   `yaml:"enable_list_objects_v2"`

	Path string
	// contains filtered or unexported fields
}

Client is the client to visit service.

func New

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

New will create a new client.

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) 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.Reader, err error)

Read implement source.Read

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

func (c *Client) Readable() bool

Readable implement source.Readable

func (*Client) Stat

func (c *Client) Stat(ctx context.Context, p string) (o *model.SingleObject, 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