Documentation ¶
Index ¶
- Variables
- func DownloadAndProcessArtifact(ctx *log.Context, downloadDir string, ...) (string, error)
- func DownloadAndProcessScript(ctx *log.Context, url, downloadDir string, ...) (string, error)
- func GetFileFromPosition(path string, position int64) ([]byte, error)
- func PostProcessFile(path string) error
- func SaveScriptFile(filePath string, content string) error
- func TailFile(path string, max int64) ([]byte, error)
- func UrlToFileName(fileURL string) (string, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var UseMockSASDownloadFailure bool = false
Functions ¶
func DownloadAndProcessArtifact ¶
func DownloadAndProcessArtifact(ctx *log.Context, downloadDir string, artifact *handlersettings.UnifiedArtifact) (string, error)
func DownloadAndProcessScript ¶
func DownloadAndProcessScript(ctx *log.Context, url, downloadDir string, cfg *handlersettings.HandlerSettings) (string, error)
func PostProcessFile ¶
postProcessFile determines if path is a script file based on heuristics and makes in-place changes to the file with some post-processing such as BOM and DOS-line endings fixes to make the script POSIX-friendly.
func SaveScriptFile ¶
func TailFile ¶
TailFile returns the last max bytes (or the entire file if the file size is smaller than max) from the file at path. If the file does not exist, it returns a nil slice and no error.
func UrlToFileName ¶
UrlToFileName parses given URL and returns the section after the last slash character of the path segment to be used as a file name. If a value is not found, an error is returned.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.