swift

package
v0.0.0-...-9e2eb7f Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage configuration.

func NewStorage

func NewStorage(user, key, tenant, domain, authUrl string, bucketName, prefix string, retryCnt uint, retryDelay time.Duration, skipSSLVerify bool) (*Storage, error)

NewStorage return new configured S3 storage.

You should always create new storage with this constructor.

func (*Storage) DeleteObject

func (st *Storage) DeleteObject(obj *storage.Object) error

DeleteObject remove object from S3.

func (*Storage) GetObjectACL

func (st *Storage) GetObjectACL(obj *storage.Object) error

GetObjectACL read object ACL from S3.

func (*Storage) GetObjectContent

func (st *Storage) GetObjectContent(obj *storage.Object) error

GetObjectContent read object content and metadata from S3.

func (*Storage) GetObjectMeta

func (st *Storage) GetObjectMeta(obj *storage.Object) error

GetObjectMeta update object metadata from S3.

func (*Storage) List

func (st *Storage) List(output chan<- *storage.Object) error

List S3 bucket and send founded objects to chan.

func (*Storage) PutObject

func (st *Storage) PutObject(obj *storage.Object) error

PutObject saves object to S3. PutObject ignore VersionId, it always save object as latest version.

func (*Storage) WithContext

func (st *Storage) WithContext(ctx context.Context)

WithContext add's context to storage.

func (*Storage) WithRateLimit

func (st *Storage) WithRateLimit(limit int) error

WithRateLimit set rate limit (bytes/sec) for storage.

Jump to

Keyboard shortcuts

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