Documentation ¶
Index ¶
- func Archive(ctx *task.Context, src, dest string) error
- func ArchiveTGZ(ctx *task.Context, src, dest string) error
- func ArchiveZip(ctx *task.Context, src, dest string) error
- func Copy(ctx *task.Context, fromPath, toPath string) error
- func CreateDirectory(ctx *task.Context, path string) error
- func CreateDirectoryR(ctx *task.Context, path string) error
- func CreateFile(ctx *task.Context, path string) (*os.File, error)
- func CreateFileR(ctx *task.Context, path string) (*os.File, error)
- func DirectoryExists(path string) (bool, error)
- func DownloadHTTP(ctx *task.Context, url string, toPath string) error
- func DownloadS3(ctx *task.Context, from S3Object, toPath string, profile string) error
- func Env(key, fallback string) string
- func ExitCode(err error) int
- func FileExists(path string) (bool, error)
- func HeadS3(ctx *task.Context, from S3Object, profile string) error
- func IsDirectoryEmpty(path string) (bool, error)
- func IsFileEmpty(path string) (bool, error)
- func IsNotRan(err error) bool
- func LogCmd(ctx *task.Context, cmd *exec.Cmd)
- func Move(ctx *task.Context, fromPath, toPath string) error
- func Remove(ctx *task.Context, path string) error
- func Run(ctx *task.Context, name string, args ...string) error
- func RunBuffered(ctx *task.Context, name string, args ...string) (string, string, string, error)
- func RunCmd(ctx *task.Context, cmd *exec.Cmd) error
- func RunOutput(ctx *task.Context, name string, args ...string) (string, error)
- func Unarchive(ctx *task.Context, src, dest string) error
- func UnarchiveTGZ(ctx *task.Context, src, dest string) error
- func UnarchiveZip(ctx *task.Context, src, dest string) error
- func UploadReaderToS3(ctx *task.Context, reader io.Reader, to S3Object, profile string) error
- func UploadS3(ctx *task.Context, fromPath string, to S3Object, profile string) error
- type S3Object
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Archive ¶
Archive will create an archive from the src file or directory and use the destination's extension to determine which format to use.
func ArchiveTGZ ¶
ArchiveTGZ will archive using tar and gzip to the destination.
func ArchiveZip ¶
ArchiveZip will zip the src into a a zipped file at the destination.
func CreateDirectory ¶
CreateDirectory creates a directory.
func CreateDirectoryR ¶
CreateDirectoryR creates a directory recursively.
func CreateFile ¶
CreateFile creates a file.
func CreateFileR ¶
CreateFileR creates a file ensuring all the directories are created recursively.
func DirectoryExists ¶
DirectoryExists indicates if the directory exists.
func DownloadHTTP ¶
DownloadHTTP issues a GET request against the provided url and downloads the contents to the toPath.
This method will retry HTTP requests that fail.
func DownloadS3 ¶
DownloadS3 downloads an object from S3.
func FileExists ¶
FileExists indicates if the file exists.
func IsDirectoryEmpty ¶
IsDirectoryEmpty indicates if the directory is empty.
func IsFileEmpty ¶
IsFileEmpty indicates if the file is empty.
func RunBuffered ¶
RunBuffered runs the specified command and returns the actual command exectued, stdout, and stderr.
func UnarchiveTGZ ¶
UnarchiveTGZ decompresses the src tgz file into the destination.
func UnarchiveZip ¶
UnarchiveZip decompresses the src zip file into the destination.
func UploadReaderToS3 ¶
UploadReaderToS3 uploads the contents of the provided reader to S3.