gs3

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	BucketName string

	WriteTimeout    time.Duration
	DownloadTimeout time.Duration
	ReadTimeout     time.Duration
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint, accessKeyId, accessKeySecret, bucketName, region string, options ...Option) (*Client, error)

func (*Client) CompletedMultipartUpload

func (c *Client) CompletedMultipartUpload(uploadId string, key string, completedParts []*s3.CompletedPart) (resp *s3.CompleteMultipartUploadOutput, err error)

func (*Client) CreateFolder

func (c *Client) CreateFolder(key string) (err error)

func (*Client) CreateMultipartUpload

func (c *Client) CreateMultipartUpload(key string) (resp *s3.CreateMultipartUploadOutput, err error)

func (*Client) GetObjectAttributes

func (c *Client) GetObjectAttributes(key string, attributes []*string) (*s3.GetObjectAttributesOutput, error)

func (*Client) GetObjectByRange

func (c *Client) GetObjectByRange(key string, offset, size int64) (io.ReadCloser, error)

func (*Client) HeadObject

func (c *Client) HeadObject(key string) (*s3.HeadObjectOutput, error)

func (*Client) List

func (c *Client) List(prefix string) ([]*s3.Object, error)

func (*Client) UploadPart

func (c *Client) UploadPart(uploadId string, body []byte, key string, partNumber int64) (resp *s3.UploadPartOutput, err error)

type Option

type Option func(*Client)

func WithTimeout

func WithTimeout(readTimeout, writeTimeout, downloadTimeout time.Duration) Option

Jump to

Keyboard shortcuts

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