adapters

package
v0.0.0-...-7f59ee1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Config

type S3Config struct {
	Region           string
	AccessKeyID      string
	SecretAccessKey  string
	Endpoint         string
	Bucket           string
	DisableSSL       bool
	S3ForcePathStyle bool
}

type S3Session

type S3Session struct {
	Bucket string
	// contains filtered or unexported fields
}

func NewS3

func NewS3(s *S3Config) (*S3Session, error)

New create a new session to connect to s3 Object storage

func (*S3Session) Connect

func (s *S3Session) Connect() error

try to connect

func (*S3Session) DeleteObject

func (s *S3Session) DeleteObject(objectKey string) error

DeleteObject file on s3 bucket

func (*S3Session) DownloadObject

func (s *S3Session) DownloadObject(objectKey, dst string) error

Download file from s3 bucket, dst includes filename

func (*S3Session) UploadObject

func (s *S3Session) UploadObject(src, objectKey string) error

UploadObject is a function to upload to s3 onject storage

Jump to

Keyboard shortcuts

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