s3

package
v0.0.0-...-998e4dc Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateSession = func(region string) *session.Session {
	return session.Must(session.NewSession(&aws.Config{
		Region: aws.String(region),
	}))
}

Functions

This section is empty.

Types

type Bucket

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

func New

func New(region string, bucketName string) Bucket

func (Bucket) GetObject

func (bucket Bucket) GetObject(key string) (BucketObject, error)

func (Bucket) ListObjects

func (bucket Bucket) ListObjects() ([]string, error)

type BucketObject

type BucketObject struct {
	Body          io.ReadCloser
	ContentLength int64
	ContentType   string
}

type BucketReaderWriter

type BucketReaderWriter interface {
	ListObjects
	GetObject
}

type GetObject

type GetObject interface {
	GetObject(key string) (BucketObject, error)
}

type ListObjects

type ListObjects interface {
	ListObjects() ([]string, error)
}

Jump to

Keyboard shortcuts

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