archive

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive interface {
	RemoveFile(bucketName string, destinationFolder string, filePath string) error

	// UploadFile: upload a local file to a remote destination.
	// The local file name should be passed in as full file Path.
	UploadFile(bucketName string, destinationFolder string, filePath string) error

	// CheckFileIntergrity: to ensure that the local file and the upload version is identical.
	CheckFileIntergrity(bucketName string, destinationFolder string, filePath string) (bool, error)

	// GetReserveDataBucketName: return pre-configured remote Bucket to store Reserve Data
	GetReserveDataBucketName() string

	// GetLogBucketName: return pre-configured remote Bucket to store logs
	GetLogBucketName() string
}

Archive is used to store obsolete files.

type S3Archive

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

func NewS3Archive

func NewS3Archive(conf config.AWSConfig) *S3Archive

func (*S3Archive) CheckFileIntergrity

func (s *S3Archive) CheckFileIntergrity(bucketName string, awsfolderPath string, filePath string) (bool, error)

func (*S3Archive) GetLogBucketName

func (s *S3Archive) GetLogBucketName() string

func (*S3Archive) GetReserveDataBucketName

func (s *S3Archive) GetReserveDataBucketName() string

func (*S3Archive) RemoveFile

func (s *S3Archive) RemoveFile(bucketName string, awsfolderPath string, filePath string) error

func (*S3Archive) UploadFile

func (s *S3Archive) UploadFile(bucketName string, awsfolderPath string, filePath string) error

Jump to

Keyboard shortcuts

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