s3

package
v0.0.0-...-cbea63e Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2021 License: Apache-2.0, MIT Imports: 14 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type S3Mgr

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

func New

func New() *S3Mgr

func (*S3Mgr) Delete

func (s *S3Mgr) Delete(ps *dao.ProvisionedService) error

Delete removes a downloaded file, incase of errors copying

func (*S3Mgr) Download

func (s *S3Mgr) Download(ps *dao.ProvisionedService) (string, error)

Download will download the binary/JAR for this provisioned service from S3 and store within the local filesystem, returning the full path to the new file

func (*S3Mgr) DownloadFile

func (s *S3Mgr) DownloadFile(bucketName, remotePath, localPath string) (string, error)

DownloadFile retrieves a file from S3

func (*S3Mgr) Exists

func (s *S3Mgr) Exists(ps *dao.ProvisionedService) (bool, error)

Exists will check if this provisioned service exists on S3 (this is our test of whether it is a valid provisioned service)

func (*S3Mgr) FileExists

func (s *S3Mgr) FileExists(bucketName, remotePath string) (bool, error)

FileExists checks whether a file exists in S3

func (*S3Mgr) IsDownloaded

func (s *S3Mgr) IsDownloaded(ps *dao.ProvisionedService) (bool, string)

IsDownloaded will check if we have already downloaded this binary/JAR to the local filesystem, returning the full path to the file

func (*S3Mgr) Setup

func (s *S3Mgr) Setup() error

Setup is not an init() function since it must not be run during the build process

func (*S3Mgr) VerifyBinary

func (s *S3Mgr) VerifyBinary(ps *dao.ProvisionedService) error

VerifyBinary downloads the md5sum for a binary if it exists and checks it against the downloaded binary. If the md5sum file does not exist

Jump to

Keyboard shortcuts

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