client

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ResponseError

func ResponseError(response *http.Response) error

func ResponseErrorFrom

func ResponseErrorFrom(body []byte) error

Types

type Client

type Client struct {
	AccessKeyId     string
	SecretAccessKey string

	Token       string
	Region      string
	Bucket      string
	Domain      string
	Protocol    string
	SOCKS5Proxy string

	SignatureVersion int

	CACertificates     []string
	SkipSystemCAs      bool
	InsecureSkipVerify bool

	UsePathBuckets bool
	// contains filtered or unexported fields
}

func NewClient

func NewClient(client *Client) (*Client, error)

func (*Client) ChangeACL

func (client *Client) ChangeACL(path, acl string) error

func (*Client) CreateBucket

func (client *Client) CreateBucket(name, region, acl string) error

func (*Client) Delete

func (client *Client) Delete(path string) error

func (*Client) DeleteBucket

func (client *Client) DeleteBucket(name string) error

func (*Client) Get

func (client *Client) Get(key string) (io.Reader, error)

func (*Client) GetACL

func (client *Client) GetACL(key string) ([]models.Grant, error)

func (*Client) List

func (client *Client) List() ([]models.Object, error)

func (*Client) ListBuckets

func (client *Client) ListBuckets() ([]models.Bucket, error)

func (*Client) NewUpload

func (client *Client) NewUpload(path string, headers *http.Header) (*Upload, error)

func (*Client) Trace

func (client *Client) Trace(writer io.Writer, traceLevel TraceLevel)

type TraceLevel

type TraceLevel int8
const (
	NoTrace      TraceLevel = 0
	TraceHeaders TraceLevel = 1
	TraceAll     TraceLevel = 2
)

type Upload

type Upload struct {
	Key string
	// contains filtered or unexported fields
}

func (*Upload) Done

func (upload *Upload) Done() error

func (*Upload) ParallelStream

func (upload *Upload) ParallelStream(in io.Reader, blockSize int, threads int) (int64, error)

func (*Upload) Stream

func (upload *Upload) Stream(reader io.Reader, blockSize int) (int64, error)

func (*Upload) Write

func (upload *Upload) Write(body []byte) error

Jump to

Keyboard shortcuts

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