s3

package
v0.0.0-...-bb5f746 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bucket

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

func NewBucket

func NewBucket(name string, opts ...Option) (*Bucket, error)

func (*Bucket) Chmod

func (b *Bucket) Chmod(ctx context.Context, name string, mode os.FileMode) error

func (*Bucket) Copy

func (b *Bucket) Copy(ctx context.Context, from bucketly.Item, to string, opts ...bucketly.CopyOption) error

func (*Bucket) Copy2

func (b *Bucket) Copy2(ctx context.Context, from string, to string, opts ...bucketly.CopyOption) error

func (*Bucket) CopyAll

func (b *Bucket) CopyAll(ctx context.Context, from bucketly.Item, to string, opts ...bucketly.CopyOption) error

func (*Bucket) CopyAll2

func (b *Bucket) CopyAll2(ctx context.Context, from string, to string, opts ...bucketly.CopyOption) error

func (*Bucket) Exists

func (b *Bucket) Exists(ctx context.Context, name string) (bool, error)

func (*Bucket) Items

func (b *Bucket) Items(name string) (bucketly.ListIterator, error)

func (*Bucket) Mkdir

func (b *Bucket) Mkdir(ctx context.Context, name string, opts ...bucketly.WriteOption) error

func (*Bucket) MkdirAll

func (b *Bucket) MkdirAll(ctx context.Context, name string, opts ...bucketly.WriteOption) error

func (*Bucket) Name

func (b *Bucket) Name() string

func (*Bucket) NewReader

func (b *Bucket) NewReader(ctx context.Context, name string) (io.ReadCloser, error)

func (*Bucket) NewWriter

func (b *Bucket) NewWriter(ctx context.Context, name string, opts ...bucketly.WriteOption) (io.WriteCloser, error)

func (*Bucket) PathSeparator

func (b *Bucket) PathSeparator() rune

func (*Bucket) Read

func (b *Bucket) Read(ctx context.Context, name string) ([]byte, error)

func (*Bucket) Remove

func (b *Bucket) Remove(ctx context.Context, name string) error

func (*Bucket) RemoveAll

func (b *Bucket) RemoveAll(ctx context.Context, name string) error

func (*Bucket) Rename

func (b *Bucket) Rename(ctx context.Context, from string, to string, opts ...bucketly.CopyOption) error

func (*Bucket) Stat

func (b *Bucket) Stat(ctx context.Context, name string) (bucketly.Item, error)

func (*Bucket) WaitUntilExists

func (b *Bucket) WaitUntilExists(ctx context.Context, name string) error

func (*Bucket) WaitUntilNotExists

func (b *Bucket) WaitUntilNotExists(ctx context.Context, name string) error

func (*Bucket) Walk

func (b *Bucket) Walk(ctx context.Context, name string, walkFunc bucketly.WalkFunc) error

func (*Bucket) Write

func (b *Bucket) Write(ctx context.Context, name string, data []byte, opts ...bucketly.WriteOption) (int, error)

type BucketManager

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

func NewBucketManager

func NewBucketManager(bucket *Bucket) *BucketManager

func (*BucketManager) Clean

func (m *BucketManager) Clean(ctx context.Context) error

func (*BucketManager) Create

func (m *BucketManager) Create(ctx context.Context) error

func (*BucketManager) Remove

func (m *BucketManager) Remove(ctx context.Context) error

type Config

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

type Option

type Option func(cfg *Config)

func WithAccessKey

func WithAccessKey(accessKeyID string) Option

func WithEndpoint

func WithEndpoint(endpoint string) Option

func WithMaxRetry

func WithMaxRetry(maxRetries int) Option

func WithRegion

func WithRegion(region string) Option

func WithSecretAccessKey

func WithSecretAccessKey(secretAccessKey string) Option

func WithSession

func WithSession(sess *session.Session) Option

func WithSessionToken

func WithSessionToken(sessionToken string) Option

Jump to

Keyboard shortcuts

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