cmd

package
v0.0.0-...-80e1bb4 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeleteFileIfExistsE

func DeleteFileIfExistsE(filepath string) error

DeleteFileIfExistsE will delete a file if it is present

func Execute

func Execute()

Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.

func FileChecksum

func FileChecksum(filename string) string

FileChecksum computes the checksum of a file

func FileChecksumE

func FileChecksumE(filename string) (string, error)

FileChecksumE computes the checksum of a file

func FolderChecksum

func FolderChecksum(folderPath, tempFile string) string

FolderChecksum computes the checksum of a folder(combination of checksums of all files of a folder)

func FolderChecksumE

func FolderChecksumE(folderPath, tempFile string) (string, error)

FolderChecksumE computes the checksum of a folder(combination of checksums of all files of a folder)

func GetFilesOfFolderE

func GetFilesOfFolderE(folderPath string) ([]string, error)

GetFilesOfFolderE returns all the files in a folder

func GetStringFlag

func GetStringFlag(flags *pflag.FlagSet, flagName string) string

GetStringFlag gets the value of a string flag with error handling

func ObjectOnS3

func ObjectOnS3(s3Bucket, s3Key string) bool

ObjectOnS3 checks if an object exists on S3

func ObjectOnS3E

func ObjectOnS3E(s3Bucket, s3Key string) (bool, error)

ObjectOnS3E checks if an object exists on S3

func PublishIfNotAlreadyOnS3

func PublishIfNotAlreadyOnS3(s3Bucket, s3Key, zipFileLocation string)

PublishIfNotAlreadyOnS3 uploads a file to S3 if it is not already present

func ReadVersion

func ReadVersion(moduleFolder string) string

ReadVersion reads the VERSION.txt file from the module folder

func ReadVersionE

func ReadVersionE(moduleFolder string) (string, error)

ReadVersionE reads the VERSION.txt file from the module folder

func ValidateFlags

func ValidateFlags(flags *pflag.FlagSet)

ValidateFlags checks if the flags passed result in a compatible set

func Zip

func Zip(sourceFolder, zipFileLocation string)

Zip packages a folder to a zip file

func ZipE

func ZipE(sourceFolder, zipFileLocation string) error

ZipE packages a folder to a zip file

func ZipModule

func ZipModule(sourceFolder, tempDir string) string

ZipModule creates a Zip of the module with name <FOLDER>-<VERSION>.zip

Types

This section is empty.

Jump to

Keyboard shortcuts

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