s3

package
v0.0.0-...-c2c101f Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewS3Handler

func NewS3Handler(ctx context.Context, s3Client *S3Client) (builder.DataProcHandler, error)

Types

type S3Client

type S3Client struct {
	Client *s3.S3
}

func NewS3

func NewS3(ak, sk string, s3cfg helper.S3Config) *S3Client

func (*S3Client) DeleteObject

func (s *S3Client) DeleteObject(bucketName, objectName string) (err error)

func (*S3Client) DeleteObjects

func (s *S3Client) DeleteObjects(ctx context.Context, bucket string, objects []string) (err error)

func (*S3Client) GetObject

func (s *S3Client) GetObject(ctx context.Context, bucketName, objectName string, offset uint64, end uint64) (result []byte, size uint64, err error)

func (*S3Client) HeadObject

func (s *S3Client) HeadObject(bucketName, objectName string) (size uint64, err error)

func (*S3Client) PutObject

func (s *S3Client) PutObject(ctx context.Context, bucketName, objectName string, value []byte) (err error)

type S3Handler

type S3Handler struct {
	Ctx      context.Context
	S3Client *S3Client
}

func (*S3Handler) DeleteData

func (s *S3Handler) DeleteData(params *types.DeleteData) (err error)

func (*S3Handler) Get

func (s *S3Handler) Get(params *types.GetData) (data []byte, size uint64, err error)

func (*S3Handler) Put

func (s *S3Handler) Put(params *types.PutData, data []byte) (err error)

Jump to

Keyboard shortcuts

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