awsutils

package
v0.0.0-...-d983439 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwsUtils

type AwsUtils interface {
	NewSessionWithOptions(endpoint, accessKey, secretKey, region string) (*session.Session, error)
	DeleteObject(s3Client *s3.S3, BucketName, BasePath string) (*s3.DeleteObjectOutput, error)
	ListObjectsV2(s3Client *s3.S3, BucketName, BasePath string) (*s3.ListObjectsV2Output, error)
	ListBuckets(s3Client *s3.S3) (*s3.ListBucketsOutput, error)
	NewUploader(sess *session.Session, BucketName, BasePath string) (*s3manager.UploadOutput, error)
	New(sess *session.Session) *s3.S3
}

func NewAwsUtils

func NewAwsUtils() AwsUtils

type AwsUtilsImpl

type AwsUtilsImpl struct {
}

func (*AwsUtilsImpl) DeleteObject

func (au *AwsUtilsImpl) DeleteObject(s3Client *s3.S3, BucketName, BasePath string) (*s3.DeleteObjectOutput, error)

func (*AwsUtilsImpl) ListBuckets

func (au *AwsUtilsImpl) ListBuckets(s3Client *s3.S3) (*s3.ListBucketsOutput, error)

func (*AwsUtilsImpl) ListObjectsV2

func (au *AwsUtilsImpl) ListObjectsV2(s3Client *s3.S3, BucketName, BasePath string) (*s3.ListObjectsV2Output, error)

func (*AwsUtilsImpl) New

func (au *AwsUtilsImpl) New(sess *session.Session) *s3.S3

func (*AwsUtilsImpl) NewSessionWithOptions

func (au *AwsUtilsImpl) NewSessionWithOptions(endpoint, accessKey, secretKey, region string) (*session.Session, error)

func (*AwsUtilsImpl) NewUploader

func (au *AwsUtilsImpl) NewUploader(sess *session.Session, BucketName, BasePath string) (*s3manager.UploadOutput, error)

type MockAwsUtils

type MockAwsUtils struct {
	NewSessionWithOptionsFunc func(endpoint, accessKey, secretKey, region string) (*session.Session, error)
	ListBucketsFunc           func(s3Client *s3.S3) (*s3.ListBucketsOutput, error)
	DeleteObjectFunc          func(s3Client *s3.S3, BucketName, BasePath string) (*s3.DeleteObjectOutput, error)
	ListObjectsV2Func         func(s3Client *s3.S3, BucketName, BasePath string) (*s3.ListObjectsV2Output, error)
	NewUploaderFunc           func(sess *session.Session, BucketName, BasePath string) (*s3manager.UploadOutput, error)
	NewFunc                   func(sess *session.Session) *s3.S3
}

func (*MockAwsUtils) DeleteObject

func (mau *MockAwsUtils) DeleteObject(s3Client *s3.S3, BucketName, BasePath string) (*s3.DeleteObjectOutput, error)

func (*MockAwsUtils) ListBuckets

func (mau *MockAwsUtils) ListBuckets(s3Client *s3.S3) (*s3.ListBucketsOutput, error)

func (*MockAwsUtils) ListObjectsV2

func (mau *MockAwsUtils) ListObjectsV2(s3Client *s3.S3, BucketName, BasePath string) (*s3.ListObjectsV2Output, error)

func (*MockAwsUtils) New

func (mau *MockAwsUtils) New(sess *session.Session) *s3.S3

func (*MockAwsUtils) NewSessionWithOptions

func (mau *MockAwsUtils) NewSessionWithOptions(endpoint, accessKey, secretKey, region string) (*session.Session, error)

func (*MockAwsUtils) NewUploader

func (mau *MockAwsUtils) NewUploader(sess *session.Session, BucketName, BasePath string) (*s3manager.UploadOutput, error)

Jump to

Keyboard shortcuts

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