s3

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2023 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const MinutesToExpireSignedURL = 15

Variables

This section is empty.

Functions

This section is empty.

Types

type IClient

type IClient interface {
	ListBuckets() (string, error)
	CreateBucket(bucket string, isPublic bool) (string, error)
	PutObjectsAsync(bucket string, filenames []string, outCh chan string, errCh chan error)
	PutObjects(bucket string, filePaths []string) (output []string, errArr []error)
	ListObjects(bucket string) (string, error)
	GetObject(bucket, key, path string) (string, error)
	DeleteObject(bucket, key string) (string, error)
	DeleteBucket(bucket string) (string, error)
	AssignURL(bucket, key string) (string, error)
}

func New

func New(config *config.AWS) (IClient, error)

type S3

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

func (*S3) AssignURL

func (service *S3) AssignURL(bucket, key string) (string, error)

func (*S3) CreateBucket

func (service *S3) CreateBucket(bucket string, isPublic bool) (string, error)

func (*S3) DeleteBucket

func (service *S3) DeleteBucket(bucket string) (string, error)

func (*S3) DeleteObject

func (service *S3) DeleteObject(bucket, key string) (string, error)

func (*S3) GetObject

func (service *S3) GetObject(bucket, key, path string) (string, error)

func (*S3) ListBuckets

func (service *S3) ListBuckets() (string, error)

func (*S3) ListObjects

func (service *S3) ListObjects(bucket string) (string, error)

func (*S3) PutObjects

func (service *S3) PutObjects(bucket string, filePaths []string) (output []string, errArr []error)

func (*S3) PutObjectsAsync

func (service *S3) PutObjectsAsync(bucket string, filenames []string, outCh chan string, errCh chan error)

Jump to

Keyboard shortcuts

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