s3

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDirStream

func NewDirStream(d *Driver, root, path string) interfaces.ObjectPageStream

func NewDriver

func NewDriver(ctx context.Context, opt Options) (interfaces.Accessor, error)

func NewNaiveSignerProvider

func NewNaiveSignerProvider(a, s string) credentials.Provider

Types

type CompleteMultipartUpload

type CompleteMultipartUpload struct {
	XMLName xml.Name `xml:"CompleteMultipartUpload"`
	Parts   []Part   `xml:"Part"`
}

func NewCompleteMultipartUploadFromObjectParts

func NewCompleteMultipartUploadFromObjectParts(input []interfaces.ObjectPart) CompleteMultipartUpload

type DirStream

type DirStream struct {
	*Driver
	// contains filtered or unexported fields
}

func (*DirStream) NextPage

func (d *DirStream) NextPage(ctx context.Context) ([]interfaces.Entry, error)

type Driver

type Driver struct {
	SSEncryption               *string
	SSEncryptionAwsKmsKeyId    *string
	SSEncryptionCustomerAlgo   *string
	SSEncryptionCustomerKey    *string
	SSEncryptionCustomerKeyMD5 *string
	logger.Logger
	// contains filtered or unexported fields
}

func (*Driver) AbortMultipart

func (d *Driver) AbortMultipart(ctx context.Context, path string, args options.AbortMultipart) error

func (*Driver) CompleteMultipart

func (d *Driver) CompleteMultipart(ctx context.Context, path string, args options.CompleteMultipart) error

func (*Driver) Create

func (d *Driver) Create(ctx context.Context, path string, _ options.CreateOptions) error

func (*Driver) CreateMultipart

func (d *Driver) CreateMultipart(ctx context.Context, path string, args options.CreateMultipart) (string, error)

func (*Driver) Delete

func (d *Driver) Delete(ctx context.Context, path string, args options.DeleteOptions) error

func (*Driver) DeleteObject

func (d *Driver) DeleteObject(_ context.Context, path string) (*http.Response, error)

func (*Driver) GetObject

func (d *Driver) GetObject(ctx context.Context, path string, offset, size *uint64) (*http.Response, error)

func (*Driver) HeadObject

func (d *Driver) HeadObject(_ context.Context, path string) (*http.Response, error)

func (*Driver) List

func (*Driver) ListObjects

func (d *Driver) ListObjects(_ context.Context, path string, continuationToken string) (*http.Response, error)

func (*Driver) Metadata

func (d *Driver) Metadata() interfaces.Metadata

func (*Driver) PreSign

func (d *Driver) PreSign(ctx context.Context, path string, args options.PreSignOptions) (req *http.Request, err error)

func (*Driver) Read

func (d *Driver) Read(ctx context.Context, path string, args options.ReadOptions) (io.ReadCloser, error)

func (*Driver) S3AbortMultipartUpload

func (d *Driver) S3AbortMultipartUpload(_ context.Context, path, uploadId string) (*http.Response, error)

func (*Driver) S3CompleteMultipartUpload

func (d *Driver) S3CompleteMultipartUpload(_ context.Context, path, uploadId string, parts []interfaces.ObjectPart) (*http.Response, error)

func (*Driver) S3InitiateMultipartUpload

func (d *Driver) S3InitiateMultipartUpload(_ context.Context, path string) (*http.Response, error)

func (*Driver) S3UploadPartRequest

func (d *Driver) S3UploadPartRequest(ctx context.Context, path string, uploadId string, partNumber uint, size *uint64, body io.ReadCloser) (*http.Request, error)

func (*Driver) Stat

func (*Driver) Write

func (d *Driver) Write(ctx context.Context, path string, args options.WriteOptions, reader io.ReadSeeker) (uint64, error)

func (*Driver) WriteMultipart

func (d *Driver) WriteMultipart(ctx context.Context, path string, args options.WriteMultipart, reader io.ReadSeeker) (interfaces.ObjectPart, error)

type InitiateMultipartUploadResult

type InitiateMultipartUploadResult struct {
	UploadId string `xml:"UploadId"`
}

type Options

type Options struct {
	Bucket   string
	Endpoint string
	Root     string
	Region   string

	AccessKey string
	SecretKey string

	SSEncryption               *string
	SSEncryptionAwsKmsKeyId    *string
	SSEncryptionCustomerAlgo   *string
	SSEncryptionCustomerKey    *string
	SSEncryptionCustomerKeyMD5 *string

	EnableVirtualHostStyle bool
}

type Output

type Output struct {
	IsTruncated           *bool                `xml:"IsTruncated"`
	NextContinuationToken *string              `xml:"NextContinuationToken"`
	CommonPrefixes        []OutputCommonPrefix `xml:"CommonPrefixes"`
	Contents              []OutputContent      `xml:"Contents"`
}

type OutputCommonPrefix

type OutputCommonPrefix struct {
	Prefix string `xml:"Prefix"`
}

type OutputContent

type OutputContent struct {
	Key          string    `xml:"Key"`
	Size         uint64    `xml:"size"`
	LastModified time.Time `xml:"LastModified"`
	ETag         string    `xml:"ETag"`
}

type Part

type Part struct {
	PartNumber uint   `xml:"PartNumber"`
	ETag       string `xml:"ETag"`
}

type Signer

type Signer interface {
	Sign(r *http.Request, reader io.ReadSeeker) error
}

func NewSigner

func NewSigner(service, region, accessKey, secretKey string, allow_anonymous bool) Signer

Jump to

Keyboard shortcuts

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