s3

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(ctx context.Context, region string) (*s3.Client, error)

Types

type S3API

type S3API interface {
	GetObject(ctx context.Context, params *s3.GetObjectInput, optFns ...func(*s3.Options)) (*s3.GetObjectOutput, error)
	PutObject(ctx context.Context, params *s3.PutObjectInput, optFns ...func(*s3.Options)) (*s3.PutObjectOutput, error)
}

type S3File

type S3File struct {
	Bucket string
	Region string
	Key    string
	// contains filtered or unexported fields
}

func NewS3File

func NewS3File(ctx context.Context, api S3API, bucket, region, key string) (*S3File, error)

func (*S3File) Get

func (f *S3File) Get() ([]byte, error)

func (*S3File) Put

func (f *S3File) Put(data []byte) error

Jump to

Keyboard shortcuts

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