amazons3

package
v0.0.0-...-260b785 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AmazonS3

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

AmazonS3 holds the S3 driver session

func Init

func Init(region, endpoint, bucket string, disableSSL, forcePathStyle *bool) (*AmazonS3, error)

Init initializes an amazon s3 driver

func (*AmazonS3) Close

func (a *AmazonS3) Close() error

Close gracefully close the s3 filestore module

func (*AmazonS3) CreateDir

func (a *AmazonS3) CreateDir(ctx context.Context, req *model.CreateFileRequest) error

CreateDir creates a directory in S3

func (*AmazonS3) CreateFile

func (a *AmazonS3) CreateFile(ctx context.Context, req *model.CreateFileRequest, file io.Reader) error

CreateFile creates a file in S3

func (*AmazonS3) DeleteDir

func (a *AmazonS3) DeleteDir(ctx context.Context, path string) error

DeleteDir deletes a directory in S3

func (*AmazonS3) DeleteFile

func (a *AmazonS3) DeleteFile(ctx context.Context, path string) error

DeleteFile deletes a file from S3

func (*AmazonS3) DoesExists

func (a *AmazonS3) DoesExists(ctx context.Context, path string) error

DoesExists checks if path exists

func (*AmazonS3) GetState

func (a *AmazonS3) GetState(ctx context.Context) error

GetState checks if sc is able to query s3

func (*AmazonS3) GetStoreType

func (a *AmazonS3) GetStoreType() utils.FileStoreType

GetStoreType returns the file store type

func (*AmazonS3) ListDir

ListDir lists a directory in S3

func (*AmazonS3) ReadFile

func (a *AmazonS3) ReadFile(ctx context.Context, path string) (*model.File, error)

ReadFile reads a file from S3

Jump to

Keyboard shortcuts

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