amazons3

package
v0.10.1 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2019 License: Apache-2.0 Imports: 12 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 string) (*AmazonS3, error)

Init initializes an amazon s3 driver

func (*AmazonS3) Close

func (a *AmazonS3) Close() error

Gracefully close the s3 filestore module

func (*AmazonS3) CreateDir

func (a *AmazonS3) CreateDir(project string, req *model.CreateFileRequest) error

CreateDir creates a directory in S3

func (*AmazonS3) CreateFile

func (a *AmazonS3) CreateFile(project string, req *model.CreateFileRequest, file io.Reader) error

CreateFile creates a file in S3

func (*AmazonS3) DeleteDir

func (a *AmazonS3) DeleteDir(project, path string) error

DeleteDir deletes a directory in S3

func (*AmazonS3) DeleteFile

func (a *AmazonS3) DeleteFile(project, path string) error

DeleteFile deletes a file from S3

func (*AmazonS3) GetStoreType

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

GetStoreType returns the file store type

func (*AmazonS3) ListDir

func (a *AmazonS3) ListDir(project string, req *model.ListFilesRequest) ([]*model.ListFilesResponse, error)

ListDir lists a directory in S3

func (*AmazonS3) ReadFile

func (a *AmazonS3) ReadFile(project, 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