s3

package module
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: MIT Imports: 12 Imported by: 2

README

Sync S3

Sync S3 is a Mojura sync library for S3.

Documentation

Index

Constants

View Source
const (
	// ErrInvalidName is returned when a name is empty
	ErrInvalidName = errors.Error("invalid name, cannot be empty")
	// ErrInvalidDirectory is returned when a directory is empty
	ErrInvalidDirectory = errors.Error("invalid directory, cannot be empty")
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Key    string `toml:"key" json:"key"`
	Secret string `toml:"secret" json:"secret"`

	Endpoint string `toml:"endpoint" json:"endpoint"`
	Region   string `toml:"region" json:"region"`

	Bucket              string `toml:"bucket" json:"bucket"`
	AvoidBucketCreation bool   `toml:"avoid-bucket-creation" json:"avoidBucketCreation"`
}

type S3

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

func New

func New(o Options) (sp *S3, err error)

func (*S3) Export

func (s *S3) Export(ctx context.Context, prefix, filename string, r io.Reader) (newFilename string, err error)

func (*S3) Get added in v0.3.1

func (s *S3) Get(ctx context.Context, prefix, filename string, fn func(r io.Reader) error) (err error)

func (*S3) GetNext added in v0.1.1

func (s *S3) GetNext(ctx context.Context, prefix, lastFilename string) (nextKey string, err error)

func (*S3) Import

func (s *S3) Import(ctx context.Context, prefix, filename string, w io.Writer) (err error)

Jump to

Keyboard shortcuts

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