s3_client

package
v0.0.0-...-ce453ac Latest Latest
Warning

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

Go to latest
Published: May 25, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigS3

type ConfigS3 struct {
	Region            string
	S3Host            string
	PartitionID       string
	HostnameImmutable bool
	Bucket            string

	AccessKeyID     string
	SecretAccessKey string
}

type S3Client

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

func NewS3Client

func NewS3Client(ctx context.Context, cfg ConfigS3) (*S3Client, error)

func (*S3Client) DeleteFile

func (s *S3Client) DeleteFile(ctx context.Context, fileName string) error

func (*S3Client) DeleteFolder

func (s *S3Client) DeleteFolder(ctx context.Context, folder string) error

func (*S3Client) DeleteObjects

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

func (*S3Client) GetFile

func (s *S3Client) GetFile(ctx context.Context, fileName string) (io.ReadCloser, error)

func (*S3Client) GetPresignURL

func (s *S3Client) GetPresignURL(ctx context.Context, fileName string) (string, error)

func (*S3Client) GetPureS3Client

func (s *S3Client) GetPureS3Client() *s3.Client

func (*S3Client) ListObjects

func (s *S3Client) ListObjects(ctx context.Context, prefix string) ([]string, error)

func (*S3Client) SaveFile

func (s *S3Client) SaveFile(ctx context.Context, key string, file io.Reader) error

Jump to

Keyboard shortcuts

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