s3

package
v0.0.0-...-76c1feb Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2021 License: AGPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetS3ReleaseBucket

func GetS3ReleaseBucket() (bucketName string)

GetS3ReleaseBucket returns bucket name for public releases (public read access, private write access)

func GetS3UploadBucket

func GetS3UploadBucket() (bucketName string)

GetS3UploadBucket returns bucket name for uploading log files (private read access, public write access)

func GetVersionFromName

func GetVersionFromName(name string) (version uint64, err error)

GetVersionFromName return the version for the given name

func GetVersionPartsFromVersion

func GetVersionPartsFromVersion(version uint64) (major uint64, minor uint64, patch uint64, err error)

GetVersionPartsFromVersion converts the merged version number back into parts.

Types

type Helper

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

Helper encapsulates the s3 session state for interactive with our default S3 bucket with appropriate credentials

func MakeS3SessionForDownloadWithBucket

func MakeS3SessionForDownloadWithBucket(awsBucket string) (helper Helper, err error)

MakeS3SessionForDownloadWithBucket download from bucket

func MakeS3SessionForUploadWithBucket

func MakeS3SessionForUploadWithBucket(awsBucket string) (helper Helper, err error)

MakeS3SessionForUploadWithBucket upload to bucket

func (*Helper) DownloadFile

func (helper *Helper) DownloadFile(name string, writer io.WriterAt) error

DownloadFile downloads the specified file to the provided Writer

func (*Helper) GetLatestPackageFilesVersion

func (helper *Helper) GetLatestPackageFilesVersion(channel string, packagePrefix string) (maxVersion uint64, maxVersionName string, err error)

GetLatestPackageFilesVersion returns the latest version details for a given standard filename prefix

func (*Helper) GetLatestPackageVersion

func (helper *Helper) GetLatestPackageVersion(channel string, packageName string) (maxVersion uint64, maxVersionName string, err error)

GetLatestPackageVersion returns the latest version details for a given package name (eg node, install, tools)

func (*Helper) GetLatestUpdateVersion

func (helper *Helper) GetLatestUpdateVersion(channel string) (maxVersion uint64, maxVersionName string, err error)

GetLatestUpdateVersion returns the latest version details for the 'node' package

func (*Helper) GetPackageFilesVersion

func (helper *Helper) GetPackageFilesVersion(channel string, pkgFiles string, specificVersion uint64) (maxVersion uint64, maxVersionName string, err error)

GetPackageFilesVersion return the package version

func (*Helper) GetPackageVersion

func (helper *Helper) GetPackageVersion(channel string, pkg string, specificVersion uint64) (maxVersion uint64, maxVersionName string, err error)

GetPackageVersion return the package version

func (*Helper) GetUpdateVersion

func (helper *Helper) GetUpdateVersion(channel string, specificVersion uint64) (maxVersion uint64, maxVersionName string, err error)

GetUpdateVersion ensures the specified version is present and returns the name of the file, if found Or if specificVersion == 0, returns the name of the file with the max version

func (*Helper) UploadChannelFiles

func (helper *Helper) UploadChannelFiles(channel string, files []string) error

UploadChannelFiles uploads the provided set of package files in a batch

func (*Helper) UploadFileStream

func (helper *Helper) UploadFileStream(targetFile string, reader io.Reader) error

UploadFileStream sends file as stream to s3

func (*Helper) UploadFiles

func (helper *Helper) UploadFiles(subFolder string, files []string) error

UploadFiles uploads the provided set of files in a batch

Jump to

Keyboard shortcuts

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